Skip to content

The Build tab's count adds slots and fields together, and changes only on a reload #597

Done

Description

@richshaw

Needs your OK: this changes the number on the Build tab to the number of slots, kept up to date as slots are added and deleted. Swap pipeline:proposed for pipeline:ready to have it built.

What happens

A signup's page shows a count beside the Build and Responses tabs (TabsNav in src/components/signup/TabsNav.tsx). The layout passes Build's count as sig.fields.length + sig.slots.length (src/app/app/(chrome)/signups/[id]/layout.tsx). A signup with 4 slots and 3 fields reads "Build 7", a number that matches nothing on the page. The rail on the same tab already says "Fields (3)".

  • It goes stale. The layout is a server component. Adding, duplicating or deleting a slot changes the builder's own state (useBuildState), not the layout, and moving between tabs keeps the layout as it was. Only a reload changes the number, or a server action that revalidates the layout (revalidateSignup in actions.ts: Publish, Close, a Settings save, removing someone).
  • Screen readers hear "Build 7", with nothing to say what it counts.

The sum dates from the spreadsheet Build tab (#65), where fields were columns and slots were rows. No comment explains it, and no test pins it.

To see it: create a signup by hand and give it 3 fields and 4 slots. The tab reads "Build 7". Choose Add a slot: there are 5 slots, and the tab still reads 7. Reload, and it reads 8.

Fix, in outline

  • Count slots only. The server's first value is sig.slots.length.
  • Keep it up to date. The Build tab reports its slot count through the bridge Check the page when Publish and share is pressed #580 adds between the Build tab and the layout (BuildBridge in src/components/signup/BuildBridge.tsx). TabsNav shows the reported count once there is one, and the server's count until then. The bridge lives in the layout, so the count stays right on Responses and Settings after slots change.
  • Say what it counts. Screen readers hear "Build, 4 slots" (visually hidden text beside the number).

Watch for

Choices this makes

  • What it counts: slots. Default: slots. The rail already counts fields, and a slot is what people sign up for.
  • Keep the count, or drop it. Default: keep it, and keep it up to date. The other way is to remove Build's count: the tab shows its own slots, and nothing can go stale. If you pick that, the Order line below no longer applies.
  • Screen reader wording: "Build, 4 slots". Default: as written. Responses keeps its plain number, since "Responses, 2" already says what it counts.

Order

After #580, which adds BuildBridge, the link between the Build tab and the layout that the up-to-date count uses. Built on main first, this would add a second context in the same layout.

Done when

  • A signup with 4 slots and 3 fields reads "Build 4".
  • Adding, duplicating or deleting a slot changes the count at once, and Responses and Settings show the new count without a reload.
  • Screen readers hear "Build, 4 slots".
  • A unit test pins the count and its update.
  • pnpm lint && pnpm typecheck && pnpm knip && pnpm test pass.

Found by the UX walkthrough (scenarios O1 and X1) on 2026-10-24, and checked against the code on main at 4ed27a9.


Generated by Claude Code

Activity

  1. added
    bug
    pipeline:ux
    on Oct 24, 2026
  2. self-assigned this
    on Nov 19, 2026
  3. removed
    pipeline:working
    on Nov 19, 2026
  4. removed
    pipeline:ux
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions