Skip to content

improve(ui): open short session links without extra lookup - #128778

Merged
steipete merged 2 commits into
mainfrom
steipete/chat-route-resolution
Aug 24, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/chat-route-resolution

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #114693

What Problem This Solves

Fixes an issue where opening a cold short session URL required an authoritative sessions.resolve request and then an additional sessions.describe request before the chat route could mount.

In the live team-session baseline, resolution took about 1.25s and the two description requests took up to another 1.07s before chat.startup could begin. The Gateway had already read the presentation facts needed by the route, but discarded them from the resolve response.

Why This Change Was Made

sessions.resolve now carries the bounded optional display name and preferred board face it already produced. The Control UI consumes those facts directly, preserving authoritative identity, visibility, slug collision handling, dashboard routing, candidate ordering, and the ten-candidate ambiguity limit while removing the route-owned describe waterfall.

The obsolete old-Gateway list fallback is deleted. The Control UI and Gateway ship as one version, so a missing current resolver fails visibly rather than silently starting up to five pages of compatibility searches. The stale compatibility promise is removed from the URL documentation.

The additive protocol fields require no protocol version bump. Generated Swift protocol models and the Control UI boot manifest are refreshed from their canonical generators.

User Impact

Short session links reach chat with one authoritative resolution request instead of two sequential Gateway stages. Ambiguous links still show the same chooser, stale display-name hints still canonicalize correctly, and sidebar-carried full keys still bypass lookup entirely.

Production LOC: +54/-140 (net -86). Tests: +211/-90. Generated protocol: +26. Documentation: -4.

Evidence

  • Cold short-route regression: exactly one sessions.resolve; zero route-owned sessions.describe and sessions.list.
  • 65 protocol tests, 51 Gateway tests, 47 Control UI route tests, and 11 Chromium E2E scenarios.
  • Full node scripts/check-changed.mjs, including native app/protocol checks.
  • pnpm protocol-registry:check and pnpm protocol:check:swift.
  • pnpm build and generated Control UI boot-manifest verification.
  • git diff --check.
  • Fresh structured autoreview: no accepted/actionable findings.
  • AI-assisted implementation; maintainer reviewed the protocol ownership, route flow, generated artifacts, tests, and documentation directly.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts size: L maintainer Maintainer-authored PR labels Aug 24, 2026
@steipete
steipete marked this pull request as ready for review August 24, 2026 15:24
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 12:04 PM ET / 16:04 UTC.

ClawSweeper review

What this changes

The PR returns display name and preferred surface from Gateway short-session resolution so Control UI short links can mount without route-owned describe or list lookups.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. Current main still performs the resolve-then-describe waterfall; this PR moves already-owned bounded presentation facts through the resolver and removes it. The prior documentation finding is addressed, with normal exact-head CI still pending.

Priority: P2
Reviewed head: 3522cd321e432bdd62f0017b80e1cdbd211dcb3e

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative owner-boundary optimization with layered protocol, route, and browser coverage; exact-head CI remains the normal merge gate.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: Not applicable to this maintainer-authored PR; attached sanitized before/after screenshots are supportive, while source browser coverage independently exercises the request boundary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to this maintainer-authored PR; attached sanitized before/after screenshots are supportive, while source browser coverage independently exercises the request boundary.
Evidence reviewed 6 items Current-main behavior remains inefficient: Current main resolves the short identifier, falls back for older Gateways, and issues sessions.describe for each candidate; the requested optimization is therefore not already implemented.
Producer-owned route facts: The PR retains visibility, deleted-agent, slug, and ambiguity filtering at the Gateway owner, then returns only key, agent, display name, and board face.
Typed bounded protocol contract: The new public result schema bounds candidates to ten and permits only the route facts consumed by the UI.
Findings None None.
Security None None.

Live Verification

Command: pnpm test ui/src/e2e/dashboard-fullscreen.e2e.test.ts

Result: FAIL (partial) — step 2 expect_output renders a live interactive board in the shell-free dashboard document: expected terminal output was not visible within 30 seconds: "renders a live interactive board in the shell-free dashboard document"

pnpm test ui/src/e2e/dashboard-fullscreen.e2e.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128778-E95pLp/target$ pnpm test ui/src/e2e/dashboard-fullscreen.e2e.test.ts
$ node --import tsx scripts/test-projects.mts ui/src/e2e/dashboard-fullscreen.e2e.test.ts
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
pnpm test ui/src/e2e/dashboard-fullscreen.e2e.test.ts
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-128778-E95pLp/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128778-E95pLp/target





























Assertions:

  • FAIL expect_output: renders a live interactive board in the shell-free dashboard document

How this fits together

A Control UI short session URL is resolved by the Gateway against visible session-store entries before the UI canonicalizes the chat or dashboard route. The returned route facts determine the initial surface; the board or chat then performs its own state loading.

flowchart LR
  A[Short session URL] --> B[Control UI route loader]
  B --> C[Gateway session resolver]
  C --> D[Visible session store]
  D --> E[Bounded route facts]
  E --> F[Canonical chat or dashboard route]
  F --> G[Chat or board startup]
Loading

Before merge

  • Resolve merge risk (P1) - A current Control UI paired with an older or custom Gateway now fails visibly on short links instead of searching up to five list pages; this is intentional one-version UI/Gateway policy and is documented, but it is an upgrade boundary for unsupported skewed deployments.
  • Complete next step (P2) - The protected maintainer PR has no discrete repair finding; continue normal exact-head CI and maintainer review.
Agent review details

Security

None.

PR surface

Source -85, Tests +197, Docs -7, Other +26. Total +131 across 22 files.

View PR surface stats
Area Files Added Removed Net
Source 11 56 141 -85
Tests 7 287 90 +197
Docs 2 5 12 -7
Config 0 0 0 0
Generated 0 0 0 0
Other 2 28 2 +26
Total 22 376 245 +131

Review metrics

Metric Value Why it matters
Production versus test delta production +56/-142; tests +287/-90; generated +28/-1; docs +5/-12 The route optimization is net-negative production code; most added lines are regression and browser-flow coverage.

Stored data model

Persistent data-model change detected: migration/backfill/repair: docs/concepts/session-attachment.md, persistent cache schema: ui/src/pages/chat/route-loader-short-list-fallback.ts, serialized state: packages/gateway-protocol/src/schema/sessions-resolve.test.ts, serialized state: packages/gateway-protocol/src/schema/sessions-resolve.ts, serialized state: src/gateway/server-methods/sessions-read.test.ts, serialized state: src/gateway/server-methods/sessions-read.ts, and 4 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the documented Gateway-version boundary (recommended)
    Merge with the current docs and visible failure behavior, because Control UI policy explicitly ships one version with its Gateway and rejects old-version fallback code.

Technical review

Best possible solution:

Keep Gateway resolution as the single owner of bounded route facts, remove the consumer waterfall, and retain the documented full-key or upgrade recovery path for unsupported custom Gateway skew.

Do we have a high-confidence way to reproduce the issue?

Yes, with high confidence from the current-head browser and route-test scenarios: a cold short link makes one resolve and no route-owned describe or list request. Tests were not executed because this is a read-only review.

Is this the best way to solve the issue?

Yes. The Gateway already reads these presentation facts while resolving visible candidates, so carrying the bounded facts forward removes the waterfall without adding a client cache or parallel lookup path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4d8bfab33ec8.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: Removing the old-Gateway list fallback intentionally changes behavior for unsupported UI/Gateway version skew.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Not applicable to this maintainer-authored PR; attached sanitized before/after screenshots are supportive, while source browser coverage independently exercises the request boundary.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable to this maintainer-authored PR; attached sanitized before/after screenshots are supportive, while source browser coverage independently exercises the request boundary.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded Control UI startup-latency improvement without an emergency security, data-loss, or availability impact.
  • merge-risk: 🚨 compatibility: Removing the old-Gateway list fallback intentionally changes behavior for unsupported UI/Gateway version skew.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable to this maintainer-authored PR; attached sanitized before/after screenshots are supportive, while source browser coverage independently exercises the request boundary.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Not applicable to this maintainer-authored PR; attached sanitized before/after screenshots are supportive, while source browser coverage independently exercises the request boundary.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the current-main short-route resolver work and the PR’s two commits, including the documentation correction after the prior review. (role: current feature owner; confidence: high; commits: ad760c9994cf, a1128c495976, 3522cd321e43; files: ui/src/pages/chat/route-loader-short-resolve.ts, src/gateway/sessions-resolve.ts, docs/concepts/session-attachment.md)

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 (1 earlier review cycle)
  • reviewed 2026-08-24T15:31:49.474Z sha a1128c4 :: found issues before merge. :: [P2] Remove the remaining old-Gateway fallback promise

@steipete

Copy link
Copy Markdown
Contributor Author

Current-head route proof:

  • The initial image shows the shell-free focus route held at authoritative resolution.
  • The resolved image shows the canonical dashboard route with an instrumented request summary: one sessions.resolve, zero route-owned sessions.describe, and zero list-fallback requests.
  • The board surface subsequently issues its own single sessions.describe to load board state; that request is deliberately outside route resolution and remains covered separately.

The deterministic Chromium harness asserted the request counts and canonical URL before capturing these sanitized images.

Before: short route waiting on authoritative resolution

After: canonical dashboard route with single-resolver request proof

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 24, 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:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed 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 Aug 24, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready verification for exact head 3522cd321e432bdd62f0017b80e1cdbd211dcb3e:

  • Exact-head CI green: https://github.com/openclaw/openclaw/actions/runs/32748028032
  • ClawSweeper’s actionable documentation finding is addressed in docs/concepts/session-attachment.md; both public pages now state the current-Gateway requirement.
  • Sanitized current-head browser proof is attached above: one sessions.resolve, zero route-owned sessions.describe, zero list fallback; the board owner’s subsequent describe remains separate.
  • 65 protocol tests, 51 Gateway tests, 47 UI tests, 11 Chromium E2E scenarios, full changed gate including 488 native/tooling tests, protocol registry/Swift checks, full build, diff check, and autoreview all pass.
  • Production +54/-140 (net -86); tests +211/-90; generated Swift +26; docs -8 total across both public pages.

Rank-up moves:

  • Public fallback docs: applied.
  • Inspectable visual proof: attached.
  • Current merge result/CI: mergeable and green.

No protocol version bump is needed: the resolver fields are additive, bounded, and produced by the existing authoritative read.

@steipete
steipete merged commit 053b89d into main Aug 24, 2026
248 checks passed
@steipete
steipete deleted the steipete/chat-route-resolution branch August 24, 2026 16:33
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 25, 2026
…128778)

* perf(ui): remove short session route waterfall

* docs: clarify short link gateway requirement
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 gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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.

[Feature]: Stage Control UI chat startup and transcript fast-path improvements

1 participant