-
-
Notifications
You must be signed in to change notification settings - Fork 90
feat(review): add review.visual.themes config for dark-mode capture #3678
Copy link
Copy link
Closed
Labels
maintainer-onlyOwner-only work — yields no Gittensor points.Owner-only work — yields no Gittensor points.roadmapOn the Wave-2 agent-layer roadmap board (project 9)On the Wave-2 agent-layer roadmap board (project 9)visualUI/web visual work — owner-led, NOT for Gittensor contributors (extensions excepted)UI/web visual work — owner-led, NOT for Gittensor contributors (extensions excepted)
Description
Metadata
Metadata
Assignees
Labels
maintainer-onlyOwner-only work — yields no Gittensor points.Owner-only work — yields no Gittensor points.roadmapOn the Wave-2 agent-layer roadmap board (project 9)On the Wave-2 agent-layer roadmap board (project 9)visualUI/web visual work — owner-led, NOT for Gittensor contributors (extensions excepted)UI/web visual work — owner-led, NOT for Gittensor contributors (extensions excepted)
Context
Phase 3 of the visual-evidence upgrade (epic #3607, following #3667 full-page screenshots and #3674 the pixel-diff Diff column). Screenshots today only ever render in whatever theme a page defaults to (no
prefers-color-schemeoverride) — a repo that ships dark mode has no way to get before/after evidence for it.Deliverables
review.visual.themes: string[]in the manifest schema (focus-manifest.ts), validated against the enumlight | dark, following the same list-parsing idiom already used forreview.visual.routes.paths(dedupe, cap, warn-and-drop invalid entries) — not thereview.featurestri-state pattern, which doesn't fit a "which variants" list.captureShot(shot.ts) accepts athemeparameter and callspage.emulateMediaFeatures([{ name: "prefers-color-scheme", value: theme }])before navigation.capturePage's cache-key fingerprint includes the theme (so light/dark don't collide in storage, mirroring how viewport is already included).buildCaptureresolves the configured theme list (default["light"], byte-identical to today) and produces oneCaptureRouteentry per (route, theme) pair, reusing the existing per-viewport capture/diff logic unchanged inside an outer theme loop —CaptureRoutegains one new optionaltheme?: "light" | "dark"field, no restructuring of the existing flat before/after/diff fields.unified-comment-bridge.ts's "Visual preview" table shows the theme in the viewport label when set (e.g. "desktop (dark)"), unchanged when absent.Expected outcome
A repo can opt into
review.visual.themes: [light, dark]and get before/after evidence for both color schemes, without any change to repos that don't configure it.Part of #3607.