Skip to content

fix(web): preserve appearance mode when changing themes - #6343

Merged
maria-rcks merged 1 commit into
pingdotgg:mainfrom
extoci:t3code/fix-first-theme-selection
Aug 12, 2026
Merged

fix(web): preserve appearance mode when changing themes#6343
maria-rcks merged 1 commit into
pingdotgg:mainfrom
extoci:t3code/fix-first-theme-selection

Conversation

@extoci

@extoci extoci commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What Changed

Keep the current System, Light, or Dark setting when the user selects another theme.

Why

On a new setup, System mode was used but not saved. When the user selected a theme, the app used that theme's default Light mode. This could change a dark app to light. The app now saves the current mode before it changes the theme.

UI Changes

No visual UI, motion, or interaction design changes. The existing theme picker now keeps the active appearance mode.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • Before/after screenshots are not applicable because no visual UI changed
  • A video is not applicable because no animation or interaction design changed

Implemented with GPT-5.6 Sol via Codex in the T3 Code harness.


Note

Low Risk
Small, localized change to theme preference writes in setTheme; no auth, security, or data-handling impact.

Overview
Fixes a case where picking a new theme could flip a dark UI to light when System (or another mode) was active but not yet stored.

setTheme now writes the current appearance mode to THEME_APPEARANCE_MODE_STORAGE_KEY (via readAppearanceModePreference + writeAppearanceModePreference) before clearing theme halves and saving the new theme. That stops the app from re-inferring mode from the newly selected theme’s default appearance on the next apply.

Reviewed by Cursor Bugbot for commit 75081d7. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix useTheme.setTheme to preserve appearance mode when changing themes

When changing themes, the previous appearance mode (light/dark) was being discarded and re-inferred from the new theme, causing unexpected switches. The fix reads the current appearance mode from storage and writes it back before applying the new theme preference in useTheme.ts.

Macroscope summarized 75081d7.

@extoci
extoci marked this pull request as ready for review August 12, 2026 15:50
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d6fe5fb7-126e-4366-bb00-448d516a011b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 12, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 75081d7

Straightforward bug fix that preserves the user's appearance mode preference when switching themes. The change is small (one functional line), defensive in nature, and limited to UI theming logic with no security or infrastructure implications.

You can customize Macroscope's approvability policy. Learn more.

@maria-rcks
maria-rcks merged commit 9666b87 into pingdotgg:main Aug 12, 2026
20 of 22 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 12, 2026
## What's Changed
* fix(web): align update toast release notes link by @t3-code[bot] in pingdotgg/t3code#6322
* fix(web): render tooltips above dropdowns by @extoci in pingdotgg/t3code#6241
* fix(web): open modified PR clicks in browser by @t3-code[bot] in pingdotgg/t3code#6278
* Fix mobile command popover glass rendering by @juliusmarminge in pingdotgg/t3code#6370
* test(mobile): seed snoozed showcase threads by @PixPMusic in pingdotgg/t3code#5155
* fix(web): preserve appearance mode when changing themes by @extoci in pingdotgg/t3code#6343
* feat(connect): deregister account environments from any client by @StiensWout in pingdotgg/t3code#4844
* feat(web): pull request surfaces — filters & qualifiers, all-server listing, update branch, reactions, in-place editing, smarter diffs by @Bil0000 in pingdotgg/t3code#6039


**Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260812.1077...v0.0.34-nightly.20260812.1079

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260812.1079
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants