Skip to content

feat(settings): confirm before deleting downloaded models - #3

Merged
karan68 merged 1 commit into
devtestfrom
feat/model-delete-confirmation
Jul 17, 2026
Merged

feat(settings): confirm before deleting downloaded models#3
karan68 merged 1 commit into
devtestfrom
feat/model-delete-confirmation

Conversation

@karan68

@karan68 karan68 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Deleting a downloaded model previously happened immediately on click, with no
confirmation. Since transcription/summary models are large (~600–700 MB) and must be
re-downloaded if removed by mistake, an accidental click was costly.

This PR gates model deletion behind the existing ConfirmationModal across all three
model managers — Whisper, Parakeet, and Summary (built-in AI) — without
changing any deletion logic or backend behaviour.

Addresses the confirmation gap called out in upstream [FEATURE] Delete downloaded
models in Settings
(Zackriya-Solutions/meetily#597). The delete capability itself was
already implemented in Briefli; this adds the missing safety confirmation.

Why

  • Prevents accidental, irreversible deletion of large models.
  • Matches the pattern already used elsewhere in the app (meeting deletion) via the shared
    ConfirmationModal, so it's consistent and low-risk.

What changed

Per manager (WhisperModelManager.tsx, ParakeetModelManager.tsx, BuiltInModelManager.tsx):

  • Added pendingDelete + isDeleting local state.
  • Added confirmDelete() that wraps the existing deleteModel() — delete logic,
    toasts, list refresh, and the Rust commands are all unchanged.
  • Delete actions (hover trash on downloaded models, and the Delete button on corrupted
    models) now open a confirmation dialog that names the model and the space it frees.
  • While the delete runs, the dialog buttons disable and show a "Deleting…" state
    (isConfirming).
  • Kept e.stopPropagation() so opening the dialog never selects/activates the model card.

No backend/Rust changes. No new dependencies.

Before / After

UI screenshots (Settings → Transcription / Summary → hover a downloaded model → Delete).

Before After
Clicking the trash icon deleted the model instantly (no prompt). A confirmation dialog appears before deletion.

Note: images to be attached in the GitHub UI — see PR comment.

Testing

  • tsc --noEmit -p tsconfig.json → clean (exit 0).
  • Bun test suite (tests/lib) → 63/63 pass.
  • Manual checklist (to verify in-app):
    • Hover a downloaded model → trash → Cancel → nothing deleted.
    • Hover → trash → Delete → model removed, toast shown, disk space freed, list refreshes.
    • Delete the currently selected Whisper/Parakeet model → selection clears.
    • Corrupted model → Delete also routes through the dialog.
    • Repeat across all three managers (Whisper, Parakeet, Summary).

Scope / non-goals

  • No changes to the Rust delete commands or engine delete_model (already correct).
  • No progress bar — deletion is a single file/dir removal that completes instantly; the
    "Deleting…" state covers it.
  • Did not change the pre-existing inconsistency where the built-in manager hides its
    trash icon for the currently-selected model (left as a separate follow-up).

Model deletion previously fired immediately on click, risking accidental loss of 600-700 MB models that must be re-downloaded. Gate deletion behind the existing ConfirmationModal in all three model managers (Whisper, Parakeet, Summary/BuiltIn).

- Add pendingDelete + isDeleting state; confirmDelete() wraps the existing deleteModel(), so delete logic and backend/API are unchanged.
- Delete actions now open a confirmation dialog naming the model and freed size; buttons disable and show a Deleting... state during the async op.
- Preserve e.stopPropagation() so opening the dialog never selects the card.

No backend changes. tsc --noEmit clean; 63/63 Bun tests pass.
@karan68
karan68 merged commit d039591 into devtest Jul 17, 2026
8 checks passed
@karan68
karan68 deleted the feat/model-delete-confirmation branch July 17, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant