Repository navigation
Description
What happened
In the right sidebar file preview, Ctrl+F searches the open file when it is shown as source (JSON, .gitignore, .cs, and Markdown/HTML in source mode), but does not search the file when a Markdown or HTML file is shown rendered. Expected: Ctrl+F opens a find bar that searches the rendered document, as it does in source view.
Diagnosis
Source view uses the @pierre/diffs code view, which provides its own Ctrl/Cmd+F find. Rendered views have no find of their own:
- Rendered Markdown (
apps/web/src/components/files/FileMarkdownPreview.tsx) renders throughChatMarkdown, which has no find support. The keydown falls through to the globalmod+fbinding,chat.find(packages/shared/src/keybindings.ts), which opens thread find for the chat (or does nothing), not a search of the file. - Rendered HTML (
apps/web/src/components/files/BrowserDocumentFrame.tsx) runs in a sandboxed iframe that forwardschat.findto the parent (HTML_RENDER_SHORTCUT_COMMANDS), with the same result.
No file-level find exists outside the code view, and Electron find-in-page is not wired up.
Likely also affected (from reading the v0.1.8 source, not tested): every other non-code-view renderer in the file preview has no find either — Mermaid rendered view (.mmd, .mermaid), CSV/TSV table view, Office/document previews (.docx, .xlsx, .pptx, .odt, .ods, .odp, .rtf, .epub), Jupyter notebooks (.ipynb), and the large-text viewer. PDF has its own find. A fix at the preview-panel level would cover all of them.
FileMarkdownPreview.tsx, BrowserDocumentFrame.tsx and FilePreviewPanel.tsx are unchanged between v0.1.8 and main; #33627 (built-in @pierre/diffs find) covers only the code view.
Steps to reproduce
- Open the desktop app on Windows and open a project with a Markdown file (e.g. README.md).
- Open the file in the right sidebar file preview, in rendered mode.
- Click in the rendered content and press Ctrl+F.
- Observe: no search of the file content. Switch to source view and press Ctrl+F: the find bar opens and works.
- Same with an .html file: rendered fails, raw source works.
Version
0.1.8 (desktop app, local server reports serverVersion 0.1.8). Triage CLI also 0.1.8.
Environment
Windows 10 Pro 10.0.19045 x64, T3 Code desktop app with its bundled local server, surface: desktop app against local server.
Evidence
Reproduced by the user; diagnosis from source at tag v0.1.8 (bf469bb). No errors in logs are expected since the key is simply routed to chat.find.Related issues
#22952 (Cmd/Ctrl+F does nothing in the integrated browser — same symptom, different surface), #33627 (code view find via @pierre/diffs 1.7), #10159 / #1486 (in-thread find).
Fix applied or workaround
Switch the file to source view to search it.
Filed by
Claude Code (claude-opus-5-5) via t3 triage
Activity