feat(layout): Option A migration — in-repo configs, fixtures, docs to seg/h/v (2de.16)#108
Merged
Merged
Conversation
… seg/h/v (2de.16)
Migrates every config, demo, fixture, and doc example in the repo to the
Option A shape grammar (bare string / { seg, when } / { h/v: [...], when }).
Old layout-row sugar and cells remain accepted until 2de.19.
Changes:
- DEFAULT_DSL_CONFIG.root: drop outer vertical wrapper; single-row default is
a bare horizontal container { kind:"container", direction:"horizontal" }
(canonical equivalent of { h:["directory","git","model","session","today","context"] })
- src/demo/statusline.json5: layout:[[...]] → root: { h: [...] }
- test/fixtures/steel-thread.json5: same
- All test inline configs (dsl-actions, dsl-state-cascade, dsl-multiline,
dsl-picker, dsl-helpers, dsl-formatters-*, segment-render-unit, daemon-render-cache,
daemon-debug, dsl-theme-picker-recolor, cli-lint, config-resolution): layout:[[...]] → root
- CLAUDE.md: authoring-surface examples updated; renderer doc fixed (config.root not config.layout)
- Equivalence pins added to default-dsl-config.test.ts:
{ h:[...] } spelling is byte-identical render to DEFAULT_DSL_CONFIG.root;
deep-nesting { v:[{ h:[a,b] },{ h:[c,d] }] } is byte-identical to layout:[["a","b"],["c","d"]]
- Remove unused requireStringSpec import in src/config/loader/layout.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
seg/h/v). Oldlayout-row sugar andcellsnodes remain accepted until 2de.19.{ h: ["directory","git","model","session","today","context"] })default-dsl-config.test.ts: assert A-grammar lowers to byte-identical ANSI output vs. the previous spelling, for both the default root and a deep-nesting two-row fixturerequireStringSpecimport insrc/config/loader/layout.tsconfig.rootnotconfig.layout)Test plan
pnpm typecheck— cleanpnpm lint— cleanpnpm check:protocol— 12 constants verifiedpnpm test— 1197 tests pass (2 pre-existing flaky daemon integration tests; pass on rerun){ h:[...] }and{ v:[{ h: }, ...] }render byte-identical to old spellingslayout:sugar outside the loader+its tests (dsl-loader, dsl-merge, config-schema, dsl-multiline error/conflict cases)