[object Object]

← back to Dw Theme Boost Fix

TK-10835: persist infinite scroll on deep ?page=N landings (route through normalize+cascade-guard, drop paged fallback)

2b6da472b5318711e0b45c8fd0f6305b2787ad43 · 2026-08-25 09:37:34 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 2b6da472b5318711e0b45c8fd0f6305b2787ad43
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Aug 25 09:37:34 2026 -0700

    TK-10835: persist infinite scroll on deep ?page=N landings (route through normalize+cascade-guard, drop paged fallback)
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 boost-infinite-override.liquid | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/boost-infinite-override.liquid b/boost-infinite-override.liquid
index d27b381..70a12f1 100644
--- a/boost-infinite-override.liquid
+++ b/boost-infinite-override.liquid
@@ -46,7 +46,7 @@
   ============================================================================
 {% endcomment %}
 <script>
-/* DW-GUARD-VERSION 20260804-1030 */
+/* DW-GUARD-VERSION 20260825-1000 */
 (function () {
   'use strict';
   if (window.__dwBoostInfinite) return;
@@ -164,15 +164,20 @@
   var mode = 'infinite';
   try { if (localStorage.getItem('dwPaginationMode') === 'paged') mode = 'paged'; } catch (e) {}
 
-  // DEEP-LANDING -> PAGED (DW, 2026-08-04 — residual scroll-jump fix, Steve-approved).
-  // A deep-linked ?page=N (N>1) has no stable anchor in infinite scroll, and its
-  // batch-append near the fold shoves the footer/main (~0.8 CLS = "images jump").
-  // Rendering deep landings as classic paged (100/page) has ZERO append shove.
-  // NOT persisted -> a normal landing (no page param) keeps infinite as the default
-  // per Steve's 2026-07-13 verdict; only genuine deep ?page=N links go paged.
-  if (mode === 'infinite') {
-    try { if (parseInt(new URL(location.href).searchParams.get('page'), 10) > 1) mode = 'paged'; } catch (e) {}
-  }
+  // DEEP-LANDING -> STAY INFINITE (DW, 2026-08-25 — Steve's verdict: persist
+  // infinite scroll on deep-linked ?page=N landings instead of falling back to
+  // numbered pages). Previously (2026-08-04) a deep ?page=N (N>1) landing flipped
+  // mode='paged' to dodge the append-shove CLS; Steve now wants the shopper to
+  // KEEP infinite scroll even when they arrive on a deep link. We no longer flip
+  // the mode — a deep ?page=N landing is instead handled by the two infinite-mode
+  // primitives already below: DEEP-LINK NORMALIZE strips the page param via
+  // history.replaceState so Boost starts clean at page 1, and CASCADE GUARD pins
+  // the viewport to the top until a real user gesture so no auto-append cascade
+  // fires on landing. Net: deep landings render as a clean page-1 infinite grid
+  // with no batch-append shove. The numbered-page toggle (localStorage
+  // 'dwPaginationMode') stays fully available for shoppers who opt into pages.
+  // (Deliberately a no-op branch retained for clarity: mode stays 'infinite'
+  // for a deep ?page=N landing unless the shopper explicitly chose 'paged'.)
 
   var TARGET = mode === 'paged' ? 'default' : 'infinite_scroll';
 

← 351da74 fix: use first non-Sample variant for JSON-LD offer price (T  ·  back to Dw Theme Boost Fix  ·  TK-10835: structural CLS fix for Boost infinite scroll (reor c0ff941 →