Skip to content

fix(ui): distinguish absolute and relative file links - #146572

Merged
steipete merged 1 commit into
mainfrom
codex/qa-file-label-root-20260912
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-file-label-root-20260912

Conversation

@steipete

@steipete steipete commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

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.ts and workspace/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

  • Tests-first: two renderer regressions and the browser label assertion fail on the original code. Target paths and line navigation already pass.
  • Candidate: 275 focused/sibling tests, all seven file-link browser cases, standard changed checks, and managed P0–P2 review pass.
  • Real Chromium renders the production UI bundle with a synthetic Gateway. Click and Enter open the distinct original files at line 7. This does not claim live Gateway or provider execution.

Local behavior proof remains bound to base 7954ad49. Current head 108f49ac on c23e1b27 preserves 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.

Before: absolute and relative file targets have identical labels

After: the absolute path retains its leading slash.

After: absolute and relative file labels are distinct

@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Sep 12, 2026
@steipete
steipete marked this pull request as ready for review September 12, 2026 23:48
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 12, 2026
@clawsweeper

clawsweeper Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 3:49 AM ET / 07:49 UTC (Revision 6).

ClawSweeper review

What this changes

Preserves 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
Reviewed head: 108f49aca272f0509f9ad79da942ff1bd669ac66

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small owner-level repair with clear visual proof and meaningful regression coverage; no blocking defect was found.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Chromium captures directly demonstrate the changed label-shortening behavior in the production UI with a synthetic Gateway. The body preserves the earlier capture-base attribution; browser regression coverage supplements the screenshots with original-target and line-navigation assertions.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after Chromium captures directly demonstrate the changed label-shortening behavior in the production UI with a synthetic Gateway. The body preserves the earlier capture-base attribution; browser regression coverage supplements the screenshots with original-target and line-navigation assertions.
Evidence reviewed 7 items Current main still needs the fix: Current main removes empty path segments before suffix disambiguation, making matching absolute and relative paths indistinguishable. Comparing this production file with the reviewed head shows exactly the proposed root-segment repair.
Latest supplied release retains the defect: The v2026.9.4 source also uses filter(Boolean) during segmentation; this release does not contain the repair.
Presentation and destination remain separate: The parser applies shortened labels only after recording original targets. Click and keyboard handlers read data-file-path and data-file-line, rather than displayed text. The patch changes neither routing nor authorization.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -1, Tests +153. Total +152 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 3 -1
Tests 2 153 0 +153
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 155 3 +152

Review metrics

None.

Technical review

Best 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.

Labels

Label justifications:

  • P2: Ambiguous chat file labels are a bounded usability defect; original file targets remain intact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): Inspected before/after Chromium captures directly demonstrate the changed label-shortening behavior in the production UI with a synthetic Gateway. The body preserves the earlier capture-base attribution; browser regression coverage supplements the screenshots with original-target and line-navigation assertions.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after Chromium captures directly demonstrate the changed label-shortening behavior in the production UI with a synthetic Gateway. The body preserves the earlier capture-base attribution; browser regression coverage supplements the screenshots with original-target and line-navigation assertions.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after Chromium captures directly demonstrate the changed label-shortening behavior in the production UI with a synthetic Gateway. The body preserves the earlier capture-base attribution; browser regression coverage supplements the screenshots with original-target and line-navigation assertions.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-12T23:54:13.270Z sha 61a1bdeb173e373163872701648c1f77d8073f20 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T01:05:28.227Z sha 9b4d1cb0bc5de4159c8d8e374d6951ea7bd8c332 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T01:30:11.103Z sha 7e3cf81 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T06:20:18.750Z sha 108f49a :: needs maintainer review before merge. :: none
  • reviewed 2026-09-13T06:28:35.170Z sha 108f49a :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/qa-file-label-root-20260912 branch 2 times, most recently from 9b4d1cb to 7e3cf81 Compare September 13, 2026 01:21
Preserve the root segment in shared file-label shortening so matching absolute and relative paths remain distinguishable while retaining their original file targets.
@steipete
steipete force-pushed the codex/qa-file-label-root-20260912 branch from 7e3cf81 to 108f49a Compare September 13, 2026 06:14
@steipete
steipete merged commit f73f179 into main Sep 13, 2026
234 of 237 checks passed
@steipete
steipete deleted the codex/qa-file-label-root-20260912 branch September 13, 2026 07:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Preserve the root segment in shared file-label shortening so matching absolute and relative paths remain distinguishable while retaining their original file targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant