Repository navigation
fix(ci): stabilize Control UI history and reconnect checks - #120732
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 8, 2026, 8:39 PM ET / August 9, 2026, 00:39 UTC. ClawSweeper reviewWhat this changesThe PR makes Control UI browser tests establish scroll intent and isolate replacement gateway sockets before asserting history reload and reconnect behavior. Merge readinessNo patch defect found. The branch repairs two test-harness ordering races, and current main does not yet contain those changes; the protected maintainer PR should remain open for normal landing review. Priority: P3 Review scores
Verification
How this fits togetherControl UI end-to-end tests drive the browser through a mock Gateway to verify session-history pagination and sidebar refreshes across reconnects. They protect client connection-lifecycle behavior without changing production code. flowchart LR
Browser[Browser scenario] --> UI[Control UI]
UI --> Gateway[Mock Gateway]
Gateway --> State[Connection and scroll state]
State --> Requests[Session requests]
Requests --> Assertions[E2E assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +29. Total +29 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the tests tied to observed scroll and connection-generation state, then confirm the latest review instructions during normal maintainer landing. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the prior history test omits the owner’s scroll-intent precondition, and the prior reconnect test can let an old socket consume a global one-shot deferral. Is this the best way to solve the issue? Yes. The patch repairs sequencing at the E2E harness boundary and matches an existing offline-gate sibling pattern instead of adding production retries or timeouts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 56cdad505594. LabelsLabel changes:
Label 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
|
|
Merged via squash.
|
What Problem This Solves
Resolves two race-prone Control UI end-to-end checks that failed the main CI run at https://github.com/openclaw/openclaw/actions/runs/31279593984 even though the exercised product behavior was correct. The failures affected external-session history autoload and same-client session-list reconnect coverage.
Why This Change Was Made
The history scenario jumped directly to the top before recording a nonzero transcript position, so the UI did not always observe upward scroll intent. It now establishes and verifies the bottom position before triggering the older-page read, matching the adjacent native-history scenario.
The reconnect scenarios armed global one-shot Gateway deferrals while the old socket could still issue requests, allowing the wrong socket generation to consume the deferral and later drop the resolved response. They now use the existing offline gate: retire the old socket, wait for visible reconnect state and the replacement socket, arm deferrals while no socket can handshake, then resume online and verify the refreshed generation.
This is the test-owner fix: it changes no production behavior, retries, or timeouts. Production LOC: +0/-0. Tests: +35/-6.
Provenance: the external-history autoload scenario was introduced by #105209 on 2026-07-12 (code/PR author and merger @steipete). The reconnect coverage was split into its current file by #114889 and expanded by #117103; #120501 most recently changed the same-client deferral ordering, but the one-shot deferral still was not generation-bound (all code/PR author and merger @steipete).
User Impact
No user-visible behavior changes. Maintainers get deterministic Control UI CI coverage for the existing history and reconnect contracts.
Evidence
pnpm format:checkon both files: passed.oxlinton both files: 0 warnings, 0 errors.pnpm check:changed: passed (core test types, changed-file lint, guards, dead-code, i18n verification).