test(extension): respect chat readiness in queue scenarios - #473
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. |
|
Codex review: needs maintainer review before merge. Reviewed September 12, 2026, 7:43 PM ET / 23:43 UTC. ClawSweeper reviewWhat this changesThe PR updates two Chrome extension chat queue tests to use browser interactions and explicitly checks submission waiting while daemon readiness is delayed. Merge readiness✅ Ready for maintainer review This remains a useful, focused test repair: current main and the latest release retain the synthetic submission helper that bypasses chat readiness. No actionable regression was found. Repository policy and owner authorship also preclude automatic closure. Priority: P3 Review scores
Verification
How this fits togetherThe extension side panel accepts questions about page content and queues additional questions while a response streams. These browser tests control daemon readiness and responses to check when submissions enter that queue. flowchart TD
A[Browser test] --> B[Hold daemon readiness]
B --> C[Chat remains hidden]
C --> D[Browser input waits]
B --> E[Release readiness]
E --> D
D --> F[Send or queue question]
F --> G[Response completes and queue drains]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep queue coverage aligned with browser actionability while preserving the production readiness guard and deterministic response gating. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes the race: settings hydration can finish before daemon readiness, and the old synthetic click reaches a handler that ignores unavailable chat. Runtime reproduction was reported by the author but not executed in this review. Is this the best way to solve the issue? Yes. Browser interactions respect the existing visibility boundary, and the controlled readiness gate exercises the race without weakening production guards or skipping queue assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b2606720c9bf. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
The chat queue tests bypassed browser actionability with direct DOM clicks. Settings could be hydrated while daemon readiness was still pending, leaving chat hidden and correctly ignoring the synthetic send. This produced intermittent zero-request failures in CI.
Use one Playwright helper for button and keyboard submission. The first queue scenario now holds daemon readiness explicitly, verifies that hidden chat receives neither input nor requests, releases readiness, and checks visible queued content before releasing the first response. A page-command barrier makes that ordering observable. Existing assertions and timeout limits remain; no product behavior or test skips changed.
The controlled gate reproduced the same zero-request failure with the old helper. Both queue scenarios then passed five repetitions each with the fix. Full check and isolated Codex autoreview through P2 pass. Live proof ran the built extension in the supported Chromium test harness, and a real Chrome fixture using the production send handler confirmed hidden submissions are ignored while visible user actions are accepted.