refactor/cleanup #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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>- 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>