Patterns
Destructive confirmation
Constraints Titan should enforce for Destructive confirmation.
See Destructive confirmation for the decided part of this page.
Last modified on September 7, 2026
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Constraints Titan should enforce for Destructive confirmation.
| ID | Constraint | Would be enforced by |
|---|---|---|
| TITAN-DESTROY-02 | The confirmation dialog’s title names the specific object. | A required objectName prop that must be interpolated into the title. |
| TITAN-DESTROY-04 | The confirm button restates the action; never “Yes”, “OK”, or “Confirm”. | A lint rule/required prop banning those literal strings as the confirm button’s label. |
| TITAN-DESTROY-05 | The destructive action is outlined; Cancel is text and comes first. | A shared ConfirmDialog component that hard-codes variant/order rather than leaving it to free composition. |
| TITAN-DESTROY-06 | Initial focus is on Cancel. | A default initialFocusRef in the shared dialog component, plus an accessibility/interaction test. |
| TITAN-DESTROY-08 | Never stack a second confirmation on top of a confirmation. | A runtime guard in the shared ConfirmDialog that warns/throws on a nested open, or a lint rule. |
| TITAN-DESTROY-09 | On failure, the dialog stays open and shows the error inline. | The ConfirmDialog’s own state machine never auto-closing on a rejected promise, covered by a component test. |
Was this page helpful?