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.
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
The three rungs
Plain → consequence summary → typed. Pick the lowest rung that is honest about the consequence.
Mark 3 orders as Completed?
4509, 4508, 4506 · Delivered tab
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
Revoke every session and token?
Signs out all 42 staff and revokes 17 API tokens immediately. Integrations stop until new keys are minted.
REVOKE ALL to confirmREVOKE ALLStates
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
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
Revoke every session and token?
Signs out all 42 staff and revokes 17 API tokens immediately. Integrations stop until new keys are minted.
REVOKE ALL to confirmREVOKE ALLRevoke every session and token?
Signs out all 42 staff and revokes 17 API tokens immediately. Integrations stop until new keys are minted.
REVOKE ALL to confirmREVOKE ALDoesn’t match yetRevoke every session and token?
Signs out all 42 staff and revokes 17 API tokens immediately. Integrations stop until new keys are minted.
REVOKE ALL to confirmREVOKE ALLRevoke every session and token?
Signs out all 42 staff and revokes 17 API tokens immediately. Integrations stop until new keys are minted.
REVOKE ALL to confirmREVOKE ALLDensity
Compact (2b ultra, the default) and comfortable, side by side. Same markup, only the density tokens change.
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
English · 中文
Staff pick en or cn (T001 Q25). Labels arrive localised; CJK falls back to PingFang SC / Noto Sans SC.
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
核对钱包扣款
工单 #877 · 无法撤销;冲正需另建充值。
Long string · permission denied
The long-string case (PL-063) and what a role without the permission sees (the server decides; T003).
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
Not available to your role
Your role is missing manage sessions. Nothing here is hidden by mistake: the server sends only what you can do.
Both apps
One @rj/admin-kit component, two themes: the Laravel admin (navy pinned) and the DTC admin (kit v4 Midnight green), by token swap only.
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
Review wallet debit
Ticket #877 · this cannot be undone; a reversing credit is a new transaction.
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