review: format check precedes limits, INVALID_IMAGE/IMAGE_TYPE_MISMATCH as format copy, tile-sized retry control

This commit is contained in:
creatixchu
2026-08-12 13:50:07 +08:00
parent c9a536e0c8
commit 8d4c3f8a0a
7 changed files with 52 additions and 1 deletions

View File

@@ -58,3 +58,12 @@
background: var(--dsw-alias-interactive-bg-hover-danger);
cursor: pointer;
}
/* A failed tile keeps the 64px grid cell instead of growing to its copy. */
.error[data-variant='tile'] {
width: 64px;
height: 64px;
padding: 4px;
overflow: hidden;
border-radius: 16px;
}

View File

@@ -79,7 +79,7 @@ export function MessageImage({ attachment, load, variant, labels }: {
}, [attachment, load, attempt])
const label = attachment.name ?? labels.image
if (error) return <button type="button" className={css.error} onClick={request}>{labels.loadFailed}</button>
if (error) return <button type="button" className={css.error} data-variant={variant} onClick={request}>{labels.loadFailed}</button>
return (
<>
<button