- Add MerchantCorrection model: upsert by merchantName, Category enum
- Check corrections DB first in suggestCategoryForMerchant (source: "learned",
no confirmation required); falls through to rules then Ollama if no match
- Inject recent corrections as few-shot examples in the Ollama prompt so the
model improves even for merchants not yet explicitly corrected
- Add POST /categories/correct route to persist corrections
- Detect category override on form save (suggestedCategory !== chosen category)
and silently fire a correction — no extra UX required
- Fix test isolation: beforeEach re-applies vi.fn() defaults after restoreAllMocks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Wrap getDashboardSnapshot in try/catch; return JSON 500 instead of crashing
- Add prisma/seed.ts with realistic Feb + Mar 2026 data: biweekly $2,850 pay
schedule, $2,430 rent, expenses across all 8 categories
- Update Dockerfile and backup route for host Ollama runtime
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add updateExpense() to lib/expenses.ts
- Add PATCH /expenses/:id route with validation and P2025 not-found handling
- Edit button on each expense card pre-fills form; cancel restores add mode
- Submit dynamically PATCHes or POSTs depending on edit state
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Strengthen prompt with required observations (savings rate, spend-to-income,
top category, anomaly), dollar-formatted amounts, and pay schedule context
- Preserve recommendation array structure; store as JSON array string in DB
- Render recommendations as numbered cards with icons in home dashboard
- Add spend-vs-income progress bar and category flow mini bar chart
- Fix test assertions for new JSON array recommendation format
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>