Skip to content

feat(mac): add bulk Approve All / Reject All to the pairing approval panel - #104011

Merged
steipete merged 2 commits into
mainfrom
claude/bulk-pairing-actions-487689
Jul 11, 2026
Merged

steipete merged 2 commits into
mainfrom
claude/bulk-pairing-actions-487689

Conversation

@steipete

@steipete steipete commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Mac app's pairing approval panel (#102535) lists every pending node/device pairing request as a card, but each one must be approved or rejected individually. When several devices reconnect at once (gateway restart, node + operator-device repair together), the operator has to click through the queue card by card. Fixes #104005.

Why This Change Was Made

Bulk resolution belongs in the panel footer, not per card: with more than one pending request, a "Reject All" and an "Approve All" button appear next to the existing "Not Now" snooze. Both route through a new PairingApprovalCenter.decideAll(_:_:), which takes the footer's rendered card snapshot and reuses the existing per-card decide(_:_:) path — so the in-flight guard, prompter ownership, and demo-card handling stay unchanged. A single-request panel keeps the current minimal footer.

Design notes:

  • Bulk decisions resolve only the rendered snapshot, never the live queue. A request that arrives between render and click must never be approved unseen, so the buttons pass the cards array they were rendered from instead of letting the center iterate its current queue (caught by autoreview; covered by a dedicated regression test).
  • Bulk approval is a security decision, so the bulk buttons deliberately get no keyboard shortcut — a stray Return cannot approve everything (single-request Return-to-approve is unchanged).
  • Bulk buttons disable while every card's decision is in flight.
  • The duplicated macOS 26 glass / macOS 15 bordered button-style branches in the card view were extracted into a shared pairingActionStyle(prominent:) helper, which the new footer buttons reuse.
  • A DEBUG-only _testSetCards seam seeds the center's queue without presenting the NSPanel, so the new center-level tests run headless.

User Impact

Mac app operators with multiple simultaneous pairing requests can resolve the whole queue with one click. Single-request behavior, keyboard shortcuts, and snooze are unchanged.

Evidence

  • swift test --package-path apps/macos --filter Pairing: 17 tests in 4 suites pass, including three new PairingApprovalCenterBulkDecisionTests (decide all routes every card to its kind handler exactly once, reject all delivers reject to every handler, bulk decisions resolve only the rendered snapshot).
  • Full swift test --package-path apps/macos --parallel: 945+ tests across 127 suites pass.
  • Autoreview (Codex gpt-5.5, branch vs origin/main): one P1 finding on the first pass (bulk action read the live queue instead of the rendered snapshot) — fixed in fix(mac): resolve bulk pairing decisions against the rendered snapshot; re-run clean.
  • swiftformat --lint clean on both changed source files; native:i18n:check clean after inventory sync.
  • Panel with two pending requests showing the new footer (window-backed test render; glass button chrome does not rasterize offscreen, so buttons appear as plain labels — layout and copy match the shipped panel):

Pairing panel with Approve All / Reject All footer

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: M maintainer Maintainer-authored PR labels Jul 11, 2026
@steipete
steipete merged commit 249e6ef into main Jul 11, 2026
80 checks passed
@steipete
steipete deleted the claude/bulk-pairing-actions-487689 branch July 11, 2026 00:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 11, 2026
…panel (openclaw#104011)

* feat(mac): add bulk Approve All / Reject All to the pairing approval panel

* fix(mac): resolve bulk pairing decisions against the rendered snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Bulk Approve All / Reject All in the Mac app pairing panel

1 participant