-
Let anyone with the game URL watch as a read-only spectator
CI / Build and push docker image (push) Successful in 3m0sreleased this
2026-10-06 06:51:53 +02:00 | 22 commits to main since this releaseAnonymous users and logged-in non-players can now open /game/ and
follow the match: they see the table, the score and each player's
captured cards and scope, but never a hand and never the join code.
Spectator actions are rejected with a forbidden error.Backend (tavolo-platform / tavolo-scopone):
- /ws/games/{id} accepts anonymous and non-seated connections as
spectators; only unknown games are refused. The state payload carries
spectator: true and withholds join_code unless the viewer is seated. - GET /api/games/{id} is public and returns the same personalized
(player) or read-only (spectator) view. - GameEngine.view_for/game_over_view take Optional[str] (None = spectator)
and are documented to hide privileged information for non-seated
viewers.
Frontend (Sycamore):
- Parse the spectator flag and render a spectator table: card backs plus
captured/scope for every seat, no clickable hand, "Spectating" badge. - A pre-start spectator sees a "game not started yet" waiting room with
the watch link and no join code. - "Copy watch link" buttons in the waiting room and the game HUD.
- The hand-end summary carries no acknowledge button for spectators and
the game-over overlay hides "My matches".
Tests and docs updated.
Downloads
- /ws/games/{id} accepts anonymous and non-seated connections as