[Bug]: Keyboard controls fail when creating a worktree from a pull request
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web — branch/ref picker and pull-request checkout dialog, observed in the macOS desktop app.
Summary
Creating a new thread in a worktree from a pull request has two keyboard-control problems: Enter does not activate the highlighted PR result after pasting its URL, and the subsequent checkout dialog defaults Enter to Local even though Worktree is styled as the primary action.
Steps to reproduce
- Start creating a new thread in a Git project and open the branch/ref picker.
- Paste a pull-request URL into Search refs….
- The Checkout pull request result appears and looks highlighted automatically.
- Press Enter. The result does not activate.
- Click the PR result manually to open the checkout dialog.
- Wait for the PR to resolve. The dialog offers Cancel, Local, and Worktree. Worktree is styled as the primary button.
- Without moving focus from the prefilled PR input, press Enter. The dialog starts the Local action instead of Worktree.
Expected behavior
- Enter activates the highlighted PR result, just like clicking it.
- Enter in the checkout dialog’s PR input activates Worktree, matching the visually primary action.
- Explicitly focusing or clicking Local still allows local checkout.
Actual behavior
PR picker: After pasting the URL, the PR result looks highlighted, but Enter does nothing. Clicking the result works.
Checkout dialog: With focus still in the PR input, Enter starts local checkout. The button styling suggests Worktree is the default, so this selects a different checkout mode than expected.
Impact
The first problem interrupts keyboard-only navigation. The second can start checkout in the main repository when the intended destination is a dedicated worktree.
Version or commit
0.0.43-nightly.20260916.1811
Environment
T3 Code desktop app on macOS.
Logs or stack traces
No logs or stack traces captured for the reported failures.
Workaround
Click Checkout pull request, then explicitly click Worktree in the dialog.
Investigation notes
Checkout dialog: confirmed in source
In PullRequestThreadDialog.tsx, opening the dialog explicitly focuses and selects the PR input. Its Enter handler calls:
void handleConfirm("local");
Local uses variant="outline", while Worktree uses the default primary button style. This mismatch was confirmed in freshly fetched upstream main on September 16, 2026. It is not caused by the Local button receiving initial focus.
PR picker: reported behavior, cause not confirmed
The relevant component is BranchToolbarBranchSelector.tsx. The exact highlighted-but-inert paste case was not reproduced during local web-client investigation based on commit 50ff4c371; it still occurs in the reported desktop version. The automated checks mostly used text entry rather than a reliable real clipboard paste.
The inspected virtualized combobox implementation activates Enter by looking up the highlighted row’s mounted element and calling .click(). A stale or missing entry is a possible explanation, but it has not been confirmed. A separate no-highlight case observed locally is not evidence of this reported failure.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/web/src/components/PullRequestThreadDialog.tsx to inspect the confirmed Enter path, then read apps/web/src/components/BranchToolbarBranchSelector.tsx and reproduce the pasted-URL case. Done means Enter activates the highlighted PR result and the checkout dialog selects Worktree by default while explicit Local focus or clicking still selects Local.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100