anomalyco / anomalyco/opencode
desktop: refocus prompt input when switching tabs with Cmd+number
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Switching session tabs with Cmd+<number> should automatically focus the destination tab's prompt input. Currently, the tab changes without refocusing the input, interrupting keyboard-only navigation.
Steps to reproduce
- Open at least two session tabs.
- Switch between them using
Cmd+1,Cmd+2, etc. - Start typing immediately after switching, including when returning to a previously visited tab.
Expected: The selected tab's prompt input receives focus, so typing works without an extra click.
Actual: The selected tab's prompt input is not automatically refocused.
Additional context
- Reported behavior; not independently reproduced. Exact app version and OS version were not provided.
- Related: #44244 reports similar focus loss on Windows. This report specifically covers Command-number tab switching; a shared cause has not been confirmed.
Requested by: @R44VC0RP (vogel via Slack)
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 by locating the Command-number session-tab switching handler and the destination tab's prompt input focus logic. Reproduce the behavior with multiple session tabs, including returning to a previously visited tab, and compare keyboard focus before and after switching. Done means typing works immediately after each Command-number switch without an extra click.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100