GeezerVison is showing github.com — fix(shared): Codex citations open forward-slash UNC paths in the current workspace by saphid · Pull Request #43798 · pingdotgg/t3code
Conversation
Problem
A Codex citation such as :codex-file-citation{path="//files/team/repo/src/app.ts" line_range_start="7"} fails to open a file on the current Windows workspace's UNC share. The equivalent backslash UNC path and file URI already work.
Deterministic repro on origin/main (f4b252309ff9c5acc18c180141d92c6ac08b0027): Run from the checkout root with Node.js 24; no share or network connection is needed.
node --input-type=module <<'JS'
import { resolveCodexFileCitationLink } from "./packages/shared/src/codexFileCitations.ts";
import { resolveMarkdownFileLink } from "./packages/shared/src/markdownLinks.ts";
const citation = resolveCodexFileCitationLink({ path: "//files/team/repo/src/app.ts", line_range_start: "7" });
console.log(citation.href);
console.log(resolveMarkdownFileLink(citation.href, String.raw`\\files\team\repo`));
JS
Observed: //files/team/repo/src/app.ts#L7 and null. Expected: a file link resolving to \\files\team\repo\src\app.ts at line 7 (targetPath ends in :7).
Change
Normalize valid forward-slash UNC paths from explicit Codex citation attributes to backslash UNC paths, preserving hosts such as localhost. Web, desktop, and mobile consume this shared serializer, including copied Markdown; the generic resolver and its workspace containment check stay unchanged. Ordinary protocol-relative Markdown links remain external, and citations to another host or share remain blocked.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
- On unmodified base source, the new focused regression failed with
AssertionError: expected null to match object, expecting the UNC target and line 7.
vp test run packages/shared/src/codexFileCitations.test.ts passed 3/3 consecutive runs (13 tests per run), including direct and copied-Markdown resolution for ordinary and localhost UNC hosts, unrelated-host/share rejection, and unchanged protocol-relative and triple-slash paths.
vp run check:changed exited 0: format, lint, both knip checks, typecheck (37 packages), and affected tests (2 files, 15 tests).
- Before/after runtime transcript and exact failing assertion: the synthetic forward-slash citation now resolves identically to its backslash UNC control, including
localhost on its own workspace. Other hosts/shares remain blocked and triple-slash paths retain their spelling.
- Not shown: rendered UI or interactive click-through on web, Electron, iOS, or Android; a live Windows host, mounted SMB share, or real Codex provider turn.
Authored by GPT-6.1 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
markdownDestinationPath now converts matching forward-slash UNC paths to UNC-style destinations. Tests cover resolution within the workspace, non-matching UNC paths, and triple-slash paths.
Changes: UNC citations
| Layer / File(s) |
Summary |
UNC path conversion and citation tests packages/shared/src/codexFileCitations.ts, packages/shared/src/codexFileCitations.test.ts |
markdownDestinationPath converts matching forward-slash UNC paths to UNC-style destinations. Tests cover workspace resolution, non-matching paths, and triple-slash href preservation. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Merge Risk: Minimal · up to 7b2e4
-
This change makes Codex citations to forward-slash UNC paths on the current Windows workspace resolve to files. Other hosts and shares remain blocked, and ordinary protocol-relative links are unaffected. No actionable merge risk remains.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: forward-slash UNC paths in Codex citations now open in the current workspace. It also follows the conventional commit form. It fits the changeset, which normalizes for… |
| Description check |
 |
The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The problem has a reproduction and expected behavior. The change explains the normalization a… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the main change: forward-slash UNC paths in Codex citations now open in the current workspace. It also follows the conventional commit form. It fits the changeset, which normalizes forward-slash UNC paths in codexFileCitations.ts and adds tests for them.
Full details: Description check
-
Explanation
The description follows the repository template. It has Problem, Change, Scope, and Verification sections. The problem has a reproduction and expected behavior. The change explains the normalization and the unchanged resolver. The scope explains why no issue is linked. Verification lists focused tests, the full check run, and what was not tested. It has no model and harness line in the template's closing comment; the author lists GPT-6.1 Sol and Gemini 4 Neon as the agents, so that requirement is met.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 51bba6a and 7b2e438.
Files selected for processing: 2
-
packages/shared/src/codexFileCitations.test.ts
packages/shared/src/codexFileCitations.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Resolve conflicts with pingdotgg#43772 by keeping main's destination logic and
rewriting forward-slash UNC paths before it; drop the test that only
covered behavior this change does not touch.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Evidence
Windows Server 2025, Chromium web client, 1440×900, dark theme, fresh databases with T3CODE_DEV_SEED=0.
Created a real SMB workspace at \\localhost\team\repo containing src/app.ts with 12 numbered exports. Seeded identical Replay replies through the app CLI. In each recording, clicked the forward-slash UNC citation first, then the equivalent backslash control. Both target line 7.
Base opened an external error tab and no workspace file. Head opened repo > src > app.ts at highlighted line 7 without a new tab. The backslash control opened line 7 on both commits.

Different-host and different-share citations on head did not become workspace file chips:

Playwright driver · Replay fixture setup · Boundary driver · Boundary replay setup
Base observations · Head observations · Boundary observations
Not shown:
- Real Codex emission and copy-as-Markdown were not exercised; the citations came from synthetic Replay replies.
- Electron desktop, mobile, and remote/relay/tunnel clients were not exercised; this proof covers the Windows-hosted web client.
|
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.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 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.
|