From 90177f1645bf886a2e4f84f4db287ba379f01773 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Feb 2026 16:35:56 +0000 Subject: fix: store sentinel IntersectionObserver in module-level variable to prevent GC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The load-more sentinel observer was assigned to a local `const observer` that fell out of scope after renderItems() returned. Without a persistent JS reference, engines can garbage-collect the observer, silently breaking infinite scroll (no more items loaded on scroll). Fix: assign to the existing module-level `itemObserver` variable, which is already disconnected/replaced at the top of each renderItems() call. Add three regression tests in regression.test.ts that use a class-based IntersectionObserver mock to capture the callback and verify: - sentinel visible → loadMore fires - sentinel visible while loading → loadMore suppressed - hasMore=false → no sentinel rendered, no loadMore https://claude.ai/code/session_01DpWhB9uGGMBnzqS28HxnuV --- web/dist/v3/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/dist/v3/index.html') diff --git a/web/dist/v3/index.html b/web/dist/v3/index.html index 0661307..a9f4a35 100644 --- a/web/dist/v3/index.html +++ b/web/dist/v3/index.html @@ -5,7 +5,7 @@ neko - + -- cgit v1.2.3