Skip to content

Pilot: agent-ready Problem and Description filters with UI SDK, in the NYSDS look #187

Closed

Description

@noneck

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-combobox holds 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. createFilterForm in v2/site/js/filterform.js runs 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-combobox with multiple (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 become ui-button. An agent that can set a filter but can't press Apply has done nothing, and createAgent can't see a plain <button>.
  • filterform.js listens to valuechange instead of change and keydown. 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

Conditions

  1. Pin one exact UI SDK version through jsdelivr, as lib.js does for DuckDB. UI SDK is in beta (first npm release 2026-11-12, 14 betas since), and the latest tag lags the beta tag.
  2. 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.
  3. Build in a worktree, and rerun stamp_assets.py after 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 createAgent lists 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.py pins 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

  1. noneck commented on Nov 23, 2026

    @noneck
    MemberAuthor

    Cross-repo tracking: BetaNYC/betanyc-ai-workspace#1733 (design layers, option 2). Browser tests: #186.

  2. added a commit that references this issue on Nov 23, 2026
  3. noneck commented on Nov 23, 2026

    @noneck
    MemberAuthor

    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:

  4. noneck commented on Nov 23, 2026

    @noneck
    MemberAuthor

    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.

  5. noneck commented on Nov 24, 2026

    @noneck
    MemberAuthor

    Slice 2 is starting with Agency: #192 (part of #191, the new full-page map). Dates and Status stay native for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementv2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions