Skip to content

fix(web): keep unchecked switches visible in custom themes - #7810

Open
evbuildsnet wants to merge 2 commits into
pingdotgg:mainfrom
evbuildsnet:fix/visible-unchecked-switches
Open

fix(web): keep unchecked switches visible in custom themes#7810
evbuildsnet wants to merge 2 commits into
pingdotgg:mainfrom
evbuildsnet:fix/visible-unchecked-switches

Conversation

@evbuildsnet

@evbuildsnet evbuildsnet commented Aug 21, 2026

Copy link
Copy Markdown

Unchecked switches disappeared in imported themes whose input border is transparent. Catppuccin Mocha exposed this in Settings > General: Archive confirmation was present but invisible while off.

The off track now uses the theme's contrast-solved muted foreground at 30% opacity. It stays visible without changing the checked state or control geometry.

BEFORE

Archive confirmation switch disappears under Catppuccin Mocha

AFTER

Archive confirmation switch remains visible under Catppuccin Mocha

Verification

  • vp test run apps/web/src/components/ui/switch.test.tsx
  • Targeted format and type-aware lint passed
  • vp run @t3tools/web#typecheck
  • Browser verification in an isolated T3 environment with Catppuccin Mocha imported from Open VSX
  • Confirmed Catppuccin maps --input to the same color as --background; the fixed off track instead resolves from --muted-foreground

Built with GPT-5.6-Sol in T3 Code through the Codex harness.


Note

Low Risk
Cosmetic UI token change on switch tracks only; no logic, auth, or data handling impact.

Overview
Unchecked switch tracks no longer disappear in themes where --input matches the background (e.g. Catppuccin Mocha).

The off-state track on Switch and switch-style MenuCheckboxItem now uses data-unchecked:bg-muted-foreground/30 instead of data-unchecked:bg-input. Checked styling and geometry are unchanged. A small SSR markup test locks in the new class.

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

Note

Fix unchecked switch visibility in custom themes

Replaces the unchecked track class data-unchecked:bg-input with data-unchecked:bg-muted-foreground/30 in both Switch and MenuCheckboxItem (switch variant). Adds tests asserting the new class is present and the old one is removed.

Macroscope summarized 28f1680.

@coderabbitai

coderabbitai Bot commented Aug 21, 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: d7c1ea05-8a86-4524-b96e-393e718999e6

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 21, 2026

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One consistency finding: the menu switch variant still uses the old unchecked token, so the two switch surfaces now diverge.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/ui/switch.tsx
@macroscopeapp

macroscopeapp Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 28f1680

Macroscope's review found this PR approvable — This is a simple CSS fix changing a color token for unchecked switch backgrounds to ensure visibility in custom themes. Both switch surfaces are updated consistently, and a test is added to verify the change.

You can add or adjust custom eligibility rules. Learn more.

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.

1 participant