diff --git a/web/src/components/GenerationCard.tsx b/web/src/components/GenerationCard.tsx index 8d16575..d618817 100644 --- a/web/src/components/GenerationCard.tsx +++ b/web/src/components/GenerationCard.tsx @@ -173,7 +173,10 @@ export function GenerationCard({ task, onOpenDetail }: Props) { const style = getComputedStyle(container); const font = `${style.fontSize} ${style.fontFamily}`; const labelsWidth = labelsEl.offsetWidth + 8; - const totalAvailable = containerWidth * 2 - labelsWidth - 24; + // Account for mention tags (thumbnails) taking extra width vs plain text + const mentionCount = (task.assetMentions?.length || 0) + (task.references?.length || 0); + const mentionExtraWidth = mentionCount * 24; // ~24px extra per mention (thumbnail + padding) + const totalAvailable = containerWidth * 2 - labelsWidth - 24 - mentionExtraWidth; const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d')!;