whisper-money/resources/js/types
Víctor Falcón e35f7125b3
feat: Plaintext transactions behind feature flag (#105)
## Summary

- Adds `plaintext-transactions` Pennant feature flag (defaults to
`false` / encryption ON)
- When active, new transactions are stored as plaintext (no client-side
encryption)
- Existing encrypted transactions continue to work — detection is based
on `description_iv` being NULL (plaintext) vs present (encrypted)
- Migration makes `description_iv` nullable on the transactions table

## Changes

**Backend:**
- Feature flag definition in `AppServiceProvider`, shared via
`HandleInertiaRequests`
- `StoreTransactionRequest` / `UpdateTransactionRequest` conditionally
require `description_iv`
- `TransactionFactory` gains a `plaintext()` state

**Frontend:**
- Edit dialog and import drawer skip encryption when flag is active
- `EncryptedTransactionDescription` renders plaintext directly when IV
is null
- All decryption loops handle both encrypted and plaintext transactions
- Rule re-evaluation stores notes as plaintext when flag is active

## Test plan

- [x] Run `php artisan migrate` to apply the migration
- [x] Activate flag: `php artisan feature:enable plaintext-transactions
all`
- [ ] Create a transaction — verify description is stored as plaintext
in DB (`description_iv` is NULL)
- [ ] Deactivate flag: `php artisan feature:disable
plaintext-transactions all`
- [ ] Create a transaction — verify encryption is still required (422
without IV)
- [x] Verify old encrypted transactions still display correctly
- [ ] Run `php artisan test --compact
tests/Feature/PlaintextTransactionsTest.php`
2026-02-10 14:31:24 +01:00
..
account.ts Remove encryption from bank account names (#104) 2026-02-09 14:15:26 +01:00
automation-rule.ts feat: add transaction labels feature (#24) 2025-12-13 13:02:19 +01:00
balance-import.ts Import balances assistant (#14) 2025-12-05 16:39:56 +01:00
budget.ts feat: Load transactions history on budget created (#72) 2026-01-22 11:10:15 +01:00
category.ts Add category type field support (#2) 2025-12-01 20:19:47 +01:00
import.ts Add transaction selection to import preview (#25) 2025-12-13 12:41:18 +01:00
index.d.ts feat: Plaintext transactions behind feature flag (#105) 2026-02-10 14:31:24 +01:00
label.ts feat: add transaction labels feature (#24) 2025-12-13 13:02:19 +01:00
language.ts feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
pricing.ts feat: centralize pricing config with multiple plans support (#20) 2025-12-09 10:03:35 +01:00
transaction.ts feat: Plaintext transactions behind feature flag (#105) 2026-02-10 14:31:24 +01:00
uuid.ts Fix CI: Update bun.lock and fix linting errors 2025-12-01 15:16:06 +01:00
vite-env.d.ts feat: Add PostHog (#70) 2026-01-20 10:47:59 +01:00