M4: GM roster, player keys and token panel #74

Closed
opened 2026-11-20 22:31:45 +01:00 by SirStone · 1 comment
Owner

Part of #63

Goal

Roster with connected state, keys create/show/replace, remove player, token create/edit/resize/status/gm_only/controller.

Acceptance criteria

  • Keys exist only in GM DOM and never in player traffic or logs
  • Remove player frees the slot
  • Token panel drives intents and reflects frames
  • gm_only hides from players
  • Resize pushes per server
  • E2e
  • Standing gate: full devbox run test green on a clean checkout, no test weakened or skipped, and the behaviour above proven at the seam(s) listed under "Proven at".

User stories covered

  • 36 — As a GM, I want to create, edit, resize and remove tokens, so that I can place the figures a scene needs.
  • 37 — As a GM, I want to mark a token gm_only, so that players do not receive it until I allow it.
  • 55 — As a GM, I want a roster with each player's connected state, so that I know who is at the table.
  • 56 — As a GM, I want to create, show and replace player keys, so that I can invite and re-invite players.
  • 57 — As a GM, I want to remove a player, so that a slot frees up for someone else.
  • 61 — As a GM, I want the player-keys dialog to keep keys out of player traffic, so that secrets stay secret.

Proven at

GM panels DOM, reducer admin slice; e2e

Notes

  • Size: M (about one agent session, ~100K tokens). Lane: G (panels).
Part of #63 ## Goal Roster with connected state, keys create/show/replace, remove player, token create/edit/resize/status/`gm_only`/controller. ## Acceptance criteria - [ ] Keys exist only in GM DOM and never in player traffic or logs - [ ] Remove player frees the slot - [ ] Token panel drives intents and reflects frames - [ ] `gm_only` hides from players - [ ] Resize pushes per server - [ ] E2e - [ ] Standing gate: full `devbox run test` green on a clean checkout, no test weakened or skipped, and the behaviour above proven at the seam(s) listed under "Proven at". ## User stories covered - 36 — As a GM, I want to create, edit, resize and remove tokens, so that I can place the figures a scene needs. - 37 — As a GM, I want to mark a token `gm_only`, so that players do not receive it until I allow it. - 55 — As a GM, I want a roster with each player's connected state, so that I know who is at the table. - 56 — As a GM, I want to create, show and replace player keys, so that I can invite and re-invite players. - 57 — As a GM, I want to remove a player, so that a slot frees up for someone else. - 61 — As a GM, I want the player-keys dialog to keep keys out of player traffic, so that secrets stay secret. ## Proven at GM panels DOM, reducer admin slice; e2e ## Notes - Size: M (about one agent session, ~100K tokens). Lane: G (panels).
SirStone added the ready-for-agentenhancement labels 2026-11-20 22:31:45 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
Author
Owner

Implemented on m4/74, commit 12c2e88 (pushed to main).

  • GM panel (src/panels/admin.ts) under #panels: roster with connected state, key create/show/replace/remove, token create/edit/resize/status/gm_only/controller. Server strings and keys use textContent; secrets live only in the GM DOM and are cleared when the GM leaves the table.
  • src/slices/admin.ts: GM token/token_gone records plus token selection; #71/#72 can read it with selectedTokenId(state) and change it only via {type:"admin-select", token}.
  • Unit seam: client/test/admin.test.ts. Browser e2e: client/e2e/admin.test.mjs proves keys never reach player traffic/DOM/server log, remove frees the capped slot, gm_only hides and reveals, status/rename/controller reflect in player frames, and a resize push moves the token per the server.
  • Gates on the rebased tree: devbox run test 157/157, devbox run client-test 66/66, devbox run e2e 9/9 green.
Implemented on `m4/74`, commit `12c2e88` (pushed to `main`). - GM panel (`src/panels/admin.ts`) under `#panels`: roster with connected state, key create/show/replace/remove, token create/edit/resize/status/`gm_only`/controller. Server strings and keys use `textContent`; secrets live only in the GM DOM and are cleared when the GM leaves the table. - `src/slices/admin.ts`: GM `token`/`token_gone` records plus token selection; #71/#72 can read it with `selectedTokenId(state)` and change it only via `{type:"admin-select", token}`. - Unit seam: `client/test/admin.test.ts`. Browser e2e: `client/e2e/admin.test.mjs` proves keys never reach player traffic/DOM/server log, remove frees the capped slot, `gm_only` hides and reveals, status/rename/controller reflect in player frames, and a resize push moves the token per the server. - Gates on the rebased tree: `devbox run test` 157/157, `devbox run client-test` 66/66, `devbox run e2e` 9/9 green.
Sign in to join this conversation.