Repository navigation
Keep the board visible after jumping to an analyzed move - #116
Merged
Merged
Conversation
Once a jump to a move from the analysis list had landed (with practice mode on: once the evals for that position were done), awaitJumpSettled() called resetAndLoadOnGuiThread(), which clears the board model. That is meant for a new game, whose first board arrives right after; here the engine just waits for input and sends no new board, so the board stayed empty with only the evals on it until the next undo or redo. The board model already shows the landed position (every undo of the walk updated it), so only the UI settings are reloaded now. New AnalysisTest#testBoardStaysVisibleAfterAJumpLands checks the discs and the score on the board once the jump has landed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V5G4cWSLBkiNNK4KC3zvXM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the following bug: after analyzing a game, tapping a move in the analysis list jumps there correctly. Once the evaluation for that position finishes, all discs disappear and only the evals stay on the board. The discs come back with the next undo or redo.
Cause
jumpToMove()loads the analyzed game and walks back to the tapped move with undo. Once the engine is waiting for input again,awaitJumpSettled()marks the jump as done. With practice mode on, that is when the evals are finished.At that point
awaitJumpSettled()calledresetAndLoadOnGuiThread(). That method clears the board model (GameStateBoardModel.reset()), which is right for a new game, because the new game's first board arrives right after. After a jump, though, the engine just waits and sends no new board. So the board stayed empty, and only the candidate evals, whichreset()doesn't touch, were drawn. The next undo or redo sent a board again.Fix
The board model already shows the landed position, because every undo step of the walk updated it. So
awaitJumpSettled()now only reloads the UI settings and no longer resets the board.Test
New
AnalysisTest#testBoardStaysVisibleAfterAJumpLands:Before the fix, the board was empty at that point.
There is no Android SDK in my environment, so the emulator job (
test) is the first place this compiles and runs.🤖 Generated with Claude Code
https://claude.ai/code/session_01V5G4cWSLBkiNNK4KC3zvXM
Generated by Claude Code