Repository navigation
refactor: deslop qa-lab and UI component leftovers - #168293
Conversation
Combine behavior-preserving QA transport and evidence helpers with shared UI rendering, menu scaffolding, and pet timers. Preserve current main branding and board readiness changes. Shrink owned assertion allowances without changing tests or budgets.
|
🦞👀 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 changes before merge. What this changesThis PR consolidates QA transport, credential, evidence, UI rendering, menu, and timer code and repairs a copied timestamp in an existing UI test fixture. Example: The session-color fixture replaces “Design review” with “Design review refreshed” and clears its purple color.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: it delivers useful maintainer-directed cleanup, and no actionable introduced defect was found; the final-head CI gate remains unresolved. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherQA Lab turns scenario selections and leased credentials into Gateway runs and evidence; Control UI components turn Gateway state into controls, menus, badges, panels, and decorative pet behavior. flowchart LR
A[QA scenario selection] --> B[QA Lab runners and transports]
C[Credential broker] --> B
B --> D[Gateway runtime]
B --> E[QA evidence and reports]
D --> F[Control UI components]
F --> G[Browser interactions]
Technical reviewBest possible solution: Retain the consolidation and fixture repair once the failed final-head CI gate is resolved. Do we have a high-confidence way to reproduce the issue? This is principally a refactor; source inspection confirms the copied-timestamp fixture failure path, and the PR records a controlled reproduction and passing browser replay. Is this the best way to solve the issue? The consolidation uses existing owners, removes replaced implementations, and preserves reviewed validation, ordering, cleanup, and UI contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 645ee94deea2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfacePR surface statistics unavailable: the file list is incomplete. 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, 8:46 AM ET / 12:46 UTC (Revision 5). |
Keep the QA channel delivery, shared readiness, and mock WebSocket implementations from main. Their CI cases reproduce native timeouts on clean main, and retaining those paths keeps the remaining cleanup outside the failing fixtures. Remove the corresponding assertion allowance deltas; the final baseline only shrinks relative to main.
|
Merged as CI run 38052432668, attempt 2 completed with 66 passing jobs, 20 skipped jobs, and the three failures below plus the derived gate. Every cancelled job from attempt 1 was rerun. The final pre-merge check-run census had 157 rows: 93 success, 59 skipped, one neutral CodeQL result, four failures, and no pending or cancelled checks. No executed native CI job had zero steps. Dependency and security-sensitive review statuses are successful; the separate CI status projects the failed CI gate.
The earlier The repeated session-color UI failure was repaired at its fixture producer. The copied read timestamp made new stored facts appear older than an interleaved descriptor. A controlled probe using the real fixture and reconciliation owners demonstrated the failure and the one-field correction with identical assertions. The complete four-case browser flow passed on the exact tested merge plus the repair, and the repaired shard passed hosted CI on this head. No assertion, deadline, retry, skip, or production freshness rule changed. All three remaining leaf failures now have matching independent failure evidence and no retained changed runtime owner on their paths. The maintainer-authorized squash was pinned to The optional fresh-main Linux request hit its allocation cap and was stopped: Testbox |
* refactor: deslop qa-lab and UI component leftovers Combine behavior-preserving QA transport and evidence helpers with shared UI rendering, menu scaffolding, and pet timers. Preserve current main branding and board readiness changes. Shrink owned assertion allowances without changing tests or budgets. * refactor: retain main QA paths covered by unresolved startup timeouts Keep the QA channel delivery, shared readiness, and mock WebSocket implementations from main. Their CI cases reproduce native timeouts on clean main, and retaining those paths keeps the remaining cleanup outside the failing fixtures. Remove the corresponding assertion allowance deltas; the final baseline only shrinks relative to main. * refactor: preserve UI Lit dependency budget * refactor: retain main QA Channel implementations * test(ui): refresh session color fixture sampling clock
What Problem This Solves
QA Lab and Control UI components repeat transport cleanup, evidence validation, rendering, menu triggers, and timer bookkeeping across closely related paths.
User Impact
No intended user-visible change. Existing validation, error precedence, credential lease cleanup, media handling, keyboard/menu behavior, and pet lifecycle remain intact. No configuration, schema, protocol, dependency, timeout, retry, or skip changes. One existing UI E2E fixture clears a copied read timestamp; all assertions remain intact.
Why This Change Was Made
Combine the remaining QA and UI simplifications behind their existing owners. Remove 648 net production lines, excluding fixture-named modules (721 including those runtime modules). The assertion-safety baseline only shrinks. This bundle uses the campaign's approved 500–999-line exception with the coverage log below.
Applied UI commit
2273e571a42281c3ea66abf52314e62d92d392c6, then QA commitd705b1d05408c3ee33c6f8fcc873403921646de1, onto mainbc8f693df3aee184c65626f7e9c9c58889c51a8b. No conflict-time drops. Main's branding changes in the sidebar and loading/presentation readiness in board widgets were preserved. Eight validation-driven scope removals are listed below.Evidence
Merged squash:
27193f88bd671c7b3dfbd9c93844c2c488cff05f, verified on fetchedorigin/main. Signed and reviewed head:15bd910d0f4c4393a5a36b5e80c8ab0e5d08a555. The initial full-bundle P2 review was scoped-clean. Fresh narrowed-bundle review raised one cleanup concern, rejected after checking the complete ownership-capture implementation: it either returns a receipt or throws, and the old preparation flag was set only after that same await. No actionable finding remains.Initial local proof on
6b49e43aa73d802c52c95d22448a8605d01f5a2d(before returning six files to main):The changed-check plan passed all 30 completed guard/type steps, including full production/test types and the assertion ratchet. Its lint stage stopped before Oxlint because the native Plugin SDK boundary declaration preparation exceeded its existing 300,000ms timeout. No timeout, artifact admission check, or receipt was bypassed. UI i18n verification completed before that failure. Initial exact-head hosted CI passed all lint jobs, including extension lint. Final-head hosted CI is complete; the inherited-failure qualification is recorded below. The direct Knip scans above replace only the aggregate's dead-export stage; all other changed-check stages ran normally in supported local-child mode.
After the first six scope drops (
398d033361d140336d18cf61611a250d1eeb9316): 15 files / 124 tests passed (including 3/3 suppression checks), 617.63 seconds; extension types passed; assertion ratchet passed; runtime cycles zero and Madge cycles zero. The six dropped files are byte-identical to pinned main. The SDK renderer input graph is unchanged, so its API proof remains valid. Thirty-one UI source blobs are unchanged; the three Lit-dependency repairs received fresh proof below.Final two-file scope-reduction proof: all eight selected tests passed (five QA Channel tests plus three suppression checks), 420.066s wall. Extension types passed (92.455s), runtime cycles were zero (228.941s), Madge cycles were zero (130.622s), and a fresh P2 review was scoped-clean. Both restored files exactly match main; no assertion-baseline change was needed.
Fresh Lit repair proof: 24 affected pixel cases and 48 repeat comparisons were identical (166.83s); 8 existing files / 102 UI tests passed (44.811s wall). UI production types, the unmodified native Lit ratchet from the tested main parent, the assertion ratchet, and 3/3 suppression tests passed. Runtime and Madge cycles remain zero. Fresh scoped P2 review was clean. The repair adds no baseline, dependency, test, timeout, or skip change.
The intermediate head
398d033361d140336d18cf61611a250d1eeb9316failed the newly introduced Lit import ratchet (62 > 59) in CI run 38043557127. This was owned by this PR. Removing static-html and ifDefined dependencies and deriving the glyph option type from its owner restores the unchanged import budget. That run cancelled 52 jobs; it is not accepted as final proof.The subsequent
c96dc6a841ff234581038fc341f4aa1f15bc5e57run 38047160317 passed the Lit check. Attempt 1 timed out in the session-color E2E label-refresh wait and cancelled 41 jobs; all were rerun. The same UI failure reproduced on clean tested main1cb9b5aeac88197f7f938bffd1557bf761fbdd92(three other cases passed), while the exact-merge hosted rerun passed. No source repair is claimed. Attempt 2 completed 63 passing / 20 skipped jobs with seven actual failures and the derived gate, and no cancellations. Those failures are individually retained in the landing evidence; the recovery recurrence prompted the final two scope drops.The next head
0c134eec0937352c28fd154b9b7223e65f46d486repeated the session-color label timeout in CI run 38049878843, cancelling 40 jobs. A controlled probe then established the fixture defect using the actual fixture and reconciliation owners: a copied sample timestamp of 100 loses to an intervening descriptor at 110, even when the replacement roster is read at 120. Clearing that copiedsnapshotAtlets the fixture stamp the new read at 120; the identical fresh-label and cleared-color assertions pass. The repair is confined to this fixture producer and preserves all production freshness rules. The full four-case bundled E2E passed on exact tested merge7389eff953b4e1c9703640edc003d6c77ed9434dplus the same two-line fix, with--maxWorkers=1: 124.921s wall including cold build; 12.885s summed case execution (the formerly failing flow 3.794s). Test count and CI budgets are unchanged. All UI test-type partitions, three suppression checks, formatting, and fresh P2 review passed. Runtime cycle and Madge results remain valid because this repair changes no runtime source or imports.Final-head CI
38052432668attempt 2 completed with 66 passing jobs, 20 skipped jobs, and three independently recurring runtime failures plus their derived gate. All cancelled jobs were rerun, and no final-head cancellation or missing check remains. The complete per-job attribution binds the two clean-main timeout reproductions and exact unrelated-PR replacement-worker failure to the current head. Security-sensitive and dependency review are successful. Landing used the explicitly authorized, exact-head inherited-failure exception; CI is not represented as green.Initial CI history: Initial CI run 38032681017 attempt 1 failed the skill-library worker test with
Session stores for agent qa are unavailable, then cancelled 16 jobs. All were rerun; that test passed in attempt 2 and also passed a fresh-main reproduction. Attempt 2 had no cancellations but retained the four native timeouts below plus the derived CI gate. Both separately cancelled auto-response jobs were rerun serially and passed. A passing replay is not represented as a fix.Fresh detached-process comparison (MHHMMH)
Commands used the canonical
node scripts/run-vitest.mjs extensions/qa-lab/src/test-file-scenario-command-lifecycle.test.tswith one worker on both sides, no test timeout/retry/skip changes. Main and bundle test/lifecycle/settlement/runner/lockfile bytes are identical. Per-run identity checks passed; cold transform/build work dominates the wall timings.Coverage log for the combined cleanup
The source lanes inspected their complete production inventories: 436 UI component files (94,901 lines at the original UI baseline) and the QA Lab/QA Channel/broker inventory. The bundle retains 82 changed source files. One existing UI E2E fixture receives a two-line repair; test cases and assertions are unchanged. Fresh bundle proof covers the changed contracts below, supplementing the source lanes' broad runs.
Prior UI lane evidence: full initial component run 308 files / 4,598 tests; complete browser selection 52 Chromium files / 680 tests plus 24 Node tests. Prior QA lane evidence: 3,620 passing tests with two failures and three existing skips; 1,404 focused tests plus 142 final owner tests passed. These are source-lane results, not current-head hosted CI.
Prior failures remain explicit: a QA detached-descendant test could not read its PID file (
ENOENT); earlier three-per-side replays passed without establishing a fix or main-red attribution. The retained lifecycle implementation is unchanged. A separate QA identity-child timeout with a missing compiled worker reproduced on main. The UI broad replay timed out in an unchanged MCP embedded-conversation case at its existing 120-second budget; the focused replay passed. No timeout, retry, assertion, or skip was changed to make these pass.Validation-driven scope removals and initial CI attribution
These eight incoming refactors were removed completely, preserving main's implementations. They lie on or are registered by the fixtures whose startup timeouts remain red on clean main; narrowing the bundle avoids relying on an inherited-failure exception while editing those paths. These scope removals change no assertions, deadlines, retries, or skips. The separate UI fixture repair is described above.
extensions/qa-channel/src/channel.tsextensions/qa-channel/src/channel-actions.tsextensions/qa-channel/src/setup.tsextensions/qa-channel/src/inbound.tsextensions/qa-channel/src/outbound.tsextensions/qa-lab/src/qa-transport.tsextensions/qa-lab/src/live-transports/shared/live-channel-status.tsextensions/qa-lab/src/providers/mock-openai/mock-openai-responses-websocket.tsThe final two drops remove the message-action and setup registrations that still overlapped the recovery fixture. They restore main byte-for-byte and need no baseline edit. The associated earlier QA Channel and QA transport assertion-allowance edits were removed too. The final baseline diff only shrinks the retained assertions, including the requested UI reductions (2→1, 5→4, 4→2).
78e6318772e0bcd6aa79cb14d1b1ed2bbd2c39a7Each case ran sequentially through
node scripts/run-vitest.mjsusing main's successfully prepared runtime,OPENCLAW_E2E_USE_PREBUILT_DIST=1, and its unchanged native deadline. The four test files and relevant child/worker fixture owners are unchanged from the initial CI merge's main parentf55b31f50edbb9b7c2fb2c87504c9b3095bb9160to the reproduction main. Matching deadlines establish recurrence, not a shared root cause. Temporary diagnostic markers were confined to the disposable main checkout and then restored byte-for-byte.The initial 180s recovery diagnostic's retained Gateway stdout/stderr files were empty and its final phase was Gateway startup. The main process-boundary controller is not selected by these fixtures. The final bundle restores the QA readiness, delivery and mock WebSocket files entirely; failing fixture owners remain outside its diff.
The image labels the initial UI proof revision; its representative scalar/sidebar/pet renderers are unchanged. Thirty-one of 34 UI source blobs remain identical; the collection draft, MCP settings, and session leading indicator received the fresh 24-case proof above. The embedded image was also inspected in the rendered PR.