Repository navigation
feat(ui): unify focused presentation routes - #126143
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
72c76e0 to
a4b4801
Compare
|
Codex review: needs changes before merge. Reviewed August 19, 2026, 1:58 AM ET / 05:58 UTC. ClawSweeper reviewWhat this changesThis PR replaces standalone dashboard, terminal, and desktop URLs with shared Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open: the prior P1 remains at the current head. The new focus handler runs before plugin dispatch, so existing plugin routes beneath Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Gateway routes incoming HTTP requests to core endpoints, registered plugin handlers, or the Control UI. Focus URLs select shell-free dashboard, terminal, or desktop presentations consumed by browser and native clients. flowchart LR
A[Browser and native clients] --> B[Focus URL]
B --> C[Gateway route stages]
C --> D{Plugin claims route?}
D -->|Yes| E[Plugin HTTP response]
D -->|No| F[Control UI focus document]
F --> G[Dashboard terminal or desktop]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +412, Tests +393, Docs +51, Other +65. Total +921 across 56 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Let registered plugin handlers claim Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: a registered plugin handler for Is this the best way to solve the issue? No: reserving the namespace before plugin dispatch is not the best solution because the existing Gateway order gives registered plugin routes precedence over Control UI fallback. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 97e3136b9e6f. LabelsLabel justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
7d80377 to
a3e1629
Compare
a3e1629 to
2184916
Compare
This comment has been minimized.
This comment has been minimized.
2184916 to
f14b888
Compare
fb6a444 to
7d8f945
Compare
d1d8202 to
38a21c8
Compare
/focus/<target> replaces unshipped standalone query links across dashboard, terminal, desktop, and native apps. Gateway-served index assets are anchored so nested documents resolve their bundles from the Control UI base path.
Fixes check:test-types TS18048/TS2322 by dropping unmatched optional captures before comparing emitted asset URLs.
Fixes the stale current-main docs test after #126132 centralized GCP and Hetzner setup in docker-vm-runtime.
The 500ms locator text read can time out while the menu label is still rendering, causing expect.poll to reject instead of using its owning 10s retry window. Treat only Playwright TimeoutError as a missing value so the outer poll retries while page-closure and arbitrary failures still surface.
The TLS probe test inferred its coroutine from mutable scope children, racing unrelated child startup and teardown in CI. Capture the exact Job from inside the probe coroutine and join that owner before asserting the stale-attempt guard.
Keep approval handling ahead of plugin dispatch, but treat focus documents as an unclaimed Control UI fallback after plugin authentication and routing. Exact and prefix plugin routes therefore retain ownership, while unclaimed reads serve the focus document and other methods return 404.
Preserve stable v2026.7.1 terminal query compatibility by rewriting the root/base ?view=terminal URL once to the canonical /focus/terminal path with history.replace. Keep URL parsing path-only, and leave the removed desktop and dashboard query forms as a hard cut.
Cached filtered configs caused duplicate ownership, and the test lacked a canonical full-suite owner.
The recovery test should assert owner state and reload identity, while dedicated tests own transient alert visibility.
38a21c8 to
d576371
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Land-ready verification completed for All earlier ClawSweeper rank-up moves are applied: registered exact/prefix plugin routes retain Focused proof includes 36 URL-contract tests, 262 Gateway tests, 41 bootstrap tests, 38 browser E2E tests, 20 iOS tests plus app build, Android Play/third-party tests and Play/Wear assemblies, 208 QA files / 2,804 tests with 2 skipped, five zero-stagger repetitions of the exact failed QA profile, complete changed-file gates, repository/private-QA builds, docs checks, and a clean final branch-wide autoreview. Real browser, iOS, and Android evidence remains in the PR body. Exact-head CI is green: https://github.com/openclaw/openclaw/actions/runs/32241671537 The current-main Gateway protocol lint break found during this landing was repaired independently in #126275 and is no longer part of this branch. The fresh ClawSweeper re-review is queued; per policy, the queued publisher refresh does not block landing after all actionable findings are addressed and exact-head CI is green. |
|
Merged via squash.
|
* feat(ui): unify focused presentation routes /focus/<target> replaces unshipped standalone query links across dashboard, terminal, desktop, and native apps. Gateway-served index assets are anchored so nested documents resolve their bundles from the Control UI base path. * test(gateway): narrow emitted asset URLs Fixes check:test-types TS18048/TS2322 by dropping unmatched optional captures before comparing emitted asset URLs. * test(docs): follow centralized cloud secret guidance Fixes the stale current-main docs test after openclaw#126132 centralized GCP and Hetzner setup in docker-vm-runtime. * test(ui): retry missing locator reads The 500ms locator text read can time out while the menu label is still rendering, causing expect.poll to reject instead of using its owning 10s retry window. Treat only Playwright TimeoutError as a missing value so the outer poll retries while page-closure and arbitrary failures still surface. * test(android): capture TLS probe coroutine The TLS probe test inferred its coroutine from mutable scope children, racing unrelated child startup and teardown in CI. Capture the exact Job from inside the probe coroutine and join that owner before asserting the stale-attempt guard. * fix(gateway): preserve plugin focus routes Keep approval handling ahead of plugin dispatch, but treat focus documents as an unclaimed Control UI fallback after plugin authentication and routing. Exact and prefix plugin routes therefore retain ownership, while unclaimed reads serve the focus document and other methods return 404. * fix(ui): migrate released terminal links Preserve stable v2026.7.1 terminal query compatibility by rewriting the root/base ?view=terminal URL once to the canonical /focus/terminal path with history.replace. Keep URL parsing path-only, and leave the removed desktop and dashboard query forms as a hard cut. * test(codex): assign run-attempt tools shard Cached filtered configs caused duplicate ownership, and the test lacked a canonical full-suite owner. * test(ui): keep cloud recovery proof state-owned The recovery test should assert owner state and reload identity, while dedicated tests own transient alert visibility. * test(qa): wait for outbound bus state * fix(qa): reserve gateway ports through staging * refactor(qa): keep socket creation in gateway owner
Related: #125806
AI-assisted: Yes. The implementation and validation were completed with AI coding tools, with repository autoreview run clean before publication.
What Problem This Solves
The landed fullscreen feature required raw exact-session query links and separate terminal and desktop URL modes. Canonical short session URLs therefore could not be mechanically focused, and native clients had to construct bespoke query forms for otherwise shared presentations.
Why This Change Was Made
This establishes one path-only
<base>/focus/<target>owner. Dashboard focus URLs reuse the canonical session resolver, including short references, canonical replacement, ambiguity, and missing-session outcomes; terminal and desktop use a closed path grammar. The iOS and Android clients now use those same paths.Dashboard and desktop query forms were unshipped and are removed without compatibility. Tag inspection showed that
/?view=terminaldid ship in stable releases, so it remains only as a one-shot application-boundary migration that immediately replaces browser history with/focus/terminal; runtime parsers and all new callers stay path-only. Existing exact or prefix plugin HTTP routes retain ownership of/focuspaths, with the Control UI focus document serving only as the unclaimed fallback.Real live proof also exposed a general nested-document bug: Vite's relative index assets resolved beneath the deep route and were served back as HTML. Gateway-served index HTML now anchors generated and public assets to the configured Control UI base path.
User Impact
Insert
/focusimmediately after the Control UI base path to open a supported surface without application chrome:Native Terminal and Desktop screens now use this contract. Released root/base-path
?view=terminallinks are rewritten once to/focus/terminal; desktop and dashboard query forms remain removed. Focus presentation remains separate from the browser Fullscreen API; opening a focus URL does not request browser fullscreen.Evidence
Focused routing, Gateway, UI, E2E, changed-surface, build, and docs validation ran as one fail-fast sequence:
Results:
/focusroutes winning, unclaimed focus serving HTML, unclaimed writes returning 404, and/?view=terminalrewriting to/focus/terminalwith no shell or fullscreen request.packages/gateway-protocol/src/index.ts. The equivalent public-surface repair passed the exact lint stripe and 64 files / 520 Gateway protocol tests, landed independently in fix(ci): restore protocol lint and Codex shard ownership #126275, and was dropped from this branch during the final rebase.node scripts/check-changed.mjs: passed for the complete core, core-tests, UI, apps, and docs scope; the final QA and Gateway protocol changes each passed their full changed-file gates.pnpm buildand finalpnpm ui:build: passed, including 906 finalized Control UI sidecars.iOS focused tests and build:
Result: 20 tests in 2 suites passed;
** TEST SUCCEEDED **and** BUILD SUCCEEDED **.Android Play and third-party variants ran on SSH run
run_3788b7102f9c:Result: Play unit tests passed (
BUILD SUCCESSFUL, 83 tasks), third-party unit tests passed (BUILD SUCCESSFUL, 54 tasks), and Play/Wear debug assemblies passed (BUILD SUCCESSFUL, 110 tasks).Real behavior proof
50285served dashboard, terminal, and desktop focus documents withGET 200,HEAD 200, and unclaimedPOST 404. The dashboard resolved a canonical short URL and showed the livefocus-dashboard-widget-okwidget; the terminal visibly executedfocus-terminal-ok; desktop showed the real unavailable outcome. All three were shell-free, anddocument.fullscreenElementremained null./focusroute returnedplugin-exact-focus-ok, a prefix descendant returnedplugin-prefix-focus-ok, and only unclaimed focus requests reached the Control UI fallback./?view=terminalin Chromium and observed immediate history replacement to/focus/terminal, removal of the query parameter, one focused terminal, zero application shells, and no browser fullscreen request.200 text/html, so Chromium rejected the module for its MIME type. Anchoring generated JS/CSS and public index assets to the Control UI base path fixed the owner boundary; HTTP tests now fetch every rewritten asset and verify its content type from focus and ordinary deep routes.1b786851c717c2b1e5b5993cf619e509437c9a584bfb40fb07abb59409cb6684for the final routing proof.GET /focus/terminalandGET /focus/desktop, both without a query string. Two focused UI tests passed. The focused terminal and desktop picker mounted visibly. XCUITest could synthesize typing into Ghostty Web's accessibility element, but Ghostty did not forward it asterminal.input, so the iOS marker is not claimed as visible; this is a synthetic-input limitation, not a route failure.run_44b12de7d4aecaptured actual WebView requests to/focus/terminaland/focus/desktop, withoutview=. The live shell banner/prompt and real desktop-source state rendered; sanitized screenshots and a 68.6-second video were visually inspected, and cleanup was verified.$autoreview --mode branch --base origin/main: clean after the feature, CI repairs, plugin-precedence fix, stable terminal migration, Codex shard repair, QA state-wait and Gateway port-ownership repairs, and current-main lint repair.Visual evidence
Before — the standalone dashboard used the exact-key query document introduced in #125806:
After — the same shell-free dashboard is reachable through its canonical short URL with
/focusinserted after the base path:Real Gateway terminal and desktop focus documents:
Actual native app WebViews using the same paths:
Real Gateway dashboard → terminal → desktop flow:
focus-live-proof-final.webm
LOC
From
git diff --numstat origin/main...HEAD:The production growth is the shared URL contract, one focus-route owner, one narrow released-terminal migration boundary, server-side correctness for deep-document assets and plugin fallback ordering, and a held QA Gateway port-reservation owner that removes a cross-process startup race. The change simultaneously deletes the three per-surface dashboard, terminal, and desktop mode modules and replaces them with one canonical path grammar.