WORK-359
Setting up your dashboard 0 entities found · 8/31 branches scanned
ID:WORK-359Status:done

Per-instance variant resolution and merge over base config

Resolve each variant axis per instance and merge matching deltas over the base config before layout assembly, reusing the existing mergeThemeConfig machinery.

Priority:highComplexity:complexMilestone:v0.20.0Source:SPEC-091

Criteria completion

Criteria completion: 3 of 3 (100%) checked; history from Jun 9 to Jun 90%25%50%75%100%Jun 9Jun 9
Branches 2
History 4
  1. b6c8084
    • ☑ Per instance the engine resolves modifier values (with `default` fallback) and merges `variants[axis][value]` over base **before** assembly; no separate condition language and no `defaultVariants`.
    • ☑ Merge reuses `mergeThemeConfig` by-key semantics (delta `layout.root` replaces; new wrapper keys add) in `variants` declaration order; the layout assembler is unchanged.
    • ☑ Themes can add/override a rune's variants via `mergeThemeConfig`.
    by bjornolofandersson
  2. 4ece0ce
    Content editedby Claude
    plan: mark Batch 1 (SPEC-091 engine config variants) done
  3. 9c0545a
    Created (ready)by bjornolofandersson
  4. 1da59d6
    Content editedby Claude
    plan: add v0.20.0 milestone and break down SPEC-086..091 into work items

Acceptance Criteria

  • Per instance the engine resolves modifier values (with default fallback) and merges variants[axis][value] over base before assembly; no separate condition language and no defaultVariants.
  • Merge reuses mergeThemeConfig by-key semantics (delta layout.root replaces; new wrapper keys add) in variants declaration order; the layout assembler is unchanged.
  • Themes can add/override a rune's variants via mergeThemeConfig.

Approach

Resolution is per-instance and happens before layout assembly; the static layout primitive is untouched. mergeThemeConfig in packages/transform/src/merge.ts. SPEC-091 §2–§3, §6.

References

  • SPEC-091

Resolution

Completed: 2026-06-09

Branch: claude/spec-091-engine-variants

What was done

  • packages/transform/src/engine.ts: resolveVariantConfig resolves each axis's modifier value (with default) and merges matching deltas over base — in declaration order — before layout assembly.
  • packages/transform/src/merge.ts: exported mergeRuneConfig (reused by the engine) and made it merge variants by axis→value so themes can extend them.

Notes

  • No separate condition language, no defaultVariants; the layout assembler is unchanged.