Skip to content

Add a private player directory and challenge by username - #8

Merged
aminghuf merged 1 commit into
mainfrom
feat/private-player-directory
Oct 8, 2026
Merged

aminghuf merged 1 commit into
mainfrom
feat/private-player-directory

Conversation

@aminghuf

@aminghuf aminghuf commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Every account could see every other account's name, record, ratings, recent games and presence. That is right for a household and a leak on a server open to strangers.

With Admin → System → Private player directory on, a user sees only themselves and the people they have played (a shared PvP game or an accepted challenge). The players list, profiles, the lobby user list, presence updates and challenge-by-id all follow that rule; admins still see everyone. A profile the viewer may not see answers 404, the same as a missing id. Off by default.

To reach someone new, POST /api/challenges now also takes to_username (exact match), and the vs Friend tab shows a username field when the directory is private.

Claude-Session: https://claude.ai/code/session_019nmbXPWqoaKiE7eMTHacLQ

What

Test plan

  • npm run typecheck passes
  • npm test passes
  • npm run build passes
  • New or changed behaviour has tests; a bug fix has a regression test that fails without the fix
  • (if touching Play, the board or WebSockets) npm run test:e2e, test:resume, test:ui, test:resume-ui pass
  • Manually exercised the affected screens
  • (if touching analysis) Verified eval/classification on a known game

Changelog

Every account could see every other account's name, record, ratings,
recent games and presence. That is right for a household and a leak on a
server open to strangers.

With Admin → System → Private player directory on, a user sees only
themselves and the people they have played (a shared PvP game or an
accepted challenge). The players list, profiles, the lobby user list,
presence updates and challenge-by-id all follow that rule; admins still
see everyone. A profile the viewer may not see answers 404, the same as a
missing id. Off by default.

To reach someone new, POST /api/challenges now also takes to_username
(exact match), and the vs Friend tab shows a username field when the
directory is private.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019nmbXPWqoaKiE7eMTHacLQ
@aminghuf
aminghuf merged commit 2ee3cc5 into main Oct 8, 2026
4 checks passed
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.

1 participant