Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 1695029 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/Comments | 384.3 kB (+62 B) · 2.5 kB CSS (0) | — | — · — · — |
| Overlay | 25.3 kB (+30 B) · 4.3 kB CSS (+27 B) | — | — · — · — |
| Toast | 111.3 kB (+28 B) · 11.7 kB CSS (+29 B) | — | — · — · — |
✓ passed · ✗ needs a fix · Δ changed, for review in the shots below · ↻ needs re-verify · — did not run
6 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Lightbox | 156.0 kB (+23 B) · 12.6 kB CSS (+31 B) | — | — · — · — |
| lab/CommentThread | 377.3 kB (+51 B) · 2.4 kB CSS (0) | — | — · — · — |
| lab/DialogHeroHeader | 96.2 kB (+46 B) · 372 B CSS (0) | — | — · — · — |
| Markdown | 202.6 kB (+14 B) · 24.0 kB CSS (+24 B) | — | — · — · — |
| Code · Storybook | 3.9 kB (+7 B) · 3.6 kB CSS (+30 B) | 87 (+5) | — · ✓ · — |
| lab/VideoPlayer | 240.1 kB (+11 B) · 2.1 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 8.18 MB packed (+943 B); no new dependencies.
Wide change (shared styles: packages/core/src/theme/MediaTheme.tsx, packages/core/src/theme/mediaSurface.stylex.ts): add ci:run-visual for Visual, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
|
/approve-spec b74008f |
|
/approve-spec c556ddd |
There was a problem hiding this comment.
Changes requested. The fix itself holds up: inside a media surface, inherited inline code now takes the chip's own primary text, and the Gothic chip goes from 1.27:1 to 12.83:1 in light and dark, in a plain media surface and in a Toast, reproduced in Chromium against both revisions during this review. Two of the pull request's own claims do not hold at this head, and one of them is the release note consumers will read.
- Release note and title promise every inverted surface; inline code in a Tooltip is unchanged. The rule keys on a media surface, and a Tooltip paints the same inverted surface without one, so
<Code color="inherit">there still measures 1.27:1 in Gothic dark and 1.13:1 in Neutral light at this head; bound the title, the changeset line and the User impact paragraph to a media surface (MediaTheme), since #12410 is what covers Tooltip. - Inherited code inside secondary text or a Link changes in every theme, against the description's claim. "In themes that do not restate text on the chip, that is the same as the surrounding text" holds only for a primary parent: in Neutral, inherited code inside secondary text moves from rgb(158,158,158) to rgb(255,255,255) in light and rgb(71,71,71) to rgb(17,17,17) in dark, and inside a Link to primary; say instead that inherited code on a media surface takes primary text whatever its parent's color is.
- Consumer docs still say
inherittakes the surrounding text color.Code.doc.mjsdescribes the prop as taking the surrounding color in two places, which is now false inside a media surface, andCode.tsx's own SYNC header lists that file; non-blocking, but a one-line amendment keeps the published docs honest.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Inherited inline code on an inverted surface, such as in a Toast, reads in every theme — false: a Tooltip's inverted panel is one, and its chip measures 1.27:1 in Gothic dark and 1.13:1 in Neutral light at this head.
- In Gothic today that chip is about 1.3:1 — verified: 1.27:1 on the base, light and dark.
- Inline code keeps the page's chip inside a media surface, and Butter, Gothic and Y2K restate their text colors on it — verified: those three themes carry the own-fill rule for the code part and the other four do not.
color="inherit"takes its parent's color, so it can land on a chip of the opposite brightness — verified on the base.- Inside a media surface inherited code takes the chip's own primary text; in themes that do not restate text on the chip, that is the same as the surrounding text — the second half is false for a secondary-text or Link parent, measured in Neutral light and dark.
component:CodeFR2 amended andcomponent:MediaThemeowns the internal marker — verified against both records at this head.- A class only, with no new attribute or DOM — verified: the compiled rule adds one declaration, and the repository's API generator reports no surface change in Core or the seven themes.
- The marker moves with MediaTheme's element when the fixed-mode surface change lands, and the Toast case fails if it is missed — holds for the case it names.
<Code color="inherit">outside a media surface still takes the surrounding color — verified in Chromium at this head; the unit tests cited for it assert the reflected color attribute, not the painted color.- Reproduction and after-contrast figures from the spec run (Gothic 12.83:1, Butter 12.16 / 15.17, Y2K 13.65 / 12.38), the 96/96 Chromium runs, the 204-test unit run and the page-size figures — reported; the Gothic figures reproduced here, and a wider unit run passed here.
- Branded Chrome stills to follow — pending author evidence, not required by an applicable claim.
Files:
.changeset/code-inherit-in-media-surface.md— finding: the release note repeats the over-broad claim.apps/storybook/stories/Code.stories.tsx— clear: two stories that give the contrast spec its fixtures.docs/specs/components/Code/Code.spec.md— clear: FR2 amendment and the verification row, owner-approved for this spec text.docs/specs/components/theme/MediaTheme.spec.md— clear: the marker is named in the ownership boundary.packages/core/src/Code/Code.tsx— clear as code; the behavior it adds is what the first two findings mis-describe.packages/core/src/Code/__tests__/CodeInMediaSurface.a11y.chromium.spec.ts— clear: eight theme settings, light and dark, over the plain surface and the Toast.packages/core/src/theme/MediaTheme.tsx— clear: the marker rides the existing element, andoffstill renders no surface.packages/core/src/theme/mediaSurface.stylex.ts— clear: internal marker module, named by the approved record change.
|
/approve-spec 6862eac |
There was a problem hiding this comment.
Changes requested. The fix works: inside a media surface, inherited inline code now takes the chip's own primary text, and Gothic's chip goes from 1.27:1 to 12.83:1 (reproduced locally: the new contrast spec passes all 16 cases on this branch and fails only the two Gothic cases against the base). The earlier points about the release note's scope, inherited code under a non-primary parent and the color docs are fixed. What remains is wording in the release note, the docs and the Code record:
- Inline code takes the surface's chip, not the page's, in every theme but Gothic. The release note, the
colorprop docs, the amended FR2 and the comments inCode.tsx, the story and the spec header say inline code "keeps the page's chip" on a media surface, but measured in Chromium the chip there follows the surface's color scheme in Butter, Chocolate, Matcha, Neutral, Stone, Y2K and Core's base tokens (on a Neutral light page it goes from rgb(241,241,241) with black text to rgb(27,27,27) with white text), so say instead that the surface does not restyle the chip, whose colors come from the theme's own code rules in the surface's color scheme. - Code's record still says inherited code follows the surrounding color and changes nothing.
Code.spec.mdkeeps the inherited-color representative state, AV3, the at-a-glance behavior, builder-impact and compatibility rows, the compatibility class and "None recorded" in the decision log beside the amended FR2, so give the state row and AV3 the media-surface exception, name the color change in the impact and compatibility lines, and log the 2026-12-03 decision.
Claims and files checked
Review mode: incremental; reason: none
changed rules (0): none
Claims:
- Inherited inline code inside a MediaTheme surface, such as a Toast, reads in every theme — verified: the contrast spec passes in all seven shipped themes and the base tokens, light and dark, on a plain surface and in a Toast (run locally).
- Tooltip content is left to the follow-up pull request — verified: Tooltip renders no MediaTheme, so this change does not reach it.
- In Gothic today the inherited chip is about 1.3:1 — verified: 1.27:1 against the base, light and dark.
- Inherited code now takes the chip's own text color, as default code does — verified: both chips measure the same color on this branch in every setting.
- Inline code keeps the page's chip inside a media surface — false: the chip follows the surface's color scheme in every theme but Gothic.
- Butter, Gothic and Y2K restate their text colors on the chip — verified from the built theme CSS; the other four shipped themes do not.
- Inherited code took the surface's color, so it could land on a chip of the opposite brightness — verified against the base in Gothic.
- Inherited code takes primary text whatever its parent's color is, in every theme — verified: with its parent forced to red, it keeps the chip's primary text in all 16 settings.
- The amended Code FR2 and the MediaTheme ownership bullet govern the change — verified, and approved for this head.
- The marker is a class only, with no new attribute or DOM — verified: one hashed class, and the API report generator lists no change in Core or any theme.
- The
colordocs say whatinherittakes on a media surface — verified in both doc entries; the wording repeats the false "page's chip" claim. - The
inheritcolor is conditional on a media-surface ancestor that carries the marker — verified in the source and the compiled CSS. - The Toast case fails if the marker is missed — verified: against the base, the Toast case fails in Gothic.
- Inherited code outside a media surface still takes the surrounding color — verified in Chromium on both revisions; the cited unit tests check the reflected attribute, not the painted color.
- The contrast spec covers a plain surface and a Toast in every shipped theme and the base tokens, light and dark — verified.
- No new public API, default or interaction model under the fix label, and no internal context in public text — verified.
- Red-first run at the test commit, after-fix contrast figures, 96/96 related Chromium specs, the 204-test unit run, the page-size figures and the Chrome stills — reported; the contrast figures, the stills' changed and unchanged cells, a 95-test related Chromium run and a 669-test unit run reproduce locally.
Files:
.changeset/code-inherit-in-media-surface.md— finding: repeats the "page's chip" claim.apps/storybook/stories/Code.stories.tsx— finding: the story comment repeats the claim; the two stories are sound fixtures.docs/specs/components/Code/Code.spec.md— findings: FR2 states the "page's chip" claim, and other lines of the record contradict FR2.docs/specs/components/theme/MediaTheme.spec.md— clear.packages/core/src/Code/Code.doc.mjs— finding: thecolordescription repeats the claim.packages/core/src/Code/Code.tsx— finding: the comment repeats the claim; the rule itself is correct.packages/core/src/Code/__tests__/CodeInMediaSurface.a11y.chromium.spec.ts— finding: the header repeats the claim; the checks are sound.packages/core/src/theme/MediaTheme.tsx— clear.packages/core/src/theme/mediaSurface.stylex.ts— clear.
…erited-color change and its decision
|
/approve-spec 0d35d58 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, so its required checks still need to pass before merge.
Inside a MediaTheme surface, inherited inline code now takes the chip's own primary text; the new Chromium spec passed in every theme setting on this commit and failed only Gothic at 1.27:1 on the base, both reproduced locally. The amended Code and MediaTheme records are approved for this commit, and the description's revised evidence line now points at the Colors play check that asserts the unchanged path. Nothing blocks.
Claims and files checked
Review mode: same-head; reason: none
- Title, inherited code in a MediaTheme surface takes the chip's own text color: verified (local Chromium probe on this commit, 16 theme settings and a Toast).
- Release note, inherited code in a MediaTheme surface such as a Toast reads in every theme: verified (the new spec passed 16/16 locally on this commit; lowest inherited chip 8.49:1).
- Release note, the surface does not restyle the chip, so inherited text takes the chip's primary whatever the surrounding color, where Gothic drew dark on dark: verified (secondary and Link parents take the chip's text in all 16 settings; base Gothic 1.27:1).
- User impact, readable in every theme inside a MediaTheme surface: verified (as above).
- User impact, Tooltip content is covered by the Tooltip pull request: verified (Tooltip renders no media surface; that pull request is open and builds on this one).
- User impact, Gothic today draws about 1.3:1: verified (1.27:1 on the base, light and dark).
- User impact, inherited code now matches default inline code: verified (inherited and default chips equal in every setting).
- Problem, the surface does not restyle the chip and Butter, Gothic and Y2K restate the chip's text: verified (only those three theme sources restate the code part; no shipped theme has a media rule).
- Problem, inherit takes the surface's color and can land on a chip of opposite brightness: verified (base Gothic).
- Problem, inherited code takes the chip's primary text whatever the parent, secondary and Link included, in every theme: verified (local probe, 16 settings).
- Authority, Code's amended FR2 and new decision, and the rows named: verified (record lines); approved for this commit.
- Authority, MediaTheme owns the internal marker: verified (record Owns bullet).
- Restoration, a new internal marker that is a class only, with no new attribute or DOM: verified (marker module, MediaTheme's props, no API change from the generator).
- Restoration, Code's docs say what inherit takes on a media surface: verified (both doc strings).
- Restoration, inherit takes primary text under the ancestor condition: verified (Code.tsx and the built CSS).
- Restoration, merge order with the MediaTheme surface pull request and the Toast case fails if the marker is missed: Toast case verified (it fails in Gothic on the base locally); merge order reported (the other pull request states the same plan).
- Evidence, the spec fails only Gothic at 1.27:1 before the change: verified (local red-first run).
- Evidence, the spec passes in every setting after the change: verified (16/16 locally).
- Evidence, chip ratios for Gothic, Butter and Y2K: verified (same numbers measured locally).
- Evidence, Toast and theme Chromium specs pass 96/96: reported.
- Evidence, inherited code outside a media surface still takes the surrounding color, per the Colors story's play check: verified (the play check asserts inherited equals its parent and passed locally).
- Evidence, the regression spec covers a plain surface and a Toast in every shipped theme and base tokens, light and dark: verified (spec lists; every setting renders a media surface).
- Scope, Code and MediaTheme, one defect, nothing hidden under the fix label, no internal context: verified (no API change; text scan clean).
- Testing, vitest for Code and MediaTheme passes: reported (a wider local run: 847 passed).
- Testing, size deltas on the reference pages, Toast and Code: reported.
- Real Chrome stills, Gothic flips and Butter and Y2K light move to the chip's near-white: reported; consistent with local frames.
- Writing rubric results, covering Code's FR2, verification row, behavior, builder-impact, compatibility, AV3 and inherited-color rows and the decision, and MediaTheme's Owns bullet: verified (each named part changed).
- Writing rubric, no narration, research, change references, rejected alternatives, open questions with options, or project status: verified (every changed record line read; Code's open questions are none).
- Overlap with the Tooltip and MediaTheme surface pull requests: verified (both open; their bodies describe the same order).
.changeset/code-inherit-in-media-surface.md: clear.apps/storybook/stories/Code.stories.tsx: clear.docs/specs/components/Code/Code.spec.md: clear.docs/specs/components/theme/MediaTheme.spec.md: clear.packages/core/src/Code/Code.doc.mjs: clear.packages/core/src/Code/Code.tsx: clear.packages/core/src/Code/__tests__/CodeInMediaSurface.a11y.chromium.spec.ts: clear.packages/core/src/theme/MediaTheme.tsx: clear.packages/core/src/theme/mediaSurface.stylex.ts: clear.
Stack: this PR, then #12410 on top.
User impact
People reading inline code that takes the surrounding text color (
<Code color="inherit">) inside aMediaThemesurface, such as a Toast, can read it in every theme. Tooltip content, which paints the same inverted surface without aMediaTheme, is covered by #12410. Today, in Gothic, that code draws the surface's dark text on the page's dark chip (about 1.3:1). With this change it takes the chip's own text color, as default inline code already does.Problem and solution fit
color="inherit"takes the text color of its parent, which is the surface's color, so it can land on a chip of the opposite brightness.--color-text-primaryas the chip resolves it), whatever its parent's color is. So inherited code inside secondary text or a Link on a media surface also takes primary text, in every theme.Expected behavior and authority
component:CodeFR2 (amended) and DEC-1: a media surface does not restyle the chip, so therecolor="inherit"takes the chip's primary text, whatever the surrounding color (owner decision, 2026-12-03). The record's behavior, builder-impact, compatibility, AV3 and inherited-color rows name the change.component:MediaThemeOwns: the internal marker its element carries for this.Smallest restoration
packages/core/src/theme/mediaSurface.stylex.ts: a new internal StyleX marker;MediaThemeputs it on its element. It is a class only, with no new attribute or DOM.packages/core/src/Code/Code.doc.mjs: thecolorprop's description says whatinherittakes on a media surface.packages/core/src/Code/Code.tsx: theinheritcolor takes--color-text-primaryunderstylex.when.ancestor('[data-astryx-media]', mediaSurfaceMarker).mediaSurfaceMarkeron that surface's element, not on MediaTheme's, so Toast's card keeps the fix. The spec's Toast case (InToast) fails if the marker is missed.Evidence
CodeInMediaSurface.a11y.chromium.spec.tsat the test commit (eb5209c) fails in Gothic: thecolor="inherit"chip is 1.27:1 in light and dark; the other seven settings pass.<Code color="inherit">outside a media surface still takes the surrounding color (theColorsstory's play check compares it with its parent).CodeInMediaSurface.a11y.chromium.spec.tsover a plain media surface and a Toast (every shipped theme and Core's base tokens, light and dark).Scope
Components: Code, MediaTheme
Testing
vitest runCode and MediaTheme: 204 passed.pnpm size:pages --base <merge base> --page toast=Toast --page code=Code, gzip): docs, form, menu and table +0; Toast +49 B; Code +6 B.Real Chrome stills
Branded Chrome on macOS, the
Core/CodeInMediaSurface story. In Gothic, the inherited chip (pnpm test) goes from dark text on the dark chip to the chip's own light text. In Butter and Y2K light, its text moves from the surface's white to the chip's own near-white, matching the default chip. The other cells are pixel-identical.Writing rubric results
Covers
component:Code(FR2, its verification row, the behavior, builder-impact, compatibility, AV3 and inherited-color rows, and DEC-1) andcomponent:MediaTheme's Owns bullet for the marker.Overlap checked: #12410 (Tooltip content colors, which builds on this), #14302 (MediaTheme's internal fixed-mode surface; the marker moves with MediaTheme's element there).
Owner: @cixzhang