Repository navigation
Show an unnamed imported player by colour, not "?" - #389
Merged
Merged
Conversation
Once the backend keeps an imported PGN's own players (backend #308), a PGN that names nobody comes back with "?" for each, PGN's "unknown". The analysis page showed names as they came, so it would have read "? vs ?". An unnamed player is now shown as White or Black, or as Guest in a game played here, and pgnNameOr treats "?" as no name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Why
Backend CSSLab/maia-platform-backend#308 (Discord bug B15) makes an imported game keep its PGN's own players. Today they're replaced with the uploader's Lichess id and "unknown". When the PGN names nobody, each player comes back as
?, PGN's "unknown". The analysis page shows names exactly as they arrive, so it would read "? vs ?", in the tab title too.What changes
pgnNameOrtreats?as no name, alongside empty,None,nullandundefined.playerLabel(name, color, gameType): an unnamed player shows as Guest in games played on the site (play, Hand & Brain), as PGN export already does, and as White or Black in any other game.formatAnalysisPlayerName.?for an unnamed player in an imported game, as the PGN standard says.Checked
pgnNameOrandplayerLabel;jest src/lib/pgnpasses 18/18. Lint andtscare clean.?case can't be seen on the live site until backend Add premoves against Maia #308 is deployed.This is safe to merge before or after the backend PR.
🤖 Generated with Claude Code