BillTracker/client/hooks
null d9a441dff6 feat(settings): auto-save preferences with live save status (batch 0.39.0)
Replace all Save buttons on the Settings page with debounced auto-save:

- useAutoSave hook: debounce with latest-payload-wins, flush() for blur,
  pending-edit flush on unmount, status machine (idle/saving/saved/error)
  with saved fading back to idle. Covered by 6 Vitest tests (fake timers).
- SaveStatus pill (framer-motion) in the page header and notification card
  headers — Saving…/Saved/Save failed.
- Timing per control: toggles/selects/channel ~150-400ms; typed inputs
  (email, URLs, grace period, drift pct) 900ms + flush on blur.
- Push token never auto-saves mid-type: saves on blur only, so a partial
  token can never overwrite a working one.
- Notification cards no longer refetch parent settings on save (would
  clobber in-flight edits under auto-save).
- Decision: no undo toast — settings are non-destructive and instantly
  re-editable; undo would add noise without safety.
- vitest include now picks up .jsx tests; jsdom + @testing-library/react
  added as devDependencies.
2026-06-12 02:08:42 -05:00
..
useAuth.jsx 0.34.3 2026-05-31 15:06:10 -05:00
useAutoSave.js feat(settings): auto-save preferences with live save status (batch 0.39.0) 2026-06-12 02:08:42 -05:00
useAutoSave.test.jsx feat(settings): auto-save preferences with live save status (batch 0.39.0) 2026-06-12 02:08:42 -05:00
useQueries.js feat(tracker): price-change drift detection with amber insight panel 2026-05-30 14:33:55 -05:00
useSearchPanelPreference.js feat: search filter panel component, search preference persistence, page integration 2026-06-07 01:28:35 -05:00