Skip to content

fix(web): linkify Windows C:/ paths in terminal output#1483

Open
MaansenV wants to merge 1 commit intopingdotgg:mainfrom
MaansenV:fix/web-terminal-links-windows-slash
Open

fix(web): linkify Windows C:/ paths in terminal output#1483
MaansenV wants to merge 1 commit intopingdotgg:mainfrom
MaansenV:fix/web-terminal-links-windows-slash

Conversation

@MaansenV
Copy link
Copy Markdown

@MaansenV MaansenV commented Mar 28, 2026

What changed

  • FILE_PATH_PATTERN now treats X:/ like X:\ so paths such as C:/Users/.../file.ts:42 get linkified (resolution already accepted both separators).
  • Tests for extraction, trailing punctuation, and resolvePathLinkTarget for C:/....
  • wsTransport malformed-envelope test: match any SyntaxError: prefix — Bun's JSON.parse message differs from the old hard-coded V8 string.

Why

Some tools print Windows paths with forward slashes. Those lines weren't linkified while backslash paths were.

UI

No layout change; only paths that were plain text before can become links. No screenshots.

Testing

  • bun run lint, bun typecheck
  • bun run test --filter=@t3tools/web

Note

Low Risk
Low risk: small regex tweak to terminal link detection plus test-only adjustments; main behavior change is additional paths becoming clickable.

Overview
Terminal output linkification now recognizes Windows absolute paths that use forward slashes (e.g. C:/...) by broadening FILE_PATH_PATTERN, and adds coverage for extraction, punctuation trimming, and resolvePathLinkTarget behavior for these paths.

The WsTransport malformed-envelope test assertion is loosened to accept any SyntaxError: prefix so it’s resilient across JS runtimes with different JSON.parse error strings.

Written by Cursor Bugbot for commit d327543. This will update automatically on new commits. Configure here.

Note

Fix FILE_PATH_PATTERN to linkify Windows C:/ paths in terminal output

Updates the Windows path regex in terminal-links.ts to accept either a backslash or forward slash after the drive letter ([A-Za-z]:[\\/ ]), so paths like C:/Users/... are now detected and linkified alongside the existing C:\... support.

Macroscope summarized d327543.

FILE_PATH_PATTERN only treated drive roots as X:\\, so lines like C:/Users/.../file.ts were skipped even though path resolution already accepts forward slashes after the colon.

Tests cover extraction, trailing punctuation, and resolvePathLinkTarget. wsTransport test matches any SyntaxError prefix so Bun's JSON.parse message doesn't fail vitest.

Made-with: Cursor
@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 28, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

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: dfddb84f-fae5-456e-af7c-4bf034d9b9b9

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:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant