Use when
- Users have unsaved or pending changes that cannot be recovered if they leave.
- A route change, tab close, reload, browser Back, external link, or sign-out action can interrupt a task.
- Autosave, draft state, or server recovery is absent, pending, failed, or insufficient for the current change.
- The product can identify the dirty scope and provide a clear stay, save, or discard choice.