Skip to content

feat(app): make chat file references clickable - #52749

Open
hsynkrkmz wants to merge 2 commits into
anomalyco:devfrom
hsynkrkmz:clickable-file-refs
Open

hsynkrkmz wants to merge 2 commits into
anomalyco:devfrom
hsynkrkmz:clickable-file-refs

Conversation

@hsynkrkmz

@hsynkrkmz hsynkrkmz commented Oct 2, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #37891
Fixes the linkification failure modes reported in #51723 and #51872

Type of change

  • New feature
  • Bug fix

What does this PR do?

File paths in assistant messages were rendered as plain text, so users copy-pasted them instead of clicking. This makes them clickable:

  • a.java:355 and a.java:355-360 (colon form)
  • Bare file paths in inline code, e.g. packages/app/src/app.tsx
  • Prose references: "x.ts at line 12" and Turkish "x.ts 12. satırda"

Clicking opens the file in the existing review panel, scrolls to and highlights the referenced line/range, one tab per file, keeping the changes tab intact.

To avoid dead-end clicks (#51723/#51872), only text whose last path segment has a file extension is linkified — directories (map-component/objecttype/) and slash compounds (write/edit) are never turned into links, and absolute paths stay unlinked since they are ambiguous across machines.

How did you verify your code works?

New parser unit tests (file-reference.test.ts, 10 cases). bun test passes in session-ui and in the app session pages. Tested manually against a live dev server with multi-file chats in a Turkish locale.

Screenshots / recordings

Will add a short recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

hkorkmaz and others added 2 commits October 2, 2026 15:39
File paths and path:line references in assistant messages are now
clickable links. Clicking opens the file in the review panel, scrolls
to and highlights the referenced line/range, and opens a new tab per
file. Directory-like and non-file inline code is deliberately not
linkified.

This branch has not been deployed

No deployments
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.

Desktop: make file paths in chat clickable (open in editor / reveal in Finder)

1 participant