Confirmation ladder
Three rungs: plain confirm → consequence summary (count, amounts with currency, wallet before → after; 409 idempotent retry) → typed confirmation for the irreversible (revoke all sessions, Q14). Money and revoke stay desktop-first.
Covers: alert-dialog primitive, confirm designer. Exports: ConfirmDialog.
Anatomy
The component as it sits in the product: English, compact, real data shapes.
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
States
7 states, left to right, top to bottom. A mock poll never finishes, so each state is drawn on purpose.
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Density
The phone shell is always comfortable (POWERUPS #15): 44px tap targets, 16px inputs. Compact exists on desktop only; see the desktop page.
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
English · 中文
Staff pick en or cn (T001 Q25). Labels arrive localised; CJK falls back to PingFang SC / Noto Sans SC.
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
将 3 个订单标为已完成?
4509, 4508, 4506 · 已送达标签
Long string · permission denied
The long-string case (PL-063) and what a role without the permission sees (the server decides; T003).
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Contract
The @rj/admin-kit API for this family. Mirrored in CONTRACT.md.
- Export
ConfirmDialog·@rj/admin-kit- Props
levelplain|summary|typed ·title·consequences[]·money{currency, before, after} ·phrase·idempotencyKey·onConfirm- States
- open · mismatch · ready · busy · conflict (409) · error
- shadcn / Radix
- AlertDialog
- Package underneath
- react-hook-form + zod (typed phrase) · crypto.randomUUID() (Idempotency-Key)
- Accessibility
- focus starts on Cancel; the confirm button names the action and amount; typed input is labelled with the phrase
- API operations
- admin.sessions.revoke-all (confirmation, expected_revision) · admin.orders.void (Idempotency-Key, 409) · admin.billing.wallets.transactions.store · admin.tickets.wallet-transactions.store · admin.api-keys.bulk-revoke
- Phone variant
- rung 1 only; 2 and 3 open on desktop