Skip to content

experimental theme: a kept palette stays as saved through hand edits and undo - #13091

Merged
josephfarina merged 1 commit into
feature/theme-editorfrom
theme-kept-palette-hand-edits
Nov 21, 2026
Merged

josephfarina merged 1 commit into
feature/theme-editorfrom
theme-kept-palette-hand-edits

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What users see

For a theme whose palette a newer CLI made (a recipe this CLI doesn't make), which opens with its palette kept as saved:

  • A setting changed by hand in <theme>.settings.json that leaves the whole-theme color settings alone (corners, or a part's color) no longer recolors anything: every color the settings module writes out stays as written. A hand edit that changes a whole-theme color setting still maps every color the module writes out this CLI's way.
  • A whole-theme color token the palette maps (--color-text-accent, say) comes back to its palette shade once undo takes its setting away; one set with this CLI and removed by hand takes this CLI's shade of the saved palette. A token the saved module never mapped gains no value from a set and its undo.
  • After a color is changed by hand away from the saved palette, setting it back to its saved seed (set <theme> accent <saved seed>) is the way back; for a color the palette has no shades for, taking it out of the file is. The refusal names that set when that setting is the only one off, and otherwise lists each setting to put back by hand. A color the theme's own source sets is named in that file, with no set. The result of the way back compares nothing (the settings before it don't build) and says so. Every other command is refused, except an undo whose step puts every color back at its saved seed. Beside the accent dial, a whole-theme --color-accent isn't something the kept palette is made from, so it saves as an exact value (show, set and undo agree); without the dial it's still refused.
  • The refusal reads: "'s colors use the recipe, which this Astryx CLI () does not make; its palette is kept as saved. Changes to what the palette is made from (the accent, neutral and status colors, the vibrancy) need a CLI that makes that recipe; other changes, including exact color tokens, a part's colors, the mode and the base, save as usual. Nothing was changed."

What this closes

The four cases left open by the change that lets such a theme open:

  • a hand-edited non-color setting remapped the colors the module writes out: now kept;
  • a whole-theme token removed by hand fell back to the base theme's color: now takes the palette's shade;
  • a seed changed by hand refused every command, the way back included: setting it back now opens the theme;
  • a whole-theme --color-accent added by hand beside the accent dial passed show but was refused by undo: now saved as an exact value by both.

Why

These are the cases the review of the change that lets such a theme open left open: a hand edit remapped written-out colors, a hand-removed token fell back to the base theme's color, set + named undo could add a mapped value the theme never had, the way back from a hand-changed color was refused, and the refusal promised a release.

How

  • The settings module records, beside its settings stamp, a stamp of the whole-theme color-token settings it was built from; a hand edit that leaves those alone keeps every written-out half.
  • On a kept palette, a token the palette maps that a setting writes in both modes is written as a pair, so the next build knows it as the palette's once the setting goes; a module written for a kept palette whose settings set a whole-theme color for both modes carries a line saying so; there a token written as a single value was never the palette's and is not kept, and in any other module, a newer CLI's included, it is still the mapping's own.
  • From settings already changed by hand away from the saved palette, a change is accepted when every color the file names (that the saved palette has shades for) is named at its saved seed, with the saved vibrancy; the build of the hand-changed settings before it is skipped instead of refused.
  • Beside the accent dial, a whole-theme --color-accent isn't something the kept palette is made from, so it saves as an exact value (show, set, undo agree); without the dial it's still refused.

Acceptance check: a real theme saved with a palette recipe this CLI doesn't make

A theme saved with astryx-oklch-v3, opened with this branch stacked on its base and the state-words change, with Core and theme-neutral packed:

  • non-color edit (set <theme> padding 8px --on card): ok
  • open (show): ok
  • build (theme build): ok
  • undo: the settings return to the theme as this CLI first saved it (the first save drops --only flags that change nothing and entries hidden by a later one, as AST-050 DEC-11 says on main)
  • color edit (set <theme> accent '#0d6efd'): refused with the text above, no install line; palette and settings unchanged
  • named undo of a page color set for one mode: exit 0, no trace of it in the settings, module or CSS

Test plan

  • theme-palette-newer-recipe-opens.test.mjs, new cases (each fails before this change, except the guard below):
    • a non-color setting changed by hand on a theme with no base keeps every written-out color, #FFF included;
    • a token the module doesn't map gains nothing from set + named undo;
    • a whole-theme token the palette maps, set for both modes and removed by hand, shows its palette shade again;
    • after a hand-changed accent, set accent <saved seed> and undo open the theme again with the palette unchanged; corners is still refused;
    • a hand-added whole-theme --color-accent beside the accent dial is built by show, and set and undo go on from it;
    • the refusal names a set when one setting is off, and each setting to put back when two are;
    • a hand-changed color the theme's own source sets is named in that file, with no set;
    • the refusal's exact text, everywhere it's checked.
  • Guard (passes before and after): a token a newer CLI set as one value, undone with no recorded shades, takes the mapping's shade, never the base theme's.
  • The theme-edit, theme, parity and experimental suites: no new failures against the base.

Writing rubric results

Run over the AST-050 DEC-11 sentence this change adds:

R1 narration: none; the sentence states what the editor does.
R2 research: none in the record.
R3 evidence: none cited; no pull request, issue or commit named.
R4 rejected alternatives: none added.
R5 change references: none.
R6 open questions: none added.
R7 project status: none.

AST-050 DEC-11 is limited to a theme not edited by hand by the change that lets such a theme open; this change, which fixes the hand-edited cases and the named undo, puts the wider sentence back.

preflight: pass 2ed189c (review deferred to batch: subagent cap)
replay: worse 0 at 2ed189c

@vercel

vercel Bot commented Nov 20, 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 1:37am UTC

Request Review

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

astracat-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 1:46 AM UTC

@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.

This needs a spec decision and three fixes before it can be approved.

The kept-palette behaviours changed here are in no current record on main: the only text is the AST-050 DEC-11 paragraph that #12735 adds, and it still says a whole-theme accent token change is refused. An engineering owner (the author qualifies) can record these behaviours there and approve with /approve-spec <full head SHA>, or name the current record that already covers them.

Blocking

  • From a hand-changed accent, an undo back to a step with no accent dial is accepted, so the theme's --color-accent falls back to the base theme's value and set <theme> accent <saved seed> is then refused, because back in _palette.mjs (lines 1154-1158) checks only the colors the new settings still name.
  • A palette-mapped token set for both modes and then removed by hand comes back at this CLI's stop instead of the saved module's (_settings.mjs lines 9059-9060, while undo restores it from the history), so read the history on that path too or narrow the "by hand or by undo" claim in the changeset and description.
  • The way-back set <theme> accent <saved seed> lists 14 part styles under styled and says the saved settings were "built again" although nothing was built or changed (_edit.mjs lines 6277-6290, _settings.mjs lines 16111-16125), so leave styled empty and say nothing was compared when that build is skipped.
Claims and files checked

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

  • Claim: a kept palette stays as saved through hand edits and undo. False for an undo back to a step without the hand-changed color (first finding).
  • Claim: a hand edit that leaves the color settings alone keeps every written-out color. Verified: the new no-base test fails on the base and passes here (_settings.mjs 9895-9909).
  • Claim: a mapped whole-theme token comes back to its palette shade by hand or by undo. Verified for undo; by hand only when this CLI maps the token as the saved module does (second finding).
  • Claim: a token the saved module never mapped gains nothing from set and its named undo. Verified (new test; _settings.mjs 5144).
  • Claim: after a hand-changed color, setting the saved seed or undo is the way back, and every other command is still refused. Verified for set and for corners; undo also accepts dropping the color (first finding).
  • Claim: any change that brings every color back to the saved seeds is accepted. False as implemented: a change that drops the color is accepted too (first finding); skipping the earlier build is verified.
  • Claim: a whole-theme --color-accent beside the accent dial leaves the palette key, so show, set and undo treat it alike. Verified (_palette.mjs 971-987; test).
  • Claim: the module records a stamp of the color-token settings. Verified (_settings.mjs 9136, 15523-15536).
  • Claim: on a kept palette a mapped token set for both modes is written as a pair, and one written as a single value is not kept. Verified (_settings.mjs 9055-9062, 5141-5148).
  • Claim: the refusal reads as quoted. Verified (_palette.mjs 905, 1223; tests).
  • Claim: each new case fails before this change. Verified: 6 of the 23 cases fail with these tests on the base, and all 23 pass here.
  • Claim: no new failures in the related suites. Partly checked: 61 related theme-edit test files pass here, with no failures on the base beyond the changed cases; the theme, parity and experimental suites were not run.
  • File .changeset/experimental-theme-kept-palette-hand-edits.md: two claims false (first and second findings); the experimental tag and patch bump are right.
  • File packages/cli/api/theme-edit/_edit.mjs: third finding.
  • File packages/cli/api/theme-edit/_palette.mjs: first finding.
  • File packages/cli/api/theme-edit/_settings.mjs: second and third findings.
  • File packages/cli/api/theme-edit/theme-palette-newer-recipe-opens.test.mjs: misses the paths behind the first and second findings.
  • File packages/cli/api/theme-edit/theme-palette-unknown-recipe.test.mjs: clear.

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.

This needs an engineering owner's spec decision and one fix before it can be approved.

The kept-palette behaviours changed here are in no current record on main: the AST-050 DEC-11 paragraph they rest on comes from the unmerged base branch, and the sentence this pull request adds to it is not approved yet. An engineering owner records the decision by commenting /approve-spec <full head SHA> on the pull request, after amending the sentence if needed (the author may do so as an engineering owner); as written, its "undo are the way back" is broader than the code, which accepts an undo only when its step keeps every color the file names.

Blocking

  • Regression: the hand-edit refusal now says "Put that setting back (by hand, or with set or undo)", but undo is refused with the same words whenever its step drops a color the file names (right after set accent, or after a status color was added by hand, even when the step is exactly the saved settings), and for a color the saved palette has no shades for set is refused too (the set half was missed at the earlier head), so name only the ways back that work in each state, or compare the undo's step with the settings the saved palette was made from (_palette.mjs line 1228, check at lines 1154-1162).

Also needed

  • The description has no ## Writing rubric results for the AST-050 edit, which every pull request that changes a record reports.
  • Non-blocking: on a kept palette whose accent comes from a whole-theme --color-accent with no accent dial, set --color-accent is refused with words saying exact color tokens save as usual; and the new test's comment says an undo that drops the accent is refused, but the test never runs that undo.

The three earlier findings are fixed at this head.

Claims and files checked

Review mode: full; reason: rebase

  • Claim: a theme whose palette a newer CLI made stays as saved through hand edits and undo. Verified: palette files and module stay unchanged through the refused undos and the way-back set.
  • Claim: a hand edit that leaves the whole-theme color settings alone (corners, a part's color) keeps every color the module writes out. Verified by the two new cases, which fail on the base and pass here.
  • Claim: a hand edit that changes a whole-theme color setting still maps written-out colors this CLI's way. Verified in code (_settings.mjs 9902-9907).
  • Claim: a mapped whole-theme token comes back to its palette shade after undo, and to this CLI's shade after a hand removal. Verified (new case; _settings.mjs 9055-9062).
  • Claim: a token the saved module never mapped gains no value from set and its undo. Verified (new case fails on the base; _settings.mjs 5144).
  • Claim: after a hand-changed color, setting it back or an undo that keeps every color the file names is the way back, and its result compares nothing. Verified: set accent <saved seed> opens with no styles or problems listed; an undo that drops the accent is refused.
  • Claim: every other command is still refused, naming the setting and the seed. Verified (corners refused).
  • Claim: any change that brings every color back to the saved seeds is accepted. False for an undo that drops a hand-added color (blocking finding).
  • Claim: beside the accent dial a whole-theme --color-accent saves as an exact value; without the dial it is refused. Verified (_palette.mjs 968-996; new case).
  • Claim: the module records a stamp of the whole-theme color-token settings. Verified (_settings.mjs 9136, 15517-15540).
  • Claim: the general refusal reads as quoted. Verified (_palette.mjs 905; tests).
  • Claim: the hand-edit refusal's "by hand, or with set or undo". False in three states (blocking finding).
  • Claim: each new test case fails before this change. Verified: with these tests on the base, 7 of 24 cases fail, all of them added or changed here; all 24 pass here.
  • Claim: no new failures in the related suites. Checked for the related editor test files; the theme, parity and experimental suites were not run.
  • Claim: the acceptance check on a real theme saved with an older recipe name. Not reproduced; the equivalent test cases pass.
  • File .changeset/experimental-theme-kept-palette-hand-edits.md: clear; the experimental tag and patch bump are right.
  • File docs/specs/AST-050-app-themes/spec.md: proposed sentence awaiting an engineering owner; no rubric results.
  • File packages/cli/api/theme-edit/_edit.mjs: clear.
  • File packages/cli/api/theme-edit/_palette.mjs: blocking finding; non-blocking refusal wording.
  • File packages/cli/api/theme-edit/_settings.mjs: clear.
  • File packages/cli/api/theme-edit/theme-palette-newer-recipe-opens.test.mjs: non-blocking test gap.
  • File packages/cli/api/theme-edit/theme-palette-unknown-recipe.test.mjs: clear.

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.

This needs an engineering owner's spec decision and two fixes before it can be approved.

The kept-palette behaviours changed here are in no current record on main: the AST-050 DEC-11 paragraph they rest on comes from the unmerged base branch, and the sentence this pull request adds to it is not approved yet. An engineering owner records the decision by commenting /approve-spec <full head SHA> on the pull request (the author may do so as an engineering owner), after amending the sentence if needed, since its "or undo is the way back" is broader than the code.

Blocking

  • Every hand-edit refusal now ends "…or undo, to open the theme", but undo is refused with those same words whenever its step drops a color the file names that the saved palette has shades for (right after set accent, after a status color was added by hand even when the step is the saved palette's own settings, and after a shadeless neutral was added right after set accent), so name undo only when its step passes that check, or compare the step with the settings the saved palette was made from (_palette.mjs lines 1235-1237, check at lines 1154-1166).
  • The ## Writing rubric results section reports seven items that are not the rubric in docs/contributing/spec-writing.md (whose R7, project status, is the result the knowledge-contracts record asks for), so replace it with one line per rubric item.

Non-blocking

  • On a kept palette whose accent is a whole-theme --color-accent with no accent dial, set --color-accent is refused with words saying exact color tokens save as usual (_palette.mjs line 905), and the new test's comment describes an undo it never runs.

The set half of the earlier refusal finding and the three findings before it are fixed at this head.

Claims and files checked

Review mode: full; reason: rebase

  • Claim: a theme whose palette a newer CLI made stays as saved through hand edits and undo. Verified: palette files and module stay unchanged through every refused command, the way-back set and the accepted undos.
  • Claim: its refusal says what is true. False: the hand-edit refusal names undo in states where undo is refused (blocking finding).
  • Claim: a hand edit that leaves the whole-theme color settings alone (corners, a part's color) keeps every color the module writes out. Verified by two new cases, which fail on the base and pass here.
  • Claim: a hand edit that changes a whole-theme color setting still maps written-out colors this CLI's way. Verified in code (_settings.mjs 9909-9917).
  • Claim: a mapped whole-theme token comes back to its palette shade after undo, and to this CLI's shade after a hand removal. Verified (new cases).
  • Claim: a token the saved module never mapped gains no value from set and its undo. Verified (new case fails on the base).
  • Claim: in a module this CLI wrote a single-value token is not the palette's, while in a newer CLI's module it stays the mapping's. Verified (_settings.mjs 5141-5156; new guard case).
  • Claim: after a hand-changed color, setting it back, or an undo that keeps every color the file names, is the way back, and its result compares nothing. Verified: set accent <saved seed> opens with no styles or problems listed; an undo back past a hand edit opens.
  • Claim: for a color the palette has no shades for, taking it out (by hand or undo) is the way back. Verified when undo's step keeps the other colors; false right after set accent (blocking finding).
  • Claim: every other command is still refused, and the refusal names the way that works for that setting. False for undo in three states (blocking finding).
  • Claim: any change that brings every color back to the saved seeds, with the saved vibrancy, is accepted. False for an undo back to the saved palette's own settings after a status color was added by hand (blocking finding).
  • Claim: beside the accent dial a whole-theme --color-accent saves as an exact value, and without the dial it is refused. Verified (new case; token-only accent still refused).
  • Claim: the module records a stamp of the whole-theme color-token settings it was built from. Verified (_settings.mjs 9143, 15525-15548).
  • Claim: the general refusal reads as quoted. Verified (_palette.mjs 905; tests).
  • Claim: each new test case fails before this change. Verified: with these tests on the base, 7 of 25 cases fail, all of them added or changed here; the one new guard case, not listed as failing, passes on both.
  • Claim: no new failures in the theme-edit, theme, parity and experimental suites. Checked for 95 related theme-edit test files (all pass here); the theme, parity and experimental suites were not run.
  • Claim: undo returns to the theme as first saved, as the saved-only rule says. Verified against that rule's text on main.
  • Claim: the acceptance check on a real theme saved with an older recipe name. Not reproduced; the equivalent test cases pass.
  • Claim: the writing rubric results pass R1-R7. False: the items reported are not the repository rubric's (blocking finding).
  • File .changeset/experimental-theme-kept-palette-hand-edits.md: the experimental tag and patch bump are right; "its refusal says what is true" is false.
  • File docs/specs/AST-050-app-themes/spec.md: proposed sentence awaiting an engineering owner; its undo clause is broader than the code.
  • File packages/cli/api/theme-edit/_edit.mjs: clear.
  • File packages/cli/api/theme-edit/_palette.mjs: blocking refusal finding; non-blocking refusal wording.
  • File packages/cli/api/theme-edit/_settings.mjs: clear.
  • File packages/cli/api/theme-edit/theme-palette-newer-recipe-opens.test.mjs: non-blocking test gap.
  • File packages/cli/api/theme-edit/theme-palette-unknown-recipe.test.mjs: clear.

Automated review (maintainer link)

*/
const keptPaletteWords = (slug, recipe) =>
`${slug}'s colors use the ${String(recipe)} recipe, which this Astryx CLI (${cliVersion()}) does not make yet; its palette is kept as saved. Color changes come once that recipe ships; other changes save as usual.`;
`${slug}'s colors use the ${String(recipe)} recipe, which this Astryx CLI (${cliVersion()}) does not make; its palette is kept as saved. Changes to what the palette is made from (the accent, neutral and status colors, the vibrancy) need a CLI that makes that recipe; other changes, including exact color tokens, a part's colors, the mode and the base, save as usual.`;

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: on a kept palette whose accent is a whole-theme --color-accent with no accent dial, set <theme> --color-accent … gets these words, which say exact color tokens save as usual. Naming that token in the parenthesis ("…, a whole-theme --color-accent with no accent dial, …") removes the contradiction.

Comment on lines +894 to +896
// A hand-changed accent: undo to a step that drops the accent is no
// way back (it would leave the accent to the base theme), and the
// saved seed set again is, its result comparing nothing.

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 comment describes an undo that drops the accent being refused, but the case never runs it, and no case runs a refused undo from a hand-edited file. A themeEditUndo here that expects the refusal and unchanged files would pin the refusal's wording.

@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.

This needs an engineering owner's spec decision and three fixes before it can be approved.

The kept-palette behaviours changed here are in no current record on main: the AST-050 DEC-11 paragraph they rest on comes from the unmerged base branch, and the sentence this pull request adds to it is not approved yet. An engineering owner records the decision by commenting /approve-spec <full head SHA> on the pull request (the author may do so as an engineering owner), after amending the sentence if needed, since its "undo when the step it goes back to has the saved colors" is broader than the code.

Blocking

  • The changeset says undo is the way back when the step it goes back to has the saved colors, but after set corners and a danger color added by hand, undo back to the saved palette's own settings ([accent #2563eb]) is refused, so either describe what the code checks (the step names every color the file names, each at its saved seed) or let that undo through (.changeset/experimental-theme-kept-palette-hand-edits.md:9).
  • The description's ## Writing rubric results reports seven items that are not the rubric in docs/contributing/spec-writing.md (narration, research, evidence, rejected alternatives, change references, open questions, project status), so the AST-050 edit still has no R7 result; replace the section with one line per rubric item.
  • The test plan says every new case fails before this change, but "a token a newer CLI set (one value), undone with no recorded shades, takes the mapping's shade" passes on the base branch, so list it as a guard that passes before and after.

The hand-edit refusal now names only the ways back that work in each state, which fixes the earlier blocking finding; the two non-blocking notes on their existing threads still apply.

Claims and files checked

Review mode: full; reason: rebase

  • Claim: a kept palette stays as saved through hand edits and undo, and its refusal says what is true: verified (changed suites pass; refusals in four reproduced states name only working ways back).
  • Claim: a hand edit that leaves the whole-theme color settings alone keeps every written-out color: verified (two new test cases, red on the base).
  • Claim: a hand edit that changes a whole-theme color setting re-maps the written-out colors this CLI's way: verified (module rebuild takes the mapped path when the colors stamp differs).
  • Claim: a palette-mapped token comes back to its palette shade after undo, and one set here and removed by hand takes this CLI's shade: verified (tests; reproduced: pair written, then the palette reference after undo).
  • Claim: a token the saved module never mapped gains no value from a set and its undo: verified (new test, red on the base).
  • Claim: setting the saved seed back is the way back, and its result compares nothing: verified (test asserts no styled changes and the note).
  • Claim: undo is the way back when the step it goes back to has the saved colors: false (undo to the saved palette's own settings is refused after a hand-added status color).
  • Claim: for a color the saved palette has no shades for, taking it out is the way back: verified by hand; by undo only when the step keeps the other colors (reproduced both ways).
  • Claim: the refusal names undo only when undo works, and every other command is still refused: verified (new test; reproduced in four states).
  • Claim: a whole-theme accent token beside the accent dial saves as an exact value, and without the dial it is still refused: verified (tests; reproduced the refusal).
  • Claim: the refusal's new wording: verified (source and tests).
  • Claim: each new test case fails before this change: false for the newer-CLI token case (passes on the base).
  • Claim: no new failures in the related suites: verified for 95 related theme-edit test files on the head; the theme, parity and experimental suites outside it were not run.
  • Claim: acceptance check on a real theme saved with a newer recipe: not checked (no CLI makes that recipe).
  • File: .changeset/experimental-theme-kept-palette-hand-edits.md: blocking (undo clause).
  • File: docs/specs/AST-050-app-themes/spec.md: awaiting an engineering owner's decision.
  • File: packages/cli/api/theme-edit/_edit.mjs: clear.
  • File: packages/cli/api/theme-edit/_palette.mjs: clear (non-blocking wording note on the general refusal).
  • File: packages/cli/api/theme-edit/_settings.mjs: clear.
  • File: packages/cli/api/theme-edit/theme-palette-newer-recipe-opens.test.mjs: non-blocking (no case runs a refused undo from a hand-edited file).
  • File: packages/cli/api/theme-edit/theme-palette-unknown-recipe.test.mjs: clear.

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the theme-kept-palette-hand-edits branch from f12bcde to 8d35c4d Compare November 20, 2026 22:30

@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.

This needs an engineering owner's /approve-spec for the current head before it can be approved; no blocking code defect remains.

The kept-palette behaviours rest on the AST-050 DEC-11 paragraph from the unmerged base branch and the sentence this pull request appends to it, and an engineering owner approved that paragraph for an earlier head. This head is the same patch rebased again onto the moved base branch, and an approval binds only the head it names, so an engineering owner records it again by commenting /approve-spec <full head SHA> with the current head's SHA (the author may do so as an engineering owner). The three non-blocking notes still apply on their threads: the refusal asks for a hand-set vibrancy back that putting the accent back alone ignores, the general refusal's wording for an accent set only as a token, and a test comment describing an undo the case never runs.

Claims and files checked

Review mode: carry-forward; reason: none

  • Claim: a kept palette stays as saved through hand edits and undo: verified (changed suites pass on the head and fail on the base).
  • Claim: a hand edit that leaves the whole-theme color settings alone keeps every written-out color: verified (two new cases, red on the base).
  • Claim: a hand edit that changes a whole-theme color setting re-maps the written-out colors this CLI's way: verified (the module rebuild takes the mapped path when the colors stamp differs).
  • Claim: a palette-mapped token returns to its palette shade after undo, and one set here and removed by hand takes this CLI's shade: verified (tests).
  • Claim: a token the saved module never mapped gains no value from a set and its undo: verified (new case, red on the base).
  • Claim: setting the saved seed back, or taking out a color the palette has no shades for, is the way back, and its result compares nothing: verified (test; reproduced for an accent dial and an accent token).
  • Claim: the refusal names a set when one setting is off, otherwise each setting to put back by hand: verified (new case; reproduced with two colors, and with a color and the vibrancy).
  • Claim: a color the theme's own source sets is named in that file, with no set: verified (new case).
  • Claim: every other command is refused, except an undo whose step names every color at its saved seed: verified (a test runs the accepted undo; reproduced a refused undo whose step drops a status color added by hand).
  • Claim: a whole-theme accent token beside the accent dial saves as an exact value, and without the dial it is still refused: verified (tests; reproduced the refusal).
  • Claim: the refusal's new wording: verified (source and tests).
  • Claim: each new test case fails before this change, except the named guard: verified (nine cases fail on the base; the guard passes on both).
  • Claim: no new failures in the related suites: verified for 96 related theme-edit and doctor test files on the head; the theme, parity and experimental suites outside them were not run.
  • Claim: the writing rubric results for the added sentence: verified (the repository rubric's seven items; the sentence has none of those issues).
  • Claim: acceptance check on a real theme saved with a newer recipe: not checked (no CLI makes that recipe).
  • File: .changeset/experimental-theme-kept-palette-hand-edits.md: clear.
  • File: docs/specs/AST-050-app-themes/spec.md: approved by an engineering owner for an earlier head; awaiting the same approval for this head.
  • File: packages/cli/api/theme-edit/_edit.mjs: clear.
  • File: packages/cli/api/theme-edit/_palette.mjs: non-blocking notes (vibrancy in the refusal; the general refusal's wording for an accent token).
  • File: packages/cli/api/theme-edit/_settings.mjs: clear.
  • File: packages/cli/api/theme-edit/theme-palette-newer-recipe-opens.test.mjs: non-blocking (a comment describes an undo the case never runs).
  • File: packages/cli/api/theme-edit/theme-palette-unknown-recipe.test.mjs: clear.

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.

This needs an engineering owner's /approve-spec for the current head before it can be approved; no blocking code defect remains.

The kept-palette behaviours rest on the AST-050 DEC-11 paragraph from the base branch, which this pull request widens back to hand-edited themes and extends with the way-back sentence. An engineering owner approved that paragraph, word for word, for an earlier head, but an approval binds only the head it names, so an engineering owner records it again by commenting /approve-spec <full head SHA> with the current head's SHA (the author may do so as an engineering owner). Non-blocking: the base branch's release note now says that a named undo of a token the newer module doesn't map writes this CLI's shade and that an accent token change is refused, both of which this pull request reverses, so one of the two notes needs narrowing before they ship together; the three earlier notes on their threads still apply.

Claims and files checked

Review mode: full; reason: rebase

  • Claim: a kept palette stays as saved through hand edits and undo: verified (the changed suites pass on the head; nine of their cases fail on the base).
  • Claim: a hand edit that leaves the whole-theme color settings alone keeps every written-out color: verified (two new cases, red on the base).
  • Claim: a hand edit that changes a whole-theme color setting still maps the written-out colors this CLI's way: verified (the rebuild takes the mapped path when the colors stamp differs, _settings.mjs:9926-9933).
  • Claim: a palette-mapped token returns to its palette shade after undo, and one set here and removed by hand takes this CLI's shade: verified (tests).
  • Claim: a token the saved module never mapped gains no value from a set and its undo: verified (new case, red on the base).
  • Claim: setting the saved seed back, or taking out a color the palette has no shades for, is the way back, and its result compares nothing: verified (a test for the seed; the code for the shadeless color, _palette.mjs:1159-1163 and :1261).
  • Claim: the refusal names a set when one setting is off, otherwise each setting to put back by hand: verified (new case).
  • Claim: a color the theme's own source sets is named in that file, with no set: verified (new case).
  • Claim: every other command is refused, except an undo whose step puts every color back at its saved seed: verified (tests run a refused change and an accepted undo; _palette.mjs:1154-1166).
  • Claim: a whole-theme accent token beside the accent dial saves as an exact value, and without the dial it is still refused: verified (tests for the dial case; the code for the token-only case, _palette.mjs:496-524 and :1134-1140).
  • Claim: the refusal's new wording: verified (source and tests).
  • Claim: the four cases the base change left open are closed: verified (tests).
  • Claim: the base branch limits the DEC-11 sentence to a theme not edited by hand, and this change puts the wider sentence back: verified (the record text on the base and the head).
  • Claim: each new test case fails before this change, except the named guard: verified (nine fail on the base; the guard passes on both).
  • Claim: no new failures in the related suites: verified for 63 related theme-edit test files on the head; the theme, parity and experimental suites outside them were not run.
  • Claim: the writing rubric results for the added sentence: verified (the rubric's seven items; the sentence has none of those issues).
  • Claim: acceptance check on a real theme saved with a newer recipe: not checked (no CLI makes that recipe).
  • File: .changeset/experimental-theme-kept-palette-hand-edits.md: accurate; non-blocking (the base branch's release note contradicts it).
  • File: docs/specs/AST-050-app-themes/spec.md: approved by an engineering owner for an earlier head; awaiting the same approval for this head.
  • File: packages/cli/api/theme-edit/_edit.mjs: clear.
  • File: packages/cli/api/theme-edit/_palette.mjs: non-blocking notes (vibrancy in the refusal; the general refusal's wording for an accent token).
  • File: packages/cli/api/theme-edit/_settings.mjs: clear.
  • File: packages/cli/api/theme-edit/theme-palette-newer-recipe-opens.test.mjs: non-blocking (a comment describes an undo the case never runs).
  • File: packages/cli/api/theme-edit/theme-palette-unknown-recipe.test.mjs: clear.

Automated review (maintainer link)

[experimental] `astryx experimental theme editor`: a theme whose palette a newer CLI made stays as saved through hand edits and undo, and its refusal says what is true.

- A setting changed by hand in the settings file that leaves the whole-theme color settings alone (corners, or a part's color) keeps every color the settings module writes out. A hand edit that changes a whole-theme color setting still maps every color the module writes out this CLI's way.
- A whole-theme color token the palette maps comes back to its palette shade once undo takes its setting away; one set with this CLI and removed by hand takes this CLI's shade of the saved palette. A token the saved module never mapped gains no value from a set and its undo.

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: once this lands on its base branch, the base's own release note (.changeset/experimental-theme-palette-newer-recipe-opens.md) says the opposite in two places. Its line 9 now says an undo that names a whole-theme color token the newer module doesn't map "writes this CLI's shade", where this line says such a token gains no value; its line 8 says a change to the whole-theme accent token is refused, which this pull request lifts beside the accent dial. If both entries ship in one release, drop that exception and narrow that clause to an accent token with no accent dial, here or in the base pull request.

…and undo

A theme whose palette a newer CLI made keeps every color its settings
module writes out through a hand edit that leaves the color settings
alone (the module records which color settings it was built from), and
a whole-theme color token the palette maps comes back to its palette
shade once its setting goes, while one the module never mapped gains
none. After a color changed by hand, setting it back or undo is the way
back, and a whole-theme accent token beside the accent color, which the
palette never reads, is treated alike by show, set and undo. The
refusal names what needs a CLI that makes the recipe and what saves.
@josephfarina
josephfarina force-pushed the theme-kept-palette-hand-edits branch from d79be8f to 2ed189c Compare November 21, 2026 01:26
@josephfarina
josephfarina changed the base branch from theme-open-any-recipe to main November 21, 2026 01:26
@josephfarina

Copy link
Copy Markdown
Contributor Author

Covers the spec:AST-050 DEC-11 sentence for themes kept with a palette recipe this CLI doesn't make (the owner's yes on both behaviours): a whole-theme --color-accent set beside the color dial follows the dial rule, and a color changed by hand has a way back to the saved palette.

Also covers the wider spec:AST-050 DEC-11 sentence this pull request restores (keeping shades and the refusal for a theme edited by hand too), as the owner's ruling conditioned when the Bootstrap pair narrowed it.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 2ed189c

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval 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.

Approved pending CI: CI has not run on this head yet.

The spec:AST-050 DEC-11 amendment carries an engineering owner's /approve-spec for this head, and the new hand-edit and undo cases fail before this change and pass with it. No blocking findings.

  • Non-blocking: the release note already pending on main (.changeset/experimental-theme-palette-newer-recipe-opens.md) still says a change to the whole-theme accent token is refused and that a named undo of a token the newer module doesn't map writes this CLI's shade; both contradict this pull request's note in the same release, so narrowing those two lines here keeps the changelog consistent.
  • Non-blocking: the hand-edit refusal asks for a hand-set vibrancy back, yet putting the accent back alone by hand opens the theme with that vibrancy still in the file and ignored; drop vibrancy from the way-back check and the refusal, or treat it as a hand edit the refusal names.
Claims and files checked

Review mode: full; reason: rebase

  • Claim: a hand edit that leaves the whole-theme color settings alone keeps every written-out color. Verified: the new cases fail on the base and pass here.
  • Claim: a hand edit that changes a whole-theme color setting still re-maps written-out colors. Verified: the rebuild re-maps when the module's colors stamp differs.
  • Claim: a palette-mapped token comes back to its palette shade after undo or a hand removal. Verified by test.
  • Claim: a token the saved module never mapped gains nothing from a set and its undo. Verified by test.
  • Claim: setting a hand-changed color back to its saved seed, or taking out one with no saved shades, reopens the theme, and the refusal names that way back, each setting to put back, or the theme source file. Verified by tests.
  • Claim: the way back compares nothing and says so. Verified: the test checks empty styles, no new problems and the note.
  • Claim: every other command stays refused except an undo to the saved seeds. Verified by tests and a probe; that undo also needs the saved vibrancy.
  • Claim: a whole-theme accent token beside the accent dial saves as an exact value, and without the dial it is refused. Verified by tests and a probe.
  • Claim: the refusal's new wording. Verified by exact-text tests.
  • Claim: an acceptance run on a real theme with a newer recipe. Not reproducible here, as no CLI makes such a recipe; consistent with the tests.
  • Claim: each new case fails before the change except the named guard. Verified: 9 of 27 fail on the base and the guard passes on both.
  • Claim: no new failures in the related suites. Partly checked: 67 related theme-edit test files pass; the rest runs in CI.
  • Claim: the added record sentence states no project status. Verified.
  • Changeset: its four entries match the behaviour above. Verified; the note already pending on main conflicts in two places (non-blocking).
  • File .changeset/experimental-theme-kept-palette-hand-edits.md: non-blocking note (conflicts with the pending note).
  • File docs/specs/AST-050-app-themes/spec.md: clear (owner-approved for this head).
  • File packages/cli/api/theme-edit/_edit.mjs: clear.
  • File packages/cli/api/theme-edit/_palette.mjs: non-blocking notes (vibrancy in the refusal; the accent-token wording in the general refusal).
  • File packages/cli/api/theme-edit/_settings.mjs: clear.
  • File packages/cli/api/theme-edit/theme-palette-newer-recipe-opens.test.mjs: non-blocking note (a comment describes an undo the case never runs).
  • File packages/cli/api/theme-edit/theme-palette-unknown-recipe.test.mjs: clear.

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 07:28
@josephfarina
josephfarina changed the base branch from main to feature/theme-editor November 21, 2026 07:28
@josephfarina
josephfarina merged commit 04c1bef into feature/theme-editor Nov 21, 2026
17 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
…and undo (#13091)

Reviewed pull request #13091, 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
…and undo (#13091)

Reviewed pull request #13091, 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
…and undo (#13091)

Reviewed pull request #13091, 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
…and undo (#13091)

Reviewed pull request #13091, 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
- #13225 experimental theme: a whole-theme border color reaches the fields' edge at the nearest shade that keeps 3:1...
- #13186 fix(cli): a color said with a tint word fills with that color again
- #13091 experimental theme: a kept palette stays as saved through hand edits and undo
- #13233 fix(cli): on a one-family base, a body font set alone keeps empty-state titles on the heading font
- #13256 fix(cli): the fields-at-3:1 note prints its exact-color command in full, with the color quoted
- #13044 feat(cli): experimental theme how: readings held back from round 15
- #13241 experimental theme: a text color on an option row reaches the tokens its label and description read
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13276.

@github-actions
github-actions Bot deleted the theme-kept-palette-hand-edits branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 2ed189c8 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