0.8.0.12:0 — bundle Station Master v0.8.0.12, and a Restore a Seat action
A player who has lost their browser storage can be put back in their seat (Gitea#33 in the game repo). The session token is the only identity the game has and it lives in one browser's localStorage, scoped to the origin joined at, so a cleared profile, a private window or a different browser locks a player out of a game that is still running with their session still on disk. Seen at a real table: of two humans in one game, the host reloaded straight back in and the joiner met an empty lobby. New action, restore-seat: pick a seat from a dropdown of the players actually holding a session — bots never appear, since seatedPlayers is read from the server's session map rather than guessed from display names — and get back a link built from this interface's own address. serverApi gained mintClaim; the dictionary gained 57-64 in all five locales. THE LINK CARRIES A CODE, NOT THE TOKEN. lobby-and-sessions.md §1 says to keep the token out of URLs so it is not shoulder-surfed or pasted into a chat, and a recovery link is exactly what gets pasted into a chat. The code is single-use, expires in 30 minutes, and the page trades it for the real token over a POST. Minting is admin-gated because deciding that somebody has lost a seat is a judgement no route can make safely; spending needs no secret, because the player following the link holds none. GAMES IN PROGRESS RESUME NORMALLY, measured rather than assumed: `git diff v0.8.0.11..v0.8.0.12 -- src/engine/` is EMPTY. The release is the server's HTTP surface, the client and the docs. The codes live in memory and are deliberately not persisted, so nothing new reaches the volume and there is nothing to migrate. README, instructions.md and the release notes in all five locales say so. NOT YET EXERCISED END TO END: the two routes and the action are typechecked and the claim store is unit-tested, but nothing has run them against a live server. This build is what makes that possible. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017nnuCv8UodHucFfx3LWEoX
This commit is contained in:
@@ -64,6 +64,15 @@ const dict = {
|
||||
'the server answered': 54,
|
||||
'Join Secret': 55,
|
||||
"Share this with anyone you want to be able to create or join a game on this server. It doesn't identify a person or a seat, just who's allowed at the lobby door. Running this action again generates a new one and restarts the server with it; anyone already seated in a game keeps playing, but the old secret stops working for new games and joins.": 56,
|
||||
// actions/restoreSeat.ts
|
||||
'Restore a Seat': 57,
|
||||
'Create a one-time link that puts a player back into their seat': 58,
|
||||
'A restore link works once and expires in 30 minutes. Whoever opens it takes that seat — send it to the right person, not to a public channel.': 59,
|
||||
Seat: 60,
|
||||
'Which player to restore': 61,
|
||||
'No seated players on this server': 62,
|
||||
'Restore Link': 63,
|
||||
'Send this to the player and have them open it in their own browser. It works once, expires in 30 minutes, and puts them back in their seat. It does not contain their session token.': 64,
|
||||
} as const
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,6 +59,14 @@ export default {
|
||||
54: 'el servidor respondi\u00f3',
|
||||
55: 'Secreto de acceso',
|
||||
56: 'Comp\u00e1rtelo con quien quieras que pueda crear una partida o unirse a una en este servidor. No identifica a una persona ni un asiento, solo a qui\u00e9n se le permite entrar. Ejecutar esta acci\u00f3n de nuevo genera otro y reinicia el servidor con \u00e9l; quien ya est\u00e9 sentado en una partida sigue jugando, pero el secreto antiguo deja de servir para nuevas partidas y uniones.',
|
||||
57: 'Restaurar un asiento',
|
||||
58: 'Crea un enlace de un solo uso que devuelve a un jugador a su asiento',
|
||||
59: 'Un enlace de restauraci\u00f3n funciona una sola vez y caduca en 30 minutos. Quien lo abra ocupar\u00e1 ese asiento: env\u00edalo a la persona correcta y no a un canal p\u00fablico.',
|
||||
60: 'Asiento',
|
||||
61: 'Qu\u00e9 jugador restaurar',
|
||||
62: 'No hay jugadores sentados en este servidor',
|
||||
63: 'Enlace de restauraci\u00f3n',
|
||||
64: 'Env\u00edaselo al jugador y que lo abra en su propio navegador. Funciona una sola vez, caduca en 30 minutos y lo devuelve directamente a su asiento. No contiene su token de sesi\u00f3n.',
|
||||
},
|
||||
de_DE: {
|
||||
0: 'Starte Station Master!',
|
||||
@@ -118,6 +126,14 @@ export default {
|
||||
54: 'der Server antwortete mit',
|
||||
55: 'Beitrittsgeheimnis',
|
||||
56: 'Weitergeben an alle, die auf diesem Server ein Spiel erstellen oder einem beitreten sollen. Es benennt weder eine Person noch einen Platz, nur wer an der T\u00fcr eingelassen wird. Diese Aktion erneut auszuf\u00fchren erzeugt ein neues und startet den Server damit neu; wer bereits an einem Spiel sitzt, spielt weiter, doch das alte Geheimnis funktioniert f\u00fcr neue Spiele und Beitritte nicht mehr.',
|
||||
57: 'Einen Platz wiederherstellen',
|
||||
58: 'Erzeugt einen einmalig g\u00fcltigen Link, der einen Spieler zur\u00fcck auf seinen Platz bringt',
|
||||
59: 'Ein Wiederherstellungslink funktioniert genau einmal und verf\u00e4llt nach 30 Minuten. Wer ihn \u00f6ffnet, nimmt diesen Platz ein \u2014 schicken Sie ihn der richtigen Person und nicht in einen \u00f6ffentlichen Kanal.',
|
||||
60: 'Platz',
|
||||
61: 'Welcher Spieler wiederhergestellt wird',
|
||||
62: 'Keine sitzenden Spieler auf diesem Server',
|
||||
63: 'Wiederherstellungslink',
|
||||
64: 'Schicken Sie dies dem Spieler, der es in seinem eigenen Browser \u00f6ffnet. Es funktioniert einmal, verf\u00e4llt nach 30 Minuten und setzt ihn direkt wieder auf seinen Platz. Es enth\u00e4lt nicht sein Sitzungs-Token.',
|
||||
},
|
||||
pl_PL: {
|
||||
0: 'Uruchamianie Station Master!',
|
||||
@@ -177,6 +193,14 @@ export default {
|
||||
54: 'serwer odpowiedzia\u0142',
|
||||
55: 'Sekret do\u0142\u0105czania',
|
||||
56: 'Udost\u0119pnij je ka\u017cdemu, kto ma m\u00f3c utworzy\u0107 gr\u0119 na tym serwerze lub do niej do\u0142\u0105czy\u0107. Nie wskazuje osoby ani miejsca \u2014 tylko to, kogo wpuszcza si\u0119 do poczekalni. Ponowne uruchomienie tej akcji tworzy nowy sekret i restartuje z nim serwer; kto ju\u017c siedzi przy grze, gra dalej, ale stary sekret przestaje dzia\u0142a\u0107 przy nowych grach i do\u0142\u0105czeniach.',
|
||||
57: 'Przywr\u00f3\u0107 miejsce',
|
||||
58: 'Tworzy jednorazowy link, kt\u00f3ry przywraca gracza na jego miejsce',
|
||||
59: 'Link przywracaj\u0105cy dzia\u0142a tylko raz i wygasa po 30 minutach. Kto go otworzy, zajmie to miejsce \u2014 wy\u015blij go w\u0142a\u015bciwej osobie, a nie na kana\u0142 publiczny.',
|
||||
60: 'Miejsce',
|
||||
61: 'Kt\u00f3rego gracza przywr\u00f3ci\u0107',
|
||||
62: 'Brak graczy przy stole na tym serwerze',
|
||||
63: 'Link przywracaj\u0105cy',
|
||||
64: 'Wy\u015blij to graczowi i popro\u015b, by otworzy\u0142 link we w\u0142asnej przegl\u0105darce. Dzia\u0142a raz, wygasa po 30 minutach i przywraca go prosto na jego miejsce. Nie zawiera jego tokenu sesji.',
|
||||
},
|
||||
fr_FR: {
|
||||
0: 'Démarrage de Station Master !',
|
||||
@@ -236,5 +260,13 @@ export default {
|
||||
54: 'le serveur a r\u00e9pondu',
|
||||
55: 'Secret de connexion',
|
||||
56: "Partagez-le avec toute personne qui doit pouvoir cr\u00e9er une partie sur ce serveur ou en rejoindre une. Il n'identifie ni une personne ni une place, seulement qui est admis \u00e0 la porte. Relancer cette action en g\u00e9n\u00e8re un nouveau et red\u00e9marre le serveur avec ; qui est d\u00e9j\u00e0 assis \u00e0 une partie continue de jouer, mais l'ancien secret cesse de fonctionner pour les nouvelles parties et les arriv\u00e9es.",
|
||||
57: 'Restaurer une place',
|
||||
58: 'Cr\u00e9e un lien \u00e0 usage unique qui remet un joueur \u00e0 sa place',
|
||||
59: "Un lien de restauration fonctionne une seule fois et expire au bout de 30 minutes. Quiconque l'ouvre prend cette place : envoyez-le \u00e0 la bonne personne, et non sur un canal public.",
|
||||
60: 'Place',
|
||||
61: 'Quel joueur restaurer',
|
||||
62: 'Aucun joueur assis sur ce serveur',
|
||||
63: 'Lien de restauration',
|
||||
64: "Envoyez-le au joueur pour qu'il l'ouvre dans son propre navigateur. Il fonctionne une fois, expire au bout de 30 minutes et le remet directement \u00e0 sa place. Il ne contient pas son jeton de session.",
|
||||
},
|
||||
} satisfies Record<string, LangDict>
|
||||
|
||||
Reference in New Issue
Block a user