Skip to content

[#30] Richer session mix + instant next round#40

Open
javaisbetterthanpython wants to merge 3 commits into
mainfrom
issue-30-richer-session-mix
Open

[#30] Richer session mix + instant next round#40
javaisbetterthanpython wants to merge 3 commits into
mainfrom
issue-30-richer-session-mix

Conversation

@javaisbetterthanpython

Copy link
Copy Markdown
Owner

Summary

  • Strengthen session-wide partner/opponent scheduling: penalize 2nd+ repeats heavily, prefer rounds with fewer repeats and lower max pairing depth, exempt fixed-pair partner repeats
  • Pre-generate the next round in the background; "Start round N" uses cache when roster/courts/pairs unchanged (rename reuses cache)
  • Show a small repeatNote on rounds when session repeats are unavoidable

Test plan

  • yarn test:ci passes
  • yarn build passes
  • Start a game, play several rounds — partner/opponent variety improves vs before
  • "Start round N" feels instant when pre-gen has finished
  • Edit players/courts invalidates pre-gen; rename does not
  • Rounds with unavoidable repeats show the italic note

Closes #30

Made with Cursor

javaisbetterthanpython and others added 3 commits June 9, 2026 01:31
Enforce session-wide partner/opponent variety with graceful degradation,
background pre-generation for instant next rounds, and repeat notes when
unavoidable repeats occur.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Serialize Web Worker requests so background pre-gen and Start round cannot
steal each other's responses, and skip the generating flash when serving a
cached round.

Co-authored-by: Cursor <cursoragent@cursor.com>
@javaisbetterthanpython

Copy link
Copy Markdown
Owner Author

Follow-up (14cc0e2): Fixes a worker race where background pre-gen and "Start round" could run concurrently on the same Web Worker, leaving the UI stuck on "Jumbling…" (e.g. round 4 never completing). Worker requests are now serialized; cached rounds skip the brief generating state.

Pausing further #30 work until #31 is done — will resume review/merge after that.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Richer session mix + instant next round

1 participant