fix(mapgen-studio): sync .dark class to theme preference at runtime#1624
Merged
Conversation
This was referenced Jun 12, 2026
refactor(studio): decompose App.tsx non-React corpus into feature modules and shared utilities
#1608
Merged
Merged
Merged
|
Railway preview (MapGen Studio): not provisioned for this PR. Policy (Graphite stacks): previews are created only for the top-of-stack PR by default.
Debug: |
This was referenced Jun 12, 2026
Owner
Author
This was referenced Jun 12, 2026
This was referenced Jun 12, 2026
Merged
mateicanavra
force-pushed
the
design/theme-class-sync
branch
from
June 12, 2026 20:44
24357e9 to
93c11bc
Compare
mateicanavra
force-pushed
the
design/first-run-visibility
branch
from
June 12, 2026 20:44
5521a62 to
77ea346
Compare
Owner
Author
Merge activity
|
mateicanavra
changed the base branch from
design/first-run-visibility
to
graphite-base/1624
June 12, 2026 21:28
… Pass-2 visual gate) OpenSpec mapgen-studio-theme-class-sync. The theming repair relied on the single .dark class, but only the index.html bootstrap ever wrote it — cycling the theme relabeled the button and changed the deck.gl lightMode input while the chrome stayed in its boot theme. StudioProviders (theme wiring owner) now syncs documentElement's .dark to the resolved preference on change; the bootstrap keeps pre-paint ownership (no flash). Verified live: cycle → chrome re-themes both directions, light + dark screenshots. tsc + 144 tests + strict valid. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ices, visually verified) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mateicanavra
force-pushed
the
design/theme-class-sync
branch
from
June 12, 2026 21:30
93c11bc to
76be94b
Compare
This was referenced Jun 12, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

The in-app theme toggle was functionally broken: cycling through Auto → Light → Dark updated the button label and the deck.gl scene's
lightModeinput, but<html>never gained or lost the.darkclass after the initial page load. The pre-paint bootstrap inindex.htmlcorrectly sets the class before first paint to avoid flash, but no runtime writer ever existed to update it afterward — leaving light mode reachable only by reloading with a light OS preference and no stored override.This adds the missing
useEffectinStudioProvidersthat syncsdocument.documentElement.classList.toggle("dark", !isLightMode)whenever the resolved preference changes. The bootstrap retains ownership of the pre-paint initial state; React owns every update after hydration. No changes to the preference cycle, storage key, bootstrap script, design tokens, or deck.gl wiring.Also adds the
mapgen-studio-theme-class-syncOpenSpec slice (proposal, spec, and tasks) and marks all six Pass-2 design slices as complete in the project goal doc, including a closure note recording the verification state at tip.