The reports ledger loads on connect, not into a closed socket

The first refreshFeedback fired while the websocket was still
connecting and pre-open sends drop silently; the games list survives
because onopen re-asks. Feedback now re-asks there too, and rides the
45-second poll so replies land while the lobby sits open.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
Eric Wagoner
2026-09-01 09:37:46 -04:00
co-authored by Claude Fable 5
parent 5abd0ba60e
commit 539c2f25bb
+2 -1
View File
@@ -374,6 +374,7 @@ class Net {
} }
} }
this.refreshGames(); this.refreshGames();
this.refreshFeedback();
}; };
ws.onclose = () => { ws.onclose = () => {
this.status = "disconnected"; this.status = "disconnected";
@@ -678,7 +679,7 @@ class Net {
if (this.pollTimer) return; if (this.pollTimer) return;
this.refreshGames(); this.refreshGames();
this.refreshFeedback(); this.refreshFeedback();
this.pollTimer = setInterval(() => this.refreshGames(), 45_000); this.pollTimer = setInterval(() => { this.refreshGames(); this.refreshFeedback(); }, 45_000);
} }
stopGamePolling(): void { stopGamePolling(): void {
if (this.pollTimer) { clearInterval(this.pollTimer); this.pollTimer = null; } if (this.pollTimer) { clearInterval(this.pollTimer); this.pollTimer = null; }