Add chat history search feature to navigation panel#8448
Add chat history search feature to navigation panel#8448vincenzopalazzo wants to merge 3 commits intoaaif-goose:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbb808d577
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
bbb808d to
cedfeaf
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cedfeaf879
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
6a11bf3 to
667af9c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 667af9c78e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0d7d23aa0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Implement a search bar in the Goose navigation panel that allows users to search through their chat history by keywords. Features: - Debounced search (250ms) via /sessions/search endpoint - Results dropdown with session name, message count, relative time - Session status indicators (streaming, unread, error) - Recipe/chat icon distinction - Full keyboard navigation (arrow keys, Enter, Escape) - Cmd/Ctrl+K global shortcut to focus - Animated dropdown with framer-motion - Skeleton loading states - Proper ARIA combobox/listbox accessibility - Hidden in condensed icon-only mode - Works in both expanded grid and condensed layouts - i18n messages extracted and compiled Resolves aaif-goose#8440 Signed-off-by: Vincenzo Palazzo <[email protected]>
c0d7d23 to
1f3b121
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f3b121278
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Drop previous results and flip to the searching state as soon as the
query changes so that during the 250ms debounce window:
- items from the previous query can no longer be clicked (misnavigation)
- the empty-state ("No chats found") does not flicker before the new
request actually runs
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 314dcdbaec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| useEffect(() => { | ||
| const handleKeyDown = (e: KeyboardEvent) => { | ||
| if ((e.metaKey || e.ctrlKey) && e.key === 'k') { |
There was a problem hiding this comment.
Use platform-specific modifier for global search shortcut
The shortcut handler currently triggers on either Meta or Ctrl ((e.metaKey || e.ctrlKey) && e.key === 'k'), so on macOS pressing Ctrl+K is also intercepted and preventDefault() is applied. This conflicts with expected macOS text-editing behavior and can steal Ctrl+K from other focused inputs while the nav search is mounted. The shortcut should follow platform semantics (Cmd on macOS, Ctrl elsewhere) like other keyboard handlers in the codebase.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 310bc15. The handler now uses (isMac ? e.metaKey : e.ctrlKey) -- matching the pattern already used in SearchView.tsx, App.tsx, and ProgressiveMessageList.tsx -- and also guards against shiftKey/altKey so only a bare Cmd+K (macOS) or Ctrl+K (Linux/Windows) triggers the shortcut. The inline hint now renders ⌘K on macOS and Ctrl+K elsewhere via separate i18n messages.
The global Cmd/Ctrl+K handler previously fired on both `metaKey` and `ctrlKey` across all platforms, so on macOS `Ctrl+K` was intercepted (conflicting with native text-editing behaviour) and the inline hint always displayed `⌘K` even on Linux/Windows. Match the platform convention used elsewhere in the codebase: Cmd on macOS, Ctrl otherwise, and render the hint accordingly. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 310bc157f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| document.addEventListener('mousedown', handleClickOutside); | ||
| return () => document.removeEventListener('mousedown', handleClickOutside); |
There was a problem hiding this comment.
Close search dropdown when focus leaves via keyboard
isFocused is only cleared by a document mousedown outside handler, so keyboard-driven focus changes (for example, pressing Tab out of the search field) never reset focus state. In that path, showDropdown can remain true even though the combobox is no longer focused, leaving stale results/error UI open and causing inconsistent keyboard/accessibility behavior. Please also handle blur/focusout transitions (e.g., when relatedTarget is outside containerRef) so the dropdown reliably closes when focus leaves the search control.
Useful? React with 👍 / 👎.
Add chat history search to navigation panel
Implements a native search bar in the Goose navigation panel, allowing users to search through their chat history by keywords.
Resolves #8440
Features
/sessions/searchbackend endpointCmd/Ctrl+Kto focus the search inputaria-expanded,aria-selectedChanges
components/conversation/ChatHistorySearch.tsxcomponents/Layout/ExpandedRenderer.tsxcomponents/Layout/CondensedRenderer.tsxImplementation Details
ScrollArea,Skeleton,SessionIndicatorsgetSessionDisplayName,truncateMessagefromuseNavigationSessionsdefineMessages/useIntli18n pattern consistent with codebase/sessions/searchendpoint already existsQuality Checks