Repository navigation
experimental theme: a kept palette stays as saved through hand edits and undo - #13091
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
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
undoback to a step with no accent dial is accepted, so the theme's--color-accentfalls back to the base theme's value andset <theme> accent <saved seed>is then refused, becausebackin_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.mjslines 9059-9060, whileundorestores 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 understyledand says the saved settings were "built again" although nothing was built or changed (_edit.mjslines 6277-6290,_settings.mjslines 16111-16125), so leavestyledempty 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.mjs9895-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
setand its namedundo. Verified (new test;_settings.mjs5144). - 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
setand forcorners; 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-accentbeside the accent dial leaves the palette key, so show, set and undo treat it alike. Verified (_palette.mjs971-987; test). - Claim: the module records a stamp of the color-token settings. Verified (
_settings.mjs9136, 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.mjs9055-9062, 5141-5148). - Claim: the refusal reads as quoted. Verified (
_palette.mjs905, 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.
c644c16 to
4268a3b
Compare
9852a57 to
b549907
Compare
3883fc5 to
630de8a
Compare
4268a3b to
49d8c13
Compare
630de8a to
f553cb5
Compare
There was a problem hiding this comment.
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
undois refused with the same words whenever its step drops a color the file names (right afterset 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 forsetis refused too (thesethalf 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.mjsline 1228, check at lines 1154-1162).
Also needed
- The description has no
## Writing rubric resultsfor 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-accentwith no accent dial,set --color-accentis 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.mjs9902-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.mjs9055-9062). - Claim: a token the saved module never mapped gains no value from
setand its undo. Verified (new case fails on the base;_settings.mjs5144). - 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 (
cornersrefused). - 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-accentsaves as an exact value; without the dial it is refused. Verified (_palette.mjs968-996; new case). - Claim: the module records a stamp of the whole-theme color-token settings. Verified (
_settings.mjs9136, 15517-15540). - Claim: the general refusal reads as quoted. Verified (
_palette.mjs905; 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.
f553cb5 to
ca3fac9
Compare
49d8c13 to
dd7f6d2
Compare
ca3fac9 to
1f15fff
Compare
There was a problem hiding this comment.
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
undois refused with those same words whenever its step drops a color the file names that the saved palette has shades for (right afterset accent, after a status color was added by hand even when the step is the saved palette's own settings, and after a shadelessneutralwas added right afterset accent), so nameundoonly when its step passes that check, or compare the step with the settings the saved palette was made from (_palette.mjslines 1235-1237, check at lines 1154-1166). - The
## Writing rubric resultssection reports seven items that are not the rubric indocs/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-accentwith no accent dial,set --color-accentis refused with words saying exact color tokens save as usual (_palette.mjsline 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
setand 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.mjs9909-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
setand 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.mjs5141-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-accentsaves 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.mjs9143, 15525-15548). - Claim: the general refusal reads as quoted. Verified (
_palette.mjs905; 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-
onlyrule says. Verified against that rule's text onmain. - 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.
| */ | ||
| 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.`; |
There was a problem hiding this comment.
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.
| // 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. |
There was a problem hiding this comment.
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.
1f15fff to
24bdacf
Compare
dd7f6d2 to
38b89a1
Compare
24bdacf to
e12e83f
Compare
There was a problem hiding this comment.
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 cornersand adangercolor added by hand,undoback 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 resultsreports seven items that are not the rubric indocs/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.
e12e83f to
1a1c2a2
Compare
38b89a1 to
41c58c1
Compare
f12bcde to
8d35c4d
Compare
There was a problem hiding this comment.
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.
5709ad0 to
d389042
Compare
04077c4 to
d79be8f
Compare
There was a problem hiding this comment.
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-1163and: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-524and: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.
| [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. |
There was a problem hiding this comment.
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.
d79be8f to
2ed189c
Compare
|
Covers the Also covers the wider |
|
/approve-spec 2ed189c |
There was a problem hiding this comment.
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
mainconflicts 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.
- #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
|
Landed on main in #13276. |
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:
<theme>.settings.jsonthat 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.--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 asetand itsundo.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 thatsetwhen 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 noset. 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-accentisn't something the kept palette is made from, so it saves as an exact value (show,setandundoagree); without the dial it's still refused.What this closes
The four cases left open by the change that lets such a theme open:
--color-accentadded by hand beside the accent dial passedshowbut was refused byundo: 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
--color-accentisn'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:set <theme> padding 8px --on card): okshow): oktheme build): ok--onlyflags that change nothing and entries hidden by a later one, as AST-050 DEC-11 says on main)set <theme> accent '#0d6efd'): refused with the text above, no install line; palette and settings unchangedTest plan
theme-palette-newer-recipe-opens.test.mjs, new cases (each fails before this change, except the guard below):#FFFincluded;set accent <saved seed>andundoopen the theme again with the palette unchanged; corners is still refused;--color-accentbeside the accent dial is built by show, and set and undo go on from it;setwhen one setting is off, and each setting to put back when two are;set;Writing rubric results
Run over the AST-050 DEC-11 sentence this change adds:
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