Skip to content

fix(app): focus session search when the Home shortcut opens Home - #53761

Merged
Brendonovich merged 2 commits into
v2from
home-search-focus
Oct 8, 2026
Merged

Brendonovich merged 2 commits into
v2from
home-search-focus

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Problem

Pressing the Home shortcut (Cmd+B, or Alt+Home on Windows) from a session opens Home, but nothing takes focus. The previously focused composer unmounts, focus falls back to the document body, and typing does nothing. Cmd+F was the only way to reach Search sessions.

Change

  • The home.toggle command records a one-shot request in the layout context when it navigates to Home.
  • The Home session search controller consumes that request on mount and focuses the search input, so typing filters sessions immediately.
  • Clicking or tapping the Home button and titlebar back/forward do not request focus, so pointer and mobile behavior are unchanged (no on-screen keyboard popping up). Pressing the shortcut again still returns to the previous tab, because modified keybinds fire from inside the input.

Testing

  • New case in the Home keeper suite (e2e/regression/home.spec.ts): from a session with the composer focused, Cmd/Ctrl+B focuses session search, typing filters to the matching session, the shortcut returns to the session, and clicking the Home button leaves the search unfocused. Verified it fails on v2 without the fix (search not focused).
  • home.spec.ts, settings-search.spec.ts, and tabs.spec.ts pass locally (chromium).
  • bun run typecheck in packages/app passes; Prettier is clean.

Requested by: @Brendonovich (Brendan via Slack)

@Brendonovich
Brendonovich merged commit a80ca68 into v2 Oct 8, 2026
9 checks passed
@Brendonovich
Brendonovich deleted the home-search-focus branch October 8, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant