Skip to content

TUI: Add confirmation dialogs for destructive actions #158

@mihaelamj

Description

@mihaelamj

Summary

Prevent accidental destructive operations with confirmation dialogs.

Use Cases

  • Saving selections (overwrite existing priority-packages.json)
  • Clearing all selections
  • Changing base directory

Design

┌────────────────────────────────────────────┐
│            Confirm Action                  │
├────────────────────────────────────────────┤
│                                            │
│  Save 42 selected packages?                │
│                                            │
│  This will overwrite:                      │
│  priority-packages.json                    │
│                                            │
│  [Y] Yes, save    [N] Cancel               │
│                                            │
└────────────────────────────────────────────┘

Tasks

  • Create ConfirmDialog.swift component
  • Add dialog rendering overlay
  • Handle Y/N input for confirmation
  • Add confirmation before overwrite operations
  • Test dialog rendering and input handling

Files

  • Sources/TUI/Components/ConfirmDialog.swift (new)
  • Sources/TUI/PackageCurator.swift
  • Sources/TUI/Models/AppState.swift

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions