siftlode/frontend
npeter83 d610647d13 feat(stats): per-user API quota attribution + admin usage page
Track who burned how much YouTube API quota. A QuotaEvent audit log (migration
0009) records every spend with the triggering user (NULL = background/system) and
an action label, set via a request/job-scoped contextvar (quota.attribute) so no
call signatures change. User-initiated work (sync subscriptions, unsubscribe,
opt-in recent backfill, manual enrich) attributes to the user; scheduler work to
System, split by action.

- backend: QuotaEvent model + migration 0009; quota.attribute() contextvar;
  record_usage logs events; entry points wrapped (routes/sync, routes/channels,
  scheduler); GET /api/quota/my-usage + GET /api/quota/admin
- frontend: admin-only Stats page (header nav, page=stats) with daily bars +
  per-user breakdown by action and range picker; 'Your API usage' in Settings ->
  Sync for every user

Verified: attribution + endpoints compute correctly; events are per-user vs System.
2026-06-12 02:47:55 +02:00
..
src feat(stats): per-user API quota attribution + admin usage page 2026-06-12 02:47:55 +02:00
index.html feat: M4 (part 2) — React reader UI with theming 2026-06-11 02:19:47 +02:00
package-lock.json feat(ui): customizable sidebar — collapsible, reorderable, toggleable widgets 2026-06-11 19:21:48 +02:00
package.json feat(ui): customizable sidebar — collapsible, reorderable, toggleable widgets 2026-06-11 19:21:48 +02:00
postcss.config.js feat: M4 (part 2) — React reader UI with theming 2026-06-11 02:19:47 +02:00
tailwind.config.js feat: M4 (part 2) — React reader UI with theming 2026-06-11 02:19:47 +02:00
tsconfig.json feat: M4 (part 2) — React reader UI with theming 2026-06-11 02:19:47 +02:00
vite.config.ts fix(dev): vite proxy to 127.0.0.1 + throttle error notifications 2026-06-11 22:00:57 +02:00