Repository navigation
refactor: deslop gateway subdirectory and UI page leftovers - #168185
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. What this changesThis PR consolidates Gateway lifecycle bookkeeping and Control UI presentation while fixing a brief empty-chat welcome during initial connection. Example: Open Mission control with cached chat text “Synthetic mission briefing.” while connecting.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed cleanup remains distinct from main, with no introduced correctness or security defect found; every observed CI failure has matching independent main evidence. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway owners admit connections and agent turns, manage desktop, terminal, portal, and Talk lifetimes, and publish results to Control UI page controllers and renderers. flowchart LR
A[Browser clients] --> B[Gateway connection admission]
B --> C[Agent turn owner]
B --> D[Desktop terminal and portal owners]
B --> E[Talk session owners]
C --> F[Control UI page state]
D --> F
E --> F
F --> G[Rendered pages]
Technical reviewBest possible solution: Retain the consolidated owners and startup repair, then use the native landing workflow's verified inherited-failure handling. Do we have a high-confidence way to reproduce the issue? The initial source-change path clears loading before the old disconnected-transition condition can restore it; the added owner regression and inspected before/after screenshots corroborate the startup failure. Is this the best way to solve the issue? The cleanup removes superseded projections and duplicated bookkeeping while retaining existing policy owners, and the startup repair corrects loading state at its producer. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7b125134f386. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -539, Tests +7, Other -1. Total -533 across 68 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 10, 2026, 9:42 AM ET / 13:42 UTC (Revision 5). |
860b641 to
b973a37
Compare
b973a37 to
e9529e4
Compare
Exact-head CI attributionHead: All eight failing jobs reproduced independently on main CI 38048680925, commit
The model/placement owners are unchanged by this PR. For all six UI failures, the tested merge and independent main have identical relevant tests, layout owners and harnesses. The 50px geometry comes from main's Details reservation ( Newer main is not being described as still red for those UI cases. Upstream Review recheck found no submitted change-request reviews or inline findings; the current-head review reports no actionable findings. This does not replace the remaining campaign proof. Final 26-case sequential parityExact bundle
The original overloaded-Mac failures/partial attempts remain separate evidence, not relabeled passing. The first Testbox command was deliberately interrupted during case 17 after retaining complete cases 1–16; that partial case is not counted. The cache-heavy initial artifact download timed out; compact native-evidence retrieval succeeded. The campaign parity requirement is complete. The requested inherited-failure exception is limited to the eight individually attributed historical jobs and their aggregate, with no cancelled or active checks. The intended squash is pinned to |
…#168185) * refactor: deslop gateway subdirectory and UI page leftovers * chore: prune obsolete usage max-lines baseline * fix(ui): preserve pending history through first connection * style(ui): normalize new session imports after rebase
…29388 absorb: absorb step 22 Upstream openclaw#168185 folds the gateway agent turn's session state into one AgentSessionPersistResult object (`state`) that persistAgentSessionPhase reads and updates, instead of initial* params and update callbacks. Conflicts: - agent-session-persist.ts: upstream's state destructuring, keeping our consumedContinuationTraceparent seed from the incoming entry. - agent-turn-service.ts: upstream's single `session` object throughout; our continuation traceparent now rides it (Object.assign carries consumedContinuationTraceparent from the persist result) and is passed to run execution as sessionContinuationTraceparent. Checks: tsgo core, extensions, core-test and ext-test 0; SDK surface 0; config baseline and worker inventory regenerated. Checkpoint sweep (986 suites; all reds re-run with a clean /tmp): - identical on plain upstream 88e8716: memory-core reindex-backoff 2/6, model-runtime-choice 2/32, tts-stream 1/12, cli-json-stdout.models 2/8; tui-pty-local e2e and seven .live suites give no offline result. - gateway agent.test 405/405 here (its earlier 3 reds were stale schema-24/25 agent DBs left in /tmp by earlier runs). - ours, red before this step (already red at step 20/21; the per-step lists never ran them), fixed in follow-up commits: subagent-announce.continuation owner mismatch, archive.continuation e2e worker-read mock, duplicate validation-cache entry in vitest.database-worker-core-paths.mjs (ci-* plan tests). - ours, red before this step, still open: usage.sessions-usage-details, provider-catalog-live-runtime.config, user-turn-transcript.recorder. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Jhynq2GVpzuVQQieebEubg
What Problem This Solves
Gateway subdirectories and Control UI pages retain redundant state, forwarding layers, and repeated presentation code after earlier ownership refactors.
User Impact
The cleanup preserves session admission, connection authority, desktop/terminal lifecycle, Talk delivery, and page rendering. A CI-discovered startup race is also repaired: cached chat history remains pending through the first connecting snapshot instead of briefly showing an empty-chat welcome. No configuration, schema, protocol, dependency, or release changes.
Why This Change Was Made
Combines d35 and d47 in one coherent cleanup: one New Session composer owner, typed page presentation state, shared connection/session bookkeeping, and shared lifecycle operations. The combined change removes 542 net production lines (-213 UI, -329 Gateway), excluding tests/support/generated outputs. This uses the coordinator-approved 500–999-line exception; the coverage log below records the audited scope and retained boundaries.
Applied d35
3dd0cb6f5bc, then d47b67c9129ac5/45a17a87652, onto main9c9b2bbc177, then rebased ontodbe7b43beb0and1be932e5ba1to resolve named CI/conflict gates. Main's new Creation Composer, background, and cloud-placement behavior stay intact. No production cleanup hunks dropped. The old generated boot-manifest delta was discarded in favor of main and regenerated canonically; the subsequent rename-test conflict keeps main's complete test and drops our now-redundant selector hunk. The obsolete Usage max-lines baseline entry was pruned exactly.Evidence
Current signed candidate:
70465d6e94ba730c47b723ec87e2ecfef5b4503b. All 26 sequential timing comparisons now qualify (104/104 selected samples passed, maximum head median +2.89%). Exact-head hosted CI is complete; its eight historical inherited failures and aggregate are individually attributed below, with later upstream repairs distinguished from the tested-main snapshot. The second rebase's import-order formatting issue is corrected; all 64 changed existing formatter targets and the mandatory 3/3 suppression tests pass.1be932e5ba1: 36/36 pairs with zero differing pixels, no missing states, and 72/72 stable repeats. Both 11-scenario capture packets and all four cases in the main-owned mutation test pass. Source-map contents match the recorded source. Only the compile-time build identity was normalized, equally on both sides.72eafadc01aand09709291c98. No new suppression, budget, skip, or retry is introduced here.Hosted CI attribution and repair
Initial exact-head run
38024009280completed 69 jobs green, 21 scope-skipped, and these three failed jobs, with no cancelled CI jobs:checks-ui-e2e (5/9)/114131140258checks-ui-e2e (2/9)/1141311402815c7d73950d9, brought in through rebase. Pending rename modal misuse was corrected upstream; its subsequent cached-pane selector ambiguity was reproduced on main and repaired by selecting the visible pane, without weakening assertions.openclaw/ci-gate/114132556291Security High and Critical Quality passed. Exhaustive initial check inventory: 221 terminal checks (98 success, 118 skipped, 1 neutral, 3 failure, 1 old ancillary auto-response cancellation). That cancelled ancillary run
38023772394was superseded by successful same-head38023774081; it is not used as product proof. New exact-head CI will determine final readiness; no admin exception has been used.The current head's CI run 38049514549 is terminal: 64 successful jobs, 21 scope-skipped, eight actual failed jobs and their aggregate gate; no cancellations. Formatting and all types pass. Every remaining failure has separate main evidence:
1142058546238420f82cbbf: the prepared-model scoped-refresh case reproduces exactly (expected two worker calls, observed three); its catalog/auth owners are not lane edits.1142058546318420f82cbbf: placement evidence reproduces exactly (unknown/current/absentbecomes allunknown); the placement evidence owners are not lane edits.114205854022114205853977114205853990114205853947114205854082114205853976openclaw/ci-gate/114207178411The six E2E comparisons use independent main CI
38048680925atb0e5f302dd8. Their test, layout, and harness blobs match this PR's tested mergeee545ff7ff01(main parente7ec72eb23c). Upstream320b0884c23/dc0ef48154fadd the Details class and its 50px transcript margin, explaining the exact handoff/rail/native displacement. This lane changes no CSS or Details/roster owner. The matching independent main failures, not merely untouched test names, qualify the attribution. None of these defects is claimed fixed here.Newer main is not being described as still red for those UI cases. Upstream
7e256f7302d4removes the redundant Details spacing; the later main run 38056049112 on7b125134f386executes and passes all formerly failing UI cases: native, collaborator scroll, mobile geometry, instant-thread, session color, and position rail. Main also updates the model credential-reacquisition contract ina825abb1fae4and corrects the session-color fixture clock in27193f88bd67. Latest main exact-case Node results were not inferred from changed shard names; the historical matching failures above remain their proof. Fetched main for this refresh isf694a7e6821eaf58bff2494550cf71ec5fcf0a52.Final 26-case sequential parity
Exact bundle
70465d6e94ba730c47b723ec87e2ecfef5b4503bversus clean main1be932e5ba1b88248eba86022c592dbefd14726a; two sequential Blacksmith Testbox leases, at most one live. Cases 1–16:tbx_01m4jzkvgg2wvscpv9txjvcznj, run 38055415364. Cases 17–26:tbx_01m4k2rnaepf102px26tzsw7j9, run 38058973050. Every individual comparison ran base/head/head/base on the same machine. All 104 selected samples pass (one selected case each); all 26 head wrapper-wall medians are within the baseline +5% budget. Native reports, exact selection, source trees, worker input provenance and cleanup signals were checked. No test timeout, retry, skip or assertion was changed. Whole-wrapper wall time is the primary metric; test-only durations remain diagnostic.The original overloaded-Mac failures/partial attempts remain separate evidence, not relabeled passing. The first Testbox command was deliberately interrupted during case 17 after retaining complete cases 1–16; that partial case is not counted. The cache-heavy initial artifact download timed out; compact native-evidence retrieval succeeded.
Coverage log for the 500–999-line exception
The source lanes audited Gateway subdirectories (201 production files / 42,646 lines after support exclusion) and UI pages m–z (271 production files / 60,320 lines), largest-first with caller/owner checks. These are audit denominators, not claims that every file changed or every test passed. The retained combined diff changes 68 files, including the bounded CI repair.
No feature removal, compatibility shim, new lint suppression, relaxed assertion/budget, or changelog edit. Tests changed only where removed internal projections required their fixtures to use the real remaining owner.