refactor/cleanup #1

Merged
nhpro merged 7 commits from refactor/cleanup into main 2026-09-26 13:08:49 +02:00
Owner
No description provided.
Engine
- hunter timeout no longer loops day.hunter_shot forever
- dying mayor without successor vacates the seat (new election next day)
- single post-death detour order (game over → hunter → succession) shared
  by vote and tiebreak; mayor killed by tiebreak now goes to night
- Composition is a Roles map + WithMayor, validated through RoleSpec
  (Unique, Faction) so new roles need no engine change
- Forfeit: leaving mid-game kills the player (lover follows, no hunter
  shot, mayor seat vacated) and can end the game
- host lives in State (hostId in snapshot), transferred on lobby leave
- UI schema removed from the domain; unreachable night transients dropped

Room actor
- announce every new death (player_died was never emitted live)
- phase timer tracks deadline + total (totalMs on game.phase)
- game over reveals all roles; result built as app.GameResult
- chat: trim, 500 runes max, 300ms flood guard, typed payload
- player name taken from the token, not the client
- idle rooms stop after 15 min and unregister; 3 rooms per user max

WS / HTTP
- composition decoded straight into game.Composition (mayor and little
  girl toggles were silently dropped)
- stable error codes {op, code, message}; internal errors not leaked
- 30s ping keepalive instead of a 5 min read timeout
- /api/v1/roles removed; 429 on room quota

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sqlc was configured but never generated (wrong schema path); the goose
make targets pointed at a non-existent directory while migrations are
embedded and applied at boot.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A new tab's resync burst was delivered to every tab of the same user.
Deaths now precede the snapshot that reflects them so clients can tell
a live death (player still alive in their snapshot) from a replay.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- roles/: one file per role (icon, tone, action UI with plain predicate
  functions), mirroring backend role_*.go — replaces the server-driven
  UI schema, /api/v1/roles and the roles store
- CompositionEditor generated from the registry; composition helpers
  replace five copy-pasted seat computations (mayor/little girl toggles
  no longer bounce back)
- protocol mirror: generic Composition, totalMs, hostId, game over roles,
  error {op, code} translated via error.<code>, name from token
- deaths deduplicated; announcements/toasts only for live deaths
- type-check actually runs (vue-tsc -b) — fixed the 5 hidden errors
- removed shadcn-vue (only Dialog was used → reka-ui directly), Tailwind,
  lucide, cva, clsx, tailwind-merge and the unused lint/format scripts
- colors go through --pixel-* tokens; PixelButton/PixelBadge use variant
  classes; dropped the blurred halo, fake window dots and footer

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
godotenv.Load stops at the first missing file, so the monorepo .env was
never read by make run/dev.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Vite looked for .env in frontend/, so dev runs outside Docker had no
VITE_DEV_AUTH and fell back to the (unconfigured) OIDC login.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
nhpro merged commit 1f6b6e2c57 into main 2026-09-26 13:08:49 +02:00
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
nhpro/shamus!1
No description provided.