fix(shared): shortened agent paths like /tmp/... no longer become broken file chips#30762
Problem
Agents often shorten a long path in inline code, for example `/tmp/claude-1000/...` for Claude Code's scratch folder. T3 Code turned that into a file chip. Clicking it asked the server for a file literally named ..., and the viewer showed "The file could not be accessed or read" with the elided path, as if T3 couldn't read /tmp. Reported in #30757 (form B).
Change
inlineCodeFilePathCandidate (shared by web, mobile, and thread find text) now leaves inline code as plain code when its path, ignoring a :line[:col] suffix, has a segment made only of three or more dots or only …. Normal paths, ./ and ../ prefixes, and dotfiles are unaffected.
Scope and approval
Very small, focused fix for a reported bug: 3 non-test lines in one shared helper, plus rows in the existing table test. This covers only the broken chip from #30757. It does not add plain-text path detection (form A, a new feature) or change the agent instructions, so this is Refs #30757 rather than Fixes. No open PR is linked to the issue, and searching existing PRs for ellipsis/file-chip/inline-code paths found nothing on this case.
Verification
- Red on
main: the new rows ininlineCodeFilePathCandidate > distinguishes file paths from code and hostnamesfail, e.g.AssertionError: expected '/tmp/claude-1000/...' to be null. - Green:
vp test run src/markdownLinks.test.ts src/threadFindText.test.tsinpackages/shared: 63 passed.apps/mobilesrc/lib/markdownLinks.test.ts: 8 passed. vp run check:changed: format, lint, knip, typecheck (34 packages), tests all pass.- Not checked in a real client. The change is pure string classification, and the chip rendering paths call this function unchanged.
Reviewed with sol-loop: 2 rounds with GPT-6.1 Sol on high. Round 1 found that a line suffix (/tmp/claude-1000/...:12) bypassed the check, which is now fixed and tested. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code
Checks
Added 1 commit
- fix(shared): shortened agent paths like /tmp/... no longer become broken file chipsbee97a2
Approvability
Verdict: Approved at bee97a2
Macroscope's review found this PR approvable — Shortened paths containing ellipsis segments remain plain inline code rather than becoming broken file chips. The change is limited to path presentation in web and mobile, without altering files or stored data.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
Walkthrough
The inline-code path classifier now rejects paths that contain a complete
...or…segment, including candidates with line or column suffixes. Regression tests cover shortened temporary, home-directory, and source paths.Changes: Inline-code path classification
Layer / File(s) Summary Reject elided path segments
packages/shared/src/markdownLinks.ts,packages/shared/src/markdownLinks.test.tsThe classifier returns nullwhen a candidate contains a complete...or…path segment. Regression tests cover shortened paths, including paths with line suffixes.Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related issues
- pingdotgg/t3code#30757: The issue describes a shortened path with an elided segment becoming a file chip. This change rejects that path.
Suggested labels:
bugfix,size:XSSuggested reviewers:
macroscopeapp
Merge Risk: External image Minimal · up to bee97
The narrow classifier change is supported by regression coverage and presents no actionable merge-blocking risk.
Pre-merge checks: Passed 4
Check name Status Explanation Title check Passed The title names the change: shortened agent paths such as /tmp/... no longer become broken file chips. The raw summary and objectives confirm that inlineCodeFilePathCandidate now rejects paths with an… Description check Passed The description follows the template structure: Problem, Change, Scope and approval, and Verification. The Problem section explains the broken file chip, the reproduction path, and the reported issue … 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 change: shortened agent paths such as /tmp/... no longer become broken file chips. The raw summary and objectives confirm that inlineCodeFilePathCandidate now rejects paths with an elided segment. The title is specific and matches the main change. It uses the conventional commit format and a plain-language description.
Full details: Description check
Explanation
The description follows the template structure: Problem, Change, Scope and approval, and Verification. The Problem section explains the broken file chip, the reproduction path, and the reported issue
#30757. The Change section explains the helper change and the affected surfaces. The Scope and approval section explains why the fix is small and why it uses Refs instead of Fixes. It does not link a maintainer-approved triage issue or give the approval comment. It also does not state whether the fix qualifies as a very small, focused fix of an obvious bug. The Verification section lists a red-to-green test run, the test counts, check:changed results, and what was not checked in a real client. The author also reports an agent model and harness at the end, which the template requests. The template asks for a triaged issue or approval, so that gap keeps the check from passing outright, but the description is otherwise mostly complete.
Finishing Touches
Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 8b44f42
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
67667db1-9423-4084-8af0-8f1aa50a5931
External image Commits
Reviewing files that changed from the base of the PR and between 8b44f42b14c8e273156474a924ccf29680dd7857 and bee97a24c9dda2a5bfbb6ef7e08b6e1f004da669.
External image Files selected for processing: 2
packages/shared/src/markdownLinks.test.tspackages/shared/src/markdownLinks.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: 8b44f42
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
67667db1-9423-4084-8af0-8f1aa50a5931
External image Commits
Reviewing files that changed from the base of the PR and between 8b44f42b14c8e273156474a924ccf29680dd7857 and bee97a24c9dda2a5bfbb6ef7e08b6e1f004da669.
External image Files selected for processing: 2
packages/shared/src/markdownLinks.test.tspackages/shared/src/markdownLinks.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Note
Written by gpt-6.1-sol on behalf of Maria
Verified in a real dev environment
verified unchanged head bee97a24c9dda2a5bfbb6ef7e08b6e1f004da669 on linux with the real dev server, repository playwright, and /usr/bin/google-chrome. created the project and conversation through the web app and completed real codex gpt-6.1-sol turns on both main and the pr. no mocks or seeded conversations.
- on
github/main(8b44f42b14), the agent's shortened/tmp/claude-1000/...became a clickable chip. clicking it produced "The file could not be accessed or read" for that literal path. - on the pr, the same saved response renders
/tmp/claude-1000/...,/tmp/claude-1000/...:12,/tmp/.../scratchpad/notes.md, and~/projects/…/notes.mdas plain inline code. a fresh provider response behaves the same. clicking shortened code leaves the viewer closed. - valid
./packages/shared/src/markdownLinks.ts:180,./.gitignore, and../t3code/package.jsonremain links and open real file content. line navigation reveals and highlights line 180. - blacksmith:
cd packages/shared && vp test run src/markdownLinks.test.ts src/threadFindText.test.tspassed all 63 tests. the head currently has 30 successful ci checks, zero failing or pending checks. no source changes were needed.
before, same conversation on main:
main turns shortened paths into file chips
main opens the shortened path as a missing file
after, same conversation on the pr:
pr leaves shortened paths as code and preserves valid links
interaction recording, with idle pauses shortened; uploaded playback and seeking checked:
shortened code stays inert while dotfile, parent-relative file and line links open
Not verified
native ios/android and electron desktop shells, macos/windows paths, remote/relay/tunnel connections, and other providers were not exercised. this pass covers the linux web client and real codex provider path. no performance claim is made.