Skip to content

[#31] Fix player name editing regressions and harden state handling#41

Open
javaisbetterthanpython wants to merge 3 commits into
mainfrom
issue-31-name-edit-fixes
Open

[#31] Fix player name editing regressions and harden state handling#41
javaisbetterthanpython wants to merge 3 commits into
mainfrom
issue-31-name-edit-fixes

Conversation

@javaisbetterthanpython

Copy link
Copy Markdown
Owner

Summary

  • Filter stale player IDs from localStorage cache and /new setup page load to prevent crashes
  • Add normalizeVolunteerSitoutsByRound to handle corrupt, missing, or truncated volunteer sitout data from older caches
  • Extend pickleball adjective list from 10 to 30 entries with randomized assignment and cross-base-name deduplication
  • Add compact click-to-edit mode (editTrigger="click") for the /new setup player list, pencil icon retained in Players modal
  • Improve player row layout on /new with proper overflow handling, consistent spacing, and button sizing
  • Add defensive null checks for volunteerSitoutsByRound access in editCourts and editPlayers
  • Disable PWA service worker in development to prevent HMR/blank-page issues
  • Add new test suite for normalizeVolunteerSitoutsByRound and update playerNames tests for expanded adjective list

Test plan

  • yarn test:ci passes (4 suites, 36 tests)
  • yarn build passes
  • yarn lint passes (only pre-existing warnings)
  • Manual: Rename players on /new, verify disambiguation with adjectives
  • Manual: Rename players in Players modal (including removed players)
  • Manual: Browse historical rounds, verify tooltip shows current name
  • Manual: Create duplicate names, verify adjective deduplication across groups

Closes #31

Made with Cursor

javaisbetterthanpython and others added 3 commits June 9, 2026 09:01
- Filter stale player IDs from cache and setup page load
- Normalize volunteerSitoutsByRound for corrupt/missing cache entries
- Extend pickleball adjective list to 30 and randomize assignment
- Prevent adjective reuse across different duplicate base names
- Add compact click-to-edit mode for /new setup player list
- Improve player row layout with proper overflow handling
- Defensive null checks for volunteerSitoutsByRound access
- Disable PWA service worker in development to prevent HMR issues
- Add volunteerSitouts normalization tests

Closes #31

Co-authored-by: Cursor <cursoragent@cursor.com>
- Change PlayersModal PlayerNameEdit to editTrigger="click" (tap name
  to edit, no pencil icon), matching the /new setup page behavior
- Add try/catch in worker.ts so getNextBestRound errors are reported
  back to the main thread instead of silently swallowing them
- Add timeout (30s), proper listener cleanup, and settled guard to
  generateRound so the UI never gets permanently stuck on "Jumbling…"

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Edit player names (in-game + setup)

1 participant