Skip to content

experimental theme: a part's fill pair is measured though its on-color is set for the whole theme - #13321

Merged
josephfarina merged 2 commits into
feature/theme-editorfrom
josephfarina/theme-a/fx-13300
Nov 21, 2026
Merged

josephfarina merged 2 commits into
feature/theme-editorfrom
josephfarina/theme-a/fx-13300

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the review finding on #13300: a fill and its on-color set inside a part were left out whenever the theme set the on-color anywhere else. Now only an on-color set on a part around this one, on a reader inside it, or for one variant or state leaves the pair out; one set for the whole theme or on a part elsewhere keeps it measured.

  • Before: after --color-on-accent '#111111' --mode dark, a white --color-accent on the top bar reported nothing in light, while its primary buttons drew white on white.
  • After: it reports 1:1 in light with its fix line; an on-color set on the app shell around the top bar still leaves it out.

Testing

theme-contrast-measures-whats-drawn.test.mjs (whole-theme and unrelated-part on-colors).

Gate

preflight: pass de0dd32 (CI half pass; review findings are the paired fix's: #13360)
replay: worse 0 at de0dd32

…r is set for the whole theme

A fill and its on-color set inside a part were left out whenever the theme set the on-color anywhere else, so after an on-color set for the whole theme (in dark mode) a white accent on the top bar reported nothing while its primary buttons drew white on white. Only an on-color set on a part around this one, on a reader inside it, or for one variant or state now leaves the pair out.

[skip ci]
@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 1:18pm 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, 3:47 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 which on-color settings leave the experimental theme editor's scoped fill pair out, and two defects need fixing either way.

No current spec governs this check, so an engineering owner needs to approve this reading, or name the spec that governs it, by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner): the pair is left out only when the on-color is also set for a variant or state, on a part around this one, or on a reader inside it, and stays measured for a whole-theme or unrelated-part on-color.

Blocking, whatever the owner decides:

  • The skip in packages/cli/api/theme-edit/_settings.mjs (lines 12758-12760) compares the other setting's --on name, so an on-color set through a group such as --on accent-fills or --on button-like now reports a false 1.00:1 problem inside app-shell-header, with a fix line that changes nothing the buttons draw; test the parts partsOf returns instead, and add an accent-fills case to the test.
  • The variant-or-state skip (lines 12756-12757) still fires for a setting on an unrelated part, so after --color-on-accent '#111111' --on card --state hover a white accent on the top bar reports nothing while its buttons draw white on white, which contradicts the changeset; apply the same parts test to those settings and say "variant or state" in the changeset.

Non-blocking: the function's JSDoc (lines 12686-12688) still says the pair is measured only where the on-color is set on no other part.

Claims and files checked

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

Claims:

  • Title: the pair is measured even though its on-color is set for the whole theme. Verified: with a dark-mode whole-theme on-color, a white accent on the top bar reports 1.00:1 in light on this head and nothing on the base.
  • The base left the pair out whenever the on-color was set anywhere else. Verified: the base predicate skips any other setting, and the base reports nothing for every case tried.
  • Now only an on-color set around the part, on a reader inside it, or for a variant or state leaves the pair out, and one set for the whole theme or elsewhere keeps it measured. Partly false: an on-color set through a group that styles a reader is measured (first blocking finding), and a state on-color on an unrelated part still leaves it out (second blocking finding).
  • Before, the top bar reported nothing while its primary buttons drew white on white. Verified: the base reports nothing, and the light on-accent there is white.
  • After, it reports 1:1 in light with its fix line. Verified: the problem comes with a fix that sets the on-color on app-shell-header in light.
  • An on-color set on the app shell around the top bar still leaves it out. Verified: the existing case passes on this head.
  • The test covers the whole-theme and unrelated-part on-colors. Verified: the new assertion fails on the base and passes on this head; both settings share one theme.
  • Changeset: the pair stays measured for a whole-theme or elsewhere on-color, and only a setting around it, on a reader, or for a variant leaves it out. False for a state on-color on another part, and it leaves out state (second blocking finding).

Files:

  • .changeset/experimental-theme-scoped-fill-pair-elsewhere.md: an [experimental] patch for @astryxdesign/cli, as the release rules require; its wording is part of the second blocking finding.
  • packages/cli/api/theme-edit/_settings.mjs: two blocking findings (lines 12756-12760); non-blocking JSDoc note (lines 12686-12688).
  • packages/cli/api/theme-edit/theme-contrast-measures-whats-drawn.test.mjs: clear; it lacks the group and state cases the fixes need.

Automated review (maintainer link)

…t reaches

The skip compared another setting's --on name, so an on-color set through a group that holds the buttons reported a false problem, and a variant or state setting on an unrelated part still left the pair out. A setting now counts by the parts it reaches: on a part around this one or a reader inside it, or on this part through a group or for a variant or state; a variant or state setting for the whole theme still counts.

[skip ci]

@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 which on-color settings leave the experimental theme editor's scoped fill pair out; both earlier blockers are fixed, and one defect needs fixing either way.

No current spec governs this check, so an engineering owner needs to approve the reading, or name the spec that governs it, by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner): the pair is left out when the same on-color is also set on this part through a group or for one of its variants or states, on a part around it, or on a part inside it that reads the on-color or holds one that does, and stays measured for a whole-theme or elsewhere on-color.

Blocking, whatever the owner decides:

  • Miss: in packages/cli/api/theme-edit/_settings.mjs (lines 12752-12760) an on-color set on a part inside the recoloured part that holds its buttons, such as --on top-nav inside app-shell-header, now gives a false 1.00:1 problem whose fix line changes nothing those buttons draw, so also count a part inside this one that holds a reader and add a --on top-nav case to the test.

Non-blocking: the Changeset's "or of the whole theme" describes a variant or state setting with no part, which set refuses.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0)

Claims:

  • Title: the pair is measured even though its on-color is set for the whole theme. Verified: with a dark-mode whole-theme on-color, a white accent on the top bar reports 1.00:1 in light on this head and nothing on the base.
  • The base left the pair out whenever the on-color was set anywhere else. Verified: the base predicate skips any other setting, and the base reports nothing for every case tried except an on-color set for dark on the top bar itself.
  • Now only an on-color set around the part, on a reader inside it, or for a variant or state leaves the pair out, and one set for the whole theme or elsewhere keeps it measured. Verified for whole-theme, unrelated-part and unrelated-state settings (measured) and for the app shell, a button and a button group (left out); an on-color set on a part inside that holds the buttons is measured too, which the blocking finding covers.
  • Before, the top bar reported nothing while its primary buttons drew white on white. Verified: the base reports nothing, and the light on-accent there is white.
  • After, it reports 1:1 in light with its fix line. Verified: the problem comes with a fix that sets the on-color on the top bar in light.
  • An on-color set on the app shell around the top bar still leaves it out. Verified: the case passes on this head.
  • The test covers the whole-theme and unrelated-part on-colors. Verified: the new assertions fail on the base and on the earlier head and pass on this head; they also cover an unrelated state and a group.
  • Changeset: a whole-theme or elsewhere on-color keeps the pair measured, and only one around it, on a reader (a group by its parts), or for a variant or state there or of the whole theme leaves it out. Verified, except that the editor cannot set a whole-theme variant or state (non-blocking).

Files:

  • .changeset/experimental-theme-scoped-fill-pair-elsewhere.md: an [experimental] patch for @astryxdesign/cli, as the release rules require; non-blocking note on its whole-theme clause.
  • packages/cli/api/theme-edit/_settings.mjs: one blocking finding (lines 12752-12760).
  • packages/cli/api/theme-edit/theme-contrast-measures-whats-drawn.test.mjs: clear; it lacks the inner-part case the fix needs.

Automated review (maintainer link)

: partsOf(ctx, y).some(
t =>
around(t) ||
readers.includes(t) ||

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.

Miss from the last review: a part inside x.on that holds a reader but does not read the on-color itself matches none of these tests. After set t --color-on-accent '#000000' --on top-nav, set t --color-accent '#ffffff' --on app-shell-header --mode light reports --color-on-accent (#ffffff) on --color-accent (#ffffff) is 1.00:1 in light with the fix --color-on-accent '#757575' --on app-shell-header --mode light, while the built theme gives .astryx-top-nav { --color-on-accent: #000000; } and the top bar's primary buttons sit inside top-nav, so they draw #000000 on white and the fix changes nothing for them (--on layout-header and --on stack do the same; the base left this pair out). The JSDoc above already says "no part around it or inside it". Also count (map[x.on]?.contains ?? []).includes(t) && (map[t]?.contains ?? []).some(r => readers.includes(r)), and add a --on top-nav case to the test.

josephfarina added a commit that referenced this pull request Nov 21, 2026
…ves the fill pair out

An on-color set on a part inside the recolored part that holds its buttons (the top nav in the top bar) gave a false 1.00:1 problem whose fix changed nothing the buttons draw. Such a part now counts as the readers do.

Fixes the review finding on #13321.

[skip ci]
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec de0dd32

@josephfarina
josephfarina marked this pull request as ready for review November 21, 2026 15:28

@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 has approved the skip reading for this head, and one defect against that reading remains.

  • Miss: in packages/cli/api/theme-edit/_settings.mjs (lines 12755-12759), an on-color set on a part inside the recoloured part that holds its buttons, such as --on top-nav inside app-shell-header, gives a false 1.00:1 problem whose fix line changes nothing those buttons draw, while the approved reading leaves that pair out; count a part inside this one that holds a reader and add a --on top-nav case to the test.

The draft #13360 makes that change on top of this branch, so bringing it into this pull request clears the finding. Non-blocking: a part-scoped on-color set for one mode also hides the other mode's pair, as on the base, and the Changeset's "or of the whole theme" describes a variant or state setting with no part, which set refuses.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0)

Claims:

  • Title: the pair is measured even though its on-color is set for the whole theme. Verified: with a dark-mode whole-theme on-color, a white accent on the top bar reports 1.00:1 in light on this head and nothing on the base.
  • The base left the pair out whenever the on-color was set anywhere else. Verified: the base predicate skips on any other setting of that on-color.
  • Now only an on-color set around the part, on a reader inside it, or for a variant or state leaves the pair out, and one set for the whole theme or elsewhere keeps it measured. Verified as the code reads; a part inside that holds the buttons counts as elsewhere here, which the blocking finding covers.
  • Before, the top bar reported nothing while its primary buttons drew white on white. Verified on the base.
  • After, it reports 1:1 in light with its fix line, and an on-color set on the app shell around the top bar still leaves it out. Verified: both cases pass on this head.
  • The test covers the whole-theme and unrelated-part on-colors. Verified: the new assertions fail on the base and pass on this head.
  • The author's checks pass on this head and CI half passes. Partly checkable: every check that ran on this head passed or was skipped, no test or lint workflow ran, and the author's own check results are not attached.
  • The review findings are handled by the paired pull request. Accurate as a pointer: #13360 makes the fix on top of this branch, but this head still has the defect.
  • Changeset: a whole-theme or elsewhere on-color keeps the pair measured, and only one around it, on a reader (a group by its parts), or for a variant or state there or of the whole theme leaves it out. Verified, except that the editor cannot set a whole-theme variant or state (non-blocking).

Files:

  • .changeset/experimental-theme-scoped-fill-pair-elsewhere.md: an [experimental] patch for @astryxdesign/cli; non-blocking note on its whole-theme clause.
  • packages/cli/api/theme-edit/_settings.mjs: one blocking finding (lines 12755-12759) and one non-blocking note on mode-limited settings.
  • packages/cli/api/theme-edit/theme-contrast-measures-whats-drawn.test.mjs: clear; it lacks the inner-part case the fix needs.

Automated review (maintainer link)

@josephfarina
josephfarina changed the base branch from josephfarina/theme-a/01c2-scoped-fill-pair to feature/theme-editor November 21, 2026 16:58
@josephfarina
josephfarina merged commit 9e7e0b7 into feature/theme-editor Nov 21, 2026
13 checks passed
josephfarina added a commit that referenced this pull request Nov 21, 2026
…ves the fill pair out (#13360)

Reviewed pull request #13360, merged into the theme working branch with only its own changes (the layer below it, #13321, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…r is set for the whole theme (#13321)

Reviewed pull request #13321, merged into the theme working branch with only its own changes (the layer below it, #13300, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…ves the fill pair out (#13360)

Reviewed pull request #13360, merged into the theme working branch with only its own changes (the layer below it, #13321, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…r is set for the whole theme (#13321)

Reviewed pull request #13321, merged into the theme working branch with only its own changes (the layer below it, #13300, is already here). It reaches main with the branch's next landing.
josephfarina added a commit that referenced this pull request Nov 21, 2026
…ves the fill pair out (#13360)

Reviewed pull request #13360, merged into the theme working branch with only its own changes (the layer below it, #13321, is already here). 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 josephfarina/theme-a/fx-13300 branch November 22, 2026 06:04

This branch was successfully deployed

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