Deleting and other confirmed actions
An action that can't be undone, or that Firm Pilot must not take alone: deleting, sending, converting to a matter, anything that bills.
When it applies
- The action can't be undone, like deleting a record or discarding unsaved edits.
- The action is one an agent must not do without the lawyer: delete, send, convert to a matter, or anything that bills.
Components
What makes the pattern. Each component's own page has its examples and props.
Rules
Each comes from AGENTS.md or a component's own best practices, gathered for this job.
| Guidance | Practice |
|---|---|
| Do | Ask with AlertDialog. Write AlertDialogTitle as a question, like Delete record?, say what happens in AlertDialogDescription, and name the confirming button with the action, like Delete. |
| Do | Put data-agent-confirm="<what it does>" on the confirming button in the footer, not on the trigger. |
| Do | Give a change that can be reversed an action on its toast, like Undo. |
| Do | Let closing return focus on its own. Pass finalFocus only when the control that opened the dialog is gone, like the row a delete removed. |
| Don't | Add a close button to an AlertDialog, or let a press outside close it. Its choice is in the footer. |
| Don't | Use a Drawer to ask. A quick question or a confirmation is a Dialog, or an AlertDialog for a choice that can't be undone. |
See it
- List page: A page that is a list: one toolbar under the header with views, search and a filter, and a table that fills the rest of the window edge to edge.
- Form panel: A form in a panel over the list: fields in one column, pairs side by side, and Cancel and Save in the panel's footer.