Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Found a potential duplicate: PR #41049: feat(app): cmd+F to search session with highlighting This appears to be the same feature - adding Cmd+F search capability to the session with highlighted matches. This earlier PR may have already implemented or attempted this functionality. You should review it to determine if it was merged, closed, or abandoned, and whether the current PR (45037) duplicates or improves upon that work. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Search within the current session's message history -- open with <leader>f or /find (alias /search), type a query, step between matches with Enter/Shift+Enter, Esc to close. Ported from upstream anomalyco#4714 (67 reactions/35 comments). Unusually, the relevant PRs (anomalyco#45037, anomalyco#48470) were still open and unreviewed rather than bot-closed -- but neither actually targets the TUI: both add Cmd/Ctrl+F search to the web/desktop timeline instead. anomalyco#45037's approach (reusing the file viewer's search by scanning the rendered page) can't carry over to a terminal UI. anomalyco#48470's approach -- find matches directly from message data (text, reasoning, tool inputs, error rows), then scroll to the hit -- doesn't depend on a browser, so its matching logic (partSearchText, findMatches) is ported directly into a new packages/tui/src/util/session-find.ts. Its browser-only parts (DOM highlighting, the web find-bar, file-viewer shortcut sharing) have no TUI equivalent and were rewritten as a real terminal find-bar component plus new match-navigation and scroll-target logic. Four new overridable keybinds (session_find <leader>f, session_find_next/previous/close). Matched parts get a highlighted background, stronger on the current match; a collapsed "Thought" block auto-opens while it holds the current match. Known gaps: word-level highlighting only works in user messages (assistant/reasoning/tool rows highlight as a whole block -- the terminal renderer can't highlight part of a markdown block); tool output isn't searched, only tool inputs, matching anomalyco#48470's own choice; a match inside a hidden/collapsed region is counted but has nothing on screen to jump to; only the current session is searched, no cross-session search; keybinds docs and generated SDK types don't list the new keys yet. New packages/tui/test/util/session-find.test.ts (11 tests, adapted from anomalyco#48470's own test file) and packages/tui/test/cli/tui/ session-find.test.tsx (2 tests rendering the real find bar). Verified against this fork's current dev, including the expandable-pasted- text-placeholders feature which touches two of the same files with no conflict: bun typecheck clean; full packages/tui suite 228 pass. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #19143
Type of change
What does this PR do?
Adds Cmd/Ctrl+F session-message search in the desktop timeline. It reuses the existing find controller to highlight matches and support next/previous navigation without changing the file-viewer behavior.
How did you verify your code works?
Ran the app with
npx --yes [email protected] run dev:desktopand tested manually.Also added automated tests.
Screenshots / recordings
Screen.Recording.2026-08-25.at.2.04.31.PM.mov
Checklist