desk: booth portrait is a plain image; options_hash recomputed against the CultLib vectors
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 4m9s

PoseAvatar renders a span, not a button, when it has no onClick. The desk recomputes each card's options_hash (RFC 8785 after NFC, SHA-256; 15 CultLib vectors) and withdraws a card that differs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Void 2026-11-10 18:15:56 +00:00
commit 0f82576d9f
12 changed files with 560 additions and 20 deletions

View file

@ -12,7 +12,8 @@ type PoseAvatarProps = {
alt?: boolean;
/** Play the first-appearance pop. */
enter?: boolean;
onClick: React.MouseEventHandler<HTMLButtonElement>;
/** Without it the portrait is a plain image: no button, no tab stop. */
onClick?: React.MouseEventHandler<HTMLButtonElement>;
};
export function PoseAvatar({ mind, pose, userId, alt, enter, onClick }: PoseAvatarProps) {
@ -43,9 +44,10 @@ export function PoseAvatar({ mind, pose, userId, alt, enter, onClick }: PoseAvat
};
}, [src, alt]);
const Tag = onClick ? 'button' : 'span';
return (
<button
type="button"
<Tag
type={onClick ? 'button' : undefined}
className={classNames(css.PoseButton, alt && css.PoseButtonAlt, enter && css.EnterPortrait)}
style={{ shapeOutside: shape }}
data-user-id={userId}
@ -59,6 +61,6 @@ export function PoseAvatar({ mind, pose, userId, alt, enter, onClick }: PoseAvat
alt={`${mind}, ${pose}`}
draggable={false}
/>
</button>
</Tag>
);
}