Repository navigation
feat(app): find in conversation (⌘F) with cross-session search handoff - #2477
Merged
Merged
Conversation
- SessionFindBar: floating find bar over the transcript with live match counter, prev/next (Enter/Shift+Enter) wrap-around navigation, Esc to close; opened via ⌘/Ctrl+F, a session-header button, or the command palette. Transcript gets top padding while open so the bar never covers the first message. - Highlights: wires the dormant highlightQuery plumbing through MessageListProvider -> MessageContent -> MarkdownBlock for assistant prose, and adds a React-level mark renderer for user bubbles; active match gets a distinct stronger mark. - fix(markdown): re-apply search highlights after every render — motion.div re-sets dangerouslySetInnerHTML on unrelated re-renders (e.g. open-target context updates), which silently wiped marks applied at mount. - Cross-session search handoff: message results now carry messageId and, on selection, open the target session with the find bar prefilled and jumped to the exact matched message. - fraimz: evals/flows/in-chat-find.flow.mjs (6 frames, user-facing) proving seed -> ⌘F -> highlight+counter -> Enter -> Esc -> cross-session handoff.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
Member
Author
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.










Summary
Adds in-chat search ("Find in conversation") alongside the existing cross-session search, with a UX designed so the two features compose:
N/Mmatch counter, prev/next, close) — discoverable via a session-header button and a command palette entry too, not just the shortcut.Enter/Shift+Entercycle matches with wrap-around;Esccloses and clears.Bug found and fixed during validation
While driving the real app with fraimz, discovered highlights applied at mount were silently wiped ~35ms later —
motion.divre-setsdangerouslySetInnerHTMLon unrelated re-renders (e.g. open-target context settling), destroying the<mark>nodes without the highlight effect's dependencies changing. Fixed by re-applying highlights after every render (near-free fast path when no query is active). Also fixed a screenshot-caught overlap defect where the bar could cover the first message on short transcripts.Known v1 scope
Code blocks, reasoning, and tool output aren't searched — v1 targets what the user reads (user bubbles + assistant prose), consistent with the existing cross-session search engine's scope.
Testing
pnpm typecheck✓pnpm --filter @openwork/app exec bun test tests/session-search.test.ts✓ (newmessageIdcoverage)pnpm --filter @openwork/app build✓pnpm fraimz --flow in-chat-find✓ — 6-frame user-facing proof (seed → ⌘F → highlight+counter → Enter → Esc → cross-session handoff), passed on a cold app boot and twice consecutively (idempotent)pnpm fraimz --flow core-flow✓ — canonical flow stays green (the markdown fix is inert for normal use)fraimz proof incoming as a PR comment.