Repository navigation
fix(ui): show session hover cards for local chat URLs - #139384
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 5, 2026, 6:54 PM ET / 22:54 UTC. ClawSweeper reviewWhat this changesExtend session titles, hover cards, and in-app navigation to local chat URLs and configured public-origin aliases while preserving workspace-file links. Merge readiness✅ Ready for maintainer review This remains a useful fix absent from current main and the latest release. Both prior findings are resolved, and no remaining blocking patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI renders chat messages into interactive links. Session links use the loaded session list to display titles and hover cards, then pass navigation to the existing chat router. flowchart TD
A[Chat message] --> B[Markdown link classification]
B --> C{Local session URL?}
C -->|Yes| D[Loaded session lookup]
D --> E[Session title and hover card]
C -->|Yes| F[In-app chat navigation]
C -->|No| G[Normal browser or workspace link]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -1, Tests +263, Docs +8. Total +270 across 13 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use one session-link classification and resolution flow across transcript rendering, hover cards, and navigation while retaining ordinary file and external-link behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: a local chat URL bypasses current main's key-only session decoration and therefore lacks the identity required by the hover card. No runtime reproduction was executed here. Is this the best way to solve the issue? Yes. Extending the existing decoration flow and reusing the route grammar avoids a competing URL parser or hovercard implementation; the added cases protect the previously reported classification failures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c131ec041e15. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Run session decoration after CJK URL cleanup and before file-link classification so hover-card refresh preserves the cleaned destination. Cover adjacent CJK prose, query and fragment preservation, and resolved session identity after title refresh.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* origin/main: (95 commits) perf(build): avoid unrelated gateway artifact scans (#127757) fix(update): deliver terminal progress after long updates (#139289) fix(ui): show session hover cards for local chat URLs (#139384) perf(ui): reuse unchanged transcript key snapshots (#139400) fix(ui): make subagent sessions view-only (#139381) fix: open agent state on SQLite builds without extensions (#139487) perf(skills): detach cached metadata from source strings (#139478) fix(ui): show primary user in multi-agent profile hero (#136736) perf(sessions): stop decoding the session row four times per SQLite entry patch (#136361) refactor(exec): share package-manager option scans (#139482) fix(ci): authorize frozen mobile release candidates (#139441) fix: avoid session deletion slowdown in large session stores (#139467) perf(gateway): reuse node invocation idle timers (#139354) fix(auth): preserve selected profiles across plugin scopes (#139413) fix(discord): retain voice input until transcription completes (#139484) fix(agents): name Gateway storage failures in run-failure copy (#139409) fix: keep subagent checks responsive in large session stores (#139450) fix(memory): index notes when optional embeddings cannot start (#139463) fix: refresh pending approvals when reopening chat (#139457) fix(tooling): preserve Git hook choices during install (#139461) ...
* fix(ui): show session hover cards for local chat URLs * fix(ui): break session link hovercard type cycle * fix(ui): preserve document-relative workspace links * fix(ui): capture session URLs after trailing-text cleanup Run session decoration after CJK URL cleanup and before file-link classification so hover-card refresh preserves the cleaned destination. Cover adjacent CJK prose, query and fragment preservation, and resolved session identity after title refresh.
Problem
Chat URLs pasted into messages rendered as ordinary links without the session hover card. Peter reported this for a host-local
/chat/<agent>/<short-id>link in the Team Control UI. Rawagent:keys already had the session presentation.Solution
Recognize absolute and root-relative chat-route hrefs, linkified URLs, and inline code in the existing session decoration pass. Document-relative hrefs are excluded before URL resolution so workspace file links retain their existing handling. The context-aware titler resolves loaded sessions with the router's shared local reference resolver and supplies the hover identity. The lazy hover-card loader now recognizes URL candidates before that identity is available. Synchronous click and keyboard routing reads the already-assigned application context through a narrow host type, so navigation does not depend on the hover-card chunk or introduce a cycle through its implementation.
Reuse canonical URL grammar and Gateway public-origin normalization; preserve the original route's face, query, and fragment. Keep file-looking session route literals out of the file-link decorator. Remove duplicated URL parsing, the separate inline-code session renderer, and duplicate title-refresh traversal.
Impact
Same-origin and root-relative session URLs receive the existing session title/card and navigate inside the Control UI. The already-loaded applied
gateway.publicOriginis recognized as an alias. Unloaded and ambiguous sessions remain navigable without a card; other origins retain normal browser behavior. Short IDs tolerate stale title slugs, while slug-only routes require a unique matching session. No dependencies, configuration options, schemas, or live Gateway changes.Evidence
Document-relative follow-up: all 205 focused tests passed with both decorators enabled, including the four new chat-route cases. The relative file and relative route cases failed on the prior head.
node scripts/check-changed.mjsand fresh P2 autoreview passed.node scripts/run-vitest.mjs ui/src/components/markdown— 109 tests passed.node scripts/run-vitest.mjs ui/src/components/markdown-links.test.ts ui/src/components/session-link-titling.test.ts— 119 tests passed.node scripts/run-vitest.mjs ui/src/components/markdown-links.test.ts ui/src/components/markdown-session-links.test.ts ui/src/components/session-link-titling.test.ts ui/src/components/session-progress-hovercard-target.test.ts ui/src/pages/chat/components/chat-transcript-render.test.ts ui/src/pages/chat/components/chat-sidebar.test.ts ui/src/pages/chat/route-resolution-handoff.test.ts— 220 tests passed across two routed shards (including the session-link event and router-handoff suites).node scripts/run-vitest.mjs ui/src/pages/chat/route-resolution-handoff.test.ts— 10 tests passed, including canonical reload, cold-cache, and changed-connection cases.Regression proof against untouched source — 11 assertions failed for missing URL decoration/hover identity, and six cold public-origin anchor/code event assertions failed separately; all pass on the repaired source.
Mock UI on port 5187, Chromium at 1100×720, device scale 2, light mode: actual hover shows the card; clicking retains a document marker while changing the app route (no full page load). Screenshots contain only synthetic fixtures.
A real click on a public-origin code URL dispatched the in-app route while the hovercard chunk was deliberately held unloaded. Cold public-origin anchors are covered by unit tests because the standalone mock cancels foreign-origin anchor clicks before application handlers. No live Team Gateway was accessed.
node scripts/check-changed.mjs— passed, including core/UI typechecks, lint, style, i18n, formatting, and dead-export scans.pnpm check:architecture— passed after CI identified and the follow-up removed a type-only import cycle; runtime and full import graphs now both report zero cycles.Follow-up UI typecheck, targeted lint, seven event tests, and fresh P2 autoreview — passed.
git diff --check— passed.Codex autoreview through P2 — scoped-clean after fixing the public-origin initialization race.
Production LOC: +232 −234 for the task diff. Funded by the shared parsing/resolution, inline-code renderer removal, and refresh traversal consolidation.
Release-note: Control UI chat URLs now show session hover cards and open inside the app, including known public-origin aliases.