Skip to content

fix(cli): experimental theme editor - an ask that starts with clear the and names only removable looks takes them away - #13262

Merged
josephfarina merged 5 commits into
feature/theme-editorfrom
fix-how-clear-scope
Nov 21, 2026
Merged

josephfarina merged 5 commits into
feature/theme-editorfrom
fix-how-clear-scope

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Design

how reads a "clear" by the clause it is in, using the parts, mode, variant and looks the clause reader already placed. There is no list of trigger words.

  1. The ask. It is the question as asked, from "clear the …" (or "clear my", "clear all the", …) to the end of its sentence or line, or to an "and", "then", "but", comma or semicolon that starts another ask with a verb of its own (a second "clear" too) and a part of its own ("… and undo my heading edits", "…, clear the button border") or a look of its own, one the clear does not name, that it does not send back ("… and make the text white"). A next ask that names neither ("… and keep the base value", "… and use a softer one", "… and use a softer shadow"), sends its look back ("… and restore the shadow") or points back at the look ("… and reset it", "… and put it back") stays in the ask, so its words keep main's reading.
  2. Removal. The clause that starts with that "clear" names a part and only removable looks (background, border, shadow, outline, padding, …), with no color, length, named property, state or direction. Every word of the ask is a word the clause reader placed in that clause (the part, its mode or variant, a word for one of the clause's own looks) or a joining word (the, my, 's, on, of, …). Then "clear" reads as "remove".
  3. Otherwise main. Any other word anywhere in the ask (a way back such as "back to the default" or "as before", the person's edits such as "changes" or "tweaks", what someone made such as "I added" or "custom", a color, a value, or a property such as "border color") leaves the ask as said: a reset, as on main. So does a "clear" that does not start its ask ("how do I clear …", "can you please clear …", "a clear border") or that names no determiner ("clear borders on cards").

User impact

astryx experimental theme editor how "clear the dark mode card background" answered that the theme already uses the base value, so the base's own dark card fill stayed drawn. "remove the dark mode card background" already gave the transparent fill. Now the clear ask gives the same answer: set <t> background-color transparent --on card --mode dark.

On a theme that already sets that look, such an ask now takes the look away (as remove does) instead of undoing the setting; any ask that names the person's edits ("clear my border changes") still undoes them.

Expected behavior and authority

No current record decides how how reads words; this is an [experimental] patch (spec:AST-017 FR22). The reading needs an engineering owner's decision on this pull request.

Evidence

  • Removal now: "clear the dark mode card background", "clear the dark mode secondary button background", "clear the card border", "clear the card's shadow", "clear the borders on inputs", "clear the card padding", "clear the card outline", "clear the card shadow and clear the button border" (both removed), "clear the card shadow, clear the button border", "clear the card shadow, then make the radius 8px" (removal beside the radius), "clear the card shadow; clear the button border" and "… and then clear the button border" (both removed), "cards: clear the border", "please clear the card shadow", "clear the card shadow and make the text color white", "clear the card border and undo my heading edits", and "clear the card shadow" on a line of its own.
  • As on main: "clear the card's border and shadow" (the clause reader puts "shadow" in a clause of its own), "clear the card shadow and set it back to the default" / "and reset it" / "and restore it" / "and revert it to the base value" / "and undo it" / "and put it back" / "but keep it as the base theme has it" / "and restore the shadow" / "and keep the base value" / "and use the base value", "clear the card shadow and use a softer one" / "… a softer shadow", "clear the card background and restore the background" / ", and restore the background" / "and reset the background" / "and undo the background" / "and use the base background", "clear the card shadow and the border color", "clear the card border-color", "clear the card border 1.5px", "clear the card background to white" / "so it is white", "clear the card shadow, back to the default" / "; back to the base value" / ", as before" / "to the default", "clear my card background changes", "clear the card overrides", "clear my card border tweaks", "clear my custom card shadow", "clear the added card border", "clear the border my teammate added to cards", "clear the shadow added to cards", "clear the card border, I added it by mistake", "clear the shadow my theme adds to cards", "how do I clear the card shadow", "can you please clear the card shadow", "clear borders on cards", "give inputs a clear border".

Scope

  • packages/cli/api/theme-edit/_how-question.mjs: askFrom and clearTakesAway, and one pass over the clauses after the clause reader has placed them. GOING_BACK, the removal verbs and the other readers are unchanged.
  • packages/cli/api/theme-edit/theme-how-clear-takes-away.test.mjs: every ask above, and a theme that sets the card background: "clear the card background" (also before "and clear the button border") takes it away, "clear my card background changes" undoes it.
  • .changeset/how-clear-takes-away.md.

Testing

  • npx vitest run packages/cli/api/theme-edit/theme-how-clear-takes-away.test.mjs --project node: 3 pass; the two removal tests fail without the change.
  • Every theme-how*.test.mjs plus theme-neutral-mode-words-direction.test.mjs: 65 files, 1,518 tests pass.
  • node scripts/check-changesets.mjs: valid; eslint and prettier clean.

replay: worse 0 at f826ee4

preflight: pass f826ee4

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 7:12pm UTC

Request Review

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

astracat-bot Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 7:30 PM 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.

Approval waits on an engineering owner's decision about how how reads a clause-leading "clear the …", and two reading defects need fixes.

No current spec record says how astryx experimental theme editor how reads an ask, so the new reading of "clear the " as a removal, including on a theme that already sets that thing (where it used to undo the edit), needs an engineering owner to record the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner.

Blocking:

  • "clear the card shadow and the border color" now prints set <theme> border none --on card (and "clear the shadow and the border color" prints --border-width 0px), because only the first removable thing is checked for a following property word (_how-question.mjs:2795-2807); keep the base reading when any removable thing in the clause is followed by color, width or another property word.
  • "clear the card background so it is white" (and "… so it goes back to white") now prints set <theme> --color-background-card '#f9fafb' --on card --mode light, moving white cards off white, because the purpose is cut before the way-back check (_how-question.mjs:2801-2808); run the way-back and colour checks before that cut and add both asks to the tests.
Claims and files checked

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

Claims:

  • Title: a "clear" that leads a clause takes its reading from its own object. Verified: _how-question.mjs:2787-2810.
  • Release note: a clause-leading "clear the / my / all …" with a removable object takes it away as "remove" does. Verified for single objects (head answers equal the base's "remove" answers); false when a joined item names a property ("… and the border color"), reported as a defect.
  • Release note: "clear the dark mode card background" gives the card a transparent fill in dark mode. Verified: theme-how-clear-scope.test.mjs:55-57, passes on the head, fails on the base.
  • Release note: it stays a reset for the person's edits, something someone made, a way back, and when the ask does not say which. Verified for the listed phrasings (third test, and the same answers as the base on an edited theme); present-tense makers ("my theme adds") are not covered, a non-blocking note.
  • Release note: "clear" said as a quality reads as before. Verified: the rewrite leaves "give inputs a clear border" unchanged.
  • Release note: an experimental patch for the CLI. Verified: .changeset/how-clear-scope.md:2, :5; the changeset check passes.
  • Description, design: the clause, object and reading rules. Verified in _how-question.mjs:2773-2811, except that the property-word rule covers only the first removable thing and the purpose cut runs before the way-back check (both reported).
  • Description, user impact: the clear ask used to say the theme already uses the base value and now gives the same transparent command as remove. Verified by running both asks on the base and the head.
  • Description: no current record decides how how reads words, and the change is an experimental patch. Consistent with the current records; the reading itself needs an owner decision.
  • Description, evidence lists: every listed ask is in the new test file. Verified.
  • Description, scope: one pass beside the existing "clear error messages" rewrite; the shared removal verbs and GOING_BACK are unchanged. Verified: _how-question.mjs:5742-5750 and the diff.
  • Description, testing: the new file passes and its two removal tests fail without the change. Verified on the head and on the base.
  • Description, testing: the 63 how test files (1,435 tests) pass, and the changeset check, eslint and prettier are clean. Verified by running them on the head.
  • Commit message: same as the description. Verified as above.

Files:

  • .changeset/how-clear-scope.md: clear; an experimental patch note that names the command.
  • packages/cli/api/theme-edit/_how-question.mjs: two blocking reading defects (joined property item, purpose that names a colour); otherwise consistent with the test file and the release note.
  • packages/cli/api/theme-edit/theme-how-clear-scope.test.mjs: passes; it has no row for a joined property item or a colour purpose, which the two fixes should add.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision about how how reads a clause-leading "clear the …", and one reading defect needs a fix.

No current spec record says how astryx experimental theme editor how reads an ask, so reading "clear the " as a removal, including on a theme that already sets that thing (where it used to take the edit back), needs an engineering owner to record the decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner.

Blocking:

  • Miss: "clear the card border-color" (and "… border-width", "… outline-color") now prints set <theme> border none --on card because the property check in clearTakesAway needs a space before the property word (_how-question.mjs:2779-2780); accept a hyphen there and add those asks to the fourth test.

The two reading defects from the earlier review are fixed. GitHub lists 59 files because feature/theme-editor was rewritten under this branch; merging its current tip into this branch would leave only this change's three files.

Claims and files checked

Review mode: full; reason: history

Claims:

  • Release note: a clause-leading clear whose object is a removable thing takes it away as remove does (dark mode card background gives a transparent dark fill): verified by the new test and by running both trees.
  • Release note: it stays a reset when the ask names the person's edits, something someone made, a way back, a colour or a value: verified by the third and fourth tests.
  • Release note: it stays a reset when the ask names a property of the thing ("the border color"): false for hyphenated names (border-color, border-width, outline-color remove the card border); true for the spaced forms.
  • Release note: clear said as a quality ("a clear border") reads as before: verified by the third and fourth tests.
  • Description: the ask ends at a sentence end, a line break, a list marker, or an and/then that does not go on with the object: verified by the second test.
  • Description: removal needs a determiner and a removable head, and unsure asks are left as said: verified, except the hyphenated property names above.
  • Description: "the default card shadow" is a removal and "back to the default" a way back: verified by the first and fourth tests.
  • Description: "clear the dark mode card background" now gives the same answer as remove: verified by running both trees.
  • Description: no current record decides how how reads words: verified against the current records.
  • Description: the change is three files: verified for this change's commits; GitHub also lists 56 files of base-branch history.
  • Description: the new test file's four tests pass and the two removal tests fail without the change: verified on the head and on the merge base.
  • Description: 63 how test files pass: partly verified; the 8 files that hold a "clear" ask (899 tests) and the new file pass on the head, the others were not rerun.
  • Description: release notes valid, eslint and prettier clean: verified.

Files:

  • packages/cli/api/theme-edit/_how-question.mjs: blocking finding at lines 2779-2780 (hyphenated property names); its other compare hunks are base-branch history.
  • packages/cli/api/theme-edit/theme-how-clear-scope.test.mjs: clear; it does not cover the hyphenated asks.
  • .changeset/how-clear-scope.md: its property claim is false for hyphenated names.
  • The other 56 files, each clear as base-branch history this change does not touch (content already on the base branch): .changeset/experimental-theme-body-font-keeps-heading-titles.md, .changeset/experimental-theme-contrast-state-tint.md, .changeset/experimental-theme-field-edge-follows-border.md, .changeset/experimental-theme-how-colon-subjects.md, .changeset/experimental-theme-how-stripe-name-forms.md, .changeset/experimental-theme-how-stripe-transparent.md, .changeset/experimental-theme-how-stripe-words-beside.md, .changeset/experimental-theme-how-stripes-on-striped-tables.md, .changeset/experimental-theme-how-system-type.md, .changeset/experimental-theme-how-the-page-label.md, .changeset/experimental-theme-kept-palette-hand-edits.md, .changeset/experimental-theme-page-note-one-mode.md, .changeset/experimental-theme-rest-look-keeps-hover-focus.md, .changeset/experimental-theme-rounding-anywhere-pills.md, .changeset/experimental-theme-text-size-main-piece.md, .changeset/how-first-ask-compiles-less.md, .changeset/how-text-look-runs.md, .changeset/theme-round15-part-02.md, .changeset/theme-round15-part-03.md, .changeset/theme-round15-part-13.md, docs/specs/AST-050-app-themes/spec.md, packages/cli/api/theme-edit/_check.mjs, packages/cli/api/theme-edit/_edit.mjs, packages/cli/api/theme-edit/_palette.mjs, packages/cli/api/theme-edit/_settings.mjs, packages/cli/api/theme-edit/_text-looks.mjs, packages/cli/api/theme-edit/theme-border-follows.test.mjs, packages/cli/api/theme-edit/theme-dials-reach-parts.test.mjs, packages/cli/api/theme-edit/theme-drawn-contrast-noted.test.mjs, packages/cli/api/theme-edit/theme-edit-text-size-main-piece.test.mjs, packages/cli/api/theme-edit/theme-field-edge-follows-border.test.mjs, packages/cli/api/theme-edit/theme-how-clause-subjects.test.mjs, packages/cli/api/theme-edit/theme-how-lexicon-need.test.mjs, packages/cli/api/theme-edit/theme-how-list-items.test.mjs, packages/cli/api/theme-edit/theme-how-page-reaches-frame.test.mjs, packages/cli/api/theme-edit/theme-how-roles-and-sides.test.mjs, packages/cli/api/theme-edit/theme-how-text-look-runs.test.mjs, packages/cli/api/theme-edit/theme-how-tint-and-mode-pairs.test.mjs, packages/cli/api/theme-edit/theme-how.test.mjs, packages/cli/api/theme-edit/theme-page-note-one-mode.test.mjs, packages/cli/api/theme-edit/theme-palette-newer-recipe-opens.test.mjs, packages/cli/api/theme-edit/theme-palette-unknown-recipe.test.mjs, packages/cli/api/theme-edit/theme-part-state-wins-build.test.mjs, packages/cli/api/theme-edit/theme-part-text-sits-core.test.mjs, packages/cli/api/theme-edit/theme-rest-look-keeps-hover-and-focus.test.mjs, packages/cli/api/theme-edit/theme-resting-shadow-part-rings.test.mjs, packages/cli/api/theme-edit/theme-set-takes-text-a-part-reads.test.mjs, packages/cli/api/theme-edit/theme-state-part-states-changed.test.mjs, packages/cli/api/theme-edit/theme-thick-borders-chain-reaches.test.mjs, packages/cli/api/theme-edit/theme-titles-shadows-alpha-state.test.mjs, packages/cli/api/theme-edit/theme-together-rounding-anywhere-reaches.test.mjs, packages/cli/api/theme-edit/theme-token-family-follows-fills.test.mjs, packages/cli/api/theme-edit/themeEditSet.doc.mjs, packages/cli/clients/cli/commands/experimental-theme-editor-set.doc.mjs, packages/cli/foundation/render/drawn-contrast.mjs, scripts/vitest-node-durations.json.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

Closing per the owner's ruling: this reading stays open as a design item. The word-boundary pre-pass keeps meeting new phrasings; the planned fix parses the ask with the clause reader how already has. Main's current reading stands meanwhile.

…he and names only removable looks takes them away

The clause reader places the parts, their mode or variant, and the looks
in each clause. An ask that starts with clear the and says nothing else
reads as remove. Any other word in the ask, a way back included, leaves
the reset reading.
…ps the clear a reset

An and plus a verb ends the ask only when the next ask names a part of
its own and does not point back at the look, so "and reset it" keeps
main's reading. The ask must hold only the looks its own clause placed.
The test covers a theme that sets the look.
@josephfarina josephfarina reopened this Nov 21, 2026
@josephfarina josephfarina changed the title fix(cli): experimental theme editor - a clear that leads a clause reads its own object fix(cli): experimental theme editor - an ask that starts with clear the and names only removable looks takes them away Nov 21, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 1fd5b69

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: an engineering owner approved the new reading of a clause-leading "clear the …" at this head, but three reading defects in the new code need fixes.

Blocking:

  • "clear the card background and keep the base value" (also "… and use the base value" and "clear the card shadow and use a softer one") now removes the look, because askFrom cuts off a next ask that names no part and none of the way-back words (_how-question.mjs:2259); keep such a next ask in the ask and add these asks to the tests.
  • A second "clear" in the same question does not start a new ask, since VERB has no "clear" and the ask never ends at a comma (_how-question.mjs:2253), so "clear the card shadow and clear the button border" removes only the button border and, on a theme that sets the card background, "clear the card background and clear the button border" undoes the background instead of removing it.
  • The description says padding and outline become removals, but "clear the card padding" and "clear the card outline" still keep the reset while "clear the card spacing" removes padding, because clearTakesAway strips only the clause reader's aspect name and not the word said (_how-question.mjs:2305-2306); strip the removable words whose look the clause placed and test them, or narrow the description.

The three findings from the earlier review are fixed.

Claims and files checked

Review mode: full; reason: history

Claims:

  • Release note: a clause-leading clear that names only parts, mode or variant and removable looks takes them away as remove does (the dark mode card background gets a transparent dark fill): verified by the first test and by running the head and the merge base; false for padding, outline, radius, gap and underline, which keep the reset.
  • Release note: before, the ask read as a reset and answered that the theme already uses the base value: verified on the merge base.
  • Release note: on a theme that sets the look, the ask takes it away, and an ask for the person's edits still undoes them: verified by the third test; false when a next ask asks for the base value.
  • Release note: any other word (a way back, also in a next ask pointing back with "it", the person's edits, what someone added, a second look, a colour, value or property) keeps the reset: verified by the second test.
  • Description: the ask ends at a sentence or line end, or at an and/then/but that starts another ask with its own verb: false when that verb is "clear".
  • Description: a next ask that points back, or goes back without a part of its own, stays in the ask: verified for "it" and the existing way-back words; false for "keep the base value" and "use a softer one".
  • Description: removable looks include background, border, shadow, outline and padding: false for outline and padding.
  • Description: a clear that does not lead its ask, or names no determiner, reads as before: verified by the second test.
  • Description: the dark mode card background ask now gives the transparent dark fill that remove gives: verified on both trees.
  • Description: no current record decides how the command reads words, so the reading needs an engineering owner's decision: verified; an engineering owner approved this head.
  • Description: the change is three files and leaves the way-back list, the removal verbs and the other readers unchanged: verified.
  • Description: the new test file's three tests pass and the two removal tests fail without the change: verified on the head and the merge base.
  • Description: the 65 how test files pass: verified (1,519 tests at this head).
  • Description: release notes valid, eslint and prettier clean: verified.

Files:

  • packages/cli/api/theme-edit/_how-question.mjs: three blocking findings (lines 2253, 2259, 2305-2306).
  • packages/cli/api/theme-edit/theme-how-clear-takes-away.test.mjs: clear; it lacks the asks behind the three findings.
  • .changeset/how-clear-takes-away.md: a valid experimental patch note; its list of removable looks implies padding and outline, which keep the reset.

Automated review (maintainer link)

…ask with its own part or look starts

A next ask ends the clear ask only when it names a part, or a look it
does not send back; "and keep the base value" stays in the ask. A second
clear, or a comma before one, starts an ask of its own. The words for the
clause's own looks (padding, outline) are what the ask may hold.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 3cce506

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: an engineering owner approved the new reading of a clause-leading "clear the …" at this head and the padding and outline finding is fixed, but two reading defects from the earlier review still stand in a narrower form.

Blocking:

  • On a theme that sets the card background, "clear the card background and restore the background" (also "… reset the background", "… undo the background") prints the transparent fill beside undo, "… and use the base background" prints only the transparent fill, and "clear the card shadow and use a softer shadow" removes the shadow, because askFrom treats a look the clear already names as the next ask's own (_how-question.mjs:2262); count a look as the next ask's own only when the clear's ask does not already name it, and add these asks to the tests.
  • A second "clear" after a semicolon, "and then" or ", then" still does not start a new ask, so "clear the card shadow; clear the button border" and "clear the card shadow and then clear the button border" remove only the button border (and, on a theme that sets the card background, "clear the card background; clear the button border" undoes it instead of removing it), because the split at _how-question.mjs:2255 skips ; and takes "then" as the verb; split at a semicolon as at a comma, allow an optional "then", and add both asks to the tests.

The other asks the earlier review named now read as intended.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Release note: a clause-leading clear that names only parts, mode or variant and removable looks takes them away as remove does (the dark mode card background gets a transparent dark fill): verified by the first test and by running the head and the merge base, now also for padding, outline, radius, gap and margin.
  • Release note: before, the ask read as a reset and answered that the theme already uses the base value: verified on the merge base.
  • Release note: on a theme that sets the look, the ask takes it away, and an ask for the person's edits still undoes them: verified by the third test.
  • Release note: any other word (a way back, also in a next ask pointing back with "it", the person's edits, what someone added, a second look, a colour, value or property) keeps the reset: verified by the second test; false for a next ask that sends the same look back without "it", such as "… and restore the background" or "… and use the base background".
  • Description: the ask ends at a sentence or line end, or at an and, then, but or comma before another ask with its own verb (a second clear too) and its own part or look: verified for "and clear", ", clear", "then clear" and "but clear"; false for "; clear", "and then clear" and ", then clear".
  • Description: a next ask that names neither, sends its look back, or points back stays in the ask and keeps main's reading: verified for "keep the base value", "use a softer one", "reset it", "put it back" and, on a fresh theme, "restore the shadow"; false for "restore the background" and "use the base background" on a theme that sets it, and for "use the base shadow" and "use a softer shadow".
  • Description: removable looks include background, border, shadow, outline and padding, with no colour, length, property, state or direction: verified.
  • Description: a clear that does not lead its ask, or names no determiner, reads as before: verified by the second test.
  • Description: the dark mode card background ask now gives the transparent dark fill that remove gives: verified on both trees.
  • Description: no current record decides how the command reads words, so the reading needs an engineering owner's decision: verified; an engineering owner approved this head.
  • Description: the change is three files and leaves the way-back list, the removal verbs and the other readers unchanged: verified.
  • Description: the new test file's three tests pass and the two removal tests fail without the change: verified on the head and the merge base.
  • Description: the 65 how test files pass: verified (1,519 tests at this head).
  • Description: release notes valid, eslint and prettier clean: verified.

Files:

  • packages/cli/api/theme-edit/_how-question.mjs: two blocking findings (lines 2255 and 2262).
  • packages/cli/api/theme-edit/theme-how-clear-takes-away.test.mjs: clear; it lacks the asks behind the two findings.
  • .changeset/how-clear-takes-away.md: a valid experimental patch note; its promise that a way back keeps the reset is false for a next ask that names the same look without "it".

Automated review (maintainer link)

…the clear ask

"…, then make the radius 8px" starts an ask of its own: the comma and
the joining word are read together.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec be5714e

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: an engineering owner approved the new reading of a clause-leading "clear the …" at this head, and "…, then clear …" now starts an ask of its own, but two reading defects still stand.

Blocking:

  • On a theme that sets the card background, "clear the card background and restore the background" (also "… reset the background", "… undo the background" and now "…, and restore the background") prints the transparent fill beside undo, "… and use the base background" prints only the transparent fill, and "clear the card shadow and use a softer shadow" removes the shadow, because askFrom treats a look the clear already names as the next ask's own (_how-question.mjs:2264); count a look as the next ask's own only when the clear's ask does not already name it, and add these asks to the tests.
  • A second "clear" after a semicolon or "and then" still does not start a new ask, so "clear the card shadow; clear the button border" and "clear the card shadow and then clear the button border" remove only the button border (and, on a theme that sets the card background, undo the background instead of removing it), because the split at _how-question.mjs:2256 has no semicolon and takes "then" after "and" as the verb; split at a semicolon as at a comma, allow an optional "then" after "and" or "but", and add both asks to the tests.

The other asks the earlier review named still read as intended.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Release note: a clause-leading clear that names only parts, mode or variant and removable looks takes them away as remove does (the dark mode card background gets a transparent dark fill): verified by the first test and by running the head and the merge base.
  • Release note: before, the ask read as a reset and answered that the theme already uses the base value: verified on the merge base.
  • Release note: on a theme that sets the look, the ask takes it away, and an ask for the person's edits still undoes them: verified by the third test.
  • Release note: any other word (a way back, also in a next ask pointing back with "it", the person's edits, what someone added, a second look, a colour, value or property) keeps the reset: verified by the second test; false for a next ask that sends the same look back without "it", such as "… and restore the background" or "… and use the base background".
  • Description: the ask ends at a sentence or line end, or at an and, then, but or comma before another ask with its own verb (a second clear too) and its own part or look: verified for "and clear", ", clear", ", and clear", ", then clear", "then clear" and "but clear"; false for "and then clear" and ", and then clear".
  • Description: a next ask that names neither, sends its look back, or points back stays in the ask and keeps main's reading: verified for "keep the base value", "use a softer one", "reset it", "put it back" and, on a fresh theme, "restore the shadow"; false for "restore the background" and "use the base background" on a theme that sets it, and for "use the base shadow" and "use a softer shadow".
  • Description: removable looks include background, border, shadow, outline and padding, with no colour, length, property, state or direction: verified.
  • Description: "clear the card shadow, then make the radius 8px" removes the shadow beside the radius: verified.
  • Description: a clear that does not lead its ask, or names no determiner, reads as before: verified by the second test.
  • Description: the dark mode card background ask now gives the transparent dark fill that remove gives: verified on both trees.
  • Description: no current record decides how the command reads words, so the reading needs an engineering owner's decision: verified; an engineering owner approved this head.
  • Description: the change is three files and leaves the way-back list, the removal verbs and the other readers unchanged: verified.
  • Description: the new test file's three tests pass and the two removal tests fail without the change: verified on the head and the merge base.
  • Description: the 65 how test files pass: verified (1,519 tests at this head; the description says 1,518).
  • Description: release notes valid, eslint and prettier clean: verified.

Files:

  • packages/cli/api/theme-edit/_how-question.mjs: two blocking findings (lines 2256 and 2264).
  • packages/cli/api/theme-edit/theme-how-clear-takes-away.test.mjs: clear; it lacks the asks behind the two findings.
  • .changeset/how-clear-takes-away.md: a valid experimental patch note; its promise that a way back keeps the reset is false for a next ask that names the same look without "it".

Automated review (maintainer link)

…out the same look, and ends at a semicolon

A look the clear already names is not the next ask's own ("… and restore
the background", "… and use a softer shadow"). A semicolon ends the ask
as a comma does, and "and then" is read as one joint.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec f826ee4

@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; it runs once the pull request is marked ready for review.

The new reading of a clause-leading "clear the " carries an engineering owner's approval at this head, and both reading issues from the earlier review are fixed: a next ask about the same look ("… and restore the background", "… and use a softer shadow") keeps the reset, and a second clear after a semicolon, "and then" or ", and then" is read as its own ask. One optional follow-up: a next ask that says "it" about the part ("clear the card shadow and give it a border") still keeps the reset, while "… and add a border" removes the shadow, so either narrow the pronoun check in askFrom or say in its comment and the description that any pronoun keeps the reset.

Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Release note: a clause-leading clear that names only parts, mode or variant and removable looks takes them away as remove does (the dark mode card background gets a transparent dark fill): verified by the first test and by running the base branch tip and the head.
  • Release note: before, the ask read as a reset and answered that the theme already uses the base value: verified on the base branch tip.
  • Release note: on a theme that sets the look, the ask takes it away, and an ask for the person's edits still undoes them: verified by the third test and on a theme that sets the card background and shadow.
  • Release note: any other word (a way back, also in a next ask pointing back with "it", the person's edits, what someone added, a second look, a colour, value or property) keeps the reset: verified; every such test ask prints the base's exact commands on both themes.
  • Description: the ask ends at a sentence or line end, or at an and, then, but, comma or semicolon before another ask with its own verb (a second clear too) and its own part, or a look the clear does not name that it does not send back: verified for every listed ask, including "; clear", "and then clear" and ", and then clear"; a next ask that says "it" about the part stays in the ask (the optional note above).
  • Description: a next ask that names neither, sends its look back, or points back stays in the ask and keeps main's reading: verified, also on a theme that sets the look.
  • Description: removable looks include background, border, shadow, outline and padding, with no colour, length, property, state or direction: verified.
  • Description: "clear the card shadow, then make the radius 8px" removes the shadow beside the radius: verified.
  • Description: a clear that does not lead its ask, or names no determiner, reads as before: verified by the second test.
  • Description: the dark mode card background ask now gives the transparent dark fill that remove gives: verified.
  • Description: no current record decides how the command reads words, so the reading needs an engineering owner's decision: verified; an engineering owner approved this head.
  • Description: the change is three files and leaves the way-back list, the removal verbs and the other readers unchanged: verified.
  • Description: the new test file's three tests pass and the two removal tests fail without the change: verified on the head and the base branch tip.
  • Description: the 65 how test files pass: verified (1,519 tests at this head; the description says 1,518).
  • Description: release notes valid, eslint and prettier clean: verified.

Files:

  • packages/cli/api/theme-edit/_how-question.mjs: one optional note (line 2261, the pronoun check).
  • packages/cli/api/theme-edit/theme-how-clear-takes-away.test.mjs: clear; it now holds the asks behind both earlier findings.
  • .changeset/how-clear-takes-away.md: clear; a valid experimental patch note whose claims match the code.

Automated review (maintainer link)

)) {
if (m[1] !== 'clear' && !isVerb(m[1])) continue;
const next = ` ${ask.slice((m.index ?? 0) + m[0].length)} `;
const pointsBack = /\b(?:it|them|that|those|this|these)\b/.test(next);

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.

Optional (not blocking): any it, them, that, those, this or these keeps the next ask in the clear's ask, also when it brings a look of its own and the pronoun names the part. On a theme that sets the card shadow, "clear the card shadow and give it a border" (also "… give them a border", "… make it rounder") prints undo <theme> box-shadow --on card beside the new border, while "clear the card shadow and add a border" prints set <theme> box-shadow none --on card. The JSDoc above and the description keep only a next ask that points back at the look. Either count a pronoun as pointing back only when the next ask names no look beyond the clear's (… && !aspectsOf(next).some(a => !said.includes(a)), with said moved above it), or say in the JSDoc and the description that any pronoun keeps the reset.

@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 20:01
@josephfarina
josephfarina merged commit de04f0e into feature/theme-editor Nov 21, 2026
9 checks passed
@josephfarina

Copy link
Copy Markdown
Contributor Author

Taken out of landing #13470 because the review of the combined head flagged a line this change made. It stays on the working branch and rides the next landing together with its fix: open the fix as a new pull request based on the working branch (it already holds this change), whose description names #13262.

josephfarina added a commit that referenced this pull request Nov 21, 2026
…he and names only removable looks takes them away (#13262)

Reviewed pull request #13262, 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
- #12787 experimental theme: a pressed or hovered part's flat tint is measured as the fill it is
- #13252 experimental theme: a one-color layer is a fill only where it covers the whole box
- #13300 experimental theme: a fill and its on-color set inside a part are measured as that part draws them
- #13321 experimental theme: a part's fill pair is measured though its on-color is set for the whole theme
- #13360 experimental theme: an on-color set on a part holding the readers leaves the fill pair out
- #12768 feat(cli): experimental theme editor show <theme> --on <part> gives what one part of a theme shows
- #13057 experimental theme pictures: sheet cells are never narrower than what they hold, and a panel over the page is drawn at its cell's full width
- #13200 experimental theme pictures: a change removes the pictures cut from a tall one
- #13199 experimental theme pictures: the pages section draws the sample app whole, cut between pages and named
- #13320 fix(cli): corners said before their edge run after it, so the whole answer does both
- #13375 experimental theme how: a clashing fill's text color goes in that fill's choice
- #13411 experimental theme how: a clash with a see-through fill joins its text too; another look's text leaves it joined
- #13420 fix(cli): experimental theme editor - glossy writes no sample gradient
- #13452 test(cli): the said-order test reads a named corner as that corner
- #13262 fix(cli): experimental theme editor - an ask that starts with clear the and names only removable looks takes them away
- #13450 fix(cli): experimental theme editor - a bar's text token is checked in the menus its items open
- #13442 feat(cli): a light neutral also fills the page, surface and card backgrounds in light mode
- #13477 docs(changeset): the clear reading takes looks away for one part
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed on main in #13470.

@github-actions
github-actions Bot deleted the fix-how-clear-scope branch November 22, 2026 06:04

This branch was successfully deployed

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