Skip to content

Sit-out modal — draft pre-gen + correct volunteer state #36

@javaisbetterthanpython

Description

@javaisbetterthanpython

Summary

Upstream: pickleball-shuffler#32

Fix volunteer sit-out modal stale state and integrate with background pre-generation. Volunteers should reflect the current round's saved state when opening — not leftovers from a previous edit session.

Flow

Open modal

  • Pre-check volunteers from current round's saved state.

Edit (draft only — no live save)

  • Checkbox changes are draft until Re-jumble is clicked.
  • Each draft change triggers debounced (150ms) background pre-generation for the current round.
  • Pre-gen uses draft volunteer list (not saved until confirmed).

Re-jumble

  • Applies draft volunteer selection (saves state).
  • Instantly shows pre-computed round layout (no perceptible wait).

Cancel / close without Re-jumble

  • Discard draft pre-generation.
  • Saved volunteer state and displayed round unchanged.

Acceptance criteria

  • Modal opens with current round's saved volunteers pre-selected
  • Checkbox edits are draft-only (not saved until Re-jumble)
  • 150ms debounced background pre-gen on draft changes
  • Re-jumble saves draft + displays pre-computed layout instantly
  • Cancel/close discards draft pre-gen; no state change
  • No stale volunteer selections from prior modal sessions
  • Coordinates with Richer session mix + instant next round #30 pre-gen infrastructure
  • yarn test:ci and yarn build pass

Files likely touched

  • src/SitoutsModal.tsx
  • pages/rounds.tsx
  • src/useShuffler.tsx

Dependencies

Upstream reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions