Let users delete a concept (draft) #221

Closed
opened 2026-08-05 13:16:17 +00:00 by robbertbos · 0 comments
Owner

Problem

A user can create new-message concepts and reply drafts (they autosave), open, edit and send/schedule them - but there is no way to delete or discard a concept without sending it. A concept only disappears when it is sent or scheduled, so someone who changes their mind is stuck with it.

  • Concepten list (frontend/src/routes/ConceptBerichten.vue): a row click only opens the concept (openRow); there is no delete action.
  • ComposeOverlay: no discard/delete button. deleteDraft (useDeleteNewMessageDraft) exists but only fires internally on send/schedule success.
  • Empty concepts are not created (autosave gates on hasBody), so this is only about discarding a concept that already has content.

Surfaced during manual testing of the new-message composer (PR #192).

Proposal

  • Add a delete action (trash icon) on each Concepten row - most discoverable.
    • Card-less concept: DELETE /api/new-message-draft/{id} (useDeleteNewMessageDraft).
    • Reply concept (card-bound): DELETE /api/cards/{cardId}/draft (useDeleteDraft).
  • Optionally a "Weggooien" button in the composer itself, for when it is open.
  • Destructive, so use an undo toast (matching the send undo-window and the NLDD "undo over confirm" guideline) rather than a confirmation dialog.
  • Invalidate the drafts list on delete; if the composer is open on the deleted concept, close/reset it. Respect the pending-draft lock (a concept with an in-flight send must not be deletable).

Notes

  • Both backend delete endpoints already exist (wired for the internal send/schedule cleanup), so this is mostly frontend wiring + one affordance.
  • Accessibility: the trash button needs an aria-label (e.g. Verwijder concept: <preview>); keep the row's existing keyboard/open behaviour intact.
## Problem A user can create new-message concepts and reply drafts (they autosave), open, edit and send/schedule them - but there is **no way to delete or discard a concept** without sending it. A concept only disappears when it is sent or scheduled, so someone who changes their mind is stuck with it. - Concepten list (`frontend/src/routes/ConceptBerichten.vue`): a row click only *opens* the concept (`openRow`); there is no delete action. - ComposeOverlay: no discard/delete button. `deleteDraft` (`useDeleteNewMessageDraft`) exists but only fires internally on send/schedule success. - Empty concepts are not created (autosave gates on `hasBody`), so this is only about discarding a concept that already has content. Surfaced during manual testing of the new-message composer (PR #192). ## Proposal - Add a delete action (trash icon) on each Concepten row - most discoverable. - Card-less concept: `DELETE /api/new-message-draft/{id}` (`useDeleteNewMessageDraft`). - Reply concept (card-bound): `DELETE /api/cards/{cardId}/draft` (`useDeleteDraft`). - Optionally a "Weggooien" button in the composer itself, for when it is open. - Destructive, so use an **undo toast** (matching the send undo-window and the NLDD "undo over confirm" guideline) rather than a confirmation dialog. - Invalidate the drafts list on delete; if the composer is open on the deleted concept, close/reset it. Respect the pending-draft lock (a concept with an in-flight send must not be deletable). ## Notes - Both backend delete endpoints already exist (wired for the internal send/schedule cleanup), so this is mostly frontend wiring + one affordance. - Accessibility: the trash button needs an `aria-label` (e.g. `Verwijder concept: <preview>`); keep the row's existing keyboard/open behaviour intact.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
robbertbos/waggle#221
No description provided.