Repository navigation
fix(clients): example paths no longer open missing files - #30021
BilalIrfanContact wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Inline paths remain code unless the file is confirmed to exist, and existing-file chips preserve the written path. The added checks use permission-gated, cached read operations and reject network paths, with no persistent-data changes. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by Verified in a real dev environmentVerified unchanged head Created a local git project and thread through the app. A real Codex turn created and committed the source files. On Stopped main before starting the PR, copied only the app-created development state for matching data, and repeated the flow. A fresh Codex turn on the PR also read the real files and produced the reply.
Not verifiedNative iOS/Android and packaged desktop clients were not exercised on this Linux VM. Mobile Markdown and shared lookup tests passed, but they do not prove native rendering. Remote/relay/tunnel connections, Windows paths, disconnected or restricted-permission sessions, cache expiry, and providers other than Codex were not exercised. |
|
this works amazingly well, fixes a long standing bug in t3code and should be merged imo :D |
|
Thanks for the thoughtful fix and verification, Bilal. #29657 by voltcrash addresses the same reported issue by preserving the authored path, and is actively maintained against current main. This branch has had no author update for over a week and main has changed the affected files, so I’m closing it as the duplicate. The other approach still leaves missing paths clickable; if preventing that remains important, please feel free to propose a smaller PR focused on that behavior. |



Problem
An example such as
avatars/u1.webpbecomes a file chip labelledu1.webpeven when no such workspace file exists. The reply loses part of its text, and clicking the chip opens an error panel.Fixes #29421.
Change
Keep inline paths as plain code until the thread's environment confirms they exist. Existing files remain clickable and show the path exactly as written, including line/column suffixes. The shared lookup reuses batched metadata and cached workspace search; unreadable, disconnected, and pending lookups stay plain code. Explicit Markdown links keep their existing behavior.
This covers web/desktop, native mobile rendering, and find-in-thread text. Native link labels are escaped independently so Markdown characters in names such as
./src/__tests__/main.tsremain literal.Scope and approval
Submitted under the focused obvious-bug exception: the change addresses the report's nonexistent-file links and loss of authored text. The shared lookup and client changes support that one problem. No separate maintainer approval has been received.
Related: #29657 implements the label-only alternative and explicitly leaves nonexistent paths clickable. This PR also prevents those links.
Verification
vp run check:changed upstream/main --concurrency 2passed on the rebased branch: formatting, lint, both Knip passes, 34 affected-package typechecks, 90 tests across 8 files (including browser tests), and 14 focused React compiler checks.src/existing.tsshows its full label and opens its actual source. This is a deterministic rendering fixture, not a paid provider turn.Before
After
Additional captures: before clicking the missing-file link · after opening the existing file.
Native-device runtime was unavailable because Agent device access is disabled; mobile unit tests and typechecking were run. Packaged desktop and remote/relay connections were not exercised. Mobile may retain stale metadata for about 60 seconds; an inline path sharing an authored link's URL stays plain code to avoid changing that link's label.
Implemented with Claude Opus 5.5 (medium, Claude Code in T3 Code); verification and follow-up fixes with GPT-6.1 Sol (Codex in T3 Code).