Skip to content

delete confirmation

Delete Confirmation Modal Variations


Option A: Simple Confirmation Dialog

┌────────────────────────────────────────────────────────┐
│ Delete Document? │
├────────────────────────────────────────────────────────┤
│ │
│ Are you sure you want to delete "discovery-agent"? │
│ │
│ This action cannot be undone. │
│ │
├────────────────────────────────────────────────────────┤
│ [Cancel] [Delete] │
└────────────────────────────────────────────────────────┘

Pros: Clean, simple, familiar pattern Cons: May not convey severity for important documents


Option B: Type-to-Confirm (Destructive Action Pattern)

┌────────────────────────────────────────────────────────┐
│ ⚠️ Delete Document │
├────────────────────────────────────────────────────────┤
│ │
│ You are about to permanently delete: │
│ │
│ 📄 discovery-agent.md │
│ Location: .claude/agents/ │
│ Last modified: 2 hours ago by Will │
│ │
│ Type "discovery-agent" to confirm: │
│ ┌──────────────────────────────────────────────────┐ │
│ │ │ │
│ └──────────────────────────────────────────────────┘ │
│ │
├────────────────────────────────────────────────────────┤
│ [Cancel] [Delete] (disabled) │
└────────────────────────────────────────────────────────┘

Pros: Prevents accidental deletion, forces user attention Cons: Friction for legitimate deletions, may be overkill for simple docs


Option C: Warning with Details Panel

┌────────────────────────────────────────────────────────┐
│ ⚠️ Delete "discovery-agent"? │
├────────────────────────────────────────────────────────┤
│ │
│ ┌─ Document Details ─────────────────────────────┐ │
│ │ Type: Agent │ │
│ │ Path: .claude/agents/discovery-agent.md │ │
│ │ Size: 2.4 KB │ │
│ │ Created: Nov 15, 2025 │ │
│ │ Last edited: Nov 27, 2025 by Will │ │
│ └────────────────────────────────────────────────┘ │
│ │
│ ❗ This action cannot be undone. │
│ │
├────────────────────────────────────────────────────────┤
│ [Cancel] [Delete Document] │
└────────────────────────────────────────────────────────┘

Pros: User can verify they’re deleting the right file Cons: More visual complexity


Option D: Nested Content Warning (for Folders/Epics)

┌────────────────────────────────────────────────────────┐
│ ⚠️ Delete Epic and All Contents? │
├────────────────────────────────────────────────────────┤
│ │
│ You are about to delete the epic "MDE" and all │
│ files inside it: │
│ │
│ 📁 TP-XXXX-MDE-Markdown-Documentation-Editor/ │
│ ├── 📄 spec.md │
│ ├── 📄 design-spec.md │
│ ├── 📄 meta.yaml │
│ └── 📁 mockups/ (5 files) │
│ │
│ Total: 8 files will be permanently deleted │
│ │
│ ┌────────────────────────────────────────────────┐ │
│ │ [x] I understand this will delete all contents │ │
│ └────────────────────────────────────────────────┘ │
│ │
├────────────────────────────────────────────────────────┤
│ [Cancel] [Delete Epic] (disabled) │
└────────────────────────────────────────────────────────┘

Pros: Clear about cascade effects, checkbox prevents accidents Cons: More complex, only needed for folder deletion


Option E: Soft Delete with Undo Toast

┌────────────────────────────────────────────────────────┐
│ Delete Document? │
├────────────────────────────────────────────────────────┤
│ │
│ "discovery-agent" will be moved to trash. │
│ │
│ You can restore it within 30 days. │
│ │
├────────────────────────────────────────────────────────┤
│ [Cancel] [Move to Trash] │
└────────────────────────────────────────────────────────┘
↓ After deletion
┌────────────────────────────────────────────────────────┐
│ ✓ Document deleted [Undo] [×] │
└────────────────────────────────────────────────────────┘

Pros: Forgiving, allows recovery, less scary Cons: Requires trash/archive system (adds complexity)


Recommendation

Option C: Warning with Details for v1

  • Shows enough context to verify correct document
  • Standard confirmation without excessive friction
  • For nested content (epics), add the file list from Option D
  • Skip type-to-confirm for v1 (overkill for internal tool)
  • Consider Option E (soft delete) as future enhancement