whisper-money/app
Víctor Falcón d1efc03fc5
Move transaction filtering from client-side to server-side (#126)
## Summary

- **Server-side filtering/sorting/search**: With encryption removed, all
transaction filtering, sorting, and full-text search (LIKE on
description + notes) now happens via SQL queries instead of client-side
IndexedDB with decryption
- **Cursor pagination**: Transactions are returned with cursor-based
pagination (default 50 per page, "Load More" pattern) instead of loading
all into IndexedDB
- **Removed IndexedDB dependency**: The main transactions page no longer
depends on Dexie/IndexedDB for data or sync — other pages (categorize,
accounts/show, budgets/show) are unaffected and will be migrated
separately

## Changes

| File | Change |
|------|--------|
| `app/Models/Transaction.php` | Added `scopeApplyFilters` query scope |
| `app/Http/Requests/IndexTransactionRequest.php` | New form request for
filter validation |
| `app/Http/Controllers/TransactionController.php` | Server-filtered
cursor-paginated index, refactored bulkUpdate to reuse scope |
| `resources/js/pages/transactions/index.tsx` | Major rewrite —
server-driven filtering, sorting, pagination via `router.visit()` |
| `resources/js/components/transactions/transaction-filters.tsx` |
Search always enabled (removed encryption key dependency) |
| `resources/js/types/transaction.ts` | Added `ServerTransaction` type |
| `resources/js/contexts/sync-context.tsx` | Simplified — removed
transaction sync service |
| `tests/Feature/TransactionFilterTest.php` | 20 new Pest tests for all
filter scenarios |

## Test plan

- [x] Run `php artisan test` — all 523+ tests pass
- [x] Navigate to `/transactions` — paginated results load from server
- [x] Apply each filter type (date, amount, category, account, label,
search) and verify server round-trip
- [x] Test "uncategorized" category filter
- [x] Test combined filters
- [x] Test sorting by date, amount, description (ascending/descending)
- [x] Test "Load More" button for cursor pagination
- [x] Test bulk operations (select some → update, select all filtered →
update)
- [x] Verify URL persistence (refresh page with filters in URL)
- [x] Test search on both description and notes fields
2026-02-16 12:49:04 +01:00
..
Actions feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
Console/Commands feat: Add --user and --connection filters to banking:sync command (#122) 2026-02-13 17:35:07 +01:00
Contracts feat: Integrate EnableBanking as open banking provider (#106) 2026-02-12 09:09:28 +01:00
Enums feat: Integrate EnableBanking as open banking provider (#106) 2026-02-12 09:09:28 +01:00
Events Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Http Move transaction filtering from client-side to server-side (#126) 2026-02-16 12:49:04 +01:00
Jobs Email notification for bank-synced transactions (#113) 2026-02-12 14:05:02 +01:00
Listeners feat: Apply automation rules to bank-synced transactions (#112) 2026-02-12 14:20:55 +01:00
Mail Email notification for bank-synced transactions (#113) 2026-02-12 14:05:02 +01:00
Models Move transaction filtering from client-side to server-side (#126) 2026-02-16 12:49:04 +01:00
Notifications feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
Policies Add Budgeting Feature to Track and Manage Spending (#36) 2026-01-21 15:25:50 +01:00
Providers Remove plaintext-transactions feature flag & E2E references (#116) 2026-02-13 11:10:21 +01:00
Services feat: Add per-bank description formatter for bank-synced transactions (#120) 2026-02-13 09:54:58 +01:00