Preview a card before publishing it, and stop portraits piling up - #13
Merged
Merged
Conversation
Preview ------- The editor can now show the card exactly as everybody else reads it, drawn by the same code the Chronicle uses. The card face moved out of ChronicleWindow into UI/ProfileCard so there is one implementation rather than two: a preview that reimplements the card is a preview that lies the moment either copy changes. A portrait chosen but not yet uploaded is shown in place of the one it would replace. One source of truth for completeness ------------------------------------ The editor kept its own copy of the completeness rules, and it had already drifted: ProfileDto.Completeness counts nine things including At first glance, the editor counted eight and ignored it, so filling in your impressions never moved the bar. The meter now reads the same draft the preview draws, and the number of criteria is a shared constant. Portraits replace rather than accumulate ---------------------------------------- Every portrait update added another image to a gallery that holds eight and never removed the one it replaced, so the ninth change would have failed outright with an error about a gallery the player never chose to fill. Updating a portrait now retires the likeness it replaces. Verified with ten consecutive updates: the gallery stays at one and the portrait changes every time. A picture that has not arrived yet ---------------------------------- An empty portrait well looked identical whether there was no portrait or one still downloading, which reads as "my picture did not save". Both the editor and the card now say when they are fetching. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
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.
Preview
The editor can show the card exactly as everybody else reads it. The card face moved out of
ChronicleWindowintoUI/ProfileCardso there is one implementation rather than two — a preview that reimplements the card is a preview that lies the moment either copy changes. A portrait chosen but not yet uploaded is shown in place of the one it would replace.One source of truth for completeness
The editor kept its own copy of the completeness rules, and it had already drifted:
ProfileDto.Completenesscounts nine things including At first glance, the editor counted eight and ignored it — so filling in your impressions never moved the bar (it showed "3 of 8"). The meter now reads the same draft the preview draws, and the criteria count is a shared constant.Portraits replace rather than accumulate
Every portrait update added another image to a gallery that holds eight, and never removed the one it replaced. The ninth change would have failed outright:
— an error about a gallery the player never chose to fill. Updating a portrait now retires the likeness it replaces. Images added deliberately from the gallery are untouched, because they are never the portrait unless picked.
Verified with ten consecutive portrait updates against a local server: gallery stays at 1, portrait changes every time.
A picture that has not arrived yet
An empty portrait well looked identical whether there was no portrait or one still downloading, which reads as "my picture did not save". Both the editor and the card now say when they are fetching.
tools/contrast-audit.pycovers the two new text pairings and passes.🤖 Generated with Claude Code