GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(shared): one-letter link schemes no longer become file links on Windows by Zacharon · Pull Request #24006 · pingdotgg/t3code

Conversation

@Zacharon

@Zacharon Zacharon commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Problem

On Windows, Chromium's URL parser reads a one-letter scheme as a drive letter.
In Chrome, Edge and the Electron desktop app on Windows, new URL("d:alert(1)").href
is file:///D:/alert(1). Node and Chromium on other platforms keep d:alert(1).

parseFileUrlHref parses first and checks the protocol after, so on Windows
rewriteMarkdownFileUriHref turns a chat link like [unknown](d:alert(1)) into a
file chip for D:/alert(1). The existing browser test
ChatMarkdown Windows file links > still rejects unsafe schemes fails on a Windows
host for this reason. CI runs on Linux, so it never sees the failure.

Change

parseFileUrlHref returns null unless the href starts with file:, before it
calls new URL. Two of its three callers (parseMarkdownFileLink and
client-runtime's markdownImages) already check this first. The web markdown link
rewrite did not.

Scope and approval

Small, focused fix for an obvious bug: one guard in a shared helper, so links render
the same on every client OS. This isn't script execution. The chip only opens a
path, but it shouldn't exist at all.

Verification

Windows 10 (19045), Node 26.12.1, Vite+ 1.3.0, Playwright Chromium headless shell
148.

  • Parser difference, from Playwright's Chromium on Windows: d:alert(1), c:foo
    and x:y become file:///D:/alert(1), file:///C:/foo and file:///X:/y.
    Node returns them unchanged.
  • From apps/web:
    vp test run --project browser src/components/ChatMarkdown.browser.test.tsx.
    On main, still rejects unsafe schemes fails because the output contains
    href="D:/alert(1)"; the other 5 pass. With the fix, 6/6 pass.
  • Related tests pass with the fix: shared fileLinks, markdownLinks and path
    (63), client-runtime markdownImages (12), web unit markdown-links and
    terminal-links (48), and the three markdown browser test files (12).
  • vp run check:changed: format, lint, knip, typecheck (28 packages) and the
    fileLinks test pass. On Windows this needed a local workaround for
    check:changed spawning vp.cmd, which isn't part of this PR.

No new test. The existing browser test is the regression test and fails on main on
Windows. A Node unit test can't reproduce Chromium's parsing.

Fix written by Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Zacharon @claude
fix(shared): one-letter link schemes no longer become file links on W…
eb2e68f
…indows

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Zacharon Zacharon mentioned this pull request Oct 23, 2026
fix(web): browser tests no longer pick a port Windows has reserved #24007
Merged
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 23, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Oct 23, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at eb2e68f

Macroscope's review found this PR approvable — This is a focused four-line bug fix that prevents one-letter schemes from being misclassified as file links on Windows while preserving valid file: URL handling. It affects only existing markdown/file-link parsing paths and introduces no schema, deployment, default, or static-analysis changes.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

parseFileUrlHref now checks that the trimmed, lowercased input starts with file: before parsing. A regression test verifies that a one-letter scheme returns null.

Changes: File URL Validation

Layer / File(s) Summary
Validate the file URL prefix
packages/shared/src/fileLinks.ts, packages/shared/src/fileLinks.test.ts
parseFileUrlHref rejects inputs without a file: prefix. A regression test verifies rejection of d:x when the mocked URL parser interprets it as a Windows-style file URL.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge, voltcrash

Merge Risk: Minimal · up to 10b97

This change stops one-letter schemes such as d:alert(1) from being rendered as file links on Windows Chromium. It is a small, low-risk hardening and appears ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the actual change: one-letter link schemes no longer become file links on Windows. It follows the conventional commit form and matches the guard added to parseFileUrlHref in packages/s…
Description check Passed The description follows the repository template. It has a clear Problem section with the Chromium drive-letter parsing cause and reproduction details. The Change section explains the guard and why it …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the actual change: one-letter link schemes no longer become file links on Windows. It follows the conventional commit form and matches the guard added to parseFileUrlHref in packages/shared/src/fileLinks.ts. At 75 characters it is slightly long but still clear.

Full details: Description check

Explanation

The description follows the repository template. It has a clear Problem section with the Chromium drive-letter parsing cause and reproduction details. The Change section explains the guard and why it sits in the shared helper. The Scope section explains why no linked issue is needed for this small bug fix. The Verification section lists specific commands, platforms, and observed before/after results, and it states what was not checked, including the Windows-only workaround. It does not include a separate issue link, but the Scope section gives a reason, which the template allows. The agent attribution line is present.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 86d49da
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b0de536-2bb9-4f51-9c71-56a97a39a15f
Commits

Reviewing files that changed from the base of the PR and between eb2e68f and 10b97fe.

Files selected for processing: 2

  • packages/shared/src/fileLinks.test.ts
  • packages/shared/src/fileLinks.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Zacharon Zacharon mentioned this pull request Oct 23, 2026
fix(scripts): launch check:changed on Windows without a vp shim #24164
Merged
This was referenced Oct 24, 2026
fix(shared): recognize Unicode letters in relative file links #24418
Closed
fix(web): terminal URLs like redis:// no longer become broken file links #25563
Closed
@maria-rcks GitCafe Production

maria-rcks commented Oct 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

verified the linux web path at exact head eb2e68f35a5dac7fe2c919bc3d4c4f23ea268fa8, after running github/main (5ef56853ef) in a separate worktree first. used vp i, one background dev server at a time, playwright from the repo dependencies, and /usr/bin/google-chrome. final verification used fresh isolated state at /home/user/t3code/.t3/verify.

created a real git repository, added its project through the web app, and submitted real codex gpt-6.1-sol turns through the composer and local provider proxy. the provider returned the requested markdown on both revisions. no mocks, fixtures, replay provider, or source changes.

  • d:alert(1), c:foo, and x:y rendered without an href. clicking them did not navigate or open a file.
  • file:///home/user/link-verification/README.md#L3 rendered as a file chip. clicking it loaded the real file in the panel and highlighted line 3.
  • https://example.com retained its destination and opened an external tab with example-domain content.
  • 39 focused parser, markdown-link, and markdown-image tests passed through blacksmith-check.
  • vp run check:changed 807319c276c6831b2c219640e9da5b38019a8f1d passed through blacksmith-check: format, lint, knip, 28 affected package typechecks, and 18 parser tests. the explicit ref is the pr's base; the shallow worker needed its ancestry fetched first.

main baseline with the same prompt and data:

main linux baseline with real codex link response

pr head with matching prompt and data:

pr head linux codex response with blocked schemes and valid file chip

pr head opens the real readme and highlights line 3

pr head link clicks and file panel interaction

short runtime transcript, including selected real provider events

Not verified

the windows-specific regression remains unverified. on this linux vm, chrome returns d:alert(1), c:foo, and x:y unchanged from new URL(...).href; it does not convert them to file: urls. the original bug therefore did not reproduce on main. the linux before/after captures prove the exercised paths still work, but cannot prove the windows fix. no url-parser shim or simulated platform was used.

windows chrome/edge and electron still need the same real-chat scenario on windows. native desktop shells, macos, ios/android, remote relay/tunnel connections, and other providers were not exercised here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Zacharon

Zacharon commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Native Windows check at eb2e68f35a5dac7fe2c919bc3d4c4f23ea268fa8

Host: Windows 10 Pro 10.0.19045 x64. Node 26.12.1, Vite+ 1.4.0. Edge 156.0.4314.56, Chrome for Testing 148.0.7778.96 (Playwright's Chromium, since stable Chrome isn't installed), and the desktop dev app (Electron 44.10.0). I ran main (6575ce32508b) first, then the same checkout with this PR's commit applied, using vp run dev / vp run dev:desktop with an isolated T3CODE_HOME. I added a real git repo as a project and sent a real Codex turn. The reply matched the prompt exactly: [one](d:alert(1)) [two](c:foo) [three](x:y), [readme](file:///C:/t3-linktest/README.md#L3), [site](https://example.com).

On Windows the bug shows in the user message, not in Codex's reply. User messages render with parseRawHtml={false}. The assistant's raw-HTML path already drops these hrefs on main, so the reply looks clean on both revisions. The browser test covers both modes.

On main:

  • In the user message, Edge, Chrome for Testing and the desktop app render d:alert(1), c:foo and x:y as file chips (D:/alert(1), C:/foo, X:/y). Clicking alert(1) opens the file panel with "could not be accessed or read" and the attempted path D:/alert(1).
  • ChatMarkdown.browser.test.tsx: still rejects unsafe schemes fails and 10 others pass.

With this PR:

  • In all three, none of the three schemes renders as a file chip. In the desktop app, clicking them does nothing. In the browsers, the user-message ones keep href="" and open the current page in a new tab, the same as javascript: links already do on main.
  • The README chip opens the file with line 3 highlighted. https://example.com opens externally.
  • ChatMarkdown.browser.test.tsx: 11/11 pass.

Not covered: Windows 11, ARM64, stable Chrome, and a packaged desktop build.

Written by Claude Opus 5.5 (Claude Code in T3 Code) on behalf of the PR author.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai coderabbitai Bot mentioned this pull request Oct 31, 2026
fix(web): terminal URLs like redis:// no longer become broken file links #28189
Merged
@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 14, 2026
juliusmarminge and others added 2 commits November 14, 2026 08:24
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/shared-file-url-r…
f0f30e0
…equires-file-scheme
@juliusmarminge @claude
test(shared): cover one-letter schemes parsed as drives
10b97fe
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge

juliusmarminge commented Nov 14, 2026

Copy link
Copy Markdown
Member

Evidence

Windows Server 2025, Chromium 156.0.8078.4, 1280×800, dark theme; real dev servers with isolated databases and synthetic replay threads on both commits.

Sent the reported five Markdown links through the composer, inspected their rendering, clicked the first link, then clicked the explicit README file link. Before each still, two screenshots 500 ms apart matched.

Before After
86d49daf82 10b97feb21
Before: one-letter schemes become file chips After: one-letter schemes are not file chips
Before: clicking the first link opens the D drive file error After: clicking the first link opens no file panel
Before: explicit README file link opens successfully After: explicit README file link still opens successfully
Before interaction recording After interaction recording

Base rendered file chips targeting D:/alert(1), C:/foo, and X:/y, requested metadata for those paths, and sent projects.readFile for D:/alert(1) after the click. Head rendered the labels one, two, and three as non-file links with sanitized empty hrefs, requested no metadata for those drive paths, and opened no file panel after the same click. The explicit README link opened readable contents on both commits.

Manual driver and seed script · Server startup script · Attempted scenario · Base observations · Head observations

The scenario runner could not spawn its Windows launcher; this verdict comes from the real-app manual comparison.

Not shown:

  • Electron desktop, Edge, Windows 11, and mobile were not exercised; this proof covers Windows Server 2025 Chromium web.
  • The HTTPS link rendered as an external link on both commits, but navigation was not exercised.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 14, 2026
@juliusmarminge
juliusmarminge merged commit a61291e into pingdotgg:main Nov 14, 2026
49 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 14, 2026
AdEx-Partners-DE added a commit to AdEx-Partners-DE/t3code that referenced this pull request Nov 14, 2026
@AdEx-Partners-DE
merge: integrate nightly 4669 and selected provider fixes
8a0992a
Integrate v0.1.10-nightly.20261114.4669 (db2cc20).
Keep fork admission, provider-instance and queue safeguards; use upstream session import and worktree restoration. Admit send-time worktree preparation before doing filesystem work. Preserve linked-worktree imports for projects with a separate Git directory.

Additional upstream patches:
- pingdotgg#36592 at 780e387
- pingdotgg#36580 at 6ab2017
- pingdotgg#24006 at 10b97fe
- pingdotgg#36561 at be14aa2
- pingdotgg#36533 at a49ce65
- pingdotgg#24007 at 503b274

Verification and Windows baseline evidence: local integrate-4669 records.
No upstream publication or pull request created.
Pipyakas pushed a commit to Pipyakas/t3code that referenced this pull request Nov 15, 2026
@Zacharon @juliusmarminge @Pipyakas
fix(shared): one-letter link schemes no longer become file links on W…
9fd0f4c
…indows (pingdotgg#24006)

Co-authored-by: Julius Marminge <[email protected]>
(cherry picked from commit a61291e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

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:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

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.

3 participants

@Zacharon @maria-rcks @juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.