Lazy-enriches member profiles on first view via Congress.gov detail API.
Adds office address, phone, official website, congress.gov link, birth
year, terms history, leadership roles, and sponsored/cosponsored counts.
Includes DB migration 0007 for new member columns.
Co-Authored-By: Jack Levy
- Poller now fetches bill detail on insert to get sponsor (list endpoint
has no sponsor data)
- Add backfill_sponsor_ids task + admin endpoint + UI button to fix the
1,616 existing bills with NULL sponsor_id
- Member name search now matches both "Last, First" and "First Last"
using split_part() on the stored name column; same fix applied to
global search
- Load Bill.sponsor relationship eagerly in get_member_bills to prevent
MissingGreenlet error during Pydantic serialization
- Remove .trim() on search onChange so spaces can be typed
Authored-By: Jack Levy
Replaces light/dark variant classes (which produced unreadable pale pink
in dark mode) with solid saturated colors: red-600 for Republicans,
blue-600 for Democrats, slate-500 for Independents — all with white text.
Authored-By: Jack Levy
LLM prompts updated to output {text, citation, quote} objects for every
key_point and risk. govinfo_url stored on BillBrief (migration 0006) so
the frontend can link directly to the source document without an extra
query. AIBriefCard renders § citation chips that expand inline to show
the verbatim quote and a View source → GovInfo link. Old plain-string
briefs continue to render unchanged.
Authored-By: Jack Levy
- GET /api/admin/stats returns total bills, docs fetched, briefs generated
(full + amendment), and remaining count
- Admin page shows stat cards + progress bar, auto-refreshes every 30s
Authored-By: Jack Levy
- User model with email/hashed_password/is_admin/notification_prefs
- JWT auth: POST /api/auth/register, /login, /me
- First registered user auto-promoted to admin
- Migration 0005: users table + user_id FK on follows (clears global follows)
- Follows, dashboard, settings, admin endpoints all require authentication
- Admin endpoints (settings writes, celery triggers) require is_admin
- Frontend: login/register pages, Zustand auth store (localStorage persist)
- AuthGuard component gates all app routes, shows app shell only when authed
- Sidebar shows user email + logout; Admin nav link visible to admins only
- Admin panel (/settings): user list with delete + promote/demote, LLM config,
data source settings, and manual celery controls
Authored-By: Jack Levy