Skip to content

Go: the room's finished games, each with its SGF - #467

Merged
aaylward merged 3 commits into
mainfrom
claude/hopeful-ramanujan-uwueor
Oct 20, 2026
Merged

aaylward merged 3 commits into
mainfrom
claude/hopeful-ramanujan-uwueor

Conversation

@aaylward

@aaylward aaylward commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

MoonBase#1668 phase 5, the last of three PRs; the hub side is MoonBase#1686.

  • useGoTable keeps history:
    • loadHistory asks for it, and it is asked for again whenever a game ends, so a player's first game shows without a refresh;
    • clear forgets it.
  • LobbyGame asks for go history once on room arrival while connected, as it does for chess.
  • LobbyPanel shows a Go games section once the room has played go or while it has a go table:
    • each game is one line, e.g. "alice vs GNU Go 4 · 9×9 · B+5.5", with an SGF download link (a data URL, <gameId>-<ordinal>.sgf);
    • Refresh asks again, for members at no go table, who never hear a game end;
    • the README section on finished games covers go.

Tests went red first. Typecheck, lint and all 1685 tests pass. The review panel (correctness, mutation, UX, simplicity) ran on 0ef1c07; its fixes are in 1dda4ee, and Cursor's review is answered in 36fcd9a.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
muchq 36fcd9a Commit Preview URL

Branch Preview URL
Oct 20 2026, 11:40 PM

@cursor

cursor Bot commented Oct 20, 2026

Copy link
Copy Markdown

Review

Altitude looks right for MoonBase#1686: go history summaries with SGF, load on room arrival (panel folded or not), clear on leave, gameEnded → re-ask so a participant’s first game shows without Refresh. No publish/review, matching the hub (go has no feed). CI green.

Medium — empty [] history hides Refresh, so roommates can miss archived games

GoGames returns null for both history === null and history.length === 0. Arrival asks once and then parks on [] for a go-less room. gameEnded only reaches seats/watchers of that table (smithy GoWatch), so another member who already holds [] never re-asks and never sees a Refresh control — the section stays gone until they leave and re-enter (clear → null → auto-load).

Chess keeps its section (and Refresh) even when empty, so the same roommate can pull. Hiding go until the room has played is fine for chess-only rooms; once the client has an answer, showing the empty state + Refresh (or always showing the section like chess) would close the gap. The “asks again when a game ends” test only covers the participant path.

Low — README still chess-only for finished games

The lobby narrative documents Chess games / review / publish (MoonBase#1637) and does not mention Go games or SGF downloads (MoonBase#1686).

Low — narrow-screen arrival test pins only chess

LobbyGame “asks on a narrow screen…” asserts chess.loadHistory but not go.loadHistory. The hide-then-room case covers go; the folded-on-arrival path is the same effect and should pin both.

@cursor

cursor Bot commented Oct 20, 2026

Copy link
Copy Markdown

Ack on 36fcd9a.

  • Roommate Refresh: showing the section (empty copy + Refresh) while room.games has a go table closes the gap without keeping go chrome in chess-only rooms. The LobbyPanel pin matches.
  • README Go games / SGF and the narrow-screen go.loadHistory assert look right.

One remaining window, not blocking: if every go table leaves room.games before a bystander refreshes, they still sit on [] with the section gone until leave/rejoin. Live-table visibility is the practical fix.

@aaylward
aaylward merged commit 5aadc84 into main Oct 20, 2026
2 checks passed
@aaylward
aaylward deleted the claude/hopeful-ramanujan-uwueor branch October 20, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants