GeezerVison is showing github.com — fix: make file uri links clickable by Yash-Singh1 · Pull Request #1867 · pingdotgg/t3code
Conversation
Yash-Singh1
commented
Apr 10, 2026
•
edited by macroscopeapp
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What Changed
Sometimes codex likes to output links as a file uri instead of just making the link the path as we'd expect. This pr strips the file:// so these links are clickable again.
UI Changes
N/A
Checklist
- This PR is small and focused
- I explained what changed and why
- I included before/after screenshots for any UI changes
- I included a video for animation/interaction changes
Note Low Risk
Low risk: small, well-scoped change to markdown link transformation with added unit/browser tests; main risk is unexpected URL rewriting edge cases for non-file links.
Overview
Fixes file:// links in chat markdown so they’re clickable. ChatMarkdown now uses a custom urlTransform to rewrite file: URIs into plain filesystem-path hrefs (preserving #L… anchors) while falling back to react-markdown’s defaultUrlTransform for everything else.
Adds rewriteMarkdownFileUriHref (and extends parseFileUrlHref to optionally avoid decoding) to prevent double-decoding issues, plus new unit tests and a browser-level ChatMarkdown test verifying rewritten hrefs and editor-open behavior.
Reviewed by Cursor Bugbot for commit 7f7b0b9. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix file URI links to be clickable in ChatMarkdown
- Adds
rewriteMarkdownFileUriHref in markdown-links.ts to convert file:// URIs to direct filesystem paths, preserving hash anchors and keeping path octets encoded for single-pass decoding downstream.
- Wires this into ChatMarkdown.tsx via a
urlTransform prop on ReactMarkdown, falling back to defaultUrlTransform for non-file URLs.
- Clicking a rewritten link continues to call
openInPreferredEditor with the resolved path and optional line number.
Macroscope summarized 7f7b0b9.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Apr 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: fa096c2c-8407-4ba2-8c3f-5a43bf18fe9a
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
yash/file-uri-links
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved
This is a straightforward bug fix that makes file:// URI links clickable in markdown by transforming them to direct paths. The changes are self-contained to URL handling in markdown rendering, well-tested with both unit and browser tests, and have no security or infrastructure implications.
No code changes detected at 7f7b0b9. Prior analysis still applies.
You can customize Macroscope's approvability policy. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
felippeoka
pushed a commit
to felippeoka/f5
that referenced
this pull request
Oct 23, 2026
react-markdown's default URL transform empties any href whose scheme it
does not know, so links to C:\..., \\server\... and file:///... paths
rendered with an empty href and never became file chips. Chat markdown
now keeps local file destinations and sanitizes everything else as
before, so javascript: links are still emptied.
CommonMark also reads the \. in C:\Users\me\.claude\settings.json as an
escape inside a link destination, which dropped the separator before
.claude. A remark extension keeps Windows path destinations as written
unless they contain character references.
Ports pingdotgg/t3code#12615 (web part) and the
local-path URL transform from pingdotgg/t3code#1867.
The bare <A> placeholder fix from
pingdotgg/t3code#16637 needs no port because
chat markdown renders HTML as text; a regression test pins that.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|