Repository navigation
Follow the system colour scheme by default - #16
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58a9e2e35b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| storedTheme === "system" || | ||
| themeModes !== null; | ||
| const theme = isKnownTheme && storedTheme ? storedTheme : "light"; | ||
| const theme = isKnownTheme && storedTheme ? storedTheme : "dark"; |
There was a problem hiding this comment.
Use the dark fallback when theme storage is unavailable
When localStorage.getItem throws—for example under browser privacy or storage restrictions—this changed fallback is never reached, and the boot script's catch block still follows the OS. On a light-system browser it therefore renders a light splash, while useTheme catches the same failure and resolves the new DEFAULT_THEME_SNAPSHOT to dark, causing a visible light-to-dark flash instead of consistently using the new dark default. Align the boot catch path with the runtime fallback.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This was about the earlier dark-default commit. The PR now defaults to following the system scheme instead. When storage throws, the boot script's catch follows the OS, and the runtime falls back to the system default (readAppearanceModePreference and readStoredFollowSystem both catch and fall back to theme === "system"). Both sides follow the OS, so there is no flash. The existing "follows the OS appearance when storage is unavailable" boot test covers the boot side.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58a9e2e to
b4594c5
Compare
A browser with no stored theme now follows the OS light/dark setting instead of always opening light, both in the boot splash (index.html) and at runtime (useTheme default). A theme the user already picked is kept. Tests that pinned the old light default are updated.
🤖 Generated with Claude Code