docs(ops): add the procedure to delete one support conversation on request

Aperta Adatta ai principianti
#796 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
sql, supabase, typescript

Direzione di ricerca

Leggi la sezione “Support chat storage and retention” in docs/operations/deploy.md, poi controlla le migrazioni citate per le chat di supporto e gli allegati, oltre a src/lib/jobs/retention.ts, per confermare i dettagli sull’eliminazione e sulla conservazione delle immagini. Aggiungi la procedura richiesta per eliminare una singola conversazione dopo il merge di #776, includendo come verificare la proprietà, l’istruzione SQL, cosa viene eliminato a cascata e quando vengono rimossi gli oggetti immagine.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: ops documentation priority: P3 size: XS

Context

The privacy policy, as changed by #791 (issue #755), tells a user: "To have a conversation deleted without deleting your account, email ." Nothing tells the operator how to keep that promise. There is no delete control and no database function for one conversation: the write functions of supabase/migrations/20261128120300_support_chat_functions.sql are start, send, reply, mark read, and set status. docs/operations has no procedure either (rg -i "support_threads" docs/operations finds nothing).

The same runbook already sets the precedent for a policy promise the operator fulfils by hand: the audit log section of docs/operations/deploy.md ("Remove the rows written before the switch") gives the count and the delete behind the policy's "To have a copy removed from our database, email" sentence.

Raised by the Fable review of #791 (thread https://github.com/eddiejaoude/StackDash/pull/791#discussion_r4769533513). It is not done on that branch because docs/operations/deploy.md is outside #755's file list and open PR #776 is editing it.

Plan

  1. Add a short procedure under "Support chat storage and retention" in docs/operations/deploy.md, after #776 merges:
    • Take the conversation id from the inbox address (/app/admin/inbox?thread=<id>), after confirming the request comes from the conversation's owner (the address on the account that owns support_threads.user_id).
    • Run delete from public.support_threads where id = '<id>'; in the SQL editor. It cascades to the messages, attachment rows, read markers, and delivery records (20261128120100_support_chat.sql:81,115,142-143, 20261128120200_support_attachments.sql:49-51).
    • Say that the image objects are then named by no row, so the daily retention job deletes them once they are 24 hours old (list_orphaned_support_objects), and that Storage objects are never deleted with SQL.
    • Say that emails already sent about the conversation stay in the inboxes they reached and with the email provider, as the policy says.
  2. Link the procedure from the policy's promise only if the docs already link operator procedures from the policy elsewhere; otherwise leave the policy as is.

Acceptance criteria

  • docs/operations/deploy.md has a procedure to delete one support conversation: how to find the id, how to check the requester owns it, the one delete statement, what it cascades to, and when the images go.
  • Each statement matches the migrations and src/lib/jobs/retention.ts at the commit it lands on.
  • Playwright e2e: none needed, no user-visible change; npx vitest run src/lib/docs.test.ts passes.

Files and areas

docs/operations/deploy.md (support chat storage and retention section only).

Non-goals: a delete control in the app or a database function for it (a feature, its own issue if wanted), changes to the privacy policy wording.

Verification

npx vitest run src/lib/docs.test.ts and npm run format:check: pass.


Branch: <issue-number>-support-conversation-delete-procedure

Model: anthropic/claude-opus-5-5 | Reasoning effort: not reported by the harness

Lingua principale
TypeScript
Stelle
13
Fork
2
Merge medio
5h 20m
PR unite (30g)
287

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eddiejaoude/StackDash

Tutte le issue di eddiejaoude/StackDash

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.