From e6edcb8c2e41f09e0a85428624d69d80c5738ddd Mon Sep 17 00:00:00 2001 From: Pierre Le Fevre Date: Fri, 19 Jun 2026 12:37:36 +0200 Subject: [PATCH] Close isu issue 374: Bing trending-now carousel hydrates offline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Bing carousel useEffect no longer aborts during real-web hydration. With the carousel JSON + PopNow thumbnails cached, the offline bing.com scenario now fetches /hp/api/v1/carousel and renders all 20 TrendingNow tiles into #crs_pane on both desktop (1365x900) and mobile (390x844) viewports during initial load — verified before the click, so it does not depend on the interaction step. This was fixed by previously-merged work: 978e552 (carousel hydration blockers) and a20d53f (rooting due-timer callbacks across mid-drain GC, which kept the Preact effect's timer callbacks alive). The carousel headlines asserted here appear only in the cached carousel JSON, never in the static snapshot shell, so the assertions exercise the live hydration path end to end. Lock the fix in with a regression guard: assert two structurally-distinct TrendingNow headlines ("Nya avslöjanden..." and "Putin: Vill se full demilitarisering av Ukraina") on both viewports. A single coincidental match can no longer pass, and an effect that aborts partway through (the #374 failure mode) is caught. Scope: this resolves the carousel useEffect defect only. The separate modules_wrapper region remains empty and is tracked by isu issue 375; the bing.com.we scenario stays # xfail for the #280/#305 screenshot-parity gap (the snapshot's daily background differs from the Chromium golden). cargo run -p we-e2e -- --real-web --out-dir crates/e2e/artifacts stays green: 16/16 (bing.com counts as xfail, carousel asserts pass). Co-Authored-By: Claude Opus 4.8 --- .isu/issues.json | 2 +- crates/e2e/scenarios/real-web/bing.com.we | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.isu/issues.json b/.isu/issues.json index b36204e..68cb332 100644 --- a/.isu/issues.json +++ b/.isu/issues.json @@ -4578,7 +4578,7 @@ ], "assigned": [], "author": "piefev", - "state": "open", + "state": "closed", "created_at": "2026-06-05T08:30:39Z" }, { diff --git a/crates/e2e/scenarios/real-web/bing.com.we b/crates/e2e/scenarios/real-web/bing.com.we index 3a6bb09..eab846f 100644 --- a/crates/e2e/scenarios/real-web/bing.com.we +++ b/crates/e2e/scenarios/real-web/bing.com.we @@ -133,7 +133,13 @@ screenshot real-web/bing.com/desktop.png dump_dom real-web/bing.com/desktop_dom.txt dump_console real-web/bing.com/desktop_console.txt assert_dom_contains "Bing" +# Trending-now carousel hydration (isu issue 374). These two headlines come +# only from the cached /hp/api/v1/carousel JSON, never the static shell, so +# they appear in the DOM only if the Preact carousel useEffect fetched the +# JSON and rendered the tiles. Asserting two structurally-distinct tiles +# guards against the effect aborting partway through (the #374 failure mode). assert_dom_contains "Nya avslöjanden får EU att agera mot Kina" +assert_dom_contains "Putin: Vill se full demilitarisering av Ukraina" # Exercise the hydrated page while the scenario remains xfailed for visual parity. click body dump_dom real-web/bing.com/desktop_interaction_dom.txt @@ -146,7 +152,9 @@ screenshot real-web/bing.com/mobile.png dump_dom real-web/bing.com/mobile_dom.txt dump_console real-web/bing.com/mobile_console.txt assert_dom_contains "Bing" +# Same trending-now carousel hydration guard at the mobile viewport (isu issue 374). assert_dom_contains "Nya avslöjanden får EU att agera mot Kina" +assert_dom_contains "Putin: Vill se full demilitarisering av Ukraina" click body dump_dom real-web/bing.com/mobile_interaction_dom.txt assert_dom_contains "Logga in" -- 2.51.2