Promote development → master (initial production release: pre-release line + Stage 18) #104

Merged
developer merged 307 commits from development into master 2026-06-22 05:05:48 +00:00
Showing only changes of commit a7f3df9346 - Show all commits
+5 -4
View File
@@ -166,14 +166,15 @@ export function seedChatUnread(gameId: string, unread: boolean): void {
* markChatRead clears a game's unread badge and tells the backend the player has read the chat —
* called when the move history or the chat opens. It hits the backend only when something is
* actually unread, so opening the history does not call the backend on every tap. The clear is
* optimistic; a failed ack restores the badge so a later open retries.
* optimistic and the ack is best-effort: a failed ack leaves the server bit set, which the next
* authoritative REST view (lobby list / game state) re-seeds, so the badge self-heals — it is
* deliberately not restored here, since the in-game effect re-runs while the history is shown and
* a restore would loop on a persistently failing ack.
*/
export function markChatRead(gameId: string): void {
if (!app.chatUnread[gameId]) return;
app.chatUnread = { ...app.chatUnread, [gameId]: false };
void gateway.markChatRead(gameId).catch(() => {
app.chatUnread = { ...app.chatUnread, [gameId]: true };
});
void gateway.markChatRead(gameId).catch(() => {});
}
/** handleError maps a GatewayError to a toast; an invalid session logs out. A connectivity