Repository navigation
Closed
Labels
Description
Part of the BetaNYC Software Factory design work: NYS Design System (NYSDS) parts plus Vercel's UI SDK, with the parts an AI agent needs to use made agent-ready. Cross-repo tracking issue: in BetaNYC/betanyc-ai-workspace, linked in a comment below.
Why BoardStat
- It has the one control NYSDS lacks. Problem and Description each take several picks, shown as chips.
nys-comboboxholds one value, and NYSDS advises against<select multiple>. That gap is what UI SDK is for. - It has the same shape as
@ui-sdk/web. Plain HTML and ES modules from a CDN, with no framework and no build step. - One form, one module, three pages.
createFilterForminv2/site/js/filterform.jsruns the identical form on the district, address and map pages.
Slice 1 (this issue)
The "Problem and description" group, plus Apply and Reset, in the shared form. One PR, and all three pages change together.
- Problem and Description become
ui-comboboxwithmultiple(chips, remove buttons, a virtualized list for Description). Their items come from the same DuckDB queries as today. - "Exclude these descriptions" becomes
ui-checkbox. Apply and Reset becomeui-button. An agent that can set a filter but can't press Apply has done nothing, andcreateAgentcan't see a plain<button>. filterform.jslistens tovaluechangeinstead ofchangeandkeydown. The draft-then-Apply model stays.- A small token file maps UI SDK's
--ui-*tokens to NYSDS theme tokens in BetaNYC colors, kept close to the current--bnyc-*colors so the page doesn't look patched. - Agent test: "an agent can find and change every setting" for this group. Add two problems, add a description, tick Exclude, press Apply, then check the applied filters and the link.
Dates, Agency and Status stay native in this slice. Slice 2 converts them after slice 1 has been checked on a real phone.
Out of scope
- The page navigation, the home page pickers (v2: Map home page: pick an area type, shade by problem #176 is rebuilding
index.html), and the What's changed filters. - The shortcut buttons on the district page that apply a filter directly.
Conditions
- Pin one exact UI SDK version through jsdelivr, as
lib.jsdoes for DuckDB. UI SDK is in beta (first npm release 2026-11-12, 14 betas since), and thelatesttag lags thebetatag. - Land before v2: Neighborhood (NTA) and police precinct pages #175 and v2: Address lookup on the district page #110 start (epic Epic: Pick an area first (neighborhoods, precincts, legislative districts, drawn shapes) #173), since they will reuse the same form.
- Build in a worktree, and rerun
stamp_assets.pyafter merging.
Risks to check in slice 1
- Phone weight. UI SDK's download size on top of DuckDB-WASM is not measured yet. Measure it on an iPhone.
- Closed groups. It isn't clear whether
createAgentlists a control inside a closed<details>. Test it. If it doesn't, slice 2 moves the groups to UI SDK's accordion. - The markup tests.
test_filter_form.pypins the form's exact markup. Rewrite those tests on purpose; don't work around them. - Accessibility. v2: Accessibility and print check #115 should review this PR.
Depends on
The Playwright browser test setup, #186.
Acceptance
- The agent test passes, and the existing tests are updated and pass.
- Keyboard use, click-away and Escape work on both comboboxes. Focus is visible, and the form works in forced colors.
- The size cost on a phone is written down in the PR.
Activity
noneck commentedon Nov 23, 2026
Cross-repo tracking: BetaNYC/betanyc-ai-workspace#1733 (design layers, option 2). Browser tests: #186.
Merge pull request #189 from BetaNYC/feature/agent-ready-filters-prot…
noneck commentedon Nov 23, 2026
Slice 1 merged 2026-11-22 in #189 (0cd08d8): Problem and Description as UI SDK comboboxes, Exclude, Apply and Reset, plus the agent test. Not deployed to beta.nyc yet.
Still open before this issue closes:
createAgentcan't see controls in a closed<details>); Dates, Agency and Status are converted.noneck commentedon Nov 23, 2026
Deployed 2026-11-23 00:01 to https://www.beta.nyc/boardstat/ (release PR #190, master 6e65e2f; uploaded with
--exclude /data/, so the nightly data was left in place). Checked live: the district page loads both comboboxes with no page errors. Still open: the iPhone check, screen-reader tests (VoiceOver and NVDA, by staff), and slice 2.noneck commentedon Nov 24, 2026
Slice 2 is starting with Agency: #192 (part of #191, the new full-page map). Dates and Status stay native for now.