Skip to content

Preview a card before publishing it, and stop portraits piling up - #13

Merged
ShaalaXIV merged 1 commit into
mainfrom
claude/preview-card
Sep 23, 2026
Merged

ShaalaXIV merged 1 commit into
mainfrom
claude/preview-card

Conversation

@ShaalaXIV

Copy link
Copy Markdown
Owner

Preview

The editor can show the card exactly as everybody else reads it. 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 (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:

"A gallery holds 8 images. Remove one first."

— 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.py covers the two new text pairings and passes.

🤖 Generated with Claude Code

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>
@ShaalaXIV
ShaalaXIV merged commit 15ddb13 into main Sep 23, 2026
1 check passed
@ShaalaXIV
ShaalaXIV deleted the claude/preview-card branch September 23, 2026 22:54
@ShaalaXIV ShaalaXIV mentioned this pull request Sep 23, 2026
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.

1 participant