From 2e2de7af9a26ce6a1b2a58bc986e6c65c0ee1f3a Mon Sep 17 00:00:00 2001 From: Nathan Date: Tue, 7 Jul 2026 11:31:19 -0400 Subject: [PATCH 01/17] feat: lobbying explorer Phase 1 foundation - Extend LobbyingFiling type with registrantId; add LobbyingStats, LobbyingClientSummary, LobbyingPositionCounts aggregate types using Dictionary for string-keyed maps (runtypes v5 compat) - Add lobbyingMeta/stats singleton collection constants; add CLIENTS_COLLECTION - Add Firestore composite indexes for registrantId+year and clientNameNorm+year (DESCENDING) on lobbyingFilings to support firm and client detail queries - Add data hooks (useLobbyingFilingsForBill, useLobbyingRegistrant, etc.) in components/db/lobbying.ts following existing useAsync pattern - Add lobbying.json locale namespace; add navigation.lobbying to common.json - Add NavbarLinkLobbying component; wire into Navbar behind lobbyingTable flag - Add LobbyingPositionChip (support/oppose/neutral/none pill), LobbyingFilingsTable (configurable columns), LobbyingBillCard (sidebar card with position stacked bar, truncated table, explorer link) - Replace dummy LobbyingTable in BillDetails with LobbyingBillCard - Enable lobbyingTable feature flag in development env - Install recharts (v3); update chartTheme.tsx for v3 TooltipContentProps API Co-Authored-By: Claude Sonnet 4.6 --- components/Navbar.tsx | 10 + components/NavbarComponents.tsx | 21 + components/bill/BillDetails.tsx | 8 +- components/db/lobbying.ts | 164 ++++++++ components/featureFlags.ts | 2 +- components/lobbying/LobbyingBillCard.tsx | 238 +++++++++++ components/lobbying/LobbyingFilingsTable.tsx | 126 ++++++ components/lobbying/LobbyingPositionChip.tsx | 74 ++++ components/lobbying/chartTheme.tsx | 317 ++++++++++++++ docs/lobbying-frontend-plan.md | 416 +++++++++++++++++++ firestore.indexes.json | 28 ++ functions/src/lobbying/types.ts | 54 +++ package.json | 1 + public/locales/en/common.json | 1 + public/locales/en/lobbying.json | 54 +++ yarn.lock | 239 +++++++++++ 16 files changed, 1750 insertions(+), 3 deletions(-) create mode 100644 components/db/lobbying.ts create mode 100644 components/lobbying/LobbyingBillCard.tsx create mode 100644 components/lobbying/LobbyingFilingsTable.tsx create mode 100644 components/lobbying/LobbyingPositionChip.tsx create mode 100644 components/lobbying/chartTheme.tsx create mode 100644 docs/lobbying-frontend-plan.md create mode 100644 public/locales/en/lobbying.json diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 3c68cdd44..a8b708eae 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -15,6 +15,7 @@ import { NavbarLinkAiTools, NavbarLinkBills, NavbarLinkHearings, + NavbarLinkLobbying, NavbarLinkEditProfile, NavbarLinkEffective, NavbarLinkFAQ, @@ -72,6 +73,9 @@ const MobileNav: React.FC> = () => { return (