Repository navigation
fix(shared): match Windows home paths case-insensitively in file links - #19627
Open
hogeheer499-commits wants to merge 1 commit into
Open
hogeheer499-commits wants to merge 1 commit into
hogeheer499-commits wants to merge 1 commit into
Conversation
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, well-tested fix that makes You can add or adjust custom eligibility rules. Learn more. |
This was referenced Oct 17, 2026
This branch has not been deployed
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.
Problem
A Markdown or terminal file link such as
~/notes.md:3stays unresolved when a valid Windows cwd spells its home segmentusersoruSeRsinstead ofUsers. This breaks an already supported file-link path on ordinary case-insensitive Windows filesystems.Reproduction:
resolvePathLinkTarget("~/notes.md:3", "C:\\users\\alice\\project")returns~/notes.md:3; expectedC:\\users\\alice\\notes.md:3.Change
Add the
iflag to the existing Windows home-path regex inpackages/shared/src/fileLinks.ts, with two regression cases. The matched path keeps its original casing and line suffix. POSIX handling and the unknown-home fallback remain unchanged. No client or product-default changes.Scope and approval
One cause in the existing shared resolver: case-sensitive detection of a supported Windows home path. This is submitted under the very small, focused obvious-bug exception; it adds no capability or workflow. The one-character production change remains absent from checked
main@ab3a3cd1.Related #18345/#18458 concern mobile call sites, and #19201 concerns clipboard formatting; none supplies this shared Windows matcher fix. This PR stands on its own.
Verification
main@348f217a) with the new fixtures: 2 fail, 21 pass. Patched file-link and related path suites: 59 pass (23 + 36).uSeRs. Original leaves the tilde unresolved and cannot find the file; patched reads the expected contents and preserves line 3. This is helper/file-access evidence, not a packaged UI click test.a1f9d1cmerges cleanly withmain@ab3a3cd1. The same 59 path tests pass in an isolated combination with fix(server): queued preview actions no longer start after their deadline, except recording stop #16941 (compatibility check, not a dependency). Shared/server typechecks, targeted lint, formatting andgit diff --checkpass.vp test run packages/shared/src/fileLinks.test.ts packages/shared/src/path.test.ts vp run --filter @t3tools/shared typecheckNot tested: packaged desktop UI, mobile or native macOS. Fork CI awaits maintainer authorization.
Code: GPT-6.1-Sol (ultra) in Codex. Independent source/evidence review, without rerunning tests: GPT-6.1-Sol (xhigh) in Codex. The original PR wording was reviewed with Opus 5.5 (xhigh) in Claude Code via T3 Code; this update was prepared with GPT-6.1-Sol in Codex.