Skip to content

fix(ui): show session hover cards for local chat URLs - #139384

Merged
steipete merged 4 commits into
mainfrom
codex/team-session-link-hovercard
Sep 5, 2026
Merged

steipete merged 4 commits into
mainfrom
codex/team-session-link-hovercard

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

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. Raw agent: 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.publicOrigin is 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.mjs and 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.

Before After
Host-local chat URL is a plain link without a session card The same chat URL resolves to the session title and hover card

Release-note: Control UI chat URLs now show session hover cards and open inside the app, including known public-origin aliases.

@clawsweeper

clawsweeper Bot commented Sep 5, 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 docs Improvements or additions to documentation app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Sep 5, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 6:54 PM ET / 22:54 UTC.

ClawSweeper review

What this changes

Extend 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
Reviewed head: ac27c8ee25ed3d790f87c875356d84452a3bbb08

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage, recorded browser observations, and no remaining actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this maintainer-authored PR. Supplied Chromium observations exercise the changed titler and navigation path; failed screenshot retrieval is a reviewer limitation, not a contributor blocker.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this maintainer-authored PR. Supplied Chromium observations exercise the changed titler and navigation path; failed screenshot retrieval is a reviewer limitation, not a contributor blocker.
Evidence reviewed 6 items Current main still lacks URL decoration: Current main decorates raw agent session keys but skips existing link tokens; its separate URL handler provides navigation without supplying the session hover identity.
Latest release retains the earlier behavior: The supplied latest release, v2026.9.2, contains the same key-only decoration and separate URL navigation implementation.
Prior findings resolved: The URL parser rejects document-relative references before URL resolution. Session decoration runs before file classification, which now follows CJK cleanup. Added regression cases cover workspace paths, adjacent CJK prose, preserved query/fragment, and title refresh.
Findings None None.
Security None None.

How this fits together

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

Before merge

None.

Agent review details

Security

None.

PR surface

Source -1, Tests +263, Docs +8. Total +270 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 9 235 236 -1
Tests 3 264 1 +263
Docs 1 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 507 237 +270

Review metrics

None.

Technical review

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

Labels

Label justifications:

  • P2: This repairs a bounded Control UI session-link presentation and navigation inconsistency.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this maintainer-authored PR. Supplied Chromium observations exercise the changed titler and navigation path; failed screenshot retrieval is a reviewer limitation, not a contributor blocker.

Evidence

What I checked:

  • Current main still lacks URL decoration: Current main decorates raw agent session keys but skips existing link tokens; its separate URL handler provides navigation without supplying the session hover identity. (ui/src/components/markdown-session-links.ts:41, c131ec041e15)
  • Latest release retains the earlier behavior: The supplied latest release, v2026.9.2, contains the same key-only decoration and separate URL navigation implementation. (ui/src/components/markdown-session-links.ts:41, 3928bad9badf)
  • Prior findings resolved: The URL parser rejects document-relative references before URL resolution. Session decoration runs before file classification, which now follows CJK cleanup. Added regression cases cover workspace paths, adjacent CJK prose, preserved query/fragment, and title refresh. (ui/src/components/markdown-session-links.ts:38, ac27c8ee25ed)
  • Shared resolution and safe navigation boundary: The titler uses the shared session-path parser and local-reference resolver, retains route query/fragment, and leaves unknown or ambiguous references without a hover identity. Both transcript and sidebar handlers use the consolidated navigation helper. These are OpenClaw-owned contracts; no Codex dependency signal applies. (ui/src/components/session-link-titling.ts:120, ac27c8ee25ed)
  • Captured browser evidence and review continuity: The supplied body at context sourceRevision 94404fa914d621823c226748043880a3d7cce38fdb890f822969fd83d0e66912 reports Chromium hover-card display, in-app navigation retaining a document marker, and public-origin code navigation with the hovercard chunk unloaded. Before/after attachment retrieval failed during this review, so their pixels were not independently inspected. This reviewer limitation does not establish missing contributor proof or a required follow-up. Tests and checks were not executed during this read-only review. (ac27c8ee25ed)
  • Main-history routing candidates: Main history records Peter Steinberger's session-link, hovercard, and route work, plus Vincent Koc's shared markdown-boundary work. Historical blob retrieval prevented exact source-line introduction verification, so these remain routing candidates without introduction claims. (ui/src/components/markdown-session-links.ts, c131ec041e15)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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 (6 earlier review cycles)
  • reviewed 2026-09-05T21:02:26.296Z sha 4a66917 :: blocked before merge. :: [P2] [P2] Preserve relative workspace-file links on chat pages
  • reviewed 2026-09-05T21:12:01.589Z sha 9f28e8c :: blocked before merge. :: [P2] [P2] Preserve relative workspace-file links on chat pages
  • reviewed 2026-09-05T21:43:21.584Z sha 9f28e8c :: blocked before merge. :: [P2] Preserve relative workspace-file links on chat pages | [P2] Capture session URLs after trailing-text cleanup
  • reviewed 2026-09-05T21:57:18.429Z sha f3dbcc2 :: blocked before merge. :: [P2] Capture session URLs after trailing-text cleanup
  • reviewed 2026-09-05T22:06:42.585Z sha f3dbcc2 :: blocked before merge. :: [P2] Capture session URLs after trailing-text cleanup
  • reviewed 2026-09-05T22:48:23.583Z sha ac27c8e :: blocked before merge. :: none

@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

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 clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 5, 2026
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit 07843c2 into main Sep 5, 2026
233 of 235 checks passed
@steipete
steipete deleted the codex/team-session-link-hovercard branch September 5, 2026 23:38
@steipete

steipete commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 5, 2026
* 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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
* 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.
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 docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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