Skip to content

feat: allow using typed branch name directly#2195

Open
thmsobrmlr wants to merge 3 commits into
mainfrom
05-18-feat_allow_using_typed_branch_name_directly
Open

feat: allow using typed branch name directly#2195
thmsobrmlr wants to merge 3 commits into
mainfrom
05-18-feat_allow_using_typed_branch_name_directly

Conversation

@thmsobrmlr
Copy link
Copy Markdown
Contributor

@thmsobrmlr thmsobrmlr commented May 18, 2026

Problem

the branch dropdown is slow as **** for large repos

Changes

allows using a typed/pasted branch name through a check button, or by pressing enter

Screenshot 2026-05-18 at 17.50.00.png

How did you test this?

tried locally

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@thmsobrmlr thmsobrmlr requested a review from a team May 18, 2026 15:49
@thmsobrmlr thmsobrmlr marked this pull request as ready for review May 18, 2026 15:50
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 18, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/code/src/renderer/features/git-interaction/components/BranchSelector.tsx:251-263
**Enter key bypasses highlighted combobox item**

Because `onKeyDownCapture` intercepts Enter and calls `stopPropagation` whenever `canUseInputBranch` is true, the combobox's own keyboard-selection logic is never reached. If a user types a partial name (e.g. `feat`), uses the arrow keys to highlight `feat/my-specific-branch`, and presses Enter, they will check out `feat` (the raw typed text) instead of the highlighted branch. This silently breaks keyboard-driven selection whenever the typed text differs from the highlighted item.

A common fix is to inspect whether any list item currently has the aria-selected / active-descendant focus — or, simpler, only intercept Enter when there are zero filtered list items that exactly match the trimmed input (i.e. the typed name doesn't resolve to anything in the list), so normal selection still wins when an item is highlighted.

Reviews (1): Last reviewed commit: "add comment" | Re-trigger Greptile

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant