fix(web): linkify Windows C:/ paths in terminal output#1483
Open
MaansenV wants to merge 1 commit intopingdotgg:mainfrom
Open
fix(web): linkify Windows C:/ paths in terminal output#1483MaansenV wants to merge 1 commit intopingdotgg:mainfrom
MaansenV wants to merge 1 commit intopingdotgg:mainfrom
Conversation
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
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
FILE_PATH_PATTERNnow treatsX:/likeX:\so paths such asC:/Users/.../file.ts:42get linkified (resolution already accepted both separators).resolvePathLinkTargetforC:/....wsTransportmalformed-envelope test: match anySyntaxError:prefix — Bun'sJSON.parsemessage 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 typecheckbun run test --filter=@t3tools/webNote
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 broadeningFILE_PATH_PATTERN, and adds coverage for extraction, punctuation trimming, andresolvePathLinkTargetbehavior for these paths.The
WsTransportmalformed-envelope test assertion is loosened to accept anySyntaxError:prefix so it’s resilient across JS runtimes with differentJSON.parseerror strings.Written by Cursor Bugbot for commit d327543. This will update automatically on new commits. Configure here.
Note
Fix
FILE_PATH_PATTERNto linkify WindowsC:/paths in terminal outputUpdates 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 likeC:/Users/...are now detected and linkified alongside the existingC:\...support.Macroscope summarized d327543.