Skip to content

apps/web: add in-thread find/search for chat conversations#1501

Open
leonardoxr wants to merge 12 commits into
pingdotgg:mainfrom
leonardoxr:feat/thread-search-1486
Open

apps/web: add in-thread find/search for chat conversations#1501
leonardoxr wants to merge 12 commits into
pingdotgg:mainfrom
leonardoxr:feat/thread-search-1486

Conversation

@leonardoxr
Copy link
Copy Markdown

@leonardoxr leonardoxr commented Mar 28, 2026

Summary

Adds a Codex-style in-thread search flow to the chat view in apps/web.

  • opens with Cmd+F / Ctrl+F
  • searches the current thread across user messages, assistant messages, plans, and work log rows
  • cycles matches with Enter, Shift+Enter, and the next/previous buttons
  • scrolls virtualized matches into view
  • highlights the matched text inline instead of applying a whole-row emphasis treatment
  • clears all highlighting when the search UI is closed
  • keeps the search bar overlaid so opening it does not shift the thread layout
  • narrows search incrementally as the query gets longer to reduce repeated scan work on large threads

Why

Closes #1486.

The issue asks for a Cmd+F / Ctrl+F style find-in-thread flow because it is hard to locate earlier content in long conversations by scrolling, especially during active generation.

Scope

This PR is intentionally limited to the web thread-search experience.

It does not include unrelated server/runtime compatibility changes or local dev seeding helpers.

Before / After

Before:

Before thread search

After:

After thread search

Validation

  • bun fmt
  • bun lint
  • bun typecheck
  • bun run test src/components/chat/threadSearch.test.ts
  • bun run test src/components/ChatMarkdown.test.tsx src/components/chat/MessagesTimeline.test.tsx src/components/chat/threadSearchHighlight.test.tsx src/components/chat/ProposedPlanCard.test.tsx
  • bun run test:browser src/components/ChatView.threadSearch.browser.tsx

Notes

This is still a fairly broad UI change for a single feature, but all included edits are directly tied to making thread search usable across the actual thread surfaces that can render searchable content.


Note

Medium Risk
Moderate UI/UX and rendering changes across the chat timeline, including altered markdown/code-block rendering during search and new indexing logic that could impact performance on large threads.

Overview
Adds an in-thread find UX to ChatView (Cmd/Ctrl+F) with an overlaid ThreadSearchBar, keyboard navigation (Enter/Shift+Enter/Escape), and auto-scroll to the active match in the virtualized MessagesTimeline.

Introduces a reusable thread search index (threadSearch.ts) that normalizes visible text across assistant markdown (via new markdownToPlainText), user messages (including rendered terminal-chip labels), work-log rows (rendered headings/previews/visible file chips), proposed plans, skill chips, and markdown file-link labels; lookup incrementally narrows using prior results.

Implements match highlighting across surfaces using renderHighlightedText plus a markdown rehype plugin (threadSearchHighlight.tsx); during search, collapsed user messages/work groups/plans auto-expand and code fences with matches render plain text with <mark> highlights instead of syntax highlighting. Also refactors markdown link parsing/label building into markdown-links.ts and adds decode-named-character-reference for entity decoding, with comprehensive new unit/browser tests.

Reviewed by Cursor Bugbot for commit 896b034. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add in-thread find/search for chat conversations

  • Adds a ThreadSearchBar UI triggered by Cmd/Ctrl+F in ChatView, with prev/next navigation, match counts, and keyboard shortcuts (Enter/Shift+Enter/Escape).
  • Builds a search index (buildThreadSearchIndex) over timeline rows covering assistant markdown, user messages with terminal context chips and skill chips, work log entries, and proposed plans.
  • Implements incremental search with narrowing reuse (findThreadSearchLookupState) and case-insensitive, locale-aware highlight rendering via a rehype plugin and renderHighlightedText.
  • Matched rows receive a data-search-match-state attribute; the active row is scrolled into view; collapsed sections (work groups, proposed plans, long user messages) auto-expand during search and hide their expand controls.
  • Adds markdownToPlainText for plain-text extraction from markdown and collectMarkdownFileLinkLabels for indexing file link labels.
  • Risk: code blocks containing a search match fall back from syntax-highlighted SuspenseShikiCodeBlock to a plain <pre><code> with <mark> nodes.

Macroscope summarized 896b034.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 28, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: eeff41c4-cd09-4ef0-8976-dc0819a24623

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 28, 2026
@leonardoxr leonardoxr marked this pull request as ready for review March 28, 2026 21:26
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: 72d67ca4fb

ℹ️ 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 apps/web/src/components/chat/MessagesTimeline.tsx Outdated
Comment thread apps/web/src/components/ChatView.tsx
Comment thread apps/web/src/components/chat/threadSearch.ts
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx Outdated
Comment thread apps/web/src/components/ChatView.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: 7828e85e7f

ℹ️ 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 apps/web/src/components/ChatMarkdown.tsx
Comment thread apps/web/src/components/chat/ProposedPlanCard.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: 2fd077b092

ℹ️ 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 apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/components/chat/ThreadSearchBar.tsx Outdated
Comment thread apps/web/src/components/ChatView.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: 340789c4b9

ℹ️ 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 apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/components/ChatView.tsx Outdated
Comment thread apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/components/ChatView.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: 776dfcfe8d

ℹ️ 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 apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/components/chat/threadSearch.ts 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: 50affe963c

ℹ️ 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 apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/lib/markdownPlainText.ts
Comment thread apps/web/src/lib/markdownPlainText.ts Outdated
Comment thread apps/web/src/lib/markdownPlainText.test.ts
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: a652fd5ee6

ℹ️ 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 apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/lib/markdownPlainText.ts
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: f9bfd72303

ℹ️ 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 apps/web/src/components/ChatView.tsx
Comment thread apps/web/src/lib/markdownPlainText.ts
Comment thread apps/web/src/lib/markdownPlainText.ts
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: cd11e1f59d

ℹ️ 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 apps/web/src/components/chat/threadSearch.ts Outdated
Comment thread apps/web/src/lib/markdownPlainText.ts
Comment thread apps/web/src/lib/markdownPlainText.ts Outdated
Comment thread apps/web/src/components/ChatView.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: e8e4642e0b

ℹ️ 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 apps/web/src/lib/markdownPlainText.ts Outdated
Comment thread apps/web/src/lib/markdownPlainText.ts Outdated
@mannie-exe
Copy link
Copy Markdown

I haven't taken the time to review any changes yet, but I wanted to bring attention to this PR. This is a really important and useful feature that I find myself reaching for all the time.

@jwadasaurus
Copy link
Copy Markdown

This feature would be great to have

@leonardoxr
Copy link
Copy Markdown
Author

This feature would be great to have

yeah, if my implementation is ok, i'd update it to make it up to date and ready for any requested changes

@leonardoxr leonardoxr force-pushed the feat/thread-search-1486 branch from e8e4642 to 633d906 Compare May 15, 2026 19:49
Comment thread apps/web/src/components/chat/MessagesTimeline.tsx Outdated
Comment thread apps/web/src/components/chat/MessagesTimeline.logic.ts 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: 633d906aab

ℹ️ 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 apps/web/src/components/ChatView.tsx Outdated
Comment on lines +2337 to +2338
if (!isThreadSearchInputTarget(activeElement)) {
threadSearchRestoreFocusRef.current = activeElement;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve focus when find is opened from editable inputs

openThreadSearch only remembers the previously focused element when it is not an input/textarea/select/contentEditable node. If a user triggers Cmd/Ctrl+F while typing in the composer, closeThreadSearch has no saved focus target and focus falls back to the document after closing, so keyboard typing cannot resume immediately. This breaks the intended focus-restore behavior for a common workflow.

Useful? React with 👍 / 👎.

Comment thread apps/web/src/components/chat/userMessageTerminalContexts.ts Outdated
Comment thread apps/web/src/components/ChatView.tsx
Comment thread apps/web/src/lib/markdownPlainText.ts Outdated
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 15, 2026

Approvability

Verdict: Needs human review

1 blocking correctness issue found. This PR adds a new in-thread find/search feature with ~2300 lines of new code including UI components, search indexing, and highlight rendering. New features of this scope require human review. Additionally, unresolved comments identify several bugs including highlight rendering issues and focus restoration problems.

You can customize Macroscope's approvability policy. Learn more.

Comment thread apps/web/src/lib/markdownPlainText.ts
Comment thread apps/web/src/components/chat/MessagesTimeline.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: efbd61f2e0

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

visibleMessageState?.visibleText ?? "",
visibleMessageState?.contexts ?? [],
)
: markdownToPlainText(visibleAssistantText),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Index rendered file-link labels for assistant markdown search

Build the assistant search text from the same file-link labels that ChatMarkdown renders, not from raw markdown alone. collectRowSearchText currently indexes markdownToPlainText(visibleAssistantText), but assistant links that resolve to local files are rendered as MarkdownFileLink labels derived from path metadata (basename/parent/line), not the original markdown link text. In threads containing [custom label](./path/to/file.ts), searching the original label can produce an active row with no visible <mark>, while searching the visible file-link label can miss entirely.

Useful? React with 👍 / 👎.

Comment thread apps/web/src/components/ChatView.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

<span className={MARKDOWN_FILE_LINK_LABEL_CLASS_NAME}>{label}</span>

P2 Badge Highlight rendered file-link labels during thread search

When a markdown link is rendered as MarkdownFileLink, the visible label text is produced from path metadata (e.g. file.ts · src/app · L12), but this label is rendered as plain text with no search highlighting. Since thread indexing now includes these rendered labels, queries that match only this visible label can make the row active without any inline <mark>, so users still cannot localize the hit. This is reproducible with links like [custom text](./src/file.ts) where the rendered label differs from the original markdown text.

ℹ️ 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 on lines +77 to +79
markdownToPlainText(visibleAssistantText),
...collectMarkdownFileLinkLabels(visibleAssistantText, options?.markdownCwd),
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Index rendered skill-chip labels for searchable message text

Message-row indexing uses raw text (markdownToPlainText(...) for assistant content and buildRenderedUserMessageText(...) for user content) but does not add the human-readable skill chip labels rendered by SkillInlineText/renderSkillInlineMarkdownChildren. In threads containing known skill tokens (for example $web_search rendered as Web Search), searching the visible chip label text will miss the row entirely because only token-form text is indexed.

Useful? React with 👍 / 👎.

Comment thread apps/web/src/components/ChatView.tsx Outdated
Comment thread apps/web/src/components/chat/MessagesTimeline.logic.ts
</div>
)}
{/* Messages — LegendList handles virtualization and scrolling internally */}
<MessagesTimeline
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 High components/ChatView.tsx:3761

The renderItem callback in MessagesTimeline depends on search state (activeSearchRowId, matchedSearchRowIds, searchQuery), but LegendList only re-renders items when itemKey, data, or extraData changes. Since no extraData prop is passed, items already on screen never re-render when search state updates — visible rows don't gain/lose search highlights as the user types or navigates results.

🤖 Copy this AI Prompt to have your agent fix this:
In file apps/web/src/components/ChatView.tsx around line 3761:

The `renderItem` callback in `MessagesTimeline` depends on search state (`activeSearchRowId`, `matchedSearchRowIds`, `searchQuery`), but `LegendList` only re-renders items when `itemKey`, `data`, or `extraData` changes. Since no `extraData` prop is passed, items already on screen never re-render when search state updates — visible rows don't gain/lose search highlights as the user types or navigates results.

Evidence trail:
- apps/web/src/components/chat/MessagesTimeline.tsx lines 270-291: `renderItem` useCallback with deps `[activeSearchRowId, matchedSearchRowIds, searchQuery]`
- apps/web/src/components/chat/MessagesTimeline.tsx lines 307-324: `<LegendList>` with no `extraData` prop
- LegendApp/legend-list src/components/Container.tsx line 165: `useMemo(() => getRenderedItem(itemKey), [itemKey, data, extraData])` — `getRenderedItem` not in deps
- LegendApp/legend-list src/utils/getRenderedItem.ts: reads `renderItem` from `state.props` and calls it, but the memo in Container only reacts to `itemKey`, `data`, `extraData`
- apps/web/package.json line 23: `@legendapp/list: 3.0.0-beta.44`

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: 0db8951448

ℹ️ 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 on lines +35 to +40
const normalizedText = text.toLocaleLowerCase();
const ranges: TextMatchRange[] = [];
let searchStart = 0;

while (searchStart <= normalizedText.length - normalizedQuery.length) {
const matchIndex = normalizedText.indexOf(normalizedQuery, searchStart);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Compute highlight ranges against original string indices

findMatchRanges lowercases the full text before searching, then reuses those indices to slice the original string during rendering. Locale-aware lowercasing can change string length (for example İ becomes ), so any match after such characters gets shifted and the <mark> can wrap the wrong substring (or an empty one). In those cases search navigation reports a hit but the visible inline highlight is misplaced/non-localizable in internationalized content.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0db8951. Configure here.

Comment thread apps/web/src/components/chat/MessagesTimeline.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: 896b034ca9

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

row.message.role === "assistant"
? [
markdownToPlainText(visibleAssistantText),
...collectMarkdownFileLinkLabels(visibleAssistantText, options?.markdownCwd),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Ignore file-link labels extracted from literal markdown code

collectRowSearchText adds collectMarkdownFileLinkLabels(visibleAssistantText, ...) from the raw assistant markdown, so [](...) patterns inside fenced/inline code are indexed as file-link labels even though markdown treats those regions as literal text and ChatMarkdown never renders a MarkdownFileLink there. In that case, searching for the synthesized label (for example file.ts · L10) can mark the row as a hit with no visible highlight in the rendered message.

Useful? React with 👍 / 👎.

? [
markdownToPlainText(visibleAssistantText),
...collectMarkdownFileLinkLabels(visibleAssistantText, options?.markdownCwd),
...collectSkillInlineTextLabels(visibleAssistantText, options?.skills ?? []),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Index skill labels only where chips are actually rendered

collectSkillInlineTextLabels(visibleAssistantText, ...) scans the full markdown source, but the renderer only transforms $skill tokens into chips in normal text and explicitly skips code and a nodes (renderSkillInlineMarkdownChildren). Tokens inside links or code therefore stay as raw $... on screen, yet their display names are still indexed; searching by display name can produce an active result without any visible <mark> in that row.

Useful? React with 👍 / 👎.

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

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add search within the thread/chat.

4 participants