Skip to content

Comments

Fix multiple analysis session issues#2496

Merged
veloce merged 5 commits intolichess-org:mainfrom
HaonRekcef:fix-load-pgn
Jan 10, 2026
Merged

Fix multiple analysis session issues#2496
veloce merged 5 commits intolichess-org:mainfrom
HaonRekcef:fix-load-pgn

Conversation

@HaonRekcef
Copy link
Collaborator

Fixes:

  • Opening a standalone analysis session from puzzle or load position works now even when there is a saved analysis. Previously it just loaded the saved analysis instead.
  • Jumps to the same path that was previously being analyzed
  • No orange box highlighting the last move of the analysis in standalone analysis

Copilot AI review requested due to automatic review settings January 8, 2026 22:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes multiple issues with standalone analysis sessions in the chess analysis feature. The changes address problems where opening a standalone analysis from a puzzle or load position would incorrectly load a previously saved analysis instead of the new position, fail to navigate to the correct path, and display unwanted orange highlighting.

Key changes:

  • Added tracking of the current path in saved standalone analysis sessions via _savedStandalonePath
  • Modified standalone analysis loading logic to only restore saved state when opening with empty PGN
  • Fixed orange box highlighting by setting pathToLiveMove to null for standalone analysis sessions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@veloce veloce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. Having some tests would be nice here.

@HaonRekcef
Copy link
Collaborator Author

Thanks for the fix. Having some tests would be nice here.

added extensive tests

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@veloce veloce merged commit 1179f16 into lichess-org:main Jan 10, 2026
6 of 7 checks passed
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