Skip to content

feat(ui): make edited file references clickable in desktop session UI#15269

Open
anduimagui wants to merge 9 commits intoanomalyco:devfrom
anduimagui:feat/desktop-clickable-file-links
Open

feat(ui): make edited file references clickable in desktop session UI#15269
anduimagui wants to merge 9 commits intoanomalyco:devfrom
anduimagui:feat/desktop-clickable-file-links

Conversation

@anduimagui
Copy link
Contributor

@anduimagui anduimagui commented Feb 26, 2026

Issue for this PR

Closes #13430

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

It makes file references in session output clickable so users can open files directly from agent responses and tool results.

The change adds shared openFilePath plumbing, detects file-like inline code references (including path:line and file://...) in markdown, and wires clicks in edit/write/apply_patch file labels to open the file in the review panel.

Related work and how this is different (plain English)

How this PR differs:

  • This PR targets the app/ui path used by desktop/web session rendering and tool cards.
  • It links inline code-style file references in markdown (for example src/foo.ts, src/foo.ts:42, and file://...) and also makes filenames inside edit/write/apply_patch cards clickable.
  • Clicking opens the file in the existing review/file flow via shared openFilePath plumbing.
  • It does not implement TUI sidebar behavior; that scope is covered by feat(tui): make modified files in sidebar clickable #14016.

How did you verify your code works?

  • bun run typecheck in packages/ui
  • pre-push hook (bun turbo typecheck) passed on push

Screenshots / recordings

  • N/A

Checklist

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

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Feb 26, 2026
@github-actions
Copy link
Contributor

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

@adamdotdevin adamdotdevin force-pushed the feat/desktop-clickable-file-links branch from 709378f to 07e548b Compare February 27, 2026 11:24
@adamdotdevin adamdotdevin added beta and removed beta labels Feb 27, 2026
@anduimagui anduimagui marked this pull request as ready for review March 1, 2026 12:04
@anduimagui anduimagui requested a review from adamdotdevin as a code owner March 1, 2026 12:04
@anduimagui anduimagui force-pushed the feat/desktop-clickable-file-links branch from e18273e to da34dfa Compare March 1, 2026 12:08
opencode-agent bot added a commit that referenced this pull request Mar 2, 2026
opencode-agent bot added a commit that referenced this pull request Mar 2, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 3, 2026
opencode-agent bot added a commit that referenced this pull request Mar 4, 2026
opencode-agent bot added a commit that referenced this pull request Mar 4, 2026
opencode-agent bot added a commit that referenced this pull request Mar 4, 2026
opencode-agent bot added a commit that referenced this pull request Mar 4, 2026
opencode-agent bot added a commit that referenced this pull request Mar 4, 2026
opencode-agent bot added a commit that referenced this pull request Mar 4, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
opencode-agent bot added a commit that referenced this pull request Mar 5, 2026
Move inline file-path parsing into a shared helper and add focused tests, including Windows file URL handling, so clickable markdown file links stay stable as parsing rules evolve.
Render clickable tool filenames as native buttons with focus-visible styles so edit/write/apply_patch file links are accessible and keep existing click-to-open behavior.
Route markdown and tool file-link clicks to the desktop openPath integration when available, with in-app review fallback if external open fails. Also harden file-ref parsing for wrapped paths and ensure in-app fallback activates the opened tab.
When external open is unavailable or fails, opening from clickable file refs now preserves optional line numbers by selecting the target line in the review file tab.
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.

[FEATURE]:[Web]: Clickable file:line references in messages (jump to file and line)

2 participants