The best way to control Claude Code, Codex and more from any computer or phone
fix: align handoff preview URLs with image attachment index
collectUserMessageBlobPreviewUrls returns a compact array (image+blob only). Consumer now indexes by image position, not full attachment index, so blob URLs apply to the correct server attachments when some are skipped. Made-with: Cursor
Julius Marminge committed
Mar 2, 2026 at 09:53 UTC
4c846332c5c972b715862df9f19b6c095c76841b
1 file changed
+7
-2
apps/web/src/components/ChatView.tsx
+7
-2
@@ -710,8 +710,13 @@ export default function ChatView({ threadId }: ChatViewProps) {
710
}
711
712
let changed = false;
713
- const attachments = message.attachments.map((attachment, index) => {
714
- const handoffPreviewUrl = handoffPreviewUrls[index];
713
+ let imageIndex = 0;
714
+ const attachments = message.attachments.map((attachment) => {
715
+ if (attachment.type !== "image") {
716
+ return attachment;
717
+ }
718
+ const handoffPreviewUrl = handoffPreviewUrls[imageIndex];
719
+ imageIndex += 1;
720
if (!handoffPreviewUrl || attachment.previewUrl === handoffPreviewUrl) {
721
return attachment;
722
}