Skip to content

fix(cli): experimental theme editor - a group height narrowed off one control stays a control height show lists - #13224

Merged
josephfarina merged 4 commits into
feature/theme-editorfrom
theme-editor-only-narrowing
Nov 21, 2026
Merged

josephfarina merged 4 commits into
feature/theme-editorfrom
theme-editor-only-narrowing

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #13039 (merged into the theme branch).

User impact

With the theme editor change in #13039, start from a theme that saves one height on the inputs (height 31px --on inputs), so show lists the inputs as apart from the buttons. Then run set <theme> height 40px --on text-input --only. The editor copies 31px onto the other inputs, each with --only, so that text-input alone changes. show then stopped listing those inputs, though they still drew 31px beside 28/32/36px buttons. A later shared height read the copies as heights kept on one control and kept them, so the inputs never joined the other controls.

Problem and solution fit

The copies the narrowing writes and a height a person kept on one control with --only had the same saved shape. The fix marks them: the narrowing saves each copy with narrowed: true, and only a copy with the marker counts as the group's plain height for show and for a later shared height. The editor reads the field as a boolean; any other value is dropped with a note. A height kept on one control alone, as an older editor saved it with --only, has no marker and stays that control's own height (spec:AST-050 DEC-16).

Expected behavior and authority

spec:AST-050 DEC-16: show lists each saved length height that keeps some controls apart at a size; a control height replaces at that size the heights kept on one control, and one kept for every size stays that control's own height at the other sizes.

Evidence

  • After the narrowing, every copied control is saved with narrowed: true, and show lists every control that holds a copy and is drawn apart from the buttons; after one copy is undone, show still lists the others. A later shared height replaces the copies on the controls that take the shared height (a text area and a complex selector keep theirs, as DEC-16 says), show lists none of them, and its note says the inputs' 31px stays every control's height at sm and lg.
  • Two older --only 40px heights (selector and number input) beside text-input's own size token, then a shared 32px: each keeps its own 40px at sm and lg, and no control gets 40px from them.
  • An older editor's saved height 40px --on text-input --only, then a shared 32px on buttons: text-input keeps its own 40px size tokens at sm and lg, and no control gets 40px from it.

Scope

  • packages/cli/api/theme-edit/_settings.mjs: narrowed in the saved setting's fields, read as a boolean; narrowedGroupHeight reads the marker.
  • packages/cli/api/theme-edit/_edit.mjs: the narrowing writes narrowed: true; ownHeightsReplaced skips marked copies; the shared-height note names the carried value.
  • packages/cli/api/theme-edit/theme-control-heights.test.mjs: the narrowing test checks show and a later shared height on every copied input; new tests for an older saved --only height and for undoing one copy.
  • .changeset/experimental-theme-narrowed-height-listed.md.

Size: one finding (a narrowed --only height must stay the group's height), about 60 lines of code; the rest is its tests and changeset, and the marker, its reader and the note fix only work together.

Testing

  • npx vitest run packages/cli/api/theme-edit/theme-control-heights.test.mjs --project node (the narrowing test fails before the change).
  • Full packages/cli/api/theme-edit directory: 558 files pass, 1 skipped.

preflight: pass 80ddb2c (same patch as 86276d7, which passed; rebased onto the theme branch with no conflict)

replay: worse 0 at 80ddb2c

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 2:05pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 2:15 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 21, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's ruling, and two fixes are needed whatever it is.

This change refines control-height behaviour that only #13039 adds: spec:AST-050 DEC-16 is approved there but is not on main, and it does not say whether the --only copies a narrowing leaves on a group's other controls are that group's height or heights kept on one control. An engineering owner (the author qualifies) can record that ruling in a comment on this pull request, or the review can wait until DEC-16 is on main.

Fixes needed:

  • After a narrowing, set <theme> height 32px --on button reports that text-input's 40px "stays every control's height at sm and lg", but every control takes the inputs' 31px there and text-input's 40px is gone, because the kept-sizes clause of the note at _edit.mjs:7422 now follows the own-height clause; move it after the replaced-heights clause with the carried value, and assert the note in the narrowing test.
  • The description says a later shared height "leaves no per-input size tokens", but text-input keeps its own 31px --size-element-sm and --size-element-lg, so please say the other inputs get no size tokens of their own.

The narrowing test fails on the base code and all 42 tests in the file pass on this head.

Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • Before this change, show stopped listing the other inputs after a narrowing: verified (the narrowing test's show assertion fails on the base code).
  • Before this change, a later shared height kept the copies as each input's own height: verified (on the base code each input keeps its own 31px tokens at sm and lg).
  • The copies are told apart from the saved settings with no new field and count as the group's height for show and for a later shared height: verified (narrowedGroupHeight and setsControlHeight in _settings.mjs; run on this head).
  • A height kept on one control alone, as an older editor saved it, stays that control's own height: verified (new test passes).
  • After the narrowing, show lists the selector and the other inputs: verified (ten entries).
  • A later shared height leaves no per-input size tokens: false (text-input keeps two of its own).
  • A later shared height leaves nothing under missed: verified (run on this head).
  • An older saved --only 40px on the text input, then a shared 32px on buttons, keeps the text input's own 40px at sm and lg and gives no control 40px: verified (new test).
  • The scope names the three changed files and functions: verified.
  • No release note is needed because the behaviour is not released: verified (absent from main; the pull request below carries the release note).
  • The narrowing test fails before the change: verified (run against the base code).
  • The whole theme-edit test directory passes, 548 files: file count verified; not rerun in this review.

Files:

  • packages/cli/api/theme-edit/_edit.mjs: first fix (the shared-height note it now reaches)
  • packages/cli/api/theme-edit/_settings.mjs: clear, with optional JSDoc and edge-case notes
  • packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear (the narrowing test checks the selector only)

Automated review (maintainer link)

Comment thread packages/cli/api/theme-edit/_edit.mjs Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's ruling, and two fixes are needed whatever it is.

This change refines control-height behaviour that only #13039 adds: spec:AST-050 DEC-16 is approved there but is not on main, and it does not say whether the --only copies a narrowing leaves on a group's other controls are that group's height or heights kept on one control. An engineering owner records that ruling by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or the review waits until DEC-16 is on main.

Fixes needed:

  • After a narrowing, set <theme> height 32px --on button reports that text-input's 40px "stays every control's height at sm and lg", but every control takes the inputs' 31px there, because the kept-sizes clause of the shared-height note in _edit.mjs now follows the own-height clause; move it after the replaced-heights clause with the carried value, and assert the note in the narrowing test.
  • The description says a later shared height "leaves no per-input size tokens", but text-input keeps its own 31px --size-element-sm and --size-element-lg, so please say the other inputs get no size tokens of their own.

The narrowing test fails on the base code, and all 43 tests in its file pass on this head.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • With #13039, after a height saved on the inputs is narrowed off text-input, show stopped listing the other inputs: verified (the narrowing test's show assertion fails on the base code).
  • Those inputs still drew 31px beside 28/32/36px buttons: verified (the saved copies; this head's show entries name those sizes).
  • Before this change, a later shared height kept the copies as each input's own height: verified (on the base code each input keeps its own 31px at sm and lg).
  • The copies are told apart from the saved settings with no new field and count as the group's height for show and for a later shared height: verified (narrowedGroupHeight and setsControlHeight in _settings.mjs; run on this head).
  • A height kept on one control alone, as an older editor saved it, stays that control's own height: verified (new test passes).
  • After the narrowing, show lists the selector and the other inputs: verified (ten entries).
  • A later shared height leaves no per-input size tokens: false (text-input keeps two of its own).
  • A later shared height leaves nothing under missed: verified (run on this head).
  • An older saved --only 40px on the text input, then a shared 32px on buttons, keeps the text input's own 40px at sm and lg and gives no control 40px: verified (new test).
  • The scope names the three changed files and functions: verified.
  • No release note is needed because the behaviour is not released: verified (absent from main; the pull request below carries the release note).
  • The narrowing test fails before the change: verified (run against the base code).
  • The whole theme-edit test directory passes, 548 files: file count verified; not rerun in this review (the changed test file and 17 related files pass).

Files:

  • packages/cli/api/theme-edit/_edit.mjs: first fix (the shared-height note it now reaches)
  • packages/cli/api/theme-edit/_settings.mjs: clear, with a non-blocking JSDoc note
  • packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear (the narrowing test checks the selector only)

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's ruling, and fixes are needed whatever it is.

This change refines control-height behaviour that only #13039 adds: spec:AST-050 DEC-16 is approved there but is not on main, and it does not say whether the --only copies a narrowing leaves on a group's other controls are that group's height or heights kept on one control. An engineering owner records that ruling by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or the review waits until DEC-16 is on main.

Fixes needed:

  • After a narrowing, set <theme> height 32px --on button reports that text-input's 40px "stays every control's height at sm and lg", but every control takes the inputs' 31px there, because the kept-sizes clause of the shared-height note in _edit.mjs now follows the own-height clause; move it after the replaced-heights clause with the carried value, and assert the note in the narrowing test.
  • The description says a later shared height "leaves no per-input size tokens", but text-input keeps its own 31px --size-element-sm and --size-element-lg, so please say the other inputs get no size tokens of their own.
  • Regression: since #13039 moved, the description's Stack line ("on main") and its testing line ("548 files pass") no longer match this head, because #13039 now targets feature/theme-editor and the theme-edit directory holds 554 test files, so please update both.

The narrowing test fails on the base code, and all 43 tests in its file pass on this head.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • The change is stacked on #13039: verified (this pull request targets #13039's branch); the stack sits "on main": false at this head (#13039 targets feature/theme-editor).
  • With #13039, after a height saved on the inputs is narrowed off text-input, show stopped listing the other inputs: verified (the narrowing test's show assertion fails on the base code).
  • Those inputs still drew 31px beside 28/32/36px buttons: verified (the saved copies; this head's show entries name those sizes).
  • Before this change, a later shared height kept the copies as each input's own height: verified (on the base code each input keeps its own 31px at sm and lg).
  • The copies are told apart from the saved settings with no new field and count as the group's height for show and for a later shared height: verified (narrowedGroupHeight and setsControlHeight in _settings.mjs; run on this head).
  • A height kept on one control alone, as an older editor saved it, stays that control's own height: verified (new test passes).
  • After the narrowing, show lists the selector and the other inputs: verified (ten entries).
  • A later shared height leaves no per-input size tokens: false (text-input keeps two of its own).
  • A later shared height leaves nothing under missed: verified (run on this head).
  • An older saved --only 40px on the text input, then a shared 32px on buttons, keeps the text input's own 40px at sm and lg and gives no control 40px: verified (new test).
  • The scope names the three changed files and functions: verified.
  • No release note is needed because the behaviour is not released: verified (absent from main; the pull request below carries the release note).
  • The narrowing test fails before the change: verified (run against the base code).
  • The whole theme-edit test directory passes, 548 files: count false at this head (554 test files); not rerun in this review (the changed test file and 17 related files pass).

Files:

  • packages/cli/api/theme-edit/_edit.mjs: first fix (the shared-height note it now reaches)
  • packages/cli/api/theme-edit/_settings.mjs: clear, with a non-blocking JSDoc note
  • packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear (the narrowing test checks the selector only and not the note)

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's ruling, and fixes are needed whatever it is.

This change refines control-height behaviour that only #13039 adds: spec:AST-050 DEC-16 is approved there but is not on main, and it does not say whether the --only copies a narrowing leaves on a group's other controls are that group's height or heights kept on one control. An engineering owner records that ruling by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or the review waits until DEC-16 is on main.

Fixes needed:

  • The group test in narrowedGroupHeight (_settings.mjs) now reads two --only heights an older editor kept on two inputs at one value as narrowed copies once any input has its own size token, so a later set <theme> height 32px --on button makes every control, buttons included, 40px at sm and lg; please recognise copies by something only the narrowing writes, such as a marker on each copy, and add that case as a test.
  • After a narrowing, set <theme> height 32px --on button still reports that text-input's 40px "stays every control's height at sm and lg" while every control takes the inputs' 31px there, because the kept-sizes clause of the shared-height note in _edit.mjs follows the own-height clause; please move it after the replaced-heights clause with the carried value and assert the note in the narrowing test.
  • The description still says a copy needs the same --only height on every other control and that show lists every input holding a copy, but one other control is now enough and the text area and complex selector hold copies that are rightly not listed, so please reword both.

The new undo test fails on the code before the last push, and all 44 tests in its file pass on this head.

Claims and files checked

Review mode: incremental; reason: none

changed rules (0): none

Claims:

  • The change is stacked on #13039, which targets feature/theme-editor: verified.
  • With #13039, after a height saved on the inputs is narrowed off text-input, show stopped listing the other inputs while they drew 31px beside 28/32/36px buttons: verified (the narrowing test's listing assertion fails on the base code).
  • Before this change a later shared height kept each copy as that input's own height: verified (on the base code each input keeps its own 31px at sm and lg).
  • The copies and a height kept on one control with --only had the same saved shape, and the fix adds no new field: verified.
  • A copy is recognised when the same --only height sits on every other control of the group and one control keeps its own size token: false at this head (one other control is enough).
  • Such copies count as the group's height for show and for a later shared height: verified.
  • A height an older editor kept on one control alone stays that control's own height: verified for one such height; false when two inputs hold the same value beside an input with its own size token.
  • The expected behaviour restates DEC-16 as approved on #13039: verified against that record, which is not on main.
  • After the narrowing, show lists every input that holds a copy: false as worded (the ten controls are listed; the text area and complex selector hold copies and are not).
  • After one copy is undone, show still lists the others: verified (new test, which fails before the last push).
  • A later shared height leaves no size tokens or heights on the inputs that held the copies and lists none of them, while text-input keeps the own sm and lg tokens the narrowing gave it: verified.
  • An older saved --only 40px on the text input, then a shared 32px on buttons, keeps the text input's own 40px at sm and lg and gives no control 40px: verified (new test).
  • The scope names the four changed files and functions: verified.
  • The narrowing test fails before the change: verified (base code).
  • The whole theme-edit test directory passes, 554 files: count verified (554 test files); not rerun in this review (the changed test file passes).
  • Release note: --only on one input leaves the inputs' other height on the other inputs as the group's height, show lists the controls it keeps apart, and a later shared height replaces it with the others: verified.

Files:

  • packages/cli/api/theme-edit/_settings.mjs: first fix (the group test)
  • packages/cli/api/theme-edit/_edit.mjs: second fix (the shared-height note it now reaches)
  • packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear
  • .changeset/experimental-theme-narrowed-height-listed.md: clear

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the theme-editor-only-narrowing branch from 312d683 to 47af44b Compare November 21, 2026 11:45
@josephfarina
josephfarina changed the base branch from theme-editor-control-heights to feature/theme-editor November 21, 2026 11:45
@josephfarina

Copy link
Copy Markdown
Contributor Author

Covers the editor data shape this pull request adds (the owner's ruling): height copies the narrowing writes onto a group's other controls carry an optional boolean narrowed: true in the saved settings; only the marker marks a copy, files without it read as before, and a later explicit set on that control replaces the copy.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 47af44b

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one fix to the shared-height note is needed.

The engineering owner's /approve-spec for this head and the ruling on the narrowed marker settle the open spec question, and the marker fixes both earlier findings.

  • The description says the rewritten shared-height note in _edit.mjs names the carried value, but for a replaced height that reads a size token (height calc(var(--size-element-sm) + 4px) --on button, then height 31px --on button) it says calc(var(--size-element-sm) + 4px) stays every control's height at sm and lg while the theme writes calc(28px + 4px) there, so please print carried(String(lastEverySize.value)) and assert it in the carry test, or reword the claim.

Non-blocking: the public ThemeEditSetting type could document narrowed, and the refusal for a pasted saved entry still calls narrowed a field the editor does not read.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • With the earlier editor change, a height saved on the inputs makes show list them apart from the buttons: verified.
  • Narrowing that height off the text input with --only copies it onto the other inputs with --only: verified.
  • Before this change, show then stopped listing those inputs while they drew 31px beside 28/32/36px buttons: verified (the narrowing test fails on the base code).
  • Before this change, a later shared height kept each copy as that input's own height: verified.
  • The copies and a height kept on one control had the same saved shape: verified.
  • The narrowing now saves each copy with narrowed: true: verified.
  • Only a marked copy counts as the group's height for show and for a later shared height: verified.
  • A marker value other than true is dropped with a note: verified.
  • A height an older editor kept on one control with --only has no marker and stays that control's own: verified.
  • The expected behaviour restates DEC-16 of the app-themes spec on the base branch: verified (it is not on main; the owner ruled it governs this head).
  • After the narrowing every copy is marked and show lists every control holding a copy that is drawn apart; after one copy is undone it lists the others: verified.
  • A later shared height replaces the copies on controls, the text area and complex selector keep theirs, show lists none, and the note says 31px stays every control's height at sm and lg: verified.
  • Two older --only 40px heights beside an input's own size token keep their own 40px at sm and lg after a shared 32px: verified.
  • An older --only 40px on the text input keeps its own 40px at sm and lg after a shared 32px, and no control gets 40px: verified.
  • Scope: the settings field is read as a boolean and the predicate reads the marker; the narrowing writes the marker and the own-height replacement skips marked copies: verified.
  • Scope: the shared-height note names the carried value: false for a replaced height that reads a size token (it names the saved expression).
  • The test file checks show and a later shared height on every copy, and adds tests for an older --only height and an undone copy: verified.
  • The narrowing test fails before the change: verified (the undo test fails too).
  • The whole theme-edit test directory passes (558 files, 1 skipped): the count matches the 558 test files; not rerun here.
  • Release note: --only on one input leaves the other inputs at the group's height, saved with narrowed: true, which show lists and a later shared height replaces; an unmarked --only height stays that control's own: verified.

Files:

  • packages/cli/api/theme-edit/_edit.mjs: the shared-height note value
  • packages/cli/api/theme-edit/_settings.mjs: clear (non-blocking: document narrowed in the public type)
  • packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear
  • .changeset/experimental-theme-narrowed-height-listed.md: clear

Automated review (maintainer link)

Comment thread packages/cli/api/theme-edit/_edit.mjs Resolved
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 86276d7

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: the shared-height note now names the value the theme writes at the other sizes, which resolves the earlier finding, and the engineering owner's /approve-spec for this head settles the spec question.

Non-blocking: the public ThemeEditSetting type could document narrowed, and the refusal for a pasted saved entry still calls narrowed a field the editor does not read.

Claims and files checked

Review mode: incremental; reason: none

changed rules (0): none

Claims:

  • With the earlier editor change, a height saved on the inputs makes show list them apart from the buttons: verified (show lists one inputs miss before the narrowing).
  • Narrowing that height off the text input with --only copies it onto the other inputs with --only: verified (twelve copies saved).
  • Before this change, show then stopped listing those inputs while they drew 31px beside 28/32/36px buttons: verified (the narrowing test fails on the base code).
  • Before this change, a later shared height kept each copy as that input's own height: verified (each input kept its own 31px at sm and lg).
  • The copies and a height kept on one control had the same saved shape: verified.
  • The narrowing now saves each copy with narrowed: true: verified (_edit.mjs:7003-7005).
  • Only a marked copy counts as the group's height for show and for a later shared height: verified (_settings.mjs:5053-5072, _edit.mjs:6938).
  • A marker value other than true is dropped with a note: verified (_settings.mjs:2346-2352).
  • A height an older editor kept on one control with --only has no marker and stays that control's own: verified (tests at :988 and :1029).
  • The expected behaviour restates the control-height decision of the app-themes spec on the base branch: verified (it is not on main; the owner approved it for this head).
  • After the narrowing every copy is marked and show lists every control holding a copy that is drawn apart; after one copy is undone it lists the others: verified (narrowing and undo tests).
  • A later shared height replaces the copies on controls, the text area and complex selector keep theirs, show lists none, and the note says 31px stays every control's height at sm and lg: verified.
  • Two older --only 40px heights beside an input's own size token keep their own 40px at sm and lg after a shared 32px: verified.
  • An older --only 40px on the text input keeps its own 40px at sm and lg after a shared 32px, and no control gets 40px: verified.
  • Scope: the settings field is read as a boolean and the predicate reads the marker; the narrowing writes the marker and the own-height replacement skips marked copies: verified.
  • Scope: the shared-height note names the carried value: verified (_edit.mjs:7607 prints the same resolved value the tokens get; the carry test asserts calc(28px + 4px)).
  • The test file checks show and a later shared height on every copy, and adds tests for an older --only height and an undone copy: verified.
  • The narrowing test fails before the change: verified (the undo and carry tests fail too).
  • The whole theme-edit test directory passes (558 files, 1 skipped): verified in part (the control-height file and the 17 related theme-edit test files pass; the rest of the directory was not rerun here).
  • Release note: --only on one input leaves the other inputs at the group's height, saved with narrowed: true, which show lists and a later shared height replaces; an unmarked --only height stays that control's own: verified.

Files:

  • packages/cli/api/theme-edit/_edit.mjs: clear
  • packages/cli/api/theme-edit/_settings.mjs: clear (non-blocking: document narrowed in the public type)
  • packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear
  • .changeset/experimental-theme-narrowed-height-listed.md: clear

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 13:44
… control stays a control height show lists

When --only gives one control its own height, the group's plain height
it replaced is copied onto the group's other controls, each with --only.
Those copies are the group's height, not heights kept on one control: show
lists the controls they keep apart, and a later shared height replaces
them with the others. A height kept on one control alone, as an older
editor saved it with --only, stays that control's own height.
…height after one is undone

A group height narrowed off one control is recognized by one other control
holding the same --only copy, so undoing one copy leaves the others the
group's height that show lists. Adds the release note for the narrowing.
…as the group's height

Telling the copies apart by their pattern also took two older heights saved
alike with --only for copies. The copies the narrowing writes are now saved
with narrowed: true, read as a boolean, and only a marked copy counts as the
group's height; a height kept on one control carries no mark. The note of a
later shared height names the height that stays at the other sizes.
…e carried value as the theme writes it

A replaced height that reads a size token is named with that token
resolved, as the theme writes it at the other sizes.
@josephfarina
josephfarina force-pushed the theme-editor-only-narrowing branch from 86276d7 to 80ddb2c Compare November 21, 2026 13:52
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 80ddb2c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: the --only narrowing now marks the copies it leaves on a group's other controls with narrowed: true, so show lists those inputs and a later shared height lines them up with every control, and the engineering owner's /approve-spec for this head settles the spec reading.

Non-blocking: the experimental ThemeEditSetting type could document narrowed, the refusal for a pasted saved entry still calls narrowed a field the editor does not read, and the note for a marker that is not true says the height is kept on its part alone even for an entry without --only.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • With the earlier editor change, a height saved on the inputs makes show list them apart from the buttons: verified (one inputs miss before the narrowing).
  • Narrowing that height off the text input with --only copies it onto the other inputs with --only: verified (twelve copies saved).
  • Before this change, show then stopped listing those inputs while they drew 31px beside 28/32/36px buttons: verified (no miss on the base code; Core's sizes are 28/32/36px).
  • Before this change, a later shared height kept each copy as that input's own height: verified (each input kept its own 31px at sm and lg).
  • The copies and a height kept on one control had the same saved shape: verified.
  • The narrowing now saves each copy with narrowed: true: verified (_edit.mjs:7003-7005).
  • Only a marked copy counts as the group's height for show and for a later shared height: verified (_settings.mjs:5053-5072, _edit.mjs:6938).
  • A marker value other than true is dropped with a note: verified (_settings.mjs:2346-2352).
  • A height an older editor kept on one control with --only has no marker and stays that control's own: verified (tests at :988 and :1029).
  • The expected behaviour restates the control-height decision of the app-themes spec: verified against the base branch's record; it is not on main, and the owner approved it for this head.
  • After the narrowing every copy is marked and show lists every control holding a copy that is drawn apart; after one copy is undone it lists the others: verified (ten, then nine).
  • A later shared height replaces the copies on controls, the text area and complex selector keep theirs, show lists none, and the note says 31px stays every control's height at sm and lg: verified.
  • Two older --only 40px heights beside an input's own size token keep their own 40px at sm and lg after a shared 32px, and no control gets 40px: verified (test at :988).
  • An older --only 40px on the text input keeps its own 40px at sm and lg after a shared 32px, and no control gets 40px: verified.
  • Scope: the settings field is read as a boolean and the predicate reads the marker; the narrowing writes the marker, the own-height replacement skips marked copies, and the shared-height note names the carried value: verified (_edit.mjs:7607; the carry test asserts calc(28px + 4px)).
  • The test file checks show and a later shared height on every copy, and adds tests for an older --only height and an undone copy: verified.
  • The size remark (about 60 lines of code): an estimate; the two modules change 38 lines, and size is not judged.
  • The narrowing test fails before the change: verified (the undo and carry tests fail too).
  • The whole theme-edit test directory passes (558 files, 1 skipped): verified in part (the control-height file and 44 related files pass; the directory now holds 560 test files and was not rerun in full).
  • The patch is the same as the previously reviewed revision, rebased with no conflict, and preflight passes: the identical patch is verified; preflight was not rerun.
  • Release note: --only on one input leaves the other inputs at the group's height, saved with narrowed: true, which show lists and a later shared height replaces; an unmarked --only height stays that control's own: verified.

Files:

  • packages/cli/api/theme-edit/_edit.mjs: clear (non-blocking: the pasted-entry refusal wording)
  • packages/cli/api/theme-edit/_settings.mjs: clear (non-blocking: the note for a marker that is not true)
  • packages/cli/api/theme-edit/theme-control-heights.test.mjs: clear
  • .changeset/experimental-theme-narrowed-height-listed.md: clear

Automated review (maintainer link)

// (`narrowed` is the narrowing's own mark: true or absent.)
if (s.narrowed != null && s.narrowed !== true) {
notes.push(
`${s.thing} was saved with narrowed ${JSON.stringify(s.narrowed)}, read as kept on ${s.on ?? 'its part'} alone`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this note says "read as kept on alone" for any entry, but an entry without only (a hand edit such as narrowed: "yes" on inputs) is a plain group height, not one kept on one part. Saying the marker was dropped (for example read without narrowed) stays true in both cases.

@josephfarina
josephfarina merged commit acadbc3 into feature/theme-editor Nov 21, 2026
9 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
… control stays a control height show lists (#13224)

Reviewed pull request #13224, merged into the theme working branch. It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
- #13284 experimental theme: the newer-recipe release note agrees with the kept-palette one
- #13159 fix(cli): experimental theme editor - rounder corners never make the chat corners less round
- #13243 set: a text size token a part never reads goes into the one its held parts read
- #13299 experimental theme: text in a see-through region is measured over the region as drawn
- #12772 experimental theme how: a label that names the spacing or corners setting reads its value as that setting's; sans after a kind of typeface is the typeface
- #12773 experimental theme how: a contradiction holds back only its own pair; a decimal is one value; a color for the whole theme takes its role
- #13309 perf(cli): theme how makes its every-word check's patterns once per lexicon
- #13224 fix(cli): experimental theme editor - a group height narrowed off one control stays a control height show lists
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13377.

@github-actions
github-actions Bot deleted the theme-editor-only-narrowing branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 80ddb2c7 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant