Repository navigation
fix(ui): prevent login gate test timeout during startup - #169248
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. |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR holds Chat-only stylesheets instead of Chat JavaScript while testing login-gate startup. Example: The generic-help browser test rejects connection with AUTH_TOKEN_MISSING while startup is pending.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a concrete test-fixture deadlock still present on current main, preserves the regression assertions, and introduces no identified defect. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI browser fixture intercepts bundled asset responses, injects a Gateway authentication failure, and checks the production login gate after startup settles. flowchart TD
A[Browser test] --> B[Hold Chat-only CSS]
A --> C[Inject authentication failure]
C --> D[Lazy login gate loads]
D --> E[Release stylesheet barrier]
E --> F[Check collapsed help and reveal]
Technical reviewBest possible solution: Merge the focused stylesheet-barrier repair while retaining the existing startup wait and help assertions. Do we have a high-confidence way to reproduce the issue? The source exposes the circular wait between the held JavaScript response and lazy login rendering, supported by the author's repeated baseline failures; this review ran no target code. Is this the best way to solve the issue? The existing route-only stylesheet matcher supplies the needed startup barrier without blocking login JavaScript or weakening assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 34292e09ea88. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +1. Total +1 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes: No label 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 (1 earlier review cycle)
Reviewed October 11, 2026, 2:06 PM ET / 18:06 UTC (Revision 2). |
|
Landed in cbe0b27. The login-gate e2e waits on the existing route stylesheet barrier instead of the JavaScript startup barrier from 9a98e2e, so the generic-help case no longer times out waiting for .login-gate. Assertions and timeouts unchanged. Proof: failed 2/2 on main 95dcdf9; the old-barrier control reproduced the timeout; the repaired barrier still catches a missing mounted gate; login-gate + initial-connect-splash 38/38 green. |
) Related: openclaw#168588 ## What Problem This Solves Fixes: the generic-help login-gate browser test can time out waiting for the login screen while its own startup barrier is held. ## User Impact No user-visible change. This repairs a Control UI test fixture without changing Gateway authentication, login behavior, timeouts, or assertions. ## Why This Change Was Made The startup regression added in f86c2a9 holds the emitted Chat JavaScript chunk before waiting for the lazy login screen. That barrier can also prevent the login screen from becoming available, so the test never reaches the release. Hold the existing route-only Chat stylesheet set instead. The test still observes `startupPending === true`, starts the no-error fixture before startup completes, and retains every collapsed-help and reveal assertion. No overlap with designated maintainer changes was found in the changed file's history. ## Evidence - Unchanged openclaw#168588 head `b61c1f05efbb1db980722db07e9feacf922afe0b`: the requested direct login-gate command passed twice (25/25 each). - Clean main `3aa85968da2a24df2797f3a0f82610d19e5fa73f`: passed twice (25/25 each). - Clean main `de225fcde8e78a9ea928a98381e35d6dccf80b2c`: failed twice (24 passed, the same generic-help `.login-gate` 30-second timeout each time). - Focused old JavaScript-barrier negative control: reproduced the same timeout. Captured state showed `startupPending: true`, a stopped Gateway with `AUTH_TOKEN_MISSING`, and the connecting splash instead of the login screen. - Focused stylesheet-barrier case: passed. - Original-race negative control: temporarily removing the existing startup wait still fails with `Missing mounted login gate` using the repaired barrier; the wait was restored before final proof. - Final direct browser run of `login-gate.e2e.test.ts` and `initial-connect-splash.e2e.test.ts`: **38/38 passed**. Commands used the repository entry point: ```sh node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/login-gate.e2e.test.ts node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/login-gate.e2e.test.ts ui/src/e2e/initial-connect-splash.e2e.test.ts ``` Proof ran on macOS arm64 with Node 24.21.0 and local Playwright Chromium; it does not claim a Linux rerun of the entire hosted shard. Merge danger: two-way door; reverting restores only the old test barrier. Blast radius is this single browser-test scenario; no production code or persisted state changes. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #168588
What Problem This Solves
Fixes: the generic-help login-gate browser test can time out waiting for the login screen while its own startup barrier is held.
User Impact
No user-visible change. This repairs a Control UI test fixture without changing Gateway authentication, login behavior, timeouts, or assertions.
Why This Change Was Made
The startup regression added in 9a98e2e holds the emitted Chat JavaScript chunk before waiting for the lazy login screen. That barrier can also prevent the login screen from becoming available, so the test never reaches the release.
Hold the existing route-only Chat stylesheet set instead. The test still observes
startupPending === true, starts the no-error fixture before startup completes, and retains every collapsed-help and reveal assertion.No overlap with designated maintainer changes was found in the changed file's history.
Evidence
b61c1f05efbb1db980722db07e9feacf922afe0b: the requested direct login-gate command passed twice (25/25 each).ab6c07f595e963ec86b93c11c90ac8d7ebf470b6: passed twice (25/25 each).95dcdf93588b82b7c6f929d01089bfece6f933a1: failed twice (24 passed, the same generic-help.login-gate30-second timeout each time).startupPending: true, a stopped Gateway withAUTH_TOKEN_MISSING, and the connecting splash instead of the login screen.Missing mounted login gateusing the repaired barrier; the wait was restored before final proof.login-gate.e2e.test.tsandinitial-connect-splash.e2e.test.ts: 38/38 passed.Commands used the repository entry point:
Proof ran on macOS arm64 with Node 24.21.0 and local Playwright Chromium; it does not claim a Linux rerun of the entire hosted shard.
Merge danger: two-way door; reverting restores only the old test barrier. Blast radius is this single browser-test scenario; no production code or persisted state changes.