feat(registry): Players page: search, read one account, restore, delete saves or the account #20

Merged
kblack0610 merged 1 commit from feat/registry-players-page into main 2026-11-04 21:28:33 +00:00
Owner

Adds the Players page to the admin site (rewards-admin P2), over the routes from #16.

  • Search by name, account id or player code. The term stays out of the URL because it can be a player code; the open player is #<account>.
  • One account: characters, worlds, memberships, ranks, records, results, purchases, history, and an online chip linking to the Live page.
  • Actions: view a snapshot as JSON, restore, soft-delete a character, delete saves, delete the account. Deletes ask for the name typed out (the account id if there is no name).
  • Player data reaches the page as text nodes only; TestAdminPlayersPage rejects innerHTML in players.js.

Nothing removed: this is a new page. api() and flash() now exist in four ui files; players.js follows the per-page copy that app.js, live.js and fleet.js use, and folding them together is a separate change.

assumed: no Stats and awards tab, because its data is P5 and its edits P7.
assumed: the online chip stays empty until the game sends account in its roster (P4).
assumed: the page does not poll, because an admin reads one account at a time and every action reloads it.
assumed: the online link uses ?game=all, because playerPresence returns g.game while the Live filter matches the session's game, so a specific game could hide the server.

Checks:

  • go test ./... in registry/: 126 passed, 0 failed. gofmt and vet clean.
  • Headless Chromium against the real handlers, 15 steps, all passed: search, card, view, restore, a refused restore then retry, tabs, each delete, reload, a gone account, markup in a name staying text, 400px width, nav from each page. The driver was temporary and is not in this PR.

Not checked: the page against a live deployment. The next registry-v tag also ships #14 to #19.

https://claude.ai/code/session_01BALUC1xuevnLBSwC4b4T3Q

Adds the Players page to the admin site (rewards-admin P2), over the routes from #16. - Search by name, account id or player code. The term stays out of the URL because it can be a player code; the open player is `#<account>`. - One account: characters, worlds, memberships, ranks, records, results, purchases, history, and an online chip linking to the Live page. - Actions: view a snapshot as JSON, restore, soft-delete a character, delete saves, delete the account. Deletes ask for the name typed out (the account id if there is no name). - Player data reaches the page as text nodes only; `TestAdminPlayersPage` rejects `innerHTML` in players.js. Nothing removed: this is a new page. `api()` and `flash()` now exist in four ui files; players.js follows the per-page copy that app.js, live.js and fleet.js use, and folding them together is a separate change. assumed: no Stats and awards tab, because its data is P5 and its edits P7. assumed: the online chip stays empty until the game sends `account` in its roster (P4). assumed: the page does not poll, because an admin reads one account at a time and every action reloads it. assumed: the online link uses `?game=all`, because `playerPresence` returns `g.game` while the Live filter matches the session's game, so a specific game could hide the server. Checks: - `go test ./...` in registry/: 126 passed, 0 failed. gofmt and vet clean. - Headless Chromium against the real handlers, 15 steps, all passed: search, card, view, restore, a refused restore then retry, tabs, each delete, reload, a gone account, markup in a name staying text, 400px width, nav from each page. The driver was temporary and is not in this PR. Not checked: the page against a live deployment. The next `registry-v` tag also ships #14 to #19. https://claude.ai/code/session_01BALUC1xuevnLBSwC4b4T3Q
ui/players.html on the admin port, over the /api/players routes from #16. Player data reaches the page as text only, and a delete asks for the player's name typed out.

Claude-Session: https://claude.ai/code/session_01BALUC1xuevnLBSwC4b4T3Q
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kblack0610/bnb-game-servers!20
No description provided.