Skip to content

Clickable file paths in the transcript open in the worktree - #506

Merged
currentbits merged 1 commit into
mainfrom
coder/clickable-transcript-paths-492
Aug 18, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/clickable-transcript-paths-492

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Summary

Fixes #492. Assistant Markdown and tool-card headers/args treated file paths as dead text — only http(s) links were clickable. Review meant copy the path, switch to an editor, paste. The CLIs already did the click.

Paths the model prints (src/foo.ts, `src/foo.ts:40`, a Read/Edit card argument) now open the file in this thread's worktree, not the main checkout.

What changed

  • Detect repo-relative and absolute paths (optional :line / :line:col) in assistant Markdown and tool-card headers/args.
  • Click → shell.openPath. Cmd/Ctrl-click → reveal in Finder.
  • Relative paths resolve against thread.worktreePath (else the project root). files:resolve checks existence and workspace membership; missing files, URLs, and npm names stay plain text.
  • Hover underline only — no underline storm.
  • Tool-card expand control is a sibling of the summary so a path link is not nested inside a button.

Out of scope: jumping the editor to a line (data-path-line is set, open still hands the file to the default app). Built-in editor remains #162.

Tests

node --experimental-strip-types --test test/pathLinks.test.ts
node --import=./test/support/disable-grok-mcp.mjs --import=./test/support/render.mjs \
  --experimental-strip-types --test --test-timeout=20000 \
  test/markdown.test.tsx test/threadView.test.tsx
node --test --test-timeout=30000 \
  electron/test/files-resolve.test.js electron/test/ipc-seam.test.js

Covers relative file, missing file, file:12, and http left alone. Renderer suite 1048 pass. Typecheck clean.

  • PR created by the Grok agent

Detect repo-relative and absolute paths in assistant Markdown and
tool-card headers/args, resolve them against the thread worktree,
and open with shell.openPath (Cmd/Ctrl-click reveals in Finder).

Fixes #492
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit fa4c0ec into main Aug 18, 2026
2 of 6 checks passed
@currentbits
currentbits deleted the coder/clickable-transcript-paths-492 branch October 3, 2026 16:07
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.

Clickable file paths in the transcript open in the worktree

1 participant