Skip to content

fix: skip 'Game starting' message when resuming a saved game#185

Merged
njbrake merged 1 commit intomainfrom
fix/resume-game-starting-message
Apr 8, 2026
Merged

fix: skip 'Game starting' message when resuming a saved game#185
njbrake merged 1 commit intomainfrom
fix/resume-game-starting-message

Conversation

@njbrake
Copy link
Copy Markdown
Contributor

@njbrake njbrake commented Apr 8, 2026

Summary

  • When resuming a saved game, the "Game starting..." message no longer appears in the game log. The log already contains the full event history from the save file, so this message was redundant and confusing.
  • Detects resume by checking whether the game phase is past Setup, then sends an empty initial state update (TUI still gets the board state to render, just no log entry).
  • Adds two regression tests: one proving resumed games skip the message, one proving fresh games still show it.

Investigation notes

Audited the full save/resume round-trip. All gameplay state (board, buildings, roads, resources, dev card deck order, robber position, longest road/army, friendly_robber, ports, phase, turn tracking) survives serialization correctly. The current player is always preserved accurately at turn boundaries.

Closes #178

Test plan

  • cargo test -- 436 tests pass (434 existing + 2 new)
  • cargo fmt and cargo clippy clean
  • Manual: start a game, quit mid-game, resume via Continue -- verify no "Game starting..." in log
  • Manual: start a fresh game -- verify "Game starting..." still appears

🤖 Generated with Claude Code

When resuming, the game log already contains the full event history from
the save file. The unconditional "Game starting..." message was confusing
because it appeared on top of that restored history. Now we detect resume
by checking whether the phase is past Setup and send an empty initial
state update instead (the TUI still gets the board state to render).

Closes #178

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@njbrake njbrake merged commit d8d0ff7 into main Apr 8, 2026
5 checks passed
@njbrake njbrake deleted the fix/resume-game-starting-message branch April 8, 2026 15:06
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.

No need for the "game starting" dialogue when resuming a game

1 participant