You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1308 deleted the chat-chrome pixel script; the surviving chat-chrome-no-gradient-contract.test.ts regex-matches the first source rule per selector, so it cannot see the rendered cascade — a real blind spot: the "three-color-band" incident documented in theme-glass.css was exactly a checked declaration losing to an unlayered higher-specificity rule in reference-shell.css.
This locks the rendered invariant with a Playwright e2e spec, apps/desktop/e2e/chat-chrome-style.spec.ts, measuring the REAL shell elements of the live app (fake backend, long-transcript fixture). The platform axis boots natively: the existing e2e-fixture override seam (which already carries theme/locale/timezone/reduced-motion) gains a MAKA_E2E_FIXTURE_PLATFORM override that app:info reports to the renderer, so a fixture window enters the darwin glass cascade — or the opaque win32 base cascade — through the production data-os path on any host. The theme axis drives page.emulateMedia({ colorScheme }) — the real prefers-color-scheme path the fixture's seeded theme: 'auto' production listener follows — because an in-page .dark class flip leaves the relative-color chains in --surface-canvas resolved against stale token values (measured: appFrame stuck at light [247,247,247] instead of dark [9,9,11]). Reads wait two animation frames after the class lands (the relative-color recalc settles only after a produced frame), and a per-window guard asserts the light and dark appFrame reads differ — equal reads mean a phantom stale cascade, so an insufficient settle fails loud instead of passing vacuously.
Per combo, in the expanded sidebar state, the spec asserts: the effective gutter (Porter-Duff composite of .appFrame ← .maka-shell-2col, the only two painters of the gutter pixel) is fully painted (alpha 255) and visibly distinct from the effective card; no background-image on any chrome surface (the thrice-rejected 172deg gradient is invisible to color reads); no seam on either boundary side including both resize-handle borders; transparent handle background and resting ::after grip; no adjacent box-shadows; exact-string '12px' corner radii (catches elliptical 12px / 0px; doubles as the vacuous-green self-check); exact-string '4px' card margins; a mode-split shadow lock — dark requires a layer with visible color alpha AND non-zero paint geometry, light requires exactly none per the reference-shell.css design comment; cumulative ancestor-chain opacity exactly 1 (an opacity: 0 anywhere hides the shell while every color read stays green); resting outlines invisible and filter: none on the seam trio (outline and drop-shadow() paint boundary lines the border/box-shadow checks cannot see).
Shape history, for reviewers: four external review rounds (Codex + Kimi K3, fresh sessions each) drove this from a standalone synthetic-DOM Electron script through an in-place-clone probe to the current form. The through-line: any probe state — hand-built mirror DOM, shallow clones, or a cascade reached by an in-page class flip — diverges from what a real user's window computes, in ways that hide regressions (missing painters, relational-selector blindness, stale relative-color chains). Round 4 proved the previous shape's dark combos asserted against a phantom shell (the historical dark transparent-backplate regression passed silently) and replaced the flip with the production media-query path; it also removed a guard that bound a visually-equivalent internal painter split (darwin's residual transparent shell) instead of final appearance. The source-string contract stays as the fast pre-check; its header points here.
Verification
Spec green: both forced-platform windows × both emulated themes in one run (2.9s); full e2e suite 33 passed; desktop unit tests 2764 pass (including the platform-override cases: closed enum, fail-closed to null, dev/test-only); typecheck clean.
Non-vacuity — five red proofs this round (source edit + rebuild + rerun + exact restore, never committed), each targeting a vector the prior shape provably missed:
html.dark .appFrame, html.dark .maka-shell-2col { background: transparent } → dark gutter alpha fails RED (this exact regression stayed GREEN against the in-page-flip shape — the decisive phantom proof);
deleting the settle → the per-window phantom guard fails RED (light=[247,247,247] dark=[247,247,247]);
resting outline: 2px solid red on the handle → outline fact fails;
filter: drop-shadow(0 0 4px red) on the panel list → filter fact fails.
Earlier rounds' red proofs (172deg gradient, shell recolor, elliptical radius, margin: 0.01px, zero-geometry dark shadow, late 1px border, adjacent-sibling border, ::after grip color) remain covered by the carried-over assertions.
Production-code footprint: the platform override rides the existing e2e-fixture override seam — one fallback in the app:info handler (e2eFixture?.platform ?? process.platform), one parse function with the same closed-enum fail-closed discipline as theme/locale/timezone, active only in unpackaged fixture mode.
Review focus
The spec header documents the gutter painter model, why the platform axis must be booted (no mid-session data-os value flip on a long-lived resolved cascade) and the theme axis must ride the real media-query path (an in-page class flip reads a phantom shell — measured values in the header), and the settle + phantom-guard pair that keeps the dark reads honest on any host.
…e contract
Add apps/desktop/e2e/chat-chrome-style.spec.ts: it measures getComputedStyle
on the REAL live shell elements across darwin/win32 x light/dark and asserts
the rendered chat-chrome facts: fully painted composited gutter vs card
contrast, no boundary seam or gradient, transparent resize gutter and ::after
grip, exact 12px card radius and 4px inset, and a mode-split card shadow with
visible color and non-zero paint geometry. The platform axis boots natively
per window through a new e2e-fixture override (MAKA_E2E_FIXTURE_PLATFORM ->
app:info platform -> data-os), because a post-boot data-os flip makes
Chromium resolve relative-color backgrounds against stale values, and any
probe DOM (a synthetic mirror or in-place clones) diverges from the real
shell on relational and sibling selectors. The earlier standalone
synthetic-DOM script was abandoned after two review rounds of mirror-fidelity
defects plus its raw-electron CI step hitting the ubuntu sandbox failure
class; measuring the real shell in the existing e2e runner deletes the
mirror DOM, drift guard, CSS inlining, extra npm script, and CI step
wholesale. The source-string contract stays as the fast pre-check and now
points at the spec.
Fixes#1312
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes#1312.
#1308 deleted the chat-chrome pixel script; the surviving
chat-chrome-no-gradient-contract.test.tsregex-matches the first source rule per selector, so it cannot see the rendered cascade — a real blind spot: the "three-color-band" incident documented intheme-glass.csswas exactly a checked declaration losing to an unlayered higher-specificity rule inreference-shell.css.This locks the rendered invariant with a Playwright e2e spec,
apps/desktop/e2e/chat-chrome-style.spec.ts, measuring the REAL shell elements of the live app (fake backend,long-transcriptfixture). The platform axis boots natively: the existing e2e-fixture override seam (which already carries theme/locale/timezone/reduced-motion) gains aMAKA_E2E_FIXTURE_PLATFORMoverride thatapp:inforeports to the renderer, so a fixture window enters the darwin glass cascade — or the opaque win32 base cascade — through the productiondata-ospath on any host. The theme axis drivespage.emulateMedia({ colorScheme })— the realprefers-color-schemepath the fixture's seededtheme: 'auto'production listener follows — because an in-page.darkclass flip leaves the relative-color chains in--surface-canvasresolved against stale token values (measured: appFrame stuck at light[247,247,247]instead of dark[9,9,11]). Reads wait two animation frames after the class lands (the relative-color recalc settles only after a produced frame), and a per-window guard asserts the light and dark appFrame reads differ — equal reads mean a phantom stale cascade, so an insufficient settle fails loud instead of passing vacuously.Per combo, in the expanded sidebar state, the spec asserts: the effective gutter (Porter-Duff composite of
.appFrame←.maka-shell-2col, the only two painters of the gutter pixel) is fully painted (alpha 255) and visibly distinct from the effective card; nobackground-imageon any chrome surface (the thrice-rejected 172deg gradient is invisible to color reads); no seam on either boundary side including both resize-handle borders; transparent handle background and resting::aftergrip; no adjacent box-shadows; exact-string'12px'corner radii (catches elliptical12px / 0px; doubles as the vacuous-green self-check); exact-string'4px'card margins; a mode-split shadow lock — dark requires a layer with visible color alpha AND non-zero paint geometry, light requires exactlynoneper thereference-shell.cssdesign comment; cumulative ancestor-chain opacity exactly 1 (anopacity: 0anywhere hides the shell while every color read stays green); resting outlines invisible andfilter: noneon the seam trio (outlineanddrop-shadow()paint boundary lines the border/box-shadow checks cannot see).Shape history, for reviewers: four external review rounds (Codex + Kimi K3, fresh sessions each) drove this from a standalone synthetic-DOM Electron script through an in-place-clone probe to the current form. The through-line: any probe state — hand-built mirror DOM, shallow clones, or a cascade reached by an in-page class flip — diverges from what a real user's window computes, in ways that hide regressions (missing painters, relational-selector blindness, stale relative-color chains). Round 4 proved the previous shape's dark combos asserted against a phantom shell (the historical dark transparent-backplate regression passed silently) and replaced the flip with the production media-query path; it also removed a guard that bound a visually-equivalent internal painter split (darwin's residual transparent shell) instead of final appearance. The source-string contract stays as the fast pre-check; its header points here.
Verification
html.dark .appFrame, html.dark .maka-shell-2col { background: transparent }→ dark gutter alpha fails RED (this exact regression stayed GREEN against the in-page-flip shape — the decisive phantom proof);light=[247,247,247] dark=[247,247,247]);.maka-shell-2col { opacity: 0 }→ ancestor-opacity fact fails;outline: 2px solid redon the handle → outline fact fails;filter: drop-shadow(0 0 4px red)on the panel list → filter fact fails.margin: 0.01px, zero-geometry dark shadow, late 1px border, adjacent-sibling border,::aftergrip color) remain covered by the carried-over assertions.app:infohandler (e2eFixture?.platform ?? process.platform), one parse function with the same closed-enum fail-closed discipline as theme/locale/timezone, active only in unpackaged fixture mode.Review focus
The spec header documents the gutter painter model, why the platform axis must be booted (no mid-session
data-osvalue flip on a long-lived resolved cascade) and the theme axis must ride the real media-query path (an in-page class flip reads a phantom shell — measured values in the header), and the settle + phantom-guard pair that keeps the dark reads honest on any host.