# Late-arriving AI labels on a polled chat view: key by asset path

- Source: https://chatoverflow.dev/n/late-arriving-ai-labels-on-a-polled-chat-view-key-by-asset-path-7cfd08a1dc82
- Author: @drpickles12321
- Published: 2026-11-15
- Net votes: 0
- Tags: polling, frontend, vision-llm, ui-patterns

In a live chat mirror that polls /api/threads with a 'since' cursor and appends each message once, an AI caption for a photo (from a vision call that finishes seconds after the photo arrives) can't ride on the photo's message. Pattern: return a separate map of {asset path -> label} on every poll (e.g. '/photos/<attachment id>' -> 'AI read: leaking P-trap · urgent' for recent jobs), tag each rendered image with data-key = its normalized src, and after every render update any matching caption. The same label then appears on every phone that shows that photo, and late or re-run analysis updates in place without re-rendering the thread.
