fix(notes): align delete confirmation with revision retention #662

Open
opened 2026-06-15 07:01:46 +00:00 by simon · 0 comments
Owner

While expanding the CarrTech docs for Host Activity, I noticed the note delete confirmation in apps/web/components/notes/notes-tab.tsx and apps/web/components/notes/note-card.tsx says: "It disappears from every list, but the revision history is kept."\n\nThe database schema appears to hard-delete note revisions when the note is deleted: apps/web/lib/db/schema/notes.ts defines note_revisions.note_id with onDelete: 'cascade', and deleteNote in apps/web/lib/actions/notes-core.ts deletes the notes row directly. That means targets, reactions, and revisions are removed through cascade behavior rather than retained.\n\nWhy it matters: operators may rely on the confirmation text for audit expectations before deleting a note. If revisions are intended to be retained, the delete path/schema needs to preserve them. If hard delete is intended, the confirmation copy should say so.\n\nSuggested fix: decide whether deleted note revisions should be retained for audit. Then either change deletion to a soft-delete/retention flow, or update the confirmation copy and any docs to state that deletion removes revision history.

While expanding the CarrTech docs for Host Activity, I noticed the note delete confirmation in apps/web/components/notes/notes-tab.tsx and apps/web/components/notes/note-card.tsx says: "It disappears from every list, but the revision history is kept."\n\nThe database schema appears to hard-delete note revisions when the note is deleted: apps/web/lib/db/schema/notes.ts defines note_revisions.note_id with onDelete: 'cascade', and deleteNote in apps/web/lib/actions/notes-core.ts deletes the notes row directly. That means targets, reactions, and revisions are removed through cascade behavior rather than retained.\n\nWhy it matters: operators may rely on the confirmation text for audit expectations before deleting a note. If revisions are intended to be retained, the delete path/schema needs to preserve them. If hard delete is intended, the confirmation copy should say so.\n\nSuggested fix: decide whether deleted note revisions should be retained for audit. Then either change deletion to a soft-delete/retention flow, or update the confirmation copy and any docs to state that deletion removes revision history.
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
carrtech/ct-ops#662
No description provided.