fix(web): invisible toggles and focus rings from imported themes - #9477
Open
flamboh wants to merge 2 commits into
Open
fix(web): invisible toggles and focus rings from imported themes#9477flamboh wants to merge 2 commits into
flamboh wants to merge 2 commits into
Conversation
Contributor
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a well-scoped fix to VS Code theme import rendering, with focused coverage for transparent controls, focus colors, placeholders, and reserved IDs. It also changes the default colors selected for imported themes lacking usable accent values, so the resulting product behavior should receive human review. You can add or adjust custom eligibility rules. Learn more. |
flamboh
force-pushed
the
t3code/fix-vscode-theme-import-controls
branch
from
September 4, 2026 07:22
86d79d2 to
c438a65
Compare
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.
Note
🤖 Fable 5.1 on behalf of Oliver
Problem
Importing Catppuccin Mocha made every toggle in Settings disappear. The theme sets
input.borderto fully transparent, which the importer flattened onto the editor background, so theinputrole became the canvas color. That role is the unchecked switch track and the border of every text input.An audit of 47 published themes and the VS Code defaults found three more cases of the same shape: a transparent or canvas-colored
focusBorderyields an invisible focus ring and accent (all five Vitesse themes, One Dark Pro Flat), the placeholder color was validated against the canvas instead of the raised surface inputs render on (Light+), and names that slug todarkorlight(Dark+, Light+) hit a reserved id and fail to import at all.Fix
The importer now treats a workbench color as usable only when it does the job the role needs:
inputrole triesinput.backgroundfirst, theninput.border, and accepts a candidate only if it stands apart from both the canvas and the checked-switch color. Otherwise it keeps the derived value.dropdown.borderis no longer a candidate; it turns an edge color into a fill.focusBorderthat flattens into the canvas and moves on to the next accent key, falling back to the standard palette accent instead of the canvas.-vscodesuffix. The label is unchanged.Built-in themes and the CSS token mapping are untouched. Already imported themes keep their stored colors, so a re-import is needed to pick up the change.
UI changes
Before
After
Focus ring before
Focus ring after
Verification
vp test run apps/web/src/vscodeThemeImport.test.ts, 22 tests passedvp lint <changed files> --report-unused-disable-directivesvp fmt --check <changed files>vp run --filter @t3tools/web typecheckgit diff --check origin/main...HEADChanges prepared by Claude Fable 5.1 through Claude Code in T3 Code, with a GPT-5.6 Sol subagent auditing the theme corpus and implementing the importer changes to spec.
Note
[!NOTE]
Fix VS Code theme import to keep switches and focus rings visible
parseVsCodeThemeFilein vscodeThemeImport.ts now rejects accent, focus, and input candidates that are transparent or lack minimum contrast against the canvas, falling back to a standard visible accent when none qualify.parseVsCodeThemeFile.Macroscope summarized c438a65.