Repository navigation
fix(ui): distinguish absolute and relative file links - #146572
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 3:49 AM ET / 07:49 UTC (Revision 6). ClawSweeper reviewWhat this changesPreserves the leading slash when shortening conflicting absolute and relative chat file links, with renderer and browser regression coverage. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main still produces ambiguous labels, and the inspected before/after screenshots demonstrate the improvement. No actionable correctness or security findings remain. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI turns file references in chat Markdown into clickable labels. Its shared label shortener controls displayed text, while separate path and line attributes determine which file opens. flowchart LR
A[Chat Markdown] --> B[Parse file references]
B --> C[Shorten distinct labels]
B --> D[Preserve path and line]
C --> E[Render file links]
D --> E
E --> F[Click or keyboard activation]
F --> G[Workspace file preview]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -1, Tests +153. Total +152 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep root identity in the existing label shortener while preserving original file destinations, line navigation, and near-linear lookup. Do we have a high-confidence way to reproduce the issue? Yes: render matching absolute and relative references together, such as /workspace/src/file.ts:7 and workspace/src/file.ts:7. Current-main source loses the root distinction, consistent with the supplied before screenshot; this review did not execute tests. Is this the best way to solve the issue? Yes: retaining the root segment repairs the existing owner without adding another shortening algorithm or changing file routing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 65c8b06f2e42. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
9b4d1cb to
7e3cf81
Compare
Preserve the root segment in shared file-label shortening so matching absolute and relative paths remain distinguishable while retaining their original file targets.
7e3cf81 to
108f49a
Compare
|
Merged via squash.
|
* commit '2acbeee461474b6ba41f5186ae1a4e0e80f4087a': (117 commits) fix(ui): import the shared deferred helper in sidebar scope tests (#146862) fix(ui): copy chat content from its context menu (#146679) perf(memory): defer legacy sidecar writer imports (#146815) fix(e2e): accept expected Kitchen Sink worker rejection (#146681) fix(ui): distinguish absolute and relative file links (#146572) feat(ui): keep file previews in tabs and render HTML (#146672) refactor: reuse shared deferred promises in UI tests (#146670) fix: gateway stop/restart refuses a healthy gateway when the Windows process snapshot misses (#146387) improve(crabbox): keep healthy cloud desktops warm on resume (#146816) fix: report blocked SQLite WAL checkpoints in status and doctor (#146775) feat: share browser dashboards with agents (#146702) fix(doctor): continue repairs after legacy agent directory collisions (#146092) feat(agents): retry cyber-refused embedded turns on Daybreak (#145291) fix: restore media uploads through protected egress (#144902) refactor(qa): share capture filter rendering (#146696) fix(cli): keep running stream jobs visible as running (#146793) refactor(parallels): share gateway readiness loop (#146694) fix(sessions): avoid rewriting already-consumed input on release (#146795) fix: preserve scheduled conversation delivery after Doctor (#146794) perf(ui): avoid redundant session-row provenance work (#146797) ...
Preserve the root segment in shared file-label shortening so matching absolute and relative paths remain distinguishable while retaining their original file targets.
What Problem This Solves
Chat can display identical labels for an absolute file path and a matching relative path, even though they open different files.
User Impact
Readers can distinguish links such as
/workspace/src/file.tsandworkspace/src/file.ts, while each link keeps its original target and line number.Why This Change Was Made
The shared label shortener now retains the leading root segment instead of discarding it before disambiguation. It keeps the existing suffix algorithm and target routing. Production changes by −1 line (+2/−3); tests add 153 lines.
Evidence
Local behavior proof remains bound to base
7954ad49. Current head108f49aconc23e1b27preserves that exact three-file patch and passed a fresh managed P0–P2 review.Earlier CI failures came from the Gateway authorization-lifetime framework path (fixed independently in #146508 and #146390), stale upgrade-cohort arguments (#146606), then the MCP cache expectation and stale quota availability (#146667 and #146691). All those upstream repairs are now included in the base. The failed runs and original proof attribution are preserved; no unrelated repair was added to this PR. Current CI34742267876 passes on the exact head. Its first attempt canceled two selected jobs before they received a runner or executed any step; one retry completed those missing checks. The original cancellation records are retained.
Before: both links display the same label.
After: the absolute path retains its leading slash.