Repository navigation
fix(test): wait for create agent to enable after its status line - #3101
Conversation
The capability status line follows the harness and Namespace at once, but Create Agent also stays disabled while the form's repository discovery is loading. Reading isDisabled() once right after the line appears failed when that read was slow. Wait for the button to enable.
|
🦞👀 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. |
…te-agent-enabled-wait
|
Codex review: needs maintainer review before merge. What this changesThis PR replaces three immediate Create Agent state assertions with bounded waits for the button to become enabled. Example: Switch to Embedded OpenClaw while repository-options discovery is still loading.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR makes a focused, source-supported repair to flaky browser assertions without changing production behavior; no actionable defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe console form combines Namespace readiness, harness capabilities, and repository discovery to control Agent creation; browser tests observe its status messages and button state. flowchart LR
A[Browser test] --> B[Create Agent form]
C[Namespace readiness] --> B
D[Harness capabilities] --> B
E[Repository discovery] --> B
B --> F[Status and button state]
F --> G[Bounded enabled wait]
Technical reviewBest possible solution: Use the existing locator to await enablement while retaining all Namespace, accessibility, and draft-preservation assertions. Do we have a high-confidence way to reproduce the issue? Source establishes the timing window, and the author reports reproducing it by holding repository discovery; this review performed no runtime reproduction. Is this the best way to solve the issue? The three bounded locator waits directly express eventual enablement without weakening the intended readiness gates or introducing production machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 49019252a2f3. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
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 Reviewed October 20, 2026, 11:41 PM ET / October 21, 2026, 03:41 UTC. |
…te-agent-enabled-wait
Problem
tests/browser/console-namespace-not-ready.test.mjs:142"Create Agent names a provisioning Namespace's status before any start" failedtrue !== false(found in side-by-side lane runs). After switching the harness to OpenClaw, the test waits for the status line "Embedded Agents are saved as drafts..." and then readscreate.isDisabled()once.updateControls()writes that status line from the harness and Namespace alone, butCreate Agentalso stays disabled while the form's repository discovery (GET .../agents/repository-options) is loading (!repositories.isSettled()). When that read is slow, the line shows while the button is still disabled.The two "Create Agent waiting on a provisioning Namespace" subtests read
isDisabled()the same way after "Dedicated Agents are provisioned and deployed when created." appears.Change
Wait for Create Agent to become enabled (
create.and(page.locator(":enabled")).waitFor()) instead of reading its state once, in those three places. Test-only: disabling Create Agent until the repository choices are known is intended.Verification
repository-optionsuntil after the harness switch leaves Create Agent disabled while the Embedded status line shows (every run); after release it enables.Risks
Low. A regression that keeps the button disabled still fails, as a timeout instead of an assertion.