You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
W8: Refresh link-preview metadata after publishing a message #91
Split out of #64 (see PR #90). APIClient.refreshMessageMetadata(messageId:) is implemented and
tested but has no caller; #64 kept it rather than deleting it because there is a real use, but
wiring it changes the publish path and deserved its own change.
What the web does
POST /api/messages/{id}/metadata fetches OpenGraph metadata for a message's links. The web fires
it after publishing (components/messages/MessageInput.tsx:511) and again after an edit,
fire-and-forget with a swallowed failure, so a new post's link previews populate without a reload.
iOS today
ComposeView renders a live preview while composing, but nothing refreshes metadata on the server
after the message is created — so the link preview can be missing on the feed until something else
populates it.
Build this
Call refreshMessageMetadata(messageId:) after a successful publish in ComposeView,
fire-and-forget, only when the posted content contained at least one URL.
Swallow every failure — it is a secondary datum and must never surface an error on the publish
path or block the success alert.
Implemented in #94. Closing here — further work tracks in the PR.
One acceptance criterion is only partly met, deliberately. "A newly posted message with a link shows its preview in the feed without a manual refresh" — the POST now fires, but the preview lands on the next feed fetch rather than immediately. The feed row renders message.linkMetadata?.links ([LinkMetadataItem]) while refreshMessageMetadata returns [MessageLinkPreview], a different shape. Folding the response straight back into the locally-inserted feed message would need an AppDataStore mutation plus a shape conversion — past the scope of this wiring, and the web behaves the same way. Split out as #96.
Activity
Adron commentedon Sep 16, 2026
Implemented in #94. Closing here — further work tracks in the PR.
One acceptance criterion is only partly met, deliberately. "A newly posted message with a link shows its preview in the feed without a manual refresh" — the POST now fires, but the preview lands on the next feed fetch rather than immediately. The feed row renders
message.linkMetadata?.links([LinkMetadataItem]) whilerefreshMessageMetadatareturns[MessageLinkPreview], a different shape. Folding the response straight back into the locally-inserted feed message would need anAppDataStoremutation plus a shape conversion — past the scope of this wiring, and the web behaves the same way. Split out as #96.