Skip to content

Find in the open thread and diffs with ⌘F (#1524) - #1596

Merged
currentbits merged 1 commit into
mainfrom
coder/find-in-thread-f-over-messages-and-plans-940e5f
Oct 11, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/find-in-thread-f-over-messages-and-plans-940e5f

Conversation

@currentbits

Copy link
Copy Markdown
Owner

⌘F now searches the open thread (messages, tool summaries, plan cards) and loaded Changes/turn diffs. Long threads were unsearchable because the transcript is a tail window and collapsed diffs are not in the DOM, so this searches the data and scrolls the hit into view instead of using Electron findInPage. Fixes #1524.

Changes

  • ⌘F / Ctrl+F opens a find bar; Enter/⇧Enter steps matches with a count; Esc closes.
  • Transcript hits expand the tail window and collapsed runs/tool groups, then highlight the card.
  • In Git or a turn diff, the same chord searches loaded patches and file paths and selects the matching file.
  • transcript.find and diff.find are remappable and listed in the Keyboard sheet (shared default ⌘F is intentional).

Verification

  • node --import=./test/support/disable-grok-mcp.mjs --import=./test/support/render.mjs --experimental-strip-types --test --test-timeout=20000 test/findInView.test.ts test/findInThread.test.tsx test/keybindings.test.tsx — 24 passed.
  • Not tested: live Electron click-through of the find bar.

Notes for reviewers

  • Shared ⌘F routes by focus: Git/turn-diff pane vs transcript. Remapping one id leaves the other on ⌘F.
  • Highlight is the containing card/file row, not intra-markdown spans. Unloaded lazy patch bodies are searched by path only.

cursor-grok-4.6 via Cursor

Made with Cursor

Solenta-Message-Id: 81296e12-f3df-45c4-9068-72ec657d373b
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T19:18:31.323713Z 2f8c011 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@currentbits
currentbits merged commit 0f94b8f into main Oct 11, 2026
6 checks passed

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

Copy link
Copy Markdown

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: 2f8c011d01

ℹ️ 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 +29 to +31
messages: detail.messages,
plan: detail.thread.plan,
planSteps: detail.thread.planSteps,

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 Include the pending approval plan in transcript search

When a plan approval prompt is open, the visible plan comes from detail.pendingPermission.plan, while the regular PlanCard is deliberately suppressed. Searching text unique to that visible plan therefore reports "No matches" because only detail.thread.plan and its steps are passed to the matcher; include the pending plan and make its rendered prompt a reveal target.

Useful? React with 👍 / 👎.

Comment thread src/findInView.ts
Comment on lines +36 to +38
for (const message of input.messages) {
if (unitMatches(message.text, query)) {
hits.push({ kind: "message", id: message.id });

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 Exclude or reveal hidden settled reasoning hits

In the normal transcript view, settled thinking-only groups are removed by collapseTimeline, but this loop still counts every thinking message whose text matches. For such a hit, revealTranscriptHit cannot find a group to expand and useScrollFindHit cannot find a DOM target, so the bar can show a valid count while Enter produces no highlight or scroll; either omit these hidden messages from the hit list or provide a way to mount and target them.

Useful? React with 👍 / 👎.

Comment thread src/findInView.ts
Comment on lines +33 to +34
if (planParts.some((t) => unitMatches(t, query))) {
hits.push({ kind: "plan", id: "plan" });

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 visual order when building transcript hits

When a query matches both the plan and transcript messages, inserting the plan hit first makes the initial result jump to the bottom-mounted PlanCard, after which Next jumps back to the first message near the top. This reverses the document order users expect when stepping through matches; append the plan hit after the chronologically rendered messages.

Useful? React with 👍 / 👎.

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.

Find in thread (⌘F) over messages and plans, plus find in diffs

1 participant