Skip to content

feat(desktop): add search in chat#57

Open
Khushalpatel499 wants to merge 3 commits into
shobcoder:mainfrom
Khushalpatel499:add_search_option
Open

feat(desktop): add search in chat#57
Khushalpatel499 wants to merge 3 commits into
shobcoder:mainfrom
Khushalpatel499:add_search_option

Conversation

@Khushalpatel499

@Khushalpatel499 Khushalpatel499 commented Jun 23, 2026

Copy link
Copy Markdown

feat: Add Search in Chat
Adds the ability to search through chat messages within a session.

How to use:

Press Ctrl+F (or Cmd+F on macOS) to open the search bar

Or click ⋯ menu → "Search in chat"

Type a query to find matching messages

Use Enter / Shift+Enter to navigate between matches

Press Escape to close

Changes:

New ChatSearch.tsx component with match navigation and scroll-to-match

Keyboard shortcut (Ctrl+F) integration in AgentView.tsx

"Search in chat" menu item added to session dropdown

CSS highlight animation for matched messages

Closes #49

@seraprogrammer

Copy link
Copy Markdown
Contributor

@Khushalpatel499 Word highlighting is not working.

image

@Khushalpatel499

Khushalpatel499 commented Jun 23, 2026

Copy link
Copy Markdown
Author

Hi @seraprogrammer
Fixed! The issues were:

  1. Word highlighting — Now highlights the actual matching words in yellow (active match gets brighter glow)

  2. Search bar moving — Replaced scrollIntoView with manual scrollBy so only the chat content scrolls, search bar stays fixed

  3. Navigation — Up/Down buttons now correctly cycle through all matches .

image

@seraprogrammer

Copy link
Copy Markdown
Contributor

@Khushalpatel499 Looks good, but the word highlighting should be theme-aware. Also, please make the arrow icon match the previous style and keep it simple.

@Khushalpatel499

Copy link
Copy Markdown
Author

Hi @seraprogrammer
Updated per feedback:

Theme-aware highlighting — Uses var(--ring) which resolves from border-interactive-active per active theme via resolveAppThemeTokens in theme/index.ts. Adapts automatically across all 37 bundled themes (Shob, Catppuccin, Dracula, Nord, etc.)

Arrow icons — Switched to ArrowUp/ArrowDown with h-3.5 w-3.5 and rounded-sm to match the existing Terminal search style (Terminal.tsx)

image

@seraprogrammer

Copy link
Copy Markdown
Contributor

@Khushalpatel499 I'm on Windows 11, and I can't see the word highlighting. Maybe there's an issue on Windows?

@Khushalpatel499

Copy link
Copy Markdown
Author

@seraprogrammer Regarding the Windows visibility issue — could you check in DevTools (Ctrl+Shift+I) if mark[data-search-mark] elements are being inserted into the DOM when you search? The TreeWalker might not be reaching text nodes inside the message renderer on your setup. A screenshot of the Elements panel after searching would help me debug.

@seraprogrammer

Copy link
Copy Markdown
Contributor

@seraprogrammer Regarding the Windows visibility issue — could you check in DevTools (Ctrl+Shift+I) if mark[data-search-mark] elements are being inserted into the DOM when you search? The TreeWalker might not be reaching text nodes inside the message renderer on your setup. A screenshot of the Elements panel after searching would help me debug.

Oky i will push in this PR - No issues bro

@GetAlamgir

Copy link
Copy Markdown

clt+F does't appear search option for windows 11.

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.

Feature: Add Search Option in chat

3 participants