Skip to content

Deploy to PROD 10/28/26 - #2322

Merged
Mephistic merged 72 commits into
prodfrom
main
Oct 28, 2026
Merged

Mephistic merged 72 commits into
prodfrom
main

Conversation

fastfadingviolets and others added 30 commits October 14, 2026 14:59
A committee of conference is its own document at
generalCourts/{court}/conferences/{id}: the pair of bills, the conferees,
status, linked hearings, journalist-authored differences and similarities,
and the four-way testimony counts. Links are one-way: the conference
references its bills, testimony gains an optional conferenceId, and nothing
is written onto a bill. getConferenceForBill answers "is this bill in
conference" from the other side.

syncConferences writes a document per YAML file under conferences/{court}
and deletes documents whose file is gone, keeping the counts the testimony
triggers own. It refuses a file whose folder and name disagree with its
court and id, or whose canonical bill is neither of the pair. findConferences scans bill histories for the appointment
action, pairs each bill with the other chamber's last reprint, resolves
conferees and drafts the YAML for each conference that has no file yet,
recognising existing ones by their bills. fetchBills queues a scraper batch
so the emulator fills in named real bills. Sixteen conferences in the 194th court
are authored, with pairings confirmed against the hearing notices.

docs/updating-conferences.md says how to add and update a conference;
scripts/README.md lists the three scripts.

Branch moves to common so districts, OCPF matching and conferences share
it, and member-name parsing to an import-free module in functions/src/shared
so the browser can use it too.

Closes hyphacoop#67

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A page per conference at /conferences/{court}/{id}, matching the UX
designer's mockup: a rail of every conference down the left (a picker in
the title on phones), the short name, a byline naming the act and linking
both bills, and a card with the six conferees beside two district maps.
Pointing at a conferee lights their district; a chair is marked, and the
viewer's own legislator carries a star. The hearings the YAML links close
the card.

The maps are the mockup's own geometry, ported as JSON: a coastline and
one Voronoi cell per seat, keyed by the legislature's District string so a
seat is found from the member document rather than typed by hand. They
show which seats are in the room, not where a district's edges run.

The data model gains an optional short `name` on a conference and a
`chair` flag on a conferee, filled in for every authored conference.

A bill in conference carries a banner to its committee, and a hearing a
conference links points back to it, since conference hearings carry no
bill numbers of their own. The bill and hearing pages look the conference
up in getServerSideProps, alongside the bill or hearing read, and pass it
down as a prop, so the browser makes no conference query and the banner
is part of the first render. All of it sits behind a `conferences` feature
flag, on in development only.

Closes hyphacoop#68
Closes hyphacoop#72

Verified: typecheck, lint, the unit and integration tests, and against the
emulator seeded with the real 194th-court
bills, members and conference hearings: both conference pages, the pointer
and tap interactions, both bill banners, the hearing back-link and the phone
picker. The server-side lookup was checked against the emulator (the
conference is in the page props for a bill and a hearing in one, null for a
bill in none), not as banner text in the HTML: dev renders an empty shell on
every page, with or without this change.
Not verified: the flag off, where the page should 404 and the banner and
back-link should be absent.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The conference map's cells were named after the design mockup, and a lookup
file translated a member's district into a cell name by exact spelling. A
spelling difference silently dropped a seat and the Senate names go stale at
the next election. The 200 cells are now keyed by `districtId`, the id the
districts collection uses, and the conferee's seat is that id when the map has
it (null otherwise). The lookup file and its module are gone.

Closes hyphacoop#74

Verified: both tscs, unit and component tests, the conferences integration
test, and all 96 conferees across the 16 conferences resolve to a map cell
via the public members API.
Not verified: `next build` (untracked scratch scripts fail tsc), and the
browser check of the bill/hearing banner, the `conferences` request log and
the flag-off case.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
/conferences lists every conference in the current court, with every
conferee lit on the two chamber maps, matching the mockup's deployed index
(k-g-k/maple-conference 85b6e14). Choosing a row holds that conference: its
six in the panel, only their seats lit, and a link to its page. Choosing a
seat reads that legislator: the conferences they sit on, and the table keeps
those rows. "My legislators" does the same for a signed-in reader's two.
Below 960px the card is a list of links. Finished conferences follow the
active ones with their status word, as in the rail. Page and nav entry sit
behind the conferences flag.

The loader resolves each member once across all conferences
(resolveConferees), and the conference page now uses it too. The two pages
share the conferee face, the bill line, the page column, the hover and
my-legislators hooks, and the seat key the map, lists and table agree on.

Left out: the shared-member count and the panel's previous/next district
strips.

Closes hyphacoop#71

Verified: both tscs, eslint, prettier, jest (14, 4 new). Against the
emulator seeded with the 194th members and the 16 conferences: 16 rows with
all 96 portraits; seats lit 26/40 and 39/160, equal to the distinct
conferees per chamber in the YAML; Data Privacy shows its six and links to
its page; a seat highlights that legislator's rows and lists their
conferences with chair tags; the nav entry opens the page; with the flag
off the index and conference page 404 and the nav entry is gone; the narrow
list at 420px; the conference page still pins and lights after the shared
refactor.
Not verified: the "My legislators" toggle with a signed-in profile (unit
test only); the 26px faces at 1200px and up; `next build`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
syncConferences stopped at the first file the runtype rejected, with an
error that named no file. It now checks each file, collects the errors
with their file names and writes nothing if any fail. It also refuses keys
the Conference runtype does not know, since the document is the YAML as
written and a misspelt key would land in Firestore beside the field it
meant to set, and a senateBillId or houseBillId without its chamber's
prefix, which getConferenceForBill relies on to pick the field it queries.

Verified: functions tsc; the conferences integration test (9) against the
Firestore emulator; all 16 authored conferences pass the new checks.
Not verified: no test exercises the unknown-key or prefix refusals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed conference lookup in getServerSideProps now drops the banner or
back-link instead of failing the bill or hearing page, as the ballot
question page does. Hearing dates on the conference page are formatted in
the legislature's zone, so the server and the reader agree on the day of
an evening hearing, and a hearing with no start is left out instead of
showing as 1970. listConferences no longer orders by title, since every
caller sorts by activity.

Verified: website tsc, jest (14).
Not verified: in a browser, the evening-hearing date and a failing lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e49c02b made syncConferences refuse a file with a key the schema does not
have and a file whose Senate and House bill ids are swapped, with no test
for either. Each now has an integration case that asserts the named error
and that nothing is written. The folder/id refusal test left court: 195 in
the shared fixture, so the next case saw a second error; it now restores it.

Verified: the conferences integration test (11) against the Firestore
emulator; prettier. In a browser against the emulator with the 194th
court's bills, members and conferences: bill banner and hearing back-link
with the flag on; none of it, and 404 on the conference pages, with the
flag off; a failed conference lookup leaves the bill and hearing pages up;
an 8:30pm Eastern hearing shows its Eastern date; "My legislators" with a
signed-in profile; 26px faces at 1317px. `next build` in a clean worktree.
Not verified: that the new cases fail with the refusals removed; phone
widths; real scraped hearings (the two linked hearings were cloned from a
fixture); a failed lookup on the conference page itself, which returns 500.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add conference committees: their data, pages and the Conference Explorer
The index page read one member document per conferee, about 65 reads for the
194th court, each carrying bill lists the page never uses. It now reads the
single memberSearch index document for the current court. Where that document
is missing, as in the emulator where the scheduler never fires, or the court
is another, it reads members one by one as before. The conference page keeps
its per-member reads.

Closes hyphacoop#75

Verified: conference unit tests pass, including new loader tests for the index
path, the missing-index fallback, a conferee absent from the index, and
another court. Against the local emulator seeded with the 194th court, the
index page's props are identical with and without the index document (16
conferences, 96 conferee rows, 96 seated; 26 Senate and 39 House seats lit),
and an edited name in the index document renders.

Not verified: the single member read is asserted by the unit test, not counted
on the emulator, which logs no reads. Portraits were counted from the page
data, not the rendered DOM.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The row was a button with the name link inside it, which is invalid HTML
and gave keyboard and screen-reader users two nested controls for one
person. The portrait is now the row's button, stretched over the row so
the whole row still pins the district, and the name is a sibling link
above it. With the legislators flag off the name goes through the
existing External link, so it opens malegislature.gov in a new tab.

Closes hyphacoop#77

Verified: jest for components/conference, tsc and eslint. In Chrome with
the flag on and off, no link sits inside a button, tab order is button
then name, and the off-flag names carry target=_blank. Hovering or
clicking the district text lights or pins the whole row and its map seat,
and clicking the off-flag name opens its malegislature.gov profile in a
new tab without pinning the row.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The banner said the bill "is in a conference committee" whatever the
committee's status, so a bill whose conference had filed its report, been
enacted or been dissolved still read as being in conference. There is now one
message per status, chosen from the status the bill page already receives,
and each still links to the committee.

Closes hyphacoop#76

Verified: tsc is clean and the conference unit tests pass, including the
banner's wording and link for each of the four statuses. On the seeded
emulator, a reportFiled bill and an appointed bill each show their own
wording, with the committee name linked.

Not verified: the enacted and dissolved wording in a browser, since no seeded
conference has either status. The wording for reportFiled, enacted and
dissolved is placeholder copy awaiting the UX designer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Making the name a sibling of the portrait button moved the focus handlers
onto the button alone, so tabbing onto the name link lit nothing. They are
on the row again, where focus from the button or the link bubbles up.

Verified: jest for components/conference, tsc. In Chrome with the
legislators flag on, tabbing from a portrait button onto its name link
keeps the row and its map seat lit.
Not verified: the same with the flag off, where the name is an External
link; the handler is on the row either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"active" is not a ConferenceStatus; the cast hid it. The fixture now uses
"appointed".

Verified: jest for components/conference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/conferences now lands on a hero (what a conference committee is, its five
steps) above the first conference in the rail's order. Every conference
address gets the same hero above it and lands at the conference's top; only
the landing opens on the hero. The explorer moves to /conferences/explorer,
titled Conference Explorer and reached from the hero; a court with no
conferences yet sends /conferences there. The Conferences nav item is
active across all of /conferences.

Scroll snap rests the reader on the whole hero or the conference's top, and
only near the top, since a snapping window eases every scroll further down.
Where the conference starts is measured by a ResizeObserver on what sits
above the hero, as the body is a fixed-height box. Rail clicks land at the
conference's top. Back within the app leaves the reader where the browser
put them, the hero included; a reload lands at the conference's top, since
Layout renders nothing until the client mounts and Chrome has nothing to
restore against. Back from a bill to deep in a conference comes back near
the top: Chrome restores while the shorter bill page is showing, as on
every MAPLE page.

The page has one h1: the hero's title on the landing, the conference's on
an address, visually hidden below md where the picker shows the name. Step
headings sit a level under the hero's title. The hero is built on the
shared PageColumn and reads its steps from the locale.

Closes hyphacoop#81

Verified: jest components/conference 16/16, tsc, eslint and prettier. In
Chrome on dev:local: the landing opens on the hero with its steps, sources
and explorer link; See the committees, a rail click (from 900px into the
landing too) and a direct address land at the conference's top; Back from
a bill to the hero stays at 0; reload mid-conference lands at the
conference's top; the explorer's tab title; an unknown address 404s. In
390px frames: stacked steps, the picker, no horizontal overflow, the h1
present but clipped; --conference-nav matches the header.
Not verified: a screen reader on a real phone; in a browser, the
empty-court redirect, the snap reach after a resize and the reduced-motion
jump; the hero's padding at phone width on PageColumn.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page column now spaces its header and the sections under it with a
flex gap instead of a margin on the header, so a section added below the
committee needs no wrapper of its own to sit 1.5rem from the one above.
The page looks the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The conference page ends with the mockup's Bill Text section: the Senate
and House texts in a recessed well, one sheet each, with a version picker
for Senate, House or both. Both is the default; below md it is the Senate,
as in the mockup. Each sheet scrolls on its own and shows one paragraph per
line the legislature broke.

The texts are fetched in the browser, not with the page: an omnibus pair
is half a megabyte (energy affordability is 533KB), and the page props
would carry it on every view. Both are fetched once by the section, so
switching version shows a text without fetching it again. A spinner holds
each sheet while it loads, and a bill with no stored text gets a sentence
and a link to its PDF.

Text the scraper extracted from a PDF is shown as stored, line numbers and
all; cleaning it up is its own change.

Closes hyphacoop#79

Verified: on the emulator with real scraped bills, data privacy shows
S2619 beside H5479 and community resilience shows S3064 beside H5518's
PDF-extracted text, each sheet scrolling on its own; the picker shows one
sheet and back; in a 390px frame it opens on the Senate with no sideways
scroll; the spinner shows in both sheets before energy affordability's
texts arrive; the gaps between sections are still 24px. Component tests
cover both sheets, one chamber picked with the other still fetched, the
spinner and the PDF link; tsc, eslint and prettier are clean.

Not verified: the PDF link in a browser (no local bill lacks text); a
real phone, only a narrow frame; whether a phone flashes both sheets
before switching to the Senate on hydration; the picker after the
fetch-once change in a browser, only in tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The conference page's title now holds under the navbar with the mockup's
tab bar beneath it: Committee and Bill Text, each tab scrolling to its
section, the section being read underlined. Testimony adds Public Input
between them. The bar was built with testimony's Public Input; it moves
here so the bill text PR carries the page's frame and testimony builds on
it. A bar of one section is left out, as the mockup leaves it out.

A tab lights once its section's top has come up to where a jump parks it,
measured on every scroll and whenever the column the sections sit in
changes size, since a section moves without a scroll when one above it
appears. The observed band it replaces was never reached by the page's
last section, so Bill Text could not light.

The bands pin under the navbar's bottom edge, tracked as the page scrolls,
rather than the stylesheet's 4.5rem. That is shorter or taller than the
desktop bar with the window, and the desktop bar lets go and scrolls away
about a window down, being sticky only inside the layout's one-window box.
On a phone the bar is not sticky, so the bands pin at the top. A tab scrolls
its section to where the navbar will be on arrival: the browser's own jump
takes the margin from before the scroll and lands a navbar's height low once
the bar has gone. The learn page's rail tracks the same edge. A jump also
turns off the hero's snap, which is on near the conference's top and would
snap the landing too, stopping a jump to Bill Text short; the hero turns it
back on near the top.

Verified: on the emulator, data privacy's two tabs jump to their sections
and land 24px under the bar as in the mockup; the lit tab follows the
scroll, and Bill Text lights at the bottom of the page; the sheets still
scroll on their own; the title sits flush under the desktop navbar, follows it up as it
lets go (stretched page: 79, 59, 39px with the bar) and rests at the top
once it has gone, where a jump to Bill Text and back lands 24px under the
tabs; in a 390px frame it pins at the top with no sideways scroll. Under
the hero, See the committees lands on the conference with the title pinned
at the top, and Bill Text, Committee and Bill Text again each land 24px
under the tabs and light (Bill Text stopped 175px short before the snap
was turned off). The bar was laid
beside the mockup at 19bd101. Component tests cover the tabs' targets,
the lit tab following the sections on a scroll and on a resize with no
scroll (failing without the resize), and a bar of one; tsc, eslint and
prettier are clean.

Not verified: a real phone, only a narrow frame; crossing the navbar's
breakpoint by resizing; keyboard focus on the tabs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A tab click replaced the history entry's state with null, which is Next's
router state: Back to that entry from another conference rewrote the URL
and left the other conference on screen. The click now keeps the state,
with the hash added to the path Next restores on Back, which would drop
it otherwise. The pinned navbar edge no longer remeasures on scrolls
inside the conference column, such as a bill text's sheet, which cannot
move the navbar; the tabs already ignored them.

Verified: on the emulator, opening Health Worker Safety from the rail,
clicking Bill Text, opening PETS Act from the rail and pressing the
browser's Back shows Health Worker Safety again at #text, the tab click
adding no history entry; jest components/conference 24/24, the new
tab-click test failing without the fix; tsc, eslint and prettier clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Testimony on a committee of conference answers a different question than
testimony on a bill: which version the committee should report, not whether
the bill should pass. Position gains passNothing, passSomething,
passSenateVersion and passHouseVersion. A draft with a conferenceId must take
one of them; every other draft keeps the three bill positions.

It follows ballot questions: one Testimony type scoped by an optional
conferenceId, with counts kept on the conference document. The testimony is
filed against the conference's canonical bill but kept off it: not in its
counts or latest testimony, not in testimony search, and not sent to the
bill's followers. The author's followers still see it.

A user can now hold a bill testimony and a conference testimony on one bill,
so publish, delete, drafts and the version archive match the scope in memory
instead of by query. That avoids stamping conferenceId: null on existing
documents. Excluding conference testimony from search changes the indexed
collection's filter, so each environment rebuilds the testimony collection
on its next deploy. One composite index is added for the conference listing.
Rolling back once conference testimony exists leaves older functions unable
to publish or delete it.

This is the server side only. Nothing under components/ or pages/ changes, so
there is no way to file conference testimony from the site yet.

Verified: functions and site tsc; functions unit tests for testimony and
notifications (32); the testimony, ballot question, moderation, conferences and
count backfill integration suites (59 tests), run on the branch tip where the
functions are unchanged from this commit.

Not verified: that testimony search leaves conference testimony out (no
Typesense locally); publishing on dev.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Conference testimony is filed against the conference's canonical bill, so it
shares that bill's id with the bill's own testimony. The site now keeps the two
apart the way the server does.

The client gets its own ConferencePosition, ConferenceTestimony and conference
draft types, so the bill and ballot-question displays keep their three
positions and none of them change. Listings for a bill, a profile and recent
testimony skip documents with a conferenceId. Draft and publication lookups
match the conference scope with the functions' matchesTestimonyScope, so a conference draft cannot collide with the
bill's draft. useEditConferenceTestimony drafts and publishes on a conference,
and useConferenceTestimony lists what has been filed on one.

Verified: site tsc is clean. The scope match is the functions' matchesTestimonyScope,
whose unit test passes. On the
emulator a conference testimony was drafted, posted and republished through the
real publish function, and its draft carried the conferenceId.

Not verified: a bill page that has testimony, in the browser, since S2581 has no
bill document locally. The listing hooks have no unit test of their own: their
jest suites already fail at the base commit (see the crumb on #69).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ient's mockup

The conference page gets the client's Public Input feed and Add Your Input
panel, built from k-g-k/maple-conference at 19bd101 (the "/" routes, which use
its BUILD flag preset).

The title carries a "Share your input" button, and Public Input joins the
section tabs between Committee and Bill Text. Public Input lists what has been filed as cards,
narrowed by account type and position, with a Following filter that appears
once the reader follows someone, five to a page, and a modal that opens an
entry whole. Each card has the kebab with Follow and Report. The panel writes
on the existing draft and publish hooks: autosaved drafts, a review step, and
posting, which puts the panel away and scrolls to a "Your Input" section.
Editing reopens the panel on the posted text; because the server requires a
reason for every republish, the review step shows one Reason for Edit field
only then, the one control the mockup does not show. The page is keyed by
conference so moving to another starts clean.

Left out on purpose: the mockup's weekly-email checkbox (nothing on the server
backs it) and its Share action (it has no destination). The followers' digest
email and newsfeed card are unchanged and still assume three positions.

Closes hyphacoop#69

Verified: site tsc and eslint are clean. jest passes for components/conference
(18, including a test that moves between conferences and failed before the
page was keyed). The feed card, filter row, and the compose panel and footer
were measured against the running mockup and match, bar the differences below.
Posting, editing, republishing, following (including from the card menu,
which then offers Unfollow), the entry modal and filters were exercised in the browser on the emulator. The server commits below it pass the
testimony, ballot question, moderation, conferences and backfill integration
suites (59).

Not verified: phone width. The review step and the Your Input section were
compared by eye only. The feed's headings and filter row do not pin as the
mockup's do. The mockup labels the reader's new entry "Just now" and animates
the "on the record" line; ours shows the date. The account-type tooltip is a
native title. Avatars are initials. The panel sits under our 72px navbar where
the mockup's is 60px. The report modal and the unverified-email path were
not exercised. The translation files the page loads
have no test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Publishing, and republishing, testimony on a conference that is reportFiled,
enacted or dissolved now fails with "not accepting testimony". Deleting stays
allowed so people can still take their testimony down. Unlike the ballot
question phase, which only the client enforces, this is checked in the publish
transaction too, so calling the function directly cannot bypass it.

On the site, a closed conference keeps its Public Input but offers no way to
write: the title's Share your input button and the Edit item in the author's
own card menu only show while it is appointed. The testimony detail page sent
conference testimony to the bill's form; it now links to the conference page
while the conference is appointed and offers no add or edit after.

Closes hyphacoop#78

Verified: the integration tests added here (publish refused for each closed
status, republish refused after the status flips, delete allowed on a closed
conference) pass. jest covers the closed page (no Share button, Public Input
still there), the card menu without Edit on a closed conference, and the
detail page's conference link and its absence once reported; the menu test
fails with the gate taken out. Site tsc is clean.

Not verified: a reportFiled conference in the browser on the emulator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nce data

yarn emulators:start loads tests/integration/exportedTestData, which predates
conferences: no conferences, no court-194 members or bills, and test@example.com
unverified. Restarting the emulators, or running the integration suite, wipes
whatever was added by hand.

seedLocal reads conferences/194/*.yaml, queues scraper batches so the functions
emulator fetches the real bills and members they name, waits for them, runs
syncConferences, verifies test@example.com, and writes seven sample testimonies
on one conference. Local only.

Verified: on an emulator started clean from the export it filled in 32 bills,
65 members and 16 conferences in about 106 seconds, and every conference page
then showed its six conferees.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ewsfeed

Conference testimony reaches the author's followers, and both places
they see it treated it as bill testimony: the digest email drew a
broken position image and linked the bill, and the newsfeed card
linked the bill and the bill's testimony page.

The digest gives a conference item the conference id and its stance
in words, taken from the site's wording (a test holds the two equal).
Each of the six slots in the user partial sends it through a new
conferenceItem partial that links the conference. The newsfeed card
says the author gave input to the conference committee, shows the
stance chip from the conference page, and links the conference's
Public Input. Bill and ballot-question items are drawn as before.

Verified: functions jest src (123), including buildDigestData and a
render of the user partial for conference, bill and sixth-slot items;
site tsc; NewsfeedCard jest for a conference and a bill card. On the
emulator: the test user followed an author from the conference page,
a new conference and a new bill testimony by that author both reached
the follower's feed, /newsfeed showed both cards with the right links,
and the digest built from the emulator rendered the conference item
with its stance and conference link beside the bill item's image.
Bill rows of the user partial render the same as on main apart from
whitespace between tags.
Not verified: violet has not looked at the email or the newsfeed in a
browser herself, nor has anyone seen the conference stance cell, now
100px wide and wrapping, in an email client. NewsfeedCard's ballot-question test still fails, as
it does on main (the test env has ballotQuestions off).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Testimony from before conference testimony has no conferenceId, and
Firestore cannot select on a missing field, so every read that kept bill
testimony apart from conference testimony fetched the whole bill and
filtered in memory. backfillTestimonyScope stamps null on whichever of
ballotQuestionId and conferenceId a published, archived or draft
testimony lacks (the ballot-question backfill skipped drafts, and this
replaces it, in CI too), with --dry-run. Drafts are now written with
conferenceId: null.

Publish, delete, the counts backfill, the website's draft and
publication lookup, the bill's listing and a testimony's version history
then filter both fields in the query, with their limits back: publish,
delete and the counts backfill are main's code plus one filter, and
matchesTestimonyScope goes. The version history fixes a conference
filing listing its author's bill versions on the canonical bill, and the
reverse. Unscoped listings keep the in-memory filter. Two composite
indexes and a conferenceId override are added; the bill listings rely on
index merging, as the ballotQuestionId filter already did. The
integration test data is migrated with the script.

Run per environment, dev then prod: indexes first, then the backfill,
then the functions and hosting, then the backfill again for what the old
code wrote in between. Stamping after the new code is live hides legacy
testimony from its bill and lets a republish duplicate it.

Closes hyphacoop#82

Verified: site tsc; functions jest 120/120; yarn test:integration-ci
tests/integration components/db, 102 pass, including the backfill on
legacy docs and its dry run, republishing backfilled legacy testimony in
place beside a conference filing, and delete skipping a newer conference
filing for the bill's latest (fails without the filter); the script's
dry run, run and second dry run against the exported test data (25
published, 133 archived, 38 drafts, then none left).

Not verified: that the indexes serve every query, which the emulator
does not check, so only dev shows it; the migration on dev or prod data;
the full yarn test:integration-ci, which aborts partway at this commit's
parent too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The conference page gains the mockup's "What needs to be resolved?"
section between Committee and Public Input, with an Unresolved Text tab:
a one-sentence gist with a feedback link, the differences as disclosures
with a Senate and a House card each (the first open, "Not in the bill"
where a chamber's text is left out, noted terms as tooltips), the
matching points beside them where there is room, a line naming the
reader's own legislator, and the sources as numbered marks with a list
at the foot of the card. A conference with nothing written has no
section and no tab.

The conference YAML gains a gist, chamber texts that may be left out,
and term notes; the page loader now passes gist, differences and
similarities through. Phone-Free Schools carries lorem ipsum until the
real copy is written. The tab row's height is one constant shared by the
pinned heading and every section's scroll margin, and the feedback form
address moves to components/common.

Closes hyphacoop#70

Verified: jest components/conference 41/41 (in the next container);
tsc and eslint; test:integration-ci tests/integration/conferences.test.ts
11/11. In Chrome beside the mockup at 19bd101, desktop and a 390px
iframe: heading, labels, chamber cards, answer and match text, gist,
term tooltip and the pinned heading match by computed style.

Not verified: the your-legislator line in the browser (jest only, no
signed-in profile); the copy itself, which is lorem ipsum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add AGENTS.md guide for contributing with AI coding agents

Covers project layout, cloud and local agent setup, a guided first
contribution for non-developers, issue and PR workflow, release to
production, conventions by area, safety rules for agents, a worked
mockup-to-production example, and known gotchas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* AGENTS.md: describe Claude Code's native AGENTS.md loading

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* AGENTS.md: smooth cloud-session onboarding

Changes from setting up a cloud session against this guide:

- Cloud sessions: sync to upstream/main before reading AGENTS.md,
  since a fork's main may be stale or lack this file; show how to
  fetch an open PR.
- New "Verify your setup" table giving the expected result of each
  baseline check (slow install that also covers functions/, existing
  lint warnings, dev server check).
- Note Python requirements must be installed before ruff/pytest.
- Note Docker may be unavailable in cloud sessions.
- Drop the pinned Claude Code version; add a way to check that
  AGENTS.md actually loaded.
- New rule: don't rewrite other people's commits to satisfy a tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WhyuCVeZkrTPkacw2qPnRY

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Year headers, registrant counts, [done/total] lines and year totals now
carry a UTC time, in weekly and backfill runs, so a slow run shows when it
slowed down and whether the portal or the code is to blame.

Verified: pytest lobbying-scraper/tests; a full local backfill logged the
timestamps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compute_stats now writes what the redesigned overview, bill and client
pages show: per-session key figures (stats.courts, totalLobbyists,
totalEntities), organizations per position on each bill, and per client
its bills, in-house filers, people lobbying for it and registration dates,
plus one inHouseFilers_{gc} doc per session.

A filer is in-house when it is the client, when its registration names the
client as employer, or when it is an individual registered with no
employing entity that lists the client: staff of organizations that don't
register as entities, like the Greater Boston Chamber of Commerce's, file
that way. Lobbyist and firm counts include only those registered in the
session and on a disclosure in it.

The parser now reads the agent named on each client's activity block
(2014 on) into registrant clientLobbyists, and filings record their
half-year window as periodEnd. Existing docs get both from
migrate_lobbying_data.py's write phase. CI runs the scraper's tests.

Closes hyphacoop#88

Verified: pytest lobbying-scraper/tests. A full scrape of the live SoS
portal into the Firestore emulator (2005-2026, 593,122 filings), then
stats: every filing has periodEnd; the 194th session has 5,650 bills, as on
dev; H4746 has 105 organizations in 250 filings; the Greater Boston Chamber
of Commerce's six 194th filers are in-house; inHouseFilers docs stay under
50 KB. The final compute_stats rewrites all 50,030 lobbyingMeta docs
unchanged from the version before its cleanup, and the final agent parser
matches the earlier one on all 49,460 archived disclosure pages, where no
firm disclosure before 2014 names agents per client and about 94% from 2014
do. yarn check-types shows only the 4 errors a clean tree has.

Not verified: deploying to dev and prod and backfilling there; that every
disclosure is in the GCS archive; the frontend reading these fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fastfadingviolets and others added 19 commits October 26, 2026 15:57
The entry kebab, the account-type and position pickers and More Filters
ran on a home-made popover that declared menu and listbox roles but
neither moved focus nor answered arrow keys. They now run on Dropdown,
as the conference picker does: the arrows move through the items,
Escape closes and hands focus back to the toggle, and Tab out closes.
Every menu is role=menu (the pickers' choices are menuitemradio), since
Dropdown is a menu button rather than a listbox. Toggles say they open a
menu before the first open, when Dropdown does not yet. Popper does not
re-place a menu on scroll, since a menu sits in its control's own flow.

Laid beside the mockup, the menus also match where the popover did not:
items are weight 500, account-type rows keep the taller line, the
position pill's chevron is mid ink, the account menu's first row reads
"All Accounts", and on a phone a picker's menu stays under its control
and narrows to the room on its right instead of sliding left. The
account and position menus still sit about 1.5px nearer their control
than the mockup's, which hangs them from a wrapper a little taller than
the control itself.

Closes hyphacoop#111

Verified: jest components/conference (a new kebab keyboard test included);
each menu open and closed beside the mockup at 19bd101, measured at
desktop width and in a 390px frame (width, offset, padding, border,
radius, shadow, row heights, selected colour); by keyboard in Chrome:
open, arrows, Enter, Escape, Tab out, Space in More Filters keeping it
open, and the focus ring on its rows.

Not verified: with a screen reader; on a real phone or with the
viewport resized while a menu is open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
compute_stats wrote the stats, filing counts and per-session list docs
one by one and only logged their sizes afterwards. A doc over Firestore's
1 MiB limit would fail its write partway through, leaving the stats half
updated. It now measures every single-document write first, with
Firestore's own size rules, and stops with nothing written if one is too
big, naming the doc to split. It still warns past 900 KiB.

Verified: python -m pytest -q in lobbying-scraper and pytest
lobbying-scraper/tests from the root (185 passed each), including a test that an oversized doc raises before any write.
A full stats run on the local emulator completed, with clientList_all at
775 KiB (76% of the limit), the largest firmList 478 KiB and the largest
clientList 402 KiB.

Not verified: a stats run against dev or prod.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tled

The weekly run caches each registrant's disclosure list and reuses it for
the prior year. Lists cached before amendments were tracked hold every
version, and lists cached during the year miss the Jul–Dec report that is
due on Jan 15 of the next year, so those reports were never picked up.

A cached list now records its superseded versions, is written only after
all its disclosures were processed and the superseded filings removed,
and counts for a prior year only if it was cached after Feb 1 of the next
year. Any other entry is fetched live again, once.

Verified: pytest on the scraper suite (191 passed), including tests that
a pre-change entry and one cached before Feb 1 are fetched live, that a
stale entry's superseded filings are removed and the entry rewritten, and
that a registrant whose disclosure failed isn't cached.

Not verified: a weekly run against the live portal or dev; how many 2025
Jul–Dec reports dev and prod are missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A firm's disclosure is listed on several registration pages, archived at
different times, so one page can say A was replaced by B and a later one
that B was replaced by C. The write phase skipped B as superseded and
then reported A as having no current version, which blocks cleanup. The
merged map now points each earlier version at its final one.

Verified: pytest on the scraper suite (194 passed), including chains,
direct entries and a cycle, which still ends on a superseded version so
it is reported for a person.

Not verified: the write phase against the GCS archive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix the Conference Explorer's member reads, conferee row controls and banner wording
# Conflicts:
#	components/conference/ConferenceDetails.test.tsx
#	components/conference/ConferenceDetails.tsx
#	components/conference/hooks.ts
#	components/conference/load.ts
#	public/locales/en/conferences.json
Show the conference's two bill texts side by side, under a pinned tab bar
Add public input to the conference committee page
Show what a conference still has to resolve
Lobbying scraper: aggregates and parsed fields for the Lobbying Explorer redesign
On some registration pages the portal links an amended period's row to
the amendment itself instead of to the original filing, so the same
disclosure is linked twice in a row. parse_summary then marked the
amendment as superseded by itself: the migration's write phase skipped
it (superseded_without_current, which blocks cleanup), and the backfill
and weekly runs wrote it and then deleted its filings. A repeated link
to a version is now skipped, so the amendment is the current version
and supersedes nothing on the page.

As a backstop, the backfill and weekly runs no longer delete the filings
of a version a page lists as both superseded and current; they keep
them and report the page.

Verified: pytest in lobbying-scraper (197 passed), including the
repeated-link layout and the kept filings in both modes. Parsing all
33,762 archived registration pages in the local archive before and after
the change differs on one page only, the one with this layout, which now
has no self-superseded versions. The local emulator's filings for that
page, which the local rebuild had deleted, were rewritten from the
archive and the stats rebuilt without errors.

Not verified: the dev write phase reporting superseded_without_current
0; a weekly or backfill run against dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lobbying scraper: Handle amendments where the period row links back to the amendment
* add an explanation file to gitignore

* add memberBillSummary cron job tests and skeletonize outward with Copilot

* revise query and tie to daily jobs

* remove extraneous bills changes

* restore scraper file

* restore scraper test to prev status

* delete scraper batching
* moving ocpf member matching to be scoped per court

* renamed matchOcpfMembersV2 to matchOcpfMembers

* warn on unclassified OCPF record types in finance scrape

Report types already logged a warning when unrecognized, defaulting to
a safe itemsOnly treatment. Record types fell through to a silent
default with no distinction between deliberately-ignored codes (205,
220) and a genuinely new one — this makes that failure mode loud too.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* extract matchMembersForCourt for per-court OCPF matching

Pulls the matching logic out of the matchOcpfMembers HTTP handler into
a reusable, court-parameterized function so the upcoming backfill
script can match historical courts too. Active-filers-only filtering
now applies only to the current court; historical courts drop it
since a legislator who served years ago has likely closed their OCPF
committee by now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* add backfillOcpfMemberMapping script for historical OCPF member matching

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* add backfillOcpfFinance script and court-parameterize finance scraping

Extracts runOcpfFinanceScrape into scrapeFinanceForCourt(court, options),
deriving YEARS per-call from generalCourts instead of a module-level
constant tied to the current court. Adds generalCourts entries for
189-191 so historical courts can be targeted. The two existing
triggers are unaffected — both still just call
scrapeFinanceForCourt(currentGeneralCourt, ...).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* enable scripts to take a single court in addition to a list of courts

* using zod to parse input

* giving user nicer error message for bad script input

* further improvements to error message for bad script input

* quiet member-mapping backfill logs by default, add --verbose, print JSON summary

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* added comment for an edge case about name matching

* add setOcpfMemberMapping script and manual flag so manual matches always win

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fail member matching for a court with no members instead of writing empty mapping docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* print a one-line error instead of a stack trace for an unknown court in the finance backfill

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Lobbying scraper: Keep the lobbying stats run within Firestore's index entry limit and the job's memory
No script or CI step ran the website's own jest tests, so the conference
components' tests could break unseen; the page loader's test had failed
on main since its fixture went stale when differences landed. A new
test:website script, beside the other test:<kind> scripts, is the one
list of website tests Repo Checks runs, starting with
components/conference. conferenceLinks.test.tsx moves there, beside the
components it tests. The unit step is renamed Cloud Functions Tests,
since that is all yarn test runs, and its TODO moves to the website step.
conferences.test.ts joins the integration list. The loader test's
fixture is now typed as a Conference rather than cast, so check-types
catches the next missing field. The switching test now mocks useBill,
which read the dev backend and kept a single-worker jest run from
exiting. AGENTS.md now says what each check runs and that a new test
runs in CI only once it is on one of those lists.

Closes hyphacoop#118

Verified: yarn test:website passes 9 suites (56 tests), both in parallel
and with jest -i, with no open handles, and exits 1 with the fixture's
differences removed, which tsc now also reports; yarn
test:integration-ci on the CI list plus conferences.test.ts passes 7
suites (81 tests), conferences first, so its court-194 wipe does not
break testimony.test.ts; prettier and the workflow YAML parse.

Not verified: the workflow on GitHub Actions.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
maple-dev Ready Ready Preview Oct 28, 2026 10:00pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
maple-prod Ignored Ignored Oct 28, 2026 10:00pm UTC

Request Review

@Mephistic
Mephistic deployed to terraform-plan October 28, 2026 22:00 — with GitHub Actions Active
@Mephistic
Mephistic deployed to terraform-plan October 28, 2026 22:00 — with GitHub Actions Active
@Mephistic
Mephistic merged commit 06a861f into prod Oct 28, 2026
17 of 18 checks passed

This branch was successfully deployed

2 active deployments
terraform-plan — d81f65df Deployed Oct 28, 2026 by Mephistic via plan_dev #19
Production – maple-dev — d81f65df Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants