Skip to content

fix(link-previews): proxy sent preview media - #5627

Open
tellaho wants to merge 1 commit into
mainfrom
tho/link-preview-media-proxy
Open

fix(link-previews): proxy sent preview media#5627
tellaho wants to merge 1 commit into
mainfrom
tho/link-preview-media-proxy

Conversation

@tellaho

@tellaho tellaho commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Overview

Category: fix
User Impact: Sent link previews now reliably display their thumbnail and favicon when the media is hosted on the relay.

Problem: Sent preview cards loaded relay-hosted snapshot media directly, so authenticated relay requests could fail even though the snapshot itself was valid. Solution: Rewrite snapshot media at the shared card render boundary through Buzz's authenticated local media proxy, preserving the original display domain and rerendering when the proxy becomes ready.

Changes

File changes

desktop/src/shared/ui/link-preview-attachment.tsx
Routes sent preview thumbnails and favicons through authenticated relay media handling above the Compact/Rich fork while preserving original metadata.

desktop/src/testing/e2eBridge.ts
Adds an opt-in proxy-readiness seam that deterministically re-arms the production media lookup when released.

desktop/tests/e2e/messaging.spec.ts
Covers the real send, snapshot, recipient, and card-render path for Compact and Rich previews, including fallback URLs, proxied URLs, and decoded image content.

desktop/tests/helpers/bridge.ts
Exposes the opt-in media-proxy startup state to E2E tests.

Reproduction Steps

  1. Send a link whose preview snapshot includes a relay-hosted thumbnail and favicon.
  2. Inspect the sent message card in Compact mode and confirm both images render after the local media proxy becomes ready.
  3. Switch link previews to Rich mode and confirm the thumbnail and favicon continue to render.
  4. Run the focused Playwright regression:
    pnpm exec playwright test tests/e2e/messaging.spec.ts --project=smoke --grep "sent link preview media uses the authenticated proxy"

Before / After

Before After
Relay-hosted preview media fails to load. The sent preview thumbnail and favicon render through the authenticated media proxy.
Before: sent link preview with a missing thumbnail After: sent link preview with the thumbnail rendered

Co-authored-by: Taylor Ho <taylorkmho@gmail.com>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho
tellaho marked this pull request as ready for review August 12, 2026 04:39
@tellaho
tellaho requested a review from a team as a code owner August 12, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant