persist explorer player-tab color across refresh#20270
Merged
ornicar merged 2 commits intoApr 21, 2026
Merged
Conversation
CZapin2015
force-pushed
the
fix/explorer-remember-color
branch
from
April 17, 2026 20:17
9423f2a to
d578ede
Compare
CZapin2015
marked this pull request as ready for review
April 17, 2026 20:22
Closes lichess-org#18107. The color prop was in-memory only while sibling prefs (db, player name, etc.) already use storedProp, so a refresh snapped the side back to white. Switch color to storedProp to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ornicar
force-pushed
the
fix/explorer-remember-color
branch
from
April 21, 2026 08:37
d578ede to
955c27f
Compare
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.
Closes #18107.
Problem
On the analysis Explorer, setting the Player tab side to Black and refreshing reverts it back to White. The tab and player name are preserved because they use
storedProp, butcolorwas a plain in-memoryprop.Fix
One field change in
ui/analyse/src/explorer/explorerConfig.ts:color: Prop<Color>→color: StoredProp<Color>prop(root.bottomColor())→storedProp<Color>('analyse.explorer.color', root.bottomColor(), str => str as Color)Matches the pattern used by the
dbfield two lines above.Testing
Verified end-to-end locally against lila-docker running my branch:
Also compared against production lichess.org in the same session, where the same flow reverts to "as white" on refresh.
Screen recording demonstrating both the production bug and the localhost fix attached below.
2026-04-17.16-07-46.mp4
AI disclosure
Parts of this change were drafted with help from Claude (Anthropic). Prompt intent: locate the one-line field in the explorer config that isn't persisted and make it match the pattern used by the other persisted fields in the same object. All code reviewed by me and verified locally.