Repository navigation
fix(cli): theme editor skips a part write that repeats Core's own token reference, says when a value matches, and names where misses are - #12480
Conversation
… nothing, and what the missed line asks A part setting that repeats what Core draws at rest (pill corners on a badge, which is round already) was listed as a style change. The styled list now leaves out a plain part rule whose value Core already draws in every look of the part, read from the part data with the base theme's tokens, so the result says it changes nothing you see. The missed line near the top of new and set now says what it means: these are not problems, each part still shows the base theme's look in a state or variant, nothing is broken, and show's line for one brings it in line.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
A new plain part setting whose only effect is a rule Core already draws in every look of the part at rest (pill corners on a round badge) is not saved or built. The result names what the part draws and says to set another value to change it. Three tests that set a value a part already draws now set one it does not, or accept the indicator lines Core draws at 2px already.
PR Analysis Report🔎 Preview ·
|
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | cli |
./api/experimental · Types · type ThemeEditChangeData |
missedWhere?: string[] | undefined |
import type {ThemeEditChangeData} from '@astryxdesign/cli/api/experimental'; const x: ThemeEditChangeData = {missedWhere: …} |
| ~ | cli |
./api/experimental · Types · type ThemeEditNewResponse |
data: { theme: string; like: string | null; files: { settings: string; source: string; css: string; module: string }; settings: string[]; notes: string[]; problems: s … #dbeccff7 → data: { theme: string; like: string | null; files: { settings: string; source: string; css: string; module: string }; settings: string[]; notes: string[]; problems: s … #14e1b8bf |
import type {ThemeEditNewResponse} from '@astryxdesign/cli/api/experimental'; const x: ThemeEditNewResponse = {data: …} |
Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Needs an owner decision, and changes either way. The two result changes to the experimental theme editor (not writing a part setting that repeats what Core already draws, and the new missed wording) have no governing spec yet, so approval waits on an engineering owner deciding them: an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or a spec settles the editor's write policy and result wording first.
Blocking findings to fix either way:
- After
set <theme> --radius-full 0px,set <theme> corners pill --on badge(andborder-radius 9999px --on badge) is dropped as "already draws border-radius 9999px" while the badge renders square, becausedrawnAtRestresolves the token Core reads with the base theme's value instead of the theme's own (packages/cli/api/theme-edit/_edit.mjs:6375-6378). - The new
missedline says each part "still shows the base theme's look in a state or variant" and "Nothing is broken", but aftercorners square25 of the 26 misses are pills and soft shadows, which hold at rest in every state, and one kind reports a surface that no longer stands out from the page (packages/cli/clients/cli/commands/experimental/theme.mjs:648). - The description's Evidence quotes
[ok] t: corners = pill on badge already shows; nothing written, but the head prints[no change] t: …, so the description needs updating.
Also worth a look:
how "thick black borders on everything"still proposeswidth 2px --on outline-indicatorandheight 2px --on tab-indicator, whichsetnow drops; the test was loosened to accept that instead of leaving those steps out of the answer.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Changeset, a new part setting that only repeats what Core draws is no longer written: true on a fresh theme (new test), false once the theme has changed the token Core reads (
_edit.mjs:6375-6378, reproduced). - Changeset, the result names what the part draws and says to set another value: verified (
_edit.mjs:6875). - Changeset, the missed line says the misses are not problems, the base look stays in a state or variant, and nothing is broken: the text is there (
theme.mjs:648) but it is false for misses at rest. - Description, pill corners on a badge used to print a styled badge radius line: verified on the base.
- Description, the status line now reads
[ok] … already shows; nothing written: false; it reads[no change] …(theme.mjs:596, new test line 75). - Description, the note text and a settings file with no badge entry: verified (new test lines 51-58).
- Description, square corners on a badge still list a 0px radius: verified (new test line 85).
- Description, the styled list skips a plain part rule equal to Core's at-rest value, read with the base theme's tokens: verified (
_context.mjs:1247-1256,_edit.mjs:6359-6389). - Description, the smallest restoration is the reader, the gate and the missed text, with no JSON field changes: no field changes (verified), but the new
[no change]status and the formatting rewraps are not listed. - Description, three tests moved off values the part already draws, or accept the 2px indicator lines: verified.
- Description, the suite tally, the four unrelated failures and the typecheck list: not rerun; the changed test files pass.
Files:
.changeset/experimental-theme-set-repeats-drawn.md: experimental patch as required; its first claim is false in the reproduced case.packages/cli/api/theme-edit/_context.mjs: clear on its own; it feeds the gate's finding.packages/cli/api/theme-edit/_edit.mjs: blocking (base-theme token lookup at 6375-6378).packages/cli/clients/cli/commands/experimental/theme.mjs: blocking (missed wording at 648); formatting-only rewraps at 1622-1624 and 1681-1692.packages/cli/api/theme-edit/theme-set-repeats-drawn.test.mjs: clear; it lacks the changed-token case.packages/cli/api/theme-edit/theme-missed-parts-named.test.mjs: checks only the wording.packages/cli/api/theme-edit/theme-thick-borders-chain-reaches.test.mjs: loosened to "2px or absent" (non-blocking).packages/cli/api/theme-edit/theme-edit.test.mjs: clear.packages/cli/api/theme-edit/theme-stale-marker-costs-undo.test.mjs: clear.
|
Owner decision (engineering owner, covering this pull request): in the experimental theme editor, a setting is skipped as already drawn only when it would write the same token reference Core already uses for that part. A setting that only matches today's resolved value is written, so the user's explicit choice survives later token edits; after |
|
I'll run a full review to re-check this with your decision. |
There was a problem hiding this comment.
Changes requested: an engineering owner's decision on this pull request settles the direction (skip a setting only when it writes the same token reference Core already uses, write one that only matches today's resolved value, and have the missed line name which state or variant still shows the base look), and this head does not implement it yet.
setcompares resolved values, socorners pill --on badge(which writes9999pxwhile Badge readsvar(--radius-full)) is dropped on a fresh theme and the new test asserts the drop, the opposite of the decision (packages/cli/api/theme-edit/_edit.mjs:6395-6419,theme-set-repeats-drawn.test.mjs:45-58).- After
set <theme> --radius-full 0px,corners pill --on badgeprints[no change]and the badge stays square becausedrawnAtRestresolves the token with the base theme's value (_edit.mjs:6375-6378), while the decision says this case gives a pill badge. - The
missedline says each part "still shows the base theme's look in a state or variant" without naming one, and aftercorners square25 of the 26 misses are pills and soft shadows at rest, beside a "Nothing is broken" that the inverted-surface miss contradicts (packages/cli/clients/cli/commands/experimental/theme.mjs:648). - The description's Evidence quotes an
[ok] … already shows; nothing writtenline that the head prints as[no change] …, and the changeset's example and the title describe the pill-badge case the decision keeps written.
Next: compare the written value with Core's unresolved part-data value, keep resolved-value writes in styled, and add tests for the decision's two cases (a same-reference write is skipped; a pill badge after --radius-full 0px). Also worth a look: how "thick black borders on everything" still proposes two indicator-line steps that set now drops.
Claims and files checked
Review mode: same-head; reason: none
Claims:
- Changeset, a new part setting that only repeats what Core draws is no longer written: what the head does, but its example (pill corners on a badge) is the case the owner's decision keeps written, and it is false once the theme changed the token Core reads (
_edit.mjs:6375-6378). - Changeset, the result names what the part draws and says to set another value: verified (
_edit.mjs:6875). - Changeset, the missed line says the misses are not problems, the base look stays in a state or variant, and nothing is broken: the text is there (
theme.mjs:648), but it names no state or variant and is false for misses at rest. - Description, pill corners on a badge used to print a styled badge radius line: verified on the base.
- Description, the status line now reads
[ok] … already shows; nothing written: false; it reads[no change] …(theme.mjs:596, new test line 75). - Description, the note text and a settings file with no badge entry: verified (new test lines 50-58).
- Description, square corners on a badge still list a 0px radius: verified (new test line 85).
- Description, the styled list skips a plain part rule equal to Core's at-rest value, read with the base theme's tokens: verified (
_context.mjs:1247-1256,_edit.mjs:6359-6389); the owner's decision keeps such a rule. - Description, the smallest restoration is the reader, the gate and the missed text, with no JSON field changes: no field changes (verified), but the new
[no change]status and the formatting rewraps are not listed. - Description, three tests moved off values the part already draws, or accept the 2px indicator lines: verified.
- Description, the suite tally, the four unrelated failures and the typecheck list: not rerun; CI's test jobs were cancelled on this head.
- Owner's comment, a test shows a pill badge after
--radius-full 0px: no such test on this head (the new file has two badge tests).
Files:
.changeset/experimental-theme-set-repeats-drawn.md: experimental patch as required; its first example is the case the decision keeps written.packages/cli/api/theme-edit/_context.mjs: blocking with the gate (resolved-valuestyledfilter at 1247-1256).packages/cli/api/theme-edit/_edit.mjs: blocking (resolved-value gate at 6395-6419, base-theme token lookup at 6375-6378).packages/cli/clients/cli/commands/experimental/theme.mjs: blocking (missed wording at 648); formatting-only rewraps at 1622-1624 and 1681-1692.packages/cli/api/theme-edit/theme-set-repeats-drawn.test.mjs: blocking (asserts the pill drop; lacks the decision's cases).packages/cli/api/theme-edit/theme-missed-parts-named.test.mjs: checks only the wording.packages/cli/api/theme-edit/theme-thick-borders-chain-reaches.test.mjs: loosened to "2px or absent" (non-blocking).packages/cli/api/theme-edit/theme-edit.test.mjs: clear.packages/cli/api/theme-edit/theme-stale-marker-costs-undo.test.mjs: clear.
…names where A part setting is skipped only when it writes the same token reference Core writes for the part at rest. A value that only matches what the part draws today is the person's own choice: it is written, and the result says it matches and holds if that token changes. The theme's own token values count, so after --radius-full 0px, pill corners on a badge are a change. The three tests moved for the earlier skip are back as they were. The missed line names each part with the state it keeps the base look in, or at rest (JSON: missedWhere), and no longer says nothing is broken.
|
/approve-spec 8c80753 |
There was a problem hiding this comment.
Changes requested. The direction an engineering owner decided and approved for this head works for the badge cases: a same-reference write is skipped, a value that only matches today's drawing is written and explained, and the pill badge survives --radius-full 0px. Three things still need fixing:
- Miss:
set <theme> background-color 'var(--color-background-surface)' --on checkbox-indicatoris refused as[no change] … already shows; nothing writtenalthough writing it recolors checked boxes, because the already-drawn check compares only the part's at-rest looks (packages/cli/api/theme-edit/_edit.mjs:6365-6367), andswitchandclickable-card's hover border behave the same. - The
missedline names a miss that holds only in one variant as<part> at rest(with a danger color set on neutral it says "toast at rest" for the error toast's fill), becausemissedWhereis built from a miss'sstatealone (packages/cli/api/theme-edit/_edit.mjs:8688-8690). - The title ("writes no part setting Core already draws"), the description's sentence about resolved base-theme tokens and its "No JSON field changes" no longer match the code, which skips only Core's own token reference and adds the experimental
missedWherefield.
Also worth a look: set and new text results now print every missedWhere entry again in a block of its own (packages/cli/clients/cli/commands/experimental/theme.mjs:605-611, :2282), and the third new test lacks the unbuilt guard its siblings have.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- Changeset, a new part setting that writes Core's own token reference at rest is not written and the result says no change: verified (new test, second case); it also refuses a setting that changes a state look (first finding).
- Changeset, a value that only matches what the part draws today is written as the person's own, with a note that it holds if the token changes: verified (new test, first case).
- Changeset, the missed line says each named part still shows the base look where the changes did not reach, keep it or bring it in line: verified for states and at-rest misses; a variant-only miss is named at rest (second finding).
- Description, before this change pill corners on a round badge gave no sign that nothing changed: verified on the base (the new test's first case fails there with no note).
- Description, the styled list leaves out a rule whose value Core draws, resolved with the base theme's tokens: false; only Core's unresolved reference is left out (third finding).
- Description, only a same-reference write is skipped, with nothing in the settings or the CSS and a no-change result: verified (new test, second case; probe).
- Description, a matching value is written with the quoted note, and after squaring the pill token pill corners on a badge are a change: verified (new test, first and third cases).
- Description, the missed line names each part with its state or at rest, backed by a new JSON list: verified for states; variants are named at rest (second finding).
- Description, a change that changes nothing visible says so: holds for the badge; broken by the checkbox, switch and clickable-card cases (first finding).
- Description, the smallest restoration adds no JSON field and no public API: false; the experimental results gain
missedWhere(third finding). - Description, the before and after evidence for pill corners, the same reference, the squared pill token and square corners: verified (all four new tests pass).
- Description, the new test covers both cases and the missed test checks the line's meaning: verified; the missed test checks the wording only.
- Description, the full suite tally, four unrelated failures and clean typechecks: not rerun; CI's test and typecheck jobs did not run on this head, and the touched test files pass here.
- Owner's comment, a test shows a pill badge after squaring the pill token: verified (new test, third case).
Files:
.changeset/experimental-theme-set-repeats-drawn.md: clear (experimental patch describing the decided rule).packages/cli/api/theme-edit/_context.mjs: stale JSDoc for the new reader (third finding); comparison logic clear.packages/cli/api/theme-edit/_edit.mjs: at-rest-only gate (first finding); variant dropped frommissedWhere(second finding).packages/cli/api/theme-edit/theme-edit.type.mjs: adds the experimentalmissedWhere;missedOn's doc is now stale (non-blocking).packages/cli/api/theme-edit/theme-missed-parts-named.test.mjs: wording check only; no variant case.packages/cli/api/theme-edit/theme-set-repeats-drawn.test.mjs: passes; no state case; third test lacks the unbuilt guard (non-blocking).packages/cli/clients/cli/commands/experimental/theme.mjs: status line clear;missedWhereprinted again as its own block (non-blocking); formatting-only rewraps.
…ed line names the variant A part write is skipped only when every look it reaches, its states included, already uses the same token reference, so a fill that recolors a checked box is written. The missed line names the variant a miss is in (toast type:error at rest).
|
/approve-spec 6c40a1b |
There was a problem hiding this comment.
Changes requested. The latest commit fixes both earlier blockers: a fill Core draws at rest but not when checked is now written, and the missed line names the variant (toast type:error at rest). Two things still need fixing:
set <theme> background-color 'var(--color-overlay-pressed)' --on tree-list-itemis refused as[no change] … already shows; nothing writtenalthough writing it would tint every tree item at rest, because the already-drawn check now counts looks Core draws only while pressed or on a::before/::afterand no longer requires one at rest (packages/cli/api/theme-edit/_edit.mjs:6417-6420);box-shadow var(--shadow-low) --on switch-thumbbehaves the same, and requiring the at-rest reference to equal the every-look one fixes both while the new tests still pass.- Regression: the changeset's first bullet says a setting that writes Core's at-rest token reference is not written, but since the latest commit such a setting is written when a state draws another value (
background-color var(--color-background-surface) --on checkbox-indicator, as the new test asserts), so the release note overstates the rule (.changeset/experimental-theme-set-repeats-drawn.md:7).
The earlier notes on the repeated missedWhere: block, the drawn JSDoc and the missing unbuilt guard still apply.
Claims and files checked
Review mode: incremental; reason: none
Changed rules (0): none, same recipe version as the last review.
Claims:
- Changeset, a new part setting that writes Core's at-rest token reference is not written and the result says no change: false as worded; a setting whose states differ is written (second finding), and one Core draws only in a state is skipped (first finding).
- Changeset, a value that only matches what the part draws today is written as the person's own, with a note that it holds if the token changes: verified (new test, first case).
- Changeset, the missed line says each named part still shows the base look where the changes did not reach, keep it or bring it in line: verified (missed-line test; accent and danger runs).
- Description, before this change pill corners on a round badge were listed as styled with no sign that nothing changed: verified from the base code, whose styled list has no reader for Core's drawing.
- Description, before this change the missed line gave a count and parts with no meaning: verified from the removed text.
- Description, only a write of Core's reference in every look the write reaches is skipped, with nothing written and a no-change result: verified for the badge and the checkbox; false for a reference Core draws only while pressed or on a pseudo-element (first finding).
- Description, a matching value is written with the quoted note, and after squaring the pill token pill corners on a badge are a change: verified (new test, first and third cases).
- Description, the missed line names each part with its variant and state or at rest, backed by the new experimental field, and says to keep it or run show's line: verified (new test, fifth case; accent run names the disabled primary button).
- Description, a change that changes nothing visible says so: holds for the badge; broken by the tree-list-item and switch-thumb cases (first finding).
- Description, the smallest restoration adds one optional reader, the check, a note, the missed text and one experimental field, with no existing field changed: verified.
- Description, the before and after evidence for pill corners, the same reference, the squared pill token and square corners: verified (all six new tests pass).
- Description, the new test covers both cases and the missed test checks the line's meaning: verified; the missed test checks the wording only.
- Description, the full suite tally, four unrelated failures and clean typechecks: not rerun; the two touched test files pass here, CI's typecheck passed, and most of its Node test shards were still running.
- Description, one defect restored, no new API hidden under the fix label, no internal context: verified; the new field is named in the description.
- Owner's comment, a test shows a pill badge after squaring the pill token: verified (new test, third case).
Files:
.changeset/experimental-theme-set-repeats-drawn.md: first bullet overstates the rule (second finding).packages/cli/api/theme-edit/_context.mjs: comparison clear; thedrawnJSDoc is stale (non-blocking).packages/cli/api/theme-edit/_edit.mjs: state-only and pseudo-element looks count as already drawn (first finding); variants now carried into the missed entries.packages/cli/api/theme-edit/theme-edit.type.mjs: adds the experimentalmissedWhere;missedOn's doc is now stale (non-blocking).packages/cli/api/theme-edit/theme-missed-parts-named.test.mjs: clear (wording check).packages/cli/api/theme-edit/theme-set-repeats-drawn.test.mjs: passes; no state-only case; third test lacks the unbuilt guard (non-blocking).packages/cli/clients/cli/commands/experimental/theme.mjs: status line clear;missedWhereprinted again as its own block (non-blocking); formatting-only rewraps.
…docs match A part write is skipped only when the part draws the same token reference at rest and in every state; a look Core draws only while pressed, or on a pseudo-element, never skips a resting tint. The release note says so, the text result no longer repeats the missed places as their own block, and the drawn reader is described as it reads.
|
/approve-spec efa68bb |
There was a problem hiding this comment.
Changes requested. The latest commit fixes the pressed and pseudo-element cases (tree items and switch thumbs are written again), the changeset wording, the repeated missedWhere block, the drawn doc and the test guard. Two things still need fixing:
set <theme> box-shadow var(--shadow-low) --on segmented-control-itemis refused as[no change] … already shows; nothing writtenalthough Core draws that shadow only on the selected item, because a look keyedselected=selectedstill counts as at rest (packages/cli/api/theme-edit/_edit.mjs:6367-6371);font-weight var(--font-weight-medium) --on selector-option-rowbehaves the same, and deciding "at rest" from the part's declared states (selected,disabled,highlighted) would write both.- Miss: after
set <theme> accent '#0b5cff'andset <theme> vibrancy 40, the missed line namesbutton at restandbadge at restalthough only the destructive button and the info, success, warning and error badges keep the base colors, because a status-fill miss's variant is read only from its steps'--when, which its dial steps never carry (packages/cli/api/theme-edit/_edit.mjs:8745-8747).
One smaller note: the missed line says show lists each miss with its line, while show lists the first six (theme.mjs:650).
Claims and files checked
Review mode: incremental; reason: none
Changed rules (0): none, same recipe version as the last review.
Claims:
- Changeset, a new part setting that writes the same token reference Core uses there at rest and in every state is not written and the result says no change: false in effect; a reference Core draws only on the selected item is also skipped (first finding); verified for the badge (new test, second case).
- Changeset, a value that only matches what the part draws today is written as the person's own, with a note that it holds if the token changes: verified (new test, first case; probe).
- Changeset, the missed line names each part with its variant and state or at rest, says it still shows the base look, and the JSON lists the same places: false for status-fill misses, which are named at rest without their variant (second finding); verified for disabled, selected and the error toast.
- Description, before this change pill corners on a round badge were listed as styled, saved and built with no sign that nothing changed: verified from the base code, whose styled list has no reader for Core's drawing.
- Description, before this change the missed line gave a count and parts with no meaning: verified from the removed text.
- Description, the styled list compared a new part rule only with the base theme's own rules: verified from the base code.
- Description, only a write of Core's reference in every look the write reaches is skipped, with nothing written to the settings or the CSS and a no-change result: nothing-written verified (probe: settings and CSS unchanged); "only" is false for selected-only looks (first finding).
- Description, a matching value is written with the quoted note, and after squaring the pill token pill corners on a badge are a change: verified (new test, first and third cases).
- Description, the missed line names each part with its variant and state or at rest, adds the experimental field, and says to keep it or use the line show gives: false for status-fill misses (second finding); the text names the first six and counts the rest.
- Description, square corners on a badge are still listed as styled: verified (new test, last case).
- Description, the new test file covers both cases and the missed-parts test checks the new wording: verified; all ten tests pass here.
- Description, the restoration is one optional reader, the same-reference check, a match note, the missed text and one new experimental field, with no existing field changed: verified from the diff, which also rewraps two blocks of formatting.
- Description, the full node test run and the typechecks are clean apart from four unrelated failures: not rerun in full; the two changed test files and the CLI's JSON-API typecheck pass here, and the strict typecheck reports only two missing built-theme imports in templates this pull request does not touch.
Files:
.changeset/experimental-theme-set-repeats-drawn.md: clear.packages/cli/api/theme-edit/_context.mjs: clear.packages/cli/api/theme-edit/_edit.mjs: both blocking findings.packages/cli/api/theme-edit/theme-edit.type.mjs: clear.packages/cli/api/theme-edit/theme-missed-parts-named.test.mjs: clear.packages/cli/api/theme-edit/theme-set-repeats-drawn.test.mjs: clear; a selected-only case would hold the first fix.packages/cli/clients/cli/commands/experimental/theme.mjs: one non-blocking wording note.
…s its variants A look keyed on a state attribute (selected=selected) counts as a state, so a write Core draws only on the selected item is written. A status fill kept at the base vibrancy carries the variants it is drawn in, so the missed line names badge variant:info, ... instead of badge at rest. The missed line says show lists the first misses.
|
/approve-spec e67c3a1 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet. The latest commit fixes both remaining issues: a look Core draws only on the selected item no longer counts as already drawn, so box-shadow var(--shadow-low) --on segmented-control-item is written again, and status-fill misses now name their variants (button variant:destructive at rest). Two optional notes:
- The
missedline joins a status miss's variants with commas inside its comma-separated list (packages/cli/api/theme-edit/_missed.mjs:635), sobadge variant:info, variant:success, variant:warning, variant:error at restis hard to tell apart from its neighbours; joining the variants another way (variant:info/success/warning/error) keeps each place one item. packages/cli/api/theme-edit/theme-set-repeats-drawn.test.mjs:165asserts only thatbadge at restis absent, which also passes when the badge is not missed at all.
Claims and files checked
Review mode: incremental; reason: none
Changed rules (0): none, same recipe version as the last review.
Claims:
- Changeset: a new part setting that writes the same token reference Core uses there, at rest and in every state, is not written, and the result says no change: verified (new test, second case; probe; selected-only and pressed-only references are written).
- Changeset: a value that only matches what the part draws today is written as the person's own, with a note that it holds if the token changes: verified (new test, first case; probe).
- Changeset: the missed line names each part with its variant and state or at rest, says it still shows the base look, says to keep it or follow show's line, and the JSON lists the same places: verified (probe: status, role-color, disabled and selected misses; missed-parts test).
- Description: before this change, pill corners on a round badge were listed as styled, saved and built with no sign that nothing changed: verified (base probe).
- Description: before this change, the missed line gave a count and parts with no meaning: verified (base probe).
- Description: the styled list compared a new part rule only with the base theme's own rules: verified from the base code.
- Description: only a write of the reference Core already writes in every look the write reaches is skipped, with nothing written to the settings or the CSS and a no-change result: verified (probe; a scan of the part data finds no part with a rendered resting look refused).
- Description: a matching value is written with the quoted note, and after squaring the pill token, pill corners on a badge are a change: verified (new test, first and third cases).
- Description: the missed line names each part with the variant and state or at rest (the error toast, for example), adds the experimental field, and says to keep it or run show's line: verified (probe; the text names the first six and counts the rest).
- Description: square corners on a badge are still listed as styled: verified (new test, last case).
- Description: the new test file covers both cases and the missed-parts test checks the new meaning: verified; all twelve tests pass here.
- Description: the change is one optional reader, the same-reference check, a match note, the missed text and one new experimental field, with no existing field changed: verified; it also gives internal missed entries a variant and rewraps two formatting blocks.
- Description: the full node test run and the typechecks are clean apart from four unrelated failures: not rerun in full; the changed tests and the CLI's JSON-API typecheck pass, and the strict typecheck reports only two missing built-theme imports in templates this pull request does not touch.
Files:
.changeset/experimental-theme-set-repeats-drawn.md: clear.packages/cli/api/theme-edit/_context.mjs: clear.packages/cli/api/theme-edit/_edit.mjs: clear.packages/cli/api/theme-edit/_missed.mjs: one non-blocking readability note.packages/cli/api/theme-edit/theme-edit.type.mjs: clear.packages/cli/api/theme-edit/theme-missed-parts-named.test.mjs: clear.packages/cli/api/theme-edit/theme-set-repeats-drawn.test.mjs: one non-blocking test note.packages/cli/clients/cli/commands/experimental/theme.mjs: clear.
| found.push({ | ||
| kind: 3, | ||
| part: p, | ||
| ...(statusLooks.length ? {when: statusLooks.join(', ')} : {}), |
There was a problem hiding this comment.
Non-blocking: these variants are joined with , , and the missed line (theme.mjs:650) joins places with , too. After accent '#0b5cff' and vibrancy 40 the line reads …, segmented-control-item selected, badge variant:info, variant:success, variant:warning, variant:error at rest, top-nav-item selected, …, where a reader cannot tell where the badge's place ends. Joining a miss's variants another way (variant:info/success/warning/error) keeps each place one item.
| await themeEditSet('t', 'vibrancy', '40', {cwd}) | ||
| ); | ||
| const where = /** @type {string[]} */ (r.data?.missedWhere ?? []); | ||
| expect(where).not.toContain('badge at rest'); |
There was a problem hiding this comment.
Non-blocking: this also passes when the badge is not missed at all. Asserting the entry it now names (a match on badge variant:info, say) would hold the fix.
User impact
Two pieces of
astryx experimental theme editoroutput misled people:set <theme> corners pill --on badge, on a base whose badges are already round, reportedstyled: badge: border-radius 9999px, as if something changed. Nothing changed on screen, the setting was still saved and built, and the result did not say so.newopened with "missed: 5 misses on 5 parts the theme's changes did not reach (button, …)". It did not say whether anything was wrong, or whether to act.Problem and solution fit
var(--radius-full)) was never compared. So a write that repeats Core's look counted as a change, and the "changes nothing you see" note never fired.border-radius var(--radius-full) --on badge) is not written: nothing lands in the settings or the CSS, and the result says[no change].corners pill, written as 9999px) is the person's own choice. It is written, and the result says: "badge already draws border-radius 9999px at rest (from var(--radius-full)): this writes 9999px as its own, so it holds if that token changes". The theme's own token values count, so after--radius-full 0px, pill corners on a badge are a change.toast type:error at rest; new experimental JSON fieldmissedWhere), says each still shows the base theme's own look there, and says to keep it or run show's line for it.Expected behavior and authority
The editor's result contract: a change that changes nothing visible says so ("this changes nothing you see"); output tells the reader whether to act.
Smallest restoration
One optional reader passed into
styledChanges, the same-reference check before the commit, a match note, the text of the missed line, and one new experimental JSON field,missedWhere; no existing field changes.Evidence
corners pill --on badgeprintedstyled: badge: border-radius 9999px.corners pill --on badgeon a round badge is written, with the note that it matches what the badge draws now;border-radius var(--radius-full) --on badgegives[no change], with nothing written; after--radius-full 0px,corners pill --on badgestylesbadge: border-radius 9999px.corners square --on badgestill listsbadge: border-radius 0px.theme-set-repeats-drawn.test.mjscovers both cases.theme-missed-parts-named.test.mjschecks the missed line's new meaning.Scope
Components: cli theme editor (set and new results)
Testing
CI=1 vitest run --project nodeon every theme-editor test file,clients/cli/commands/andpackages/cli/test/: 8280 pass.Four failures fail the same way without this change:
theme-accent-lift, from a stale local theme build (a fixture issue fixed separately);Also clean: typecheck, typecheck:strict, typecheck:json-api, typecheck:authoring and api-dts; check:changesets.