clipwright/dashboard
juancarlos.cavero b4bf211b7b fix(cloud): close the gaps the account-deletion review turned up
Eight findings from re-reading the erasure path, each one something that would
have shown up in production rather than in a test:

- The local purge missed two stores. SaaSShorts outputs (output/saas_<id>) and
  generated thumbnails record ownership in their own in-memory dicts, not in
  the .owner file, so neither was erased. Thumbnails are the serious half: the
  hourly sweep deliberately skips their directory, so a deleted user's
  generated images stayed on disk forever, publicly served at /thumbnails/.
- The purge ran on the event loop. rmtree over gigabytes of video stalled every
  other request on the process; it goes through asyncio.to_thread now.
- Paths from those dicts are now resolved through _safe_under, so a session id
  or output_dir containing ".." deletes nothing.
- Deleting a user made a webhook path reachable that never was: _apply_topup
  takes the user id from Stripe metadata, so a top-up completing around the
  deletion inserted a row pointing at a user that no longer exists. The FK
  violation 500s the webhook, and since the event is only recorded after
  handle_event returns, Stripe retries the same doomed insert for three days.
  It confirms the row exists first.
- The "why are you leaving" box was free text stored in a record that
  deliberately outlives the account, which is how personal data ends up in one
  by accident. It is a closed list now, which also makes twenty deletions a
  month countable instead of readable.
- Two concurrent deletes wrote two erasure records and sent two goodbye emails.
  The DELETE's rowcount now decides which call is the real one; the UI holds a
  ref so a double click doesn't fire a second Stripe cancel and R2 purge.
- The delete button armed itself when the confirm box was empty, if the page
  ever rendered before /api/me resolved.
- The goodbye email claimed we keep "a one-way hash of your email and nothing
  else", which was not true of the Stripe reference beside it. Fixed in the
  email and in the privacy policy, EN and ES.

Also: skip the Upload-Post call when no managed key is configured, and say
plainly in the in-flight comment that it covers metered work only.

tests/test_account_local_purge.py covers tenant isolation across all three
stores and both traversal attempts; test_account_erasure.py gains the
confirmation gate, the API-key refusal, and the already-cancelled-at-Stripe
case that would otherwise trap a user forever.
2026-08-24 19:26:12 +02:00
..
public feat(seo): canvas screenshot on the n8n page, and link it from the landing 2026-08-21 21:41:58 +02:00
seo fix(cloud): close the gaps the account-deletion review turned up 2026-08-24 19:26:12 +02:00
src fix(cloud): close the gaps the account-deletion review turned up 2026-08-24 19:26:12 +02:00
.gitignore improve video preview 2025-12-21 01:59:15 +01:00
Dockerfile fix(analytics): make product analytics opt-in and host-scoped 2026-07-28 09:58:33 +02:00
eslint.config.js added front-end and backend 2025-12-19 17:59:03 +01:00
index.html feat(dashboard): make the app usable on a phone 2026-08-24 02:25:24 +02:00
nginx.conf fix(seo): permanent apex redirect, real 404s, and gallery links that resolve 2026-07-27 11:48:33 +02:00
package-lock.json feat: Add Remotion integration for animated subtitles, hooks and effects 2026-04-10 14:00:11 +02:00
package.json feat: Add Remotion integration for animated subtitles, hooks and effects 2026-04-10 14:00:11 +02:00
postcss.config.js added front-end and backend 2025-12-19 17:59:03 +01:00
README.md added front-end and backend 2025-12-19 17:59:03 +01:00
tailwind.config.js feat(dashboard): make the app usable on a phone 2026-08-24 02:25:24 +02:00
vite-plugin-seo.js feat(legal): full legal corpus — Terms, Privacy, Legal Notice in EN+ES 2026-08-19 22:06:11 +02:00
vite.config.js feat(seo): make the site readable by AI crawlers 2026-07-27 10:56:15 +02:00

React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.