Skip to content

fix(windows): windows branch switch ui broken#1038

Open
EwanJordaan wants to merge 5 commits intopingdotgg:mainfrom
EwanJordaan:fix(windows)/branch-selection-ui
Open

fix(windows): windows branch switch ui broken#1038
EwanJordaan wants to merge 5 commits intopingdotgg:mainfrom
EwanJordaan:fix(windows)/branch-selection-ui

Conversation

@EwanJordaan
Copy link

@EwanJordaan EwanJordaan commented Mar 13, 2026

What Changed

  • Moved selected-row styling into the shared combobox and autocomplete primitives
  • Removed branch-selector-specific selected styling
  • Fixed the Windows branch switch UI so the hover effect renders consistently

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:

  • The selected branch row could render incorrectly or inconsistently in the branch switch UI on Windows
  • Hovering over branches did not update the highlighted row visually

After:

  • The selected branch row uses the shared selected-state styling
  • Hover, highlighted, and selected states are now consistent with the shared combobox/autocomplete behavior
  • Hover highlighting follows the cursor correctly in the branch switch UI

Video:

Screen.Recording.2026-03-13.195339.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for the UI change
  • I included a video for animation/interaction changes

Issue #1040

Note

[!NOTE]

Fix branch selector UI styling on Windows

  • Adds a branchSelectorHighlightClassName constant to BranchToolbarBranchSelector.tsx with dark (#242424) background and white text for hover, selected, and highlighted states, replacing a broken conditional bg-accent class.
  • Updates combobox.tsx and autocomplete.tsx to add hover:bg-accent, data-selected:bg-accent/50, and data-selected:text-foreground to item base styles.
  • Behavioral Change: The active branch item no longer receives a custom accent style outside of the component's selected/highlighted state; all visual feedback now comes from data attributes.

Macroscope summarized facdae5.


Note

Low Risk
Low risk styling-only changes, but they affect shared ComboboxItem/AutocompleteItem rendering 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 ComboboxItem and AutocompleteItem primitives via hover: and data-selected classes, and removes the branch selector’s one-off “active branch” accent styling in favor of a single branchSelectorHighlightClassName applied to all branch picker items.

Written by Cursor Bugbot for commit facdae5. This will update automatically on new commits. Configure here.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 13, 2026
- Apply shared hover/selected/highlight class to all branch combobox items
- Keep branch action rows and branch rows visually consistent in the selector
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

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

Run ID: db36e5ef-06d1-42bf-b3c0-eb50f0eb398d

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Mar 13, 2026
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

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";
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 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