anomalyco / anomalyco/opencode

desktop: refocus prompt input when switching tabs with Cmd+number

Open
#47,514 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

2.0 bug
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
  1. Open at least two session tabs.
  2. Switch between them using Cmd+1, Cmd+2, etc.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.