feat(shard): admin write plane, help-page queue, and public champion board #58

Merged
whitlocktech merged 1 commits from feature/shard-admin-champs into main 2026-07-14 18:46:52 +00:00
Member

Wires up the three uo-link sidecar surfaces that weren't integrated yet. Extends the merged uo-link integration.

Champion spawns (public)

  • New shard_champs table; ingest champ.update / champ.remove into our own store (served like online/houses, survives a shard outage).
  • Public /site/champs board with a Champions nav link; live via the existing SSE feed (champ.* added to the public allowlist).

Staff write plane (admin + moderator)

  • kick / ban / unban / broadcast via /admin/shard/*. actor is stamped server-side from the session — never sent by the browser. Sidecar status codes mapped (403 disabled/protected, 404 unknown, 503/504 transient). admin.audit events are logged and surfaced at /admin/shard/audit.
  • New In-Game Ops admin view (/admin/shard-ops) with broadcast, account actions, support queue, and a live audit log.
  • Per-account Kick / Ban / Unban on the user-detail (/admin/users/:id) and character views via a reusable ShardAccountActions component (self-gates to staff, so it's safe inside player-shared components).

Help-page (support) queue (admin + moderator)

  • New shard_pages table; ingest page.new / page.updated / page.closed; respond/close via /admin/shard/pages/*.
  • Champ board and page queue are snapshotted from the sidecar's /champs and /pages on every WS (re)connect, guarded so a failed call never wipes local state.

Out of scope

  • Squelch/mute is not included: the sidecar exposes only kick/ban/unban/broadcast, and the game-side ADMIN_CONTROLS.md records it as "Not planned" (2026-07-13). Adding it needs an /admin/squelch sidecar endpoint first.

Testing

  • Unit tests for ingest routing of champ.* / page.* / admin.audit (server/test/shardIngest.champsPages.test.js) — full suite 169/169 green.
  • Client npm run build clean; Swagger regenerated.
  • Verified live end-to-end against MariaDB + the Rust sidecar + ServUO: WS ingest/backfill, champ/page snapshot-on-connect, live status/economy, a real help page ingested & served, and the write plane happy path (broadcast/kick/ban/unban → admin.ok, admin.audit with actor:"web:admin" flowing back to the audit log), plus mapped 403/404/400 error cases.

🤖 Generated with Claude Code

https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ

Wires up the three uo-link sidecar surfaces that weren't integrated yet. Extends the merged uo-link integration. ## Champion spawns (public) - New `shard_champs` table; ingest `champ.update` / `champ.remove` into our own store (served like online/houses, survives a shard outage). - Public **`/site/champs`** board with a **Champions** nav link; live via the existing SSE feed (`champ.*` added to the public allowlist). ## Staff write plane (admin + moderator) - `kick` / `ban` / `unban` / `broadcast` via `/admin/shard/*`. **`actor` is stamped server-side from the session — never sent by the browser.** Sidecar status codes mapped (403 disabled/protected, 404 unknown, 503/504 transient). `admin.audit` events are logged and surfaced at `/admin/shard/audit`. - New **In-Game Ops** admin view (`/admin/shard-ops`) with broadcast, account actions, support queue, and a live audit log. - Per-account **Kick / Ban / Unban** on the user-detail (`/admin/users/:id`) and character views via a reusable `ShardAccountActions` component (self-gates to staff, so it's safe inside player-shared components). ## Help-page (support) queue (admin + moderator) - New `shard_pages` table; ingest `page.new` / `page.updated` / `page.closed`; respond/close via `/admin/shard/pages/*`. - Champ board and page queue are snapshotted from the sidecar's `/champs` and `/pages` on every WS (re)connect, guarded so a failed call never wipes local state. ## Out of scope - **Squelch/mute** is not included: the sidecar exposes only kick/ban/unban/broadcast, and the game-side `ADMIN_CONTROLS.md` records it as "Not planned" (2026-07-13). Adding it needs an `/admin/squelch` sidecar endpoint first. ## Testing - Unit tests for ingest routing of `champ.*` / `page.*` / `admin.audit` (`server/test/shardIngest.champsPages.test.js`) — full suite **169/169** green. - Client `npm run build` clean; Swagger regenerated. - **Verified live end-to-end** against MariaDB + the Rust sidecar + ServUO: WS ingest/backfill, champ/page snapshot-on-connect, live status/economy, a real help page ingested & served, and the write plane happy path (broadcast/kick/ban/unban → `admin.ok`, `admin.audit` with `actor:"web:admin"` flowing back to the audit log), plus mapped 403/404/400 error cases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
wtclaude added 1 commit 2026-07-14 18:16:46 +00:00
feat(shard): admin write plane, help-page queue, and public champion board
All checks were successful
PR Checks / server-tests (pull_request) Successful in 10m20s
PR Checks / client-build (pull_request) Successful in 9m49s
PR Checks / bot-install (pull_request) Successful in 9m33s
c31553aeb6
Wire up the three uo-link sidecar surfaces that weren't integrated yet.

Champion spawns
- Ingest champ.update/champ.remove into a new shard_champs table (served from
  our own store, like online/houses); public /site/champs board with a nav link,
  live via the existing SSE feed (champ.* added to the public allowlist).

Staff write plane (admin + moderator)
- kick / ban / unban / broadcast via /admin/shard/*; actor is stamped server-side
  from the session, never the browser. Sidecar status codes mapped (403 disabled/
  protected, 404 unknown, 503/504 transient). admin.audit events are logged and
  surfaced at /admin/shard/audit.
- New admin "In-Game Ops" view (/admin/shard-ops), plus per-account Kick/Ban/Unban
  on the user-detail and character views (ShardAccountActions, self-gated to staff).

Help-page (support) queue
- Ingest page.new/updated/closed into a new shard_pages table; respond/close via
  /admin/shard/pages/*. Champ board and page queue are snapshotted from the
  sidecar's /champs and /pages on every WS (re)connect (guarded so a failed call
  never wipes local state).

Verified live end-to-end against MariaDB + the Rust sidecar + ServUO; unit tests
cover ingest routing (shardIngest.champsPages.test.js). Swagger regenerated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
whitlocktech approved these changes 2026-07-14 18:46:01 +00:00
whitlocktech merged commit 01b3bb52bf into main 2026-07-14 18:46:52 +00:00
whitlocktech deleted branch feature/shard-admin-champs 2026-07-14 18:46:53 +00:00
Sign in to join this conversation.
No description provided.