Repository navigation
Description
What happened
I really want to have the file open in the diff view when I click on a link to the file in the chat if it was changed, not the raw file explorer. is that possible
A feature request: when a file link in the chat refers to a file the agent changed in this thread, clicking it should open the Diff panel focused on that file, rather than the plain file preview. The user's motivation: it makes reviewing large changes much easier — you land directly on what changed instead of scanning the whole file or hunting for it in the Diff tab.
Diagnosis
Verified against the v0.1.5 source that this is not currently possible, by setting or otherwise:
- A plain click on a chat file link calls
openFileinapps/web/src/rightPanelStore.ts(line 729), which unconditionally opens afilesurface (the file preview panel). Cmd/ctrl-click opens the external editor (apps/web/src/components/chat/MarkdownFileLink.tsx, ~line 340). Neither path considers whether the file has pending changes. - The Diff panel surface is a payload-less singleton (
{ id: "diff", kind: "diff" }inrightPanelStore.ts), so nothing outside the panel can open it focused on a specific file. - The building block exists: the diff file tree already supports focusing a path internally (
apps/web/src/components/diffs/DiffFileTree.tsx,model.focusPath). What's missing is plumbing from the chat link handler through the diff surface to that focus call, plus a decision point (always, a modifier key, a context-menu item, or a setting) and a "does this file have changes in this thread" check.
Suggested shape: when the clicked file is part of the thread's changed files, open the Diff panel revealed/scrolled to that file; otherwise keep today's preview behavior. A context-menu entry ("Open diff") would also cover it if changing the default click is undesirable.
Steps to reproduce
- In a thread where the agent has modified a file, wait for the chat to render a link to that file.
- Click the link.
- The right panel opens the file preview showing the file's current contents. Expected (desired): the Diff panel focused on that file's changes.
Version
0.1.5 (desktop app against the local server, server also 0.1.5)
Environment
macOS (darwin arm64 25.5.0), Node v26.12.1, desktop app + local server
Evidence
apps/web/src/rightPanelStore.ts:729 openFile → always opens a `file` (preview) surface
apps/web/src/rightPanelStore.ts:48 diff surface: { id: "diff"; kind: "diff" } — no file payload
apps/web/src/components/chat/MarkdownFileLink.tsx:340 cmd/ctrl-click → external editor
apps/web/src/components/diffs/DiffFileTree.tsx:143 model.focusPath(nextFocusedPath) exists internally
Related issues
Searched; no existing request for this. #15104 (changed-files card modes) and #19459 (GitLab MR file links losing the file) are adjacent but different.
Fix applied or workaround
None needed; workaround is opening the Diff tab in the right panel manually and locating the file in its tree.
Filed by
Claude Code (Claude Fable 5) via t3 triage
Activity