fix(debug 04-06): decouple welcome-hero mark stroke via --mks-mark-stroke
Operator-empirical Task 4 checkpoint flagged the dark-mode mark stroke
as muddy ink-on-madder. Root cause: .welcome-hero__mark used
`color: var(--mks-fg-inverse)`, which is a SEMANTIC text-foreground-on-
inverse-surface token that flips to ink-900 in the dark theme
(tokens.css line 244). The mark sits on a theme-independent madder-600
circle, so the stroke must be theme-independent too.
Fix: introduce a dedicated BRAND-COMPONENT token --mks-mark-stroke =
var(--mks-linen-50) in the universal :root block. CRUCIALLY NOT
overridden in the .dark/[data-theme="dark"] block — stays linen-50 on
every surface. Rewire .welcome-hero__mark to point at the new token.
SVG (mokosh-mark.svg) unchanged — `stroke="currentColor"` cascade
plumbing identical; only the wrapper's color source changed.
A35 strengthened: extracted live-DOM probe into a helper, now probes
BOTH light + dark themes (data-theme="dark" toggle on documentElement),
and added A35.5 — the decouple proof that light.computedStroke ===
dark.computedStroke === "rgb(250, 247, 241)" (linen-50). No new
__MOKOSH_UAT__ symbol; FORBIDDEN_HOOK_STRINGS stays at 12.
Scope expansion note: src/welcome/welcome.css was not in Plan 04-06
re-plan iter-2 files_modified. The edit is authorized by the operator's
TWEAK verdict on Task 4 checkpoint.
Verification:
- /tmp/04-06-welcome-hero-{light,dark}.png re-shot — both show identical
crisp linen-on-madder grid icon.
- A35.5 LIVE-DOM probe (UAT): light="rgb(250, 247, 241)", dark=same.
- UAT 36/36 GREEN; vitest 187 + 1 tolerated webm-remux flake.
- 6/6 pre-checkpoint bundle gates PASS; FORBIDDEN_HOOK_STRINGS = 12.
Debug session: .planning/debug/04-06-dark-mode-mark-decouple.md
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -544,15 +544,19 @@ async function main(): Promise<number> {
|
||||
// RUN — not env-gated; the 5-min wait is A33's, not A34's).
|
||||
{ name: 'A34', drive: driveA34Wrapped },
|
||||
// Plan 04-06 A35: UI-SPEC dark-logo `currentColor` strategy LIVE-DOM
|
||||
// proof. Opens welcome.html as a real Puppeteer tab so populateMark()
|
||||
// actually runs; reads getComputedStyle().stroke on the injected
|
||||
// <svg> to verify the currentColor cascade resolves through
|
||||
// .welcome-hero__mark color: var(--mks-fg-inverse) (UI-SPEC Option A).
|
||||
// Appended LAST in the drivers array so the new welcome tab cannot
|
||||
// pollute any later driver (and welcomePage.close() in finally
|
||||
// guarantees no tab leak regardless). Host-side driver — mirrors
|
||||
// the driveA32/A33/A34 host-side pattern (NOT a page.evaluate
|
||||
// (window.__mokoshHarness) wrapper).
|
||||
// proof + Plan 04-06 Task 4 decouple verification. Opens welcome.html
|
||||
// as a real Puppeteer tab so populateMark() actually runs; reads
|
||||
// getComputedStyle().stroke on the injected <svg> in BOTH light and
|
||||
// dark themes to verify (a) the currentColor cascade resolves
|
||||
// through .welcome-hero__mark color: var(--mks-mark-stroke), and
|
||||
// (b) the theme-INDEPENDENT --mks-mark-stroke token is NOT
|
||||
// overridden by the .dark/[data-theme="dark"] override block — both
|
||||
// probes resolve to the same linen-50 RGB. Appended LAST in the
|
||||
// drivers array so the new welcome tab cannot pollute any later
|
||||
// driver (and welcomePage.close() in finally guarantees no tab leak
|
||||
// regardless). Host-side driver — mirrors the driveA32/A33/A34
|
||||
// host-side pattern (NOT a page.evaluate(window.__mokoshHarness)
|
||||
// wrapper).
|
||||
{ name: 'A35', drive: driveA35Wrapped },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user