fix(windows): windows branch switch ui broken#1038
fix(windows): windows branch switch ui broken#1038EwanJordaan wants to merge 5 commits intopingdotgg:mainfrom
Conversation
- Apply shared hover/selected/highlight class to all branch combobox items - Keep branch action rows and branch rows visually consistent in the selector
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| resolvedActiveBranch, | ||
| }); | ||
| const branchSelectorHighlightClassName = | ||
| "hover:bg-[#242424] hover:text-white data-selected:bg-[#242424] data-selected:text-white data-highlighted:bg-[#242424] data-highlighted:text-white"; |
There was a problem hiding this comment.
Hardcoded dark-only colors bypass theme system
Medium Severity
branchSelectorHighlightClassName hardcodes bg-[#242424] and text-white for hover, selected, and highlighted states. The app supports light and dark themes, and every other component uses theme-aware tokens (bg-accent, text-foreground). These hardcoded dark colors will produce jarring dark-background items in light mode, and they override the theme-aware styles that the shared primitives now correctly provide. The old code used bg-accent text-foreground, which respected the active theme.


What Changed
Why
The branch switcher already controls selection through the combobox value state, but the selected styling was partly hardcoded in the branch selector itself. That made the UI behavior inconsistent and more fragile.
This change moves selected-state styling into the shared combobox/autocomplete primitives so visual state is handled consistently through the existing
data-selected,data-highlighted, and hover behaviors.By relying on the shared primitives instead of custom styling in the branch selector, the UI behavior becomes predictable across combobox-based components and resolves the Windows branch selection hover issue.
UI Changes
Before:
After:
Video:
Screen.Recording.2026-03-13.195339.mp4
Checklist
Issue #1040
Note
[!NOTE]
Fix branch selector UI styling on Windows
branchSelectorHighlightClassNameconstant to BranchToolbarBranchSelector.tsx with dark (#242424) background and white text for hover, selected, and highlighted states, replacing a broken conditionalbg-accentclass.hover:bg-accent,data-selected:bg-accent/50, anddata-selected:text-foregroundto item base styles.Macroscope summarized facdae5.
Note
Low Risk
Low risk styling-only changes, but they affect shared
ComboboxItem/AutocompleteItemrendering across the app and could subtly change highlight/selected appearance in other pickers.Overview
Fixes inconsistent branch-switch row highlighting (notably on Windows) by standardizing hover/selected/highlight styling.
Moves selected-row styling into the shared
ComboboxItemandAutocompleteItemprimitives viahover:anddata-selectedclasses, and removes the branch selector’s one-off “active branch” accent styling in favor of a singlebranchSelectorHighlightClassNameapplied to all branch picker items.Written by Cursor Bugbot for commit facdae5. This will update automatically on new commits. Configure here.