fix: intro/onboarding screens respect selected theme#1
Closed
ryans-posthog wants to merge 1 commit intomainfrom
Closed
fix: intro/onboarding screens respect selected theme#1ryans-posthog wants to merge 1 commit intomainfrom
ryans-posthog wants to merge 1 commit intomainfrom
Conversation
The onboarding welcome + steps (and other FullScreenLayout-wrapped screens) rendered in light appearance regardless of the user's selected theme. - Drop the hardcoded `class=\"dark\"` on <html> and stale `bg-dark-bg text-dark-text` classes on <body> in `apps/code/index.html`, and replace them with a pre-paint inline script that reads the persisted theme from `localStorage` and toggles `.dark` on <html> before first paint. This prevents a flash of the wrong theme and lets themeStore keep the class in sync after hydration via `syncDarkClass`. - Remove `.radix-themes` from the light-side `--color-background` selector in `globals.css` so Radix Theme wrappers derive the background from their own appearance, not from the bare `.radix-themes` class that matches every wrapper (including dark ones). Refresh the adjacent Lemon-button comment that referenced the former \"always-light\" assumption. - Align `FullScreenLayout`'s inner <Theme> props with the outer `ThemeWrapper` (`grayColor=\"slate\"`, `panelBackground=\"solid\"`, `scaling=\"105%\"`) so the nested Theme doesn't silently diverge from the app's main appearance. Generated-By: PostHog Code Task-Id: f813985c-b866-4b44-88f6-7bda252418d3
ryans-posthog
commented
Apr 21, 2026
Owner
Author
ryans-posthog
left a comment
There was a problem hiding this comment.
What implication are there for this change?
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.
Summary
FullScreenLayout-wrapped screens — auth, invite code) rendered in light appearance regardless of the user's selected theme.apps/code/index.htmlhardcoded<html class="dark">+bg-dark-bg text-dark-texton<body>;globals.csshad.radix-themesin the light--color-backgroundselector (matching every Radix Theme wrapper, including dark ones); the inner<Theme>inFullScreenLayoutdiverged from the outerThemeWrapperprops.localStorageand toggles.darkon<html>before first paint (kept in sync post-hydration bysyncDarkClassinthemeStore.ts); scope the light--color-backgroundto:root, .light, .light-theme; alignFullScreenLayout's inner<Theme>(grayColor="slate",panelBackground="solid",scaling="105%").Test plan
pnpm --filter code typecheckpassespnpm --filter code test— only the unrelated pre-existingSessionService > watchCloudTaskfailure remains (also fails onmain)localStorage) with OS in light → onboarding renders lightDarkin Settings → General, log out → onboarding renders dark, no light flash on restartLight, log out → onboarding renders light, no dark flash on restart