Skip to content

fix(cli): experimental theme editor - glossy writes no sample gradient - #13420

Merged
josephfarina merged 3 commits into
feature/theme-editorfrom
hq13k/fu-glossy-none
Nov 21, 2026
Merged

josephfarina merged 3 commits into
feature/theme-editorfrom
hq13k/fu-glossy-none

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Two commits plus a revert: the own-fill gloss was reverted in place after review, so this lands as "glossy writes no sample" (the tree equals its first commit).

User impact

Asking the experimental theme editor for a glossy look, for example the brief "Surface: glossy gradient buttons and top bar, flat cards.", wrote the same sample gradient, white to indigo (linear-gradient(#ffffff 0%, #c7d2fe 45%, #6366f1 100%)), on every part it named: the buttons, the app shell header and the top nav, in both modes. The buttons and the bar turned indigo, whatever the theme's own colors and in dark mode too.

Problem and solution fit

  1. Why does it happen? "glossy" was answered with one fixed sample value, never with the part it was said of.
  2. Why does it harm the task? A gloss is a treatment of a part's own color; a fixed indigo gradient replaces the color instead.
  3. Why does that matter? The theme's buttons and bar change hue, and the dark mode gets a light gradient.

The smallest fix stops writing the sample: the answer writes nothing for "glossy" and shows the sample as an example the person can set.

Expected behavior and authority

An owner ruled that the sample gradient is never written for "glossy" (help text only).

Smallest restoration

  • The glossy answer writes nothing and names the sample as an example background value.
  • The gradient design word and every other design word are unchanged.

Evidence

  • Reproduction before the change: the brief above writes background 'linear-gradient(#ffffff 0%, #c7d2fe 45%, #6366f1 100%)' on button, app-shell-header and top-nav.
  • Result after the change: the brief writes only box-shadow none --on card; the glossy part of the answer says a gloss is a gradient of the part's own color and gives the sample to set.
  • Representative unchanged path: "a gradient header", "glossy page" and "no glossy buttons" answer the same.
  • Regression test or other mutation-sensitive proof: theme-how-glossy-sample.test.mjs and the glossy gradient header row in theme-how.test.mjs fail before the change and pass after.

Scope

Components: CLI (experimental theme editor how)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest run packages/cli/api/theme-edit/theme-how-glossy-sample.test.mjs packages/cli/api/theme-edit/theme-how.test.mjs
  • Full packages/cli/api/theme-edit directory

replay: worse 0 at a71dac3

preflight: pass a71dac3

"glossy gradient buttons and top bar" wrote one sample gradient, white to
indigo, on every part it named, whatever the part's color or the mode. A
gloss is a gradient of the part's own color in each mode, which the editor
does not work out here: the answer writes nothing and gives the sample as
an example to set.
… own fill

On top of writing no sample: a gloss is now made from the part's own fill
in each mode, ten tones lighter at the top and ten darker at the bottom on
the palette's tone scale, through the fill. The fill is one said for the
part in the ask (never a color or tone said of its text or border), else
the fill the theme sets on the part or on a variant of it, that mode's
first, else each variant's own fill, the base theme's rule for a variant
first. A variant, mode or part with no plain fill of its own keeps its
look, and the answer names it.
@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 5:52pm 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
@josephfarina josephfarina changed the title fix(cli): experimental theme editor - glossy writes no sample gradient fix(cli): experimental theme editor - glossy is a gloss of the part's own fill, never a sample Nov 21, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 7015886

@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, 6:13 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.

Changes requested: glossy buttons, bars and cards now take a gloss of their own fill, but three cases still answer wrongly.

  • Banners and toasts vary by status and type rather than variant, so "glossy banners" writes one gloss of the info fill on every banner (error, warning and success lose their colors), "glossy toasts" glosses the error toast in the default toast's color, and "glossy error banner" writes nothing while saying the banner draws no fill (_how-question.mjs, lines 27450–27458).
  • When a named variant has no fill, the answer names the part instead: "glossy ghost buttons" says "button draws no fill of its own here", which is wrong for primary and destructive buttons (line 27520).
  • A gradient the theme already set is reported as "none, or a see-through one", for example "glossy header" after "gradient header" (line 27521).

Building the looks from the axis each part varies by, naming the variant in both no-fill answers, and naming a gradient fill when one governs would resolve these, and banner and toast cases in the new test would pin the first.

Claims and files checked

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

  • Claim (title): glossy is a gloss of the part's own fill, never a sample: verified for parts with variants and single-look parts; false for banner and toast looks (first finding).
  • Claim (release note): ten tones lighter at the top and ten darker at the bottom, through the fill, written as colors; white keeps a white top and black a black bottom: verified in glossOf and in the written values.
  • Claim (release note): a fill said in the ask comes first, never a color said of the text or border: verified ("glossy blue buttons", "Top bar: dark (#222), glossy", the text-color asks).
  • Claim (release note): else the theme's own fill on the part or a variant, that mode first: verified by the new tests (part fill, one-variant fill, light-dark pair).
  • Claim (release note): else each variant's own fill: verified for variant parts; false for banner (status) and toast (type).
  • Claim (release note): a variant, mode or part with no plain fill keeps its look, and a top nav in a bar writes nothing unless a fill is said: verified ("glossy top nav" against "glossy blue top nav").
  • Claim (release note): an experimental patch entry for the CLI: verified.
  • Claim (description): before, the brief wrote the indigo sample on the button, the app shell header and the top nav: verified on the base.
  • Claim (description): on Neutral, the primary button's light and dark glosses, the destructive button's own red tint, and secondary and ghost unchanged: verified with the exact values quoted.
  • Claim (description): each app shell header variant takes its own gloss per mode and the top nav is not written: verified (the section variant keeps its look).
  • Claim (description): a #222 bar glosses #222, and a theme's own button or variant fill is glossed: verified.
  • Claim (description): a look with no plain fill writes nothing and the answer names it: verified for secondary; false for a named variant with no fill such as ghost (second finding).
  • Claim (description): the seventeen listed glossy asks change, and the glossy page, no-glossy and gradient asks do not: verified, each ask run on the base and the head.
  • Claim (description): known limit in "the top bar is dark and glossy": verified; the gloss covers that answer's own fill line.
  • Claim (description): the regression test fails before the change and passes after: verified (12 of 12 fail on the base, 12 of 12 pass on the head).
  • Claim (description): two commits, the first writing no sample and the second the own-fill gloss: verified.
  • Claim (description): about 150 lines of code plus the test and release note: approximately right (173 non-comment lines added).
  • Claim (description): one defect, no hidden public API, default or interaction model, no internal context: verified.
  • Claim (description): the two named test files and the theme-edit directory pass: the two files verified on the head and on the head merged into the current base; the whole directory was not rerun.
  • File .changeset/experimental-theme-how-glossy-own-fill.md: finding (its "each variant's own fill" is false for banner and toast)
  • File packages/cli/api/theme-edit/_how-question.mjs: three findings (above)
  • File packages/cli/api/theme-edit/_tables.mjs: clear
  • File packages/cli/api/theme-edit/theme-how-glossy-own-fill.test.mjs: clear (banner and toast cases belong with the first fix)
  • File packages/cli/api/theme-edit/theme-how.test.mjs: clear

Automated review (maintainer link)

…wn fill

Review found gaps in reading each part's own fill (banners and toasts,
size-scoped asks, a named ghost variant). Back to writing no sample: the
glossy answer writes nothing and shows the sample as an example.
@josephfarina josephfarina changed the title fix(cli): experimental theme editor - glossy is a gloss of the part's own fill, never a sample fix(cli): experimental theme editor - glossy writes no sample gradient Nov 21, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a71dac3

@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: a glossy ask no longer writes the white-to-indigo sample; each glossy part gets a help line instead, and the new test and the changed theme-how row fail on the base and pass here.

  • Non-blocking: the help example drops the variant or mode the ask named ("glossy primary buttons" shows --on button, "glossy buttons in dark mode" shows no --mode dark), so copying it as shown writes the sample on every variant in both modes; building it from the same --when, --state and --mode flags would keep it to the ask.
Claims and files checked

Review mode: full; reason: over-500-lines

  • Claim (release note): an experimental patch entry for the CLI: verified ([experimental], '@astryxdesign/cli': patch).
  • Claim (release note): how "glossy buttons" no longer writes one white-to-indigo sample on every part it names: verified (the base writes it on buttons, the app shell header, the top nav, cards and badges; the head writes nothing).
  • Claim (release note): a gloss is a gradient of the part's own color, so the answer writes nothing and gives the sample as an example: verified (_how-question.mjs lines 27314-27320 and the answers).
  • Claim (description): two commits plus a revert, with the tree equal to the first commit: verified.
  • Claim (description): before, the brief wrote the sample on the button, the app shell header and the top nav, in both modes: verified on the base.
  • Claim (description): an owner ruled that the sample is never written for glossy, as help text only: verified by an engineering owner's spec approval for this head.
  • Claim (description): the glossy answer writes nothing and names the sample as an example background value: verified.
  • Claim (description): the gradient word and every other design word are unchanged: verified (the design-word table is untouched; "a gradient header" answers the same).
  • Claim (description): after the change the brief writes only the card shadow line, and its glossy part names the sample: verified.
  • Claim (description): "a gradient header", "glossy page" and "no glossy buttons" answer the same: verified, output identical on base and head.
  • Claim (description): the new test and the glossy gradient header row fail before the change and pass after: verified (both fail on the base; 724 tests pass on the head).
  • Claim (description): one defect, no tagalongs, no hidden public API, default or interaction model, no internal context: verified.
  • Claim (description): the two named test files and the whole theme-edit directory pass: the two files verified; of the directory, all 64 theme-how files were rerun and pass (1,489 tests); the rest was not rerun.
  • File .changeset/experimental-theme-how-glossy-no-sample.md: clear
  • File packages/cli/api/theme-edit/_how-question.mjs: one non-blocking note (above)
  • File packages/cli/api/theme-edit/theme-how-glossy-sample.test.mjs: clear
  • File packages/cli/api/theme-edit/theme-how.test.mjs: clear

Automated review (maintainer link)

// which differs by part and mode; the sample is help, never written.
if (design === 'glossy')
return {
text: `a glossy fill${where} is a gradient of the part's own color in each mode, which the editor does not work out here, so nothing is written; set one as a background, for example: background ${DESIGN.glossy} --on ${on}`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: the example keeps only --on ${on}, so it drops the scope the ask named. "glossy primary buttons" answers "a glossy fill on button (variant primary) … --on button", and "glossy buttons in dark mode" shows no --mode dark; copied as shown, it writes the sample on every variant in both modes. Building the example from the same --when, --state and --mode that f carries would keep it to what was asked.

@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 18:18
@josephfarina
josephfarina merged commit c341b43 into feature/theme-editor Nov 21, 2026
9 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
#13420)

Reviewed pull request #13420, 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 hq13k/fu-glossy-none branch November 22, 2026 06:04

This branch was successfully deployed

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