Skip to content

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

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

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

Conversation

@anduimagui
Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #13430

Type of change

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

What does this PR do?

This is a clean replacement for #15269, rebuilt on top of current dev so the diff stays focused on clickable file references in the desktop session UI.

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?

  • Confirmed the rebuilt branch diff is limited to the intended packages/ui and packages/app changes.
  • bun typecheck in packages/ui currently fails locally because @tsconfig/node22/tsconfig.json is missing in this environment.
  • bun typecheck in packages/app currently fails locally because workspace dependencies/types are unavailable in this environment.

Screenshots / recordings

  • N/A

Notes

Checklist

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

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.
Open filenames in review and use the adjacent icon for external app launches — with clearer labels for both actions.
@github-actions
Copy link
Copy Markdown
Contributor

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

Based on the search results, here are the related PRs:

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

Related PR #18836 - "feat: add clickable markdown file references"

  • This appears to address similar functionality for making file references clickable in markdown, likely related to the inline code reference detection mentioned in this PR.

Related PR #11429 - "feat: add clickable file paths in agent responses (web UI only)"

  • This PR is mentioned in the description as related work focusing on making file paths clickable in agent responses for the web UI, while the current PR targets the app/ui path used by desktop/web session rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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)

1 participant