Commit Graph

4 Commits

Author SHA1 Message Date
null a2266635f4 perf: worker N+1 batching, status runtime DB persistence, 'use strict' 2026-06-04 21:32:28 -05:00
null 1f1c505115 fix: daily worker quarterly and annual bill cycle bugs
- getCycleRange() now called per-bill so quarterly/annual bills are
  checked in their full window, not just the calendar month
- Null-safe guard after buildTrackerRow() prevents TypeError on
  cyclically-inactive bills
2026-06-03 21:55:15 -05:00
null 5182754e0f feat(tracker): price-change drift detection with amber insight panel
Detects when a bill's recent payments have diverged from its configured
expected amount for 2+ consecutive months and surfaces it in a new
collapsible amber panel on the Tracker page.

- Migration v0.71: adds `drift_snoozed_until` to bills and
  `notify_amount_change` to users
- New `driftService.getDriftReport()`: computes per-bill payment median
  over last 3 months, flags drift above a user-configurable threshold
  (default 5%, minimum $1 delta)
- New `GET /api/bills/drift-report` and `POST /api/bills/:id/snooze-drift`
  routes (registered before `/:id` to avoid routing conflict)
- `runDriftNotifications()` added to daily worker — sends amber digest
  email per user listing all changed bills with old → new amounts
- `notify_amount_change` wired through profile and notifications routes
- `DriftInsightPanel`: collapsible amber panel with per-bill
  strikethrough old → new amount, ±% badge, TrendingUp/TrendingDown
  icons, "Update to $X.XX" (with undo toast) and "Dismiss" (30 days)
  actions; teal palette for price decreases
- `drift_threshold_pct` setting added to SettingsPage Billing Behavior
- "Notify on price changes" toggle added to ProfilePage notifications

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 14:33:55 -05:00
_null b9d1366d46 initial commit 2026-05-03 19:51:57 -05:00