BillTracker/client
null 1238ac5b14 feat(demo): full "take it for a ride" seed + surgical, correct removal
The demo seeder created bills + categories only, so nearly every page
rendered empty; clear-demo had a data-loss bug and error-protection gaps.

Seed now populates every user-facing surface: bills with autopay states,
3-6 months of payment history (with drift + debt paydown), monthly
skips/overrides/snoozes/notes, a demo bank source + accounts + matched/
unmatched/subscription transactions, categorised spending + budgets +
rules, planning income/starting-amounts, category groups, an active
snowball plan (+ extra-payment), merchant rules, and a calendar feed —
so a new user can explore Tracker (incl. overdue/drift), Analytics,
Summary, Spending, Snowball, Payoff, Transactions, Matches, Subscriptions,
Banking and Calendar with realistic data.

Correct removal (the emphasis):
- Migration v1.07 adds an is_seeded marker to the 12 user-scoped,
  non-cascading demo tables (bill-children cascade with their seeded bill).
- clearSeededDemoData() (new, in userDataService alongside eraseUserData)
  removes ONLY seeded rows in one transaction, child->parent, and keeps a
  seeded category if a user's own bill still references it.
- Fixes the category collision: seed marks ONLY categories it creates, so
  clear no longer deletes the user's default categories / uncategorises
  their real bills.

Error protection: idempotency guard on seeded (not all) bills -> 409
instead of a fake "created 0"; whole seed wrapped in one transaction
(atomic); rate-limit + audit + standardizeError on all three routes;
seeded-status reports payments/transactions counts; dead --force removed.
Client copy/counts corrected.

Verified: typecheck/check clean; server suite 232/232 (+6 new); client
typecheck/lint/build clean; e2e probe 17/17; on a COPY of the real prod
DB the v1.07 migration applies (integrity ok) and a seed->clear round-trip
on the data-rich user restores their real data byte-for-byte with no
orphans.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 13:06:47 -05:00
..
components feat(demo): full "take it for a ride" seed + surgical, correct removal 2026-07-06 13:06:47 -05:00
contexts refactor(brand): wire brand + new primitives through layout chrome 2026-07-05 17:18:31 -05:00
hooks refactor(tracker): move settings/simplefin onto React Query + defer search (plan B) 2026-07-05 14:43:13 -05:00
lib Add complete brand asset pack 2026-07-06 12:54:29 -05:00
pages Polish tracker command header 2026-07-06 12:54:11 -05:00
public Add complete brand asset pack 2026-07-06 12:54:29 -05:00
App.tsx refactor(brand): adopt new primitives in pages 2026-07-05 17:18:56 -05:00
api.ts refactor: remove verified dead code — orphan file, dead HOC, unused api wrappers 2026-07-05 17:21:31 -05:00
index.css refactor(brand): wire brand + new primitives through layout chrome 2026-07-05 17:18:31 -05:00
main.tsx feat(settings): theme "System" + reduce-motion (plan Tier 1) 2026-07-05 15:50:37 -05:00
types.ts refactor(ts): move User to @/types + type auth endpoints; add code to 500 (Track C/D) 2026-07-05 12:26:11 -05:00