Skip to content

Add chat history search feature to navigation panel#8448

Open
vincenzopalazzo wants to merge 5 commits intoaaif-goose:mainfrom
vincenzopalazzo:feature/chat-history-search-clean
Open

Add chat history search feature to navigation panel#8448
vincenzopalazzo wants to merge 5 commits intoaaif-goose:mainfrom
vincenzopalazzo:feature/chat-history-search-clean

Conversation

@vincenzopalazzo
Copy link
Copy Markdown
Contributor

@vincenzopalazzo vincenzopalazzo commented Apr 9, 2026

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

  • Debounced search (250ms) via existing /sessions/search backend endpoint
  • Rich results dropdown with session name, message count, and relative time
  • Session status indicators — streaming, unread, and error states
  • Recipe/chat icon distinction — ChefHat icon for recipe sessions, MessageSquare for chats
  • Full keyboard navigation — ↑/↓ arrows, Enter to select, Escape to close
  • Global shortcutCmd/Ctrl+K to focus the search input
  • Animated dropdown — smooth open/close with framer-motion
  • Skeleton loading states — 3-row shimmer while results load
  • ARIA accessibility — combobox + listbox roles, aria-expanded, aria-selected
  • Responsive — works in both expanded grid and condensed navigation layouts
  • Hidden in icon-only mode — search bar collapses when navigation is minimized to icons

Changes

File Status
components/conversation/ChatHistorySearch.tsx New (348 lines)
components/Layout/ExpandedRenderer.tsx Modified (+11 lines)
components/Layout/CondensedRenderer.tsx Modified (+16 lines)

Implementation Details

  • Reuses shared UI components: ScrollArea, Skeleton, SessionIndicators
  • Reuses existing utilities: getSessionDisplayName, truncateMessage from useNavigationSessions
  • Uses defineMessages/useIntl i18n pattern consistent with codebase
  • Follows existing navigation component patterns and Tailwind theme tokens
  • No backend changes required — the /sessions/search endpoint already exists

Preview

  • Expanded navigation: search input renders above the session grid and the dropdown stays attached to the full-width search bar.
  • Condensed navigation: search input renders inline above the session list and is not mounted in icon-only mode.
  • Keyboard flow: Cmd+K on macOS / Ctrl+K elsewhere focuses the field, arrow keys move the active result, Enter selects, Escape closes, and Tab closes the dropdown when focus leaves the control.

Quality Checks

  • ✅ TypeScript compilation (no errors in changed files)
  • ✅ ESLint (clean)
  • ✅ Prettier formatted

Testing

  • source bin/activate-hermit && cd ui/desktop && pnpm run lint:check

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/desktop/src/components/Layout/ExpandedRenderer.tsx Outdated
Comment thread ui/desktop/src/components/conversation/ChatHistorySearch.tsx Outdated
@vincenzopalazzo vincenzopalazzo force-pushed the feature/chat-history-search-clean branch from bbb808d to cedfeaf Compare April 9, 2026 18:08
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/desktop/src/components/Layout/CondensedRenderer.tsx Outdated
Comment thread ui/desktop/src/components/conversation/ChatHistorySearch.tsx
@vincenzopalazzo vincenzopalazzo force-pushed the feature/chat-history-search-clean branch 2 times, most recently from 6a11bf3 to 667af9c Compare April 9, 2026 18:35
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/desktop/src/components/conversation/ChatHistorySearch.tsx
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/desktop/src/components/conversation/ChatHistorySearch.tsx
@vincenzopalazzo vincenzopalazzo force-pushed the feature/chat-history-search-clean branch from c0d7d23 to 1f3b121 Compare April 14, 2026 19:34
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/desktop/src/components/conversation/ChatHistorySearch.tsx
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/desktop/src/components/conversation/ChatHistorySearch.tsx Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread ui/desktop/src/components/conversation/ChatHistorySearch.tsx
@lifeizhou-ap
Copy link
Copy Markdown
Collaborator

Thanks @vincenzopalazzo!

Nice work!

There's one outstanding Codex comment about closing the
dropdown when focus leaves via keyboard (Tab-out) that hasn't been
addressed yet. Could you take a look at that one?

Also can you please

  • add the screenshot or short video of this feature in the PR description
  • add the "Testing" part

After you've finish, I will finalise this PR

@vincenzopalazzo
Copy link
Copy Markdown
Contributor Author

Addressed the remaining Codex thread in 310bc15: the chat history search dropdown now closes when focus leaves via keyboard, including Tab-out.

I also updated the PR description with Preview and Testing sections.

Testing run: source bin/activate-hermit && cd ui/desktop && pnpm run lint:check.

I wasn't able to attach a screenshot/video from this CLI environment, so that part still needs a manual follow-up if you'd like it before merge.

@vincenzopalazzo
Copy link
Copy Markdown
Contributor Author

Validation complete.

Ran:

  • source bin/activate-hermit && cd ui/desktop && pnpm run lint:check

  • No additional code changes were pending in the branch at validation time.

Current PR checks summary:

Build Binary	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136081/job/71446790406	
Build Rust Project on Windows	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136137/job/71446789961	
Compaction Tests	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136081/job/71446790834	
Smoke Tests	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136081/job/71446790845	
Smoke Tests (Code Execution)	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136081/job/71446791005	
bundle-desktop	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136194/job/71446789920	
changes	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136081/job/71446790328	
Build and Test Rust Project	pass	5m47s	https://github.com/aaif-goose/goose/actions/runs/24453136137/job/71446828638	
Check Rust Code Format	pass	37s	https://github.com/aaif-goose/goose/actions/runs/24453136137/job/71446828658	
Lint Rust Code	pass	2m43s	https://github.com/aaif-goose/goose/actions/runs/24453136137/job/71446828666	
changes	pass	15s	https://github.com/aaif-goose/goose/actions/runs/24453136137/job/71446789640	
check-quarantined	pass	14s	https://github.com/aaif-goose/goose/actions/runs/24453135483/job/71446787410	
comment-on-pr	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136194/job/71446790286	
Check Generated Schemas are Up-to-Date	pass	13m0s	https://github.com/aaif-goose/goose/actions/runs/24453136137/job/71446828655	
update-release-notes	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136094/job/71446790028	
Test and Lint Electron Desktop App	pass	1m38s	https://github.com/aaif-goose/goose/actions/runs/24453136137/job/71446828678	
check-commits	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136078/job/71446789949	
check-fork	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136081/job/71446789743	
goose server HTTP integration tests	skipping	0	https://github.com/aaif-goose/goose/actions/runs/24453136081/job/71446790996

@vincenzopalazzo
Copy link
Copy Markdown
Contributor Author

Resolved the remaining review thread for the chat history search dropdown keyboard-focus fix. The thread is now marked as resolved.

vincenzopalazzo and others added 4 commits April 23, 2026 12:16
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 <vincenzopalazzodev@gmail.com>
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) <noreply@anthropic.com>
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) <noreply@anthropic.com>
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
@vincenzopalazzo vincenzopalazzo force-pushed the feature/chat-history-search-clean branch from 310bc15 to 1aee503 Compare April 23, 2026 16:18
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1aee5035f8

ℹ️ 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".

Comment thread ui/desktop/src/i18n/messages/en.json Outdated
@vincenzopalazzo
Copy link
Copy Markdown
Contributor Author

Follow-up on review 4164115220: rebased the branch onto the updated main, kept the chat history search blur fix in 1aee503, and resolved the remaining review thread tied to this review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
@vincenzopalazzo
Copy link
Copy Markdown
Contributor Author

Done @lifeizhou-ap now should be ready for another pass!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a search bar to search through chat history

2 participants