Skip to content

Add keyboard shortcut for session search - #1064

Draft
kvanland wants to merge 1 commit into
omnigent-ai:mainfrom
kvanland:feat/session-search-hotkey
Draft

kvanland wants to merge 1 commit into
omnigent-ai:mainfrom
kvanland:feat/session-search-hotkey

Conversation

@kvanland

Copy link
Copy Markdown

Related issue

Closes #1059

Summary

  • Adds Cmd/Ctrl+Shift+F to open the sidebar if needed, focus the sidebar "Search sessions" input, and select the current query.
  • Documents the shortcut in the keyboard shortcuts dialog while leaving Cmd/Ctrl+K available for a future command palette.
  • Adds Vitest and Playwright coverage for the shortcut path.

Type of change

  • Bug fix
  • Feature
  • Refactor / chore
  • Docs
  • Test / CI
  • Breaking change

Test coverage

  • Unit tests added / updated
  • Integration tests added / updated
  • E2E tests added / updated
  • Manual verification completed
  • Existing tests cover this change
  • Not applicable

Coverage rationale

Vitest coverage exercises the hotkey predicate, Cmd/Ctrl variants, ignored chords, sidebar open-before-focus behavior, actual search input focus/selection, and the keyboard shortcuts dialog row.

Playwright coverage in tests/e2e_ui/sessions/test_sidebar_search.py verifies Ctrl+Shift+F opens a collapsed sidebar and focuses/selects the search input in the browser.

Validated locally:

  • npm test -- src/hooks/useSessionSearchHotkey.test.tsx src/components/KeyboardShortcutsDialog.test.tsx src/shell/Sidebar.test.tsx src/lib/panelSizePreferences.test.ts src/hooks/useResizableSidebar.test.tsx
  • npx oxlint src/hooks/useSessionSearchHotkey.ts src/hooks/useSessionSearchHotkey.test.tsx src/shell/Sidebar.tsx src/shell/Sidebar.test.tsx src/components/KeyboardShortcutsDialog.tsx src/components/KeyboardShortcutsDialog.test.tsx src/test-setup.ts
  • npm run type-check
  • npm run format:check -- src/hooks/useSessionSearchHotkey.ts src/hooks/useSessionSearchHotkey.test.tsx src/shell/Sidebar.tsx src/shell/Sidebar.test.tsx src/components/KeyboardShortcutsDialog.tsx src/components/KeyboardShortcutsDialog.test.tsx src/test-setup.ts
  • npm run build
  • uv run --python /opt/homebrew/bin/python3.13 pytest tests/e2e_ui/sessions/test_sidebar_search.py --ui-skip-build -q

Note: full npm run lint currently reports existing errors outside this change; focused oxlint on the touched TS/TSX files passes.

Signed-off-by: Kyle Van Landingham <kyle.vanlandingham@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2-medium Priority: bug with workaround, important feature request size/L Pull request size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add keyboard shortcut to focus session search, with path toward command palette integration

3 participants