Repository navigation
fix(ui): pairing decisions resend on double click and lack device names - #177571
Conversation
- Track in-flight approve and reject decisions per pending requestId for device and node pairing; a repeat decision for the same request sends nothing until the first one settles. - Disable a pending device row's Approve and Reject, and a pending node's Approve and Reject menu items, while that request's decision is in flight. - Name each pending device row's Approve and Reject after its device.
|
🦞👀 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. What this changesThis PR suppresses overlapping pairing decisions and adds device names to pending-device buttons’ accessible labels. Example: An operator double-clicks Approve for Synthetic laptop.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current pairing-feedback bug with a focused shared guard; no actionable correctness or security findings remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Devices page translates operator decisions into Gateway pairing RPCs and renders authoritative inventory, pending controls, and operation errors. flowchart TD
A[Operator decision] --> B[Devices page]
B --> C[Per request decision guard]
C --> D[Existing mutation owner]
D --> E[Gateway pairing RPC]
E --> F[Inventory refresh]
F --> B
Technical reviewBest possible solution: Keep one synchronous request-level decision owner around the existing mutation flows and render its pending state in both device and node controls. Do we have a high-confidence way to reproduce the issue? Yes: current-main dispatch permits repeated decisions, the Gateway rejects consumed request IDs, and the contributor supplies a matching real-Gateway browser trace; this review executed no target code. Is this the best way to solve the issue? The shared synchronous guard is a small complete repair for overlapping decisions, preserves genuine errors and existing refresh policies, and avoids unnecessary persisted state or competing owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4ab3748ad4d8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +61, Tests +78. Total +139 across 10 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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 Reviewed October 19, 2026, 2:27 PM ET / 18:27 UTC. |
vyctorbrzezowski
left a comment
There was a problem hiding this comment.
Reviewed the shared device/node pairing guard, conflicting decisions for the same request, failure cleanup, connection and page replacement, confirmation-time permission checks, and the disabled controls and accessible device names. The guard acquires synchronously and releases in finally; the existing mutation and connection owners retain error and refresh behavior. No actionable issue found in the reviewed diff.
Automated code review complete. No further changes are requested from the author at this stage. Final product and design review will be handled by the responsible maintainer before the PR is considered for merge.
vyctorbrzezowski
left a comment
There was a problem hiding this comment.
Reviewed the shared device/node pairing guard, conflicting decisions for the same request, failure cleanup, connection and page replacement, confirmation-time permission checks, and the disabled controls and accessible device names. The guard acquires synchronously and releases in finally; the existing mutation and connection owners retain error and refresh behavior. No actionable issue found in the reviewed diff.
Automated code review complete. No further changes are requested from the author at this stage. Final product and design review will be handled by the responsible maintainer before the PR is considered for merge.
|
Rechecked the Devices page in Chromium with two synthetic pending devices and a held Gateway response. Before — main After — reviewed candidate tree The browser sent a second decision for the tablet while the laptop was pending. Rejecting the held responses re-enabled both rows; retrying the laptop sent the third request. Separate focused tests cover same-request duplicate suppression, opposite decisions, connection/route retirement, and stale completion versus a replacement decision (50 tests passed). Full-page context, same viewport and fixtures: Risk and coverage: this is the real source UI with a simulated Gateway, not a live operator session. The entire tracked source tree was verified equal to the pinned main commit before the first capture, then restored and verified against the reviewed candidate. Both runs logged the same |
…es (openclaw#177571) * fix(ui): pairing decisions resend on double click and lack device names - Track in-flight approve and reject decisions per pending requestId for device and node pairing; a repeat decision for the same request sends nothing until the first one settles. - Disable a pending device row's Approve and Reject, and a pending node's Approve and Reject menu items, while that request's decision is in flight. - Name each pending device row's Approve and Reject after its device. * chore: prepare reviewed contributor base integration * fix(ui): preserve device decision guards across main integration * fix(ui): retain per-request pairing guards across lifecycle changes --------- Co-authored-by: Vyctor H. Brzezowski <[email protected]>




Closes #127580
What Problem This Solves
Approving or rejecting a pending device or node can send the same decision twice before the first response arrives, producing an
unknown requestIderror after a successful decision. Pending device controls also need to identify their device to screen readers.User Impact
Only the request being approved or rejected is disabled while waiting. Other pending requests remain usable, and failures allow retry. Screen readers identify the device for each decision.
Why This Change Was Made
The pairing owner now admits one decision per request. Approve and Reject share that guard; other pending requests remain usable. Settlement releases the guard for retry. Connection and route retirement clear obsolete admission, while an old completion cannot release a newer decision for the same request. Device buttons expose names such as “Approve Synthetic tablet.” Confirmation-time permission and connection checks remain in the shared dialog owner.
The integration with current main preserves Mitchell Etzel's feature and original commit ancestry. Pairing uses the existing page-task owner instead of the inventory-wide saving indicator, so deciding on one row does not disable the other rows. Token rotation, revocation, removal and their existing presentation are unchanged.
Evidence
Inspected before/after screenshots and browser evidence show the real source UI with a simulated Gateway. Before is main
b90f49b11fc; after is the reviewed candidate. The later main integration throughc2abf601480leaves the Devices sources and relevant captured styles unchanged.node scripts/run-vitest.mjs <file> --maxWorkers=1wrapper: pairing operations 3.14 s; Devices rendering 2.69 s; inventory actions 2.10 s. The wrapper avoids reconciling the shared dependency installation. Exact-head CI run 39785774744 passed. Its emitted module timings report 0.295 s of test execution for pairing operations and 0.770 s for inventory actions; these exclude worker setup and collection. The rendering file has the measured local wall time above; no per-file CI timing was emitted in the inspected UI logs.git diff --checkpassed. Independent P0–P2 review found no actionable defect.Risk and coverage
This guard covers overlapping decisions in one page scope; it does not coordinate concurrent operators. The real Gateway was not exercised in this maintainer pass. Both source-browser runs logged the same
entries is not iterableerror outside the verified pairing interactions, so the capture is not a claim that the entire application is error-free.Local lint was not completed: the repository wrapper rejected shared dependencies outside the checkout. Its guard was preserved; lint and type checks passed through the exact-head GitHub CI run. No full local build or test suite was run.