Skip to content

Let organizers limit how many spots one person can take #312

Open
1 of 5 issues completed
Open

Description

@richshaw

Organizers often want each person to take no more than a few spots: one dish per family, two shifts per volunteer. Otherwise a few people fill the sheet. This issue tracks building that properly. The work is split into the sub-issues listed below.

Where it stands

  • settings.maxCommitmentsPerParticipant has been in SignupSettingsSchema (src/schemas/signups.ts) since the first commit. Nothing reads it. commitToSlot and updateOwnCommitment in src/services/commitments.ts never check it, so anyone can still take every spot.
  • The AI connector's update_signup tool used to accept it and show it back. An assistant asked to "limit each person to 2 spots" would report the limit as set when it wasn't.
  • fix(mcp): stop offering a per-person limit that nothing enforces #318 (merged) took it out of the connector until this work lands. update_signup now refuses the setting, and tool results hide any value already stored.
  • The REST API still accepts it through SignupSettingsSchema. It was never documented there, and the web app has no control for it.
  • Values already stored. Signups where the connector saved a value before that change still carry it. Before the check goes live, decide whether to honour those values or clear them. An organizer who set a limit weeks ago may have forgotten, and participants would suddenly hit it. Count the rows carrying the key before deciding, and keep the actual rows out of public text.

Decisions needed before building

  1. Spots or sign-ups? Since Call the quantity field Spots and cap it at the spots left #291, one sign-up can take several spots. The current name counts sign-ups, so a limit of 2 would still let one person take 5 spots on a single slot. Suggested: count spots (the total quantity of that person's active sign-ups), and rename the key to say so (for example maxSpotsPerParticipant) while nothing enforces the old one.
  2. Who counts as one person? A participant is one row per email address per signup (the participants_signup_email unique index). Someone using two email addresses gets two allowances. That's acceptable, because participants don't have accounts and shouldn't need one. The help page should say so.
  3. How this fits with Per-participant commitment caps over slot field groupings #14. Per-participant commitment caps over slot field groupings #14 proposes participantLimits, with limits per group ("one slot per teacher"). With no group, that is exactly this limit. Suggested: build the signup-wide limit first, and write the check so Per-participant commitment caps over slot field groupings #14 can add a group key later without starting over. Record here whether the simple setting then stays as a shorthand or becomes one participantLimits entry.

Sub-issues, in order

#313 comes before #315, #316 and #317, and #314 comes before #315.

Done when

  • An organizer can set a limit in the web app or through an assistant.
  • Participants can see the limit and can't go over it.
  • All sub-issues are closed, and pnpm lint && pnpm typecheck && pnpm test && pnpm test:db pass.

Sub-issues

Sub-issues

1 of 5 Issues completed
Loading 5 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions