From b269e8df7e6ed3e1910b6f6eeef08fa4b89778bd Mon Sep 17 00:00:00 2001 From: thomaspblock Date: Thu, 13 Aug 2026 16:42:16 -0400 Subject: [PATCH] fix(desktop): route compact preview geometry fixture through media proxy (#5799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Category:** fix (CI) **User Impact:** None — test-only change that unblocks `main` and every open PR. **Problem:** `main` has been red since #5629 landed on `45f4b91a3`: `Desktop Smoke E2E (3)` fails `compact link preview image geometry truncates long titles to one line` on every build (main run 31727837133, and e.g. #5792, #5790). Two independently-green PRs raced: #5629 added the test stubbing its preview image at the raw relay origin (`http://localhost:3000/media/*.png`), while #5627 rewrites sent snapshot media through the authenticated local media proxy (`http://127.0.0.1:54321` in the E2E mock bridge). Merged together, the image request goes to the proxy origin, the stub never matches, and `naturalWidth` stays `0`. **Solution:** Point the route stub at the mock proxy origin, matching the existing `sent link preview media uses the authenticated proxy in compact and rich cards` test in the same spec. **Testing:** Reproduced the failure locally on `45f4b91a3`, then with this fix: targeted test passes, and the full `messaging.spec.ts` smoke suite passes 58/58. Signed-off-by: Thomas Petersen Co-authored-by: Wintermute <3f1797424fd9ad6653a83665c660517777cd7f8c228c0d5907f49e01537f3ca5@buzz.block.builderlab.xyz> --- desktop/tests/e2e/messaging.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/tests/e2e/messaging.spec.ts b/desktop/tests/e2e/messaging.spec.ts index cbe19133c9..68a5fad7fc 100644 --- a/desktop/tests/e2e/messaging.spec.ts +++ b/desktop/tests/e2e/messaging.spec.ts @@ -1312,7 +1312,10 @@ test("compact link preview image geometry truncates long titles to one line", as page, }) => { const previewUrl = "https://github.com/block/buzz/pull/3246?geometry=1"; - await page.route("http://localhost:3000/media/*.png", (route) => + // Sent snapshot media is relay-hosted and rewritten through the + // authenticated media proxy (#5627), so serve the fixture from the mock + // proxy origin rather than the raw relay origin. + await page.route("http://127.0.0.1:54321/media/**", (route) => route.fulfill({ body: LINK_PREVIEW_IMAGE, contentType: "image/png",