Skip to content

Follow the system colour scheme by default - #16

Merged
orbitingflea merged 1 commit into
wbfrom
wb-dark-default
Oct 10, 2026
Merged

orbitingflea merged 1 commit into
wbfrom
wb-dark-default

Conversation

@orbitingflea

@orbitingflea orbitingflea commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

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

Copilot AI balanced review requested due to automatic review settings October 10, 2026 17:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T18:02:39.884797Z 58a9e2e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS labels Oct 10, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread apps/web/index.html Outdated
storedTheme === "system" ||
themeModes !== null;
const theme = isKnownTheme && storedTheme ? storedTheme : "light";
const theme = isKnownTheme && storedTheme ? storedTheme : "dark";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@orbitingflea orbitingflea changed the title Default the chat to the dark theme Follow the system colour scheme by default Oct 10, 2026
@orbitingflea
orbitingflea merged commit 7b46813 into wb Oct 10, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants