whisper-money/resources/views/mail
Víctor Falcón 477e4d50e2
feat(encryption): commands to warn and remove inactive encrypted-data accounts (#633)
## What

Two artisan commands to retire the remaining legacy client-side
encrypted data in production (transactions with
`description_iv`/`notes_iv`, accounts with `name_iv`).

- **`encryption:notify-removal`** — queues a re-engagement/deletion
warning to every user who still has an encrypted transaction or account.
Reuses `SendUpdateEmailJob` (queue `emails`, dedup via `UserMailLog`,
50/day pacing). The email is framed as an **inactivity** cleanup (no
mention of encryption) and pitches recent additions (AI insights, bank
integrations, etc.).
- **`encryption:delete-accounts`** — soft-deletes and anonymizes
(`User::markAsDeleted()`) those users **only** if they have not signed
in within the grace window (`--days`, default 7, via `last_active_at`).
Anyone who came back is spared, and the demo account is always excluded.

Both support `--dry-run` and `--force`, and share the target query via
the `FindsUsersWithLegacyEncryption` concern so the warning and the
deletion always target the same set.

## Intended manual run

`notify-removal --dry-run` → run for real → wait 7 days →
`delete-accounts --dry-run` → run for real.

## Notes / scope

- Deletion is a **soft-delete + email anonymization** (accounts become
unusable); it does not hard-purge rows, and does not cancel Stripe
subscriptions or revoke bank connections (unlike `user:delete`). Legacy
inactive accounts are unlikely to have either; handle separately if
needed.
- Email copy is plain English (matches the existing `mail/updates/*`
convention), no new `__()` keys.

## Tests

`tests/Feature/Console/NotifyEncryptedDataRemovalCommandTest.php` and
`DeleteEncryptedDataAccountsCommandTest.php` — 6 passing (targeting,
queue, dry-run, grace window, demo exclusion).
2026-07-03 15:57:04 +00:00
..
drip feat(email): follow up after post-onboarding AI consent (#596) 2026-06-26 17:56:06 +00:00
invitations feat(leads): cohort-based launch invitations with per-user Stripe coupons (#333) 2026-04-30 15:10:28 +01:00
updates feat(encryption): commands to warn and remove inactive encrypted-data accounts (#633) 2026-07-03 15:57:04 +00:00
bank-transactions-synced.blade.php feat(settings): let users disable bank transactions email (#472) 2026-06-02 12:24:39 +02:00
banking-connection-auth-failed.blade.php fix: reorder signed names in mail templates (#266) 2026-04-10 13:32:32 +01:00
banking-connection-expired.blade.php Notify users about expired bank connections (#404) 2026-05-20 09:20:13 +02:00
broken-bank-logos-report.blade.php Add weekly bank logo audit command (#211) 2026-03-06 11:05:13 +00:00
enable-banking-connections-cancelled.blade.php Cancel Enable Banking connections for free users (#289) 2026-04-15 16:23:03 +02:00
user-lead-invitation.blade.php fix: reorder signed names in mail templates (#266) 2026-04-10 13:32:32 +01:00
user-lead-re-invitation.blade.php feat(leads): add user lead re-invite campaign (#432) 2026-05-26 08:35:31 +02:00
verify-email.blade.php fix: reorder signed names in mail templates (#266) 2026-04-10 13:32:32 +01:00
verify-user-lead-email.blade.php feat: verify waitlist leads (#285) 2026-04-14 11:26:01 +01:00
waitlist-overtaken.blade.php fix: reorder signed names in mail templates (#266) 2026-04-10 13:32:32 +01:00
waitlist-referral-notification.blade.php fix: reorder signed names in mail templates (#266) 2026-04-10 13:32:32 +01:00
waitlist-welcome.blade.php fix: reorder signed names in mail templates (#266) 2026-04-10 13:32:32 +01:00