Repository navigation
fix(control-ui): recover bundled startup without losing sign-in - #138964
Conversation
Prepare the selected UI root against the running Gateway build before serving it. Preserve pending same-origin dashboard bootstrap through document recovery and fence stale connection callbacks, without changing native build admission or remote manual refresh.
|
🦞👀 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 real behavior proof before merge. Reviewed September 5, 2026, 8:57 AM ET / 12:57 UTC. ClawSweeper reviewWhat this changesRepairs stale bundled dashboard assets during startup, preserves destination-bound browser pairing across recovery reloads, and improves Doctor diagnostics. Merge readiness⛔ Blocked before merge - 5 items remain Current main still needs this repair. The earlier code finding is resolved, and the captured package-upgrade evidence addresses that follow-up; the remaining authority-proof gap prevents a merge-ready verdict. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway prepares and serves OpenClaw’s browser dashboard. Dashboard and onboarding links supply a one-time pairing credential, which browser startup exchanges for a device credential before opening authenticated connections. flowchart TD
A[Gateway startup] --> B[Inspect selected dashboard bundle]
B --> C[Ready or source rebuild]
B --> D[Package repair guidance]
C --> E[Browser dashboard]
F[Pairing link and Gateway destination] --> E
E --> G[Recovery reload and destination confirmation]
G --> H[Authenticated Gateway connection]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +51, Tests +833, Docs +3. Total +887 across 28 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep recovery in the existing asset-health and startup-confirmation owners; the shared reload owner’s modest growth is justified by preserving destination and connection authority across navigation. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main accepts complete stale assets during preparation, while handshake admission rejects their build identity and ordinary reload loses the cleaned bootstrap. This review did not execute that scenario. Is this the best way to solve the issue? Yes at the owner boundary: shared asset inspection and existing startup confirmation avoid competing repair or authentication paths. Relaxing admission or persisting bootstrap credentials would weaken the established contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 177a1e3b054e. LabelsLabel justifications:
EvidenceWhat 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 (3 earlier review cycles)
|
|
The captured-Gateway finding is fixed in the handoff owner, and dashboard/onboarding issuers now bind the same resolved destination. The final patch also fixes a diagnostic gap found by the requested real package-upgrade proof: offline Doctor now detects a complete but stale UI bundle and gives the appropriate source-build or package-reinstall guidance. The final tree is committed at @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
The 12:57 ClawSweeper review has no remaining code or security findings. Its unfinished automatic cross-tab proof is now complete on The stopped/replaced portion of the rank-up request is explicitly scoped: those individual races were not reproduced with live browser transport. The existing regressions execute the real application store and reload scheduler with a simulated client, a deferred HTTP probe, and captured navigation. They cover stop, reconnect, credential replacement, and retarget while the probe is outstanding; each rejects the retired recovery without navigation or a reload-guard write. These cases failed on the original code. We are skipping an additional live replay of each timing variant: the available browser control surface does not expose the pending probe or application-owner handles, so reliably staging those transitions before the bounded probe settles would require another controlled transport or page-instrumentation fixture. This is a disclosed proof limit, not a claim of live race coverage. No production-only test hook or additional simulated fixture is being added; the final Chrome run supplies the real navigation and credential-delivery evidence. The packaged compatibility risk is accepted with its demonstrated repair contract. The candidate tarball passed a fresh Linux npm installation and the published The Doctor data-model flag is a false positive. |
…claw#138964) * fix(control-ui): recover bundled startup without losing sign-in Prepare the selected UI root against the running Gateway build before serving it. Preserve pending same-origin dashboard bootstrap through document recovery and fence stale connection callbacks, without changing native build admission or remote manual refresh. * fix(control-ui): bind pairing handoffs to their Gateway * style(control-ui): apply pinned formatter to document renderer * fix(doctor): report stale bundled Control UI assets
…claw#138964) * fix(control-ui): recover bundled startup without losing sign-in Prepare the selected UI root against the running Gateway build before serving it. Preserve pending same-origin dashboard bootstrap through document recovery and fence stale connection callbacks, without changing native build admission or remote manual refresh. * fix(control-ui): bind pairing handoffs to their Gateway * style(control-ui): apply pinned formatter to document renderer * fix(doctor): report stale bundled Control UI assets (cherry picked from commit 91095dc)
What Problem This Solves
A source Gateway restart could serve an old Control UI that its own build admission rejected. Recovery then lost an unfinished browser pairing handoff, and another tab changing the saved Gateway could redirect that pending credential. Focused desktop and terminal documents also omitted the Gateway confirmation dialog. Complete but stale packaged assets exposed a related diagnostic gap: Gateway refused them while offline Doctor reported no UI problem.
What Changed
Startup checks completeness and build identity at the selected UI root, repairs source-owned output, and carries the prepared result forward. A damaged package cannot borrow assets from an unrelated checkout. Explicit custom roots, development UI, and strict build admission retain their contracts.
One browser reload owner preserves the pending one-shot handoff together with its captured Gateway destination and rechecks client/connection identity after asynchronous probes. Dashboard and onboarding issuers carry their already-resolved HTTP/WebSocket pair. Existing startup confirmation owns the destination choice: Cancel retains the saved Gateway; Confirm sends the bootstrap only to the named Gateway. One outer renderer makes this confirmation available across normal and focused documents.
Doctor opts into the same build-identity inspection for its loaded installation, prints source-build or package-reinstall guidance, and validates source rebuild output. Updater completeness-only checks remain unchanged because an old updater process can inspect a newer target. No configuration, dependency, database, or protocol surface is added.
Verification
07302f01eeab6653479a6558c141ca580e073b16passed 283 focused source tests, 31 focused UI tests, the full changed gate, canonical build, and package integrity. This is the tree committed by41693be8eebb033d38a0c50253a27e0ecee97f43.[email protected]CLI upgrade, serving all expected startup assets and preserving isolated configuration/workspace state. Deliberately mixing complete old UI into the new runtime produced terminal 503. Stopped-Gateway Doctor now prints reinstall guidance; reinstalling the identical candidate tarball restores 200. Healthy upgrades do not produce a false UI warning.Retry-After: 1before matching UI became ready.41693be8: a mounted old document retained an unconsumed handoff for Gateway A while offline; another tab saved Gateway B. A real build-mismatch rejection triggered automatic reload to the final runtime. The fresh document kept B selected and restored the confirmation naming A. Cancel kept B, with zero bootstrap-authentication events at A. A separate fresh Confirm authenticated at A with the bootstrap and receivedhello-ok; an ordinary reload then authenticated with the device credential, without another bootstrap authentication.41693be8, including the requiredopenclaw/ci-gate. The required translation verification passed; its separate advisory catalog audit reported existing fallback-baseline drift.The earlier provider teardown CI timeout did not reproduce in original-head or exact-merge cold/warm full shard replays; the original hosted retry passed. No timeout or assertion was weakened. The local checkout's older formatter changed an intermediate commit; the canonical pinned formatter restored the exact remote-verified bytes before publication.
Startup bundle budgets pass at eight JS requests / 345,577 bytes gzip and one CSS request / 43,989 bytes gzip. These are size measurements, not a claimed runtime speedup.
Before / After
Both captures are synthetic-only and show the same desktop-focus pairing flow.
Size And Follow-ups
Production +51 lines (357 added / 306 removed); tests/support +833; docs +3. The shared reload owner accounts for 48 production lines protecting captured connection identity and destination-bound credential delivery. Other production changes total +3; Doctor, the root renderer, and asset ownership code shrink. No generated files, lockfiles, or snapshots change.
ci-run-node-test-shard.mtstreats onlyCI=trueas enabled;CI=1differs from neighboring canonical boolean parsing. Recorded separately from the provider teardown timeout; no causal claim or workaround here.