You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): the web build works from a checkout path with spaces - #30666
vp build in apps/web fails when the checkout path contains a space. The @betteroffice/fonts-cjk alias in apps/web/vite.config.ts was resolved with new URL(...).pathname, which percent-encodes the space as %20, so the aliased file does not exist. Fixes#29587.
Change
Resolve the alias with NodeURL.fileURLToPath(new URL(...)), which decodes the path, as the issue suggests.
Scope and approval
One-line fix for the build bug reported in #29587.
Verification
Built apps/web from a fresh checkout at /home/…/t3 space repro on e68e19d605:
Before: vp build exits 1 with [UNLOADABLE_DEPENDENCY] Could not load ../../../t3%20space%20repro/apps/web/src/components/files/office/fonts-cjk.ts … No such file or directory.
After: vp build exits 0, ✓ built in 16.02s.
vp run check:changed: format, lint, knip, and typecheck pass.
No test added: this is build configuration, and the build in CI covers it. No UI change.
Done with Claude Opus 5.5 in Claude Code (T3 Code).
The fonts-cjk alias used `URL.pathname`, which keeps a space as `%20`, so
the aliased file did not exist. Resolve it with `fileURLToPath` instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Macroscope's review found this PR approvable — The web build now converts the existing font alias URL into a native filesystem path, supporting checkout directories containing spaces. The alias target and font behavior remain unchanged, with no material operational exposure.
Notes:
All code in this push has already been reviewed. Approvability was decided on eligibility alone.
You can add or adjust custom eligibility rules. Learn more.
pingdotgg/t3code#30080: Applies similar URL-to-filesystem-path handling to relay migrations.
Suggested reviewers:maria-rcks
Merge Risk: Minimal · previous review 51ca6
The path-space build issue is addressed without introducing additional merge-blocking risk.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title clearly and concisely describes the primary change: fixing the web build when the checkout path contains spaces.
Description check
The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the failure, the fix, the linked issue, the focused scope, and the before-and-after bu…
Linked Issues check
[#29587] The only coding requirement is that the web build succeeds from a checkout path that contains a space. The root cause is that the @betteroffice/fonts-cjk alias in apps/web/vite.config.ts …
Out of Scope Changes check
The whole-PR diff changes one file, apps/web/vite.config.ts. It adds the node:url import and changes the fonts-CJK alias expression. Both edits serve the objective of #29587. No unrelated file or …
Full details: Description check
Explanation
The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the failure, the fix, the linked issue, the focused scope, and the before-and-after build results.
Full details: Linked Issues check
Explanation
[#29587] The only coding requirement is that the web build succeeds from a checkout path that contains a space. The root cause is that the @betteroffice/fonts-cjk alias in apps/web/vite.config.ts used new URL(...).pathname, which keeps %20 in the path. The diff at merge base e68e19d to head 51ca6c0 replaces this with NodeURL.fileURLToPath(new URL("./src/components/files/office/fonts-cjk.ts", import.meta.url)), with import * as NodeURL from "node:url" added. This is the fix the issue proposes. fileURLToPath decodes the percent-encoded path, so the aliased file resolves. The issue requests no automated test, and the change is a one-line configuration fix. The author's before and after build results are reported in the PR description. I did not run the build. The result rests on the code change and the correct decoding behavior of fileURLToPath.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff changes one file, apps/web/vite.config.ts. It adds the node:url import and changes the fonts-CJK alias expression. Both edits serve the objective of #29587. No unrelated file or behavior changes appear in the diff. The node:url import follows the existing node:fs/promises and node:zlib imports in the same file. The raw summary reports no changes to exported declarations, which matches the diff.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between e68e19d and 51ca6c0.
Files selected for processing: 1
apps/web/vite.config.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
verified exact head 51ca6c0594a1e3b334e3aae7b2abf59b34136623 on a linux boat vm. no source changes were needed.
reproduced on github/main (8b44f42b14): the web build in a real directory containing spaces failed with UNLOADABLE_DEPENDENCY for real%20t3%20main/.../fonts-cjk.ts.
the pr's web build passed in a real directory containing spaces and in a normal path. builds and check:changed ran through blacksmith. format, lint, knip, and affected typechecks passed.
ran vp i and the real background dev server from /home/user/pr space. used the repo's playwright with /usr/bin/google-chrome.
added a real git project through the app. a real codex gpt-6.1-sol turn created word, powerpoint, and markdown files. the word viewer rendered the heading, paragraph, bold, and italic text. the powerpoint viewer rendered its title and subtitle. markdown preview worked.
a second codex turn read the files and returned hashes matching an independent sha256sum check. no mocks, fixtures, or demo app state.
native desktop, ios, android, macos, and windows were not exercised on this linux vm. remote relay/tunnel connections and other providers were not exercised. optional cjk glyph coverage was not tested; this change preserves the existing font fallback.
In independent checkouts named checkout with spaces, run vp i at the root, then vp build from apps/web. Both installs succeeded. Environment for both captures: Linux x86_64, Node 26.12.1, pnpm 12.14.0, Vite+ 1.4.0; no seeded state. These images show excerpts of actual captured build output.
Thanks for this. Main has the change since #29051.
Compared the complete diff: this PR only corrects URL decoding for the fonts-cjk stub alias, while main removes that alias and stub entirely and resolves the installed font package, eliminating the same build failure.
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
size:XS0-9 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.
3 participants
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
vp buildinapps/webfails when the checkout path contains a space. The@betteroffice/fonts-cjkalias inapps/web/vite.config.tswas resolved withnew URL(...).pathname, which percent-encodes the space as%20, so the aliased file does not exist. Fixes #29587.Change
Resolve the alias with
NodeURL.fileURLToPath(new URL(...)), which decodes the path, as the issue suggests.Scope and approval
One-line fix for the build bug reported in #29587.
Verification
Built
apps/webfrom a fresh checkout at/home/…/t3 space reproone68e19d605:vp buildexits 1 with[UNLOADABLE_DEPENDENCY] Could not load ../../../t3%20space%20repro/apps/web/src/components/files/office/fonts-cjk.ts … No such file or directory.vp buildexits 0,✓ built in 16.02s.vp run check:changed: format, lint, knip, and typecheck pass.No test added: this is build configuration, and the build in CI covers it. No UI change.
Done with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code