aboutsummaryrefslogtreecommitdiffstats
path: root/web/dist/v3/index.html
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-02-17 17:00:13 +0000
committerClaude <noreply@anthropic.com>2026-02-17 17:00:13 +0000
commit8ac775d7ce97e31a9531572f6f116dfc8de25d35 (patch)
treec429272b7cade26edd9f7a44ac02a9ff432b9b7a /web/dist/v3/index.html
parent90177f1645bf886a2e4f84f4db287ba379f01773 (diff)
downloadneko-8ac775d7ce97e31a9531572f6f116dfc8de25d35.tar.gz
neko-8ac775d7ce97e31a9531572f6f116dfc8de25d35.tar.bz2
neko-8ac775d7ce97e31a9531572f6f116dfc8de25d35.zip
fix: replace IntersectionObserver with scroll-position check for infinite scroll
The IntersectionObserver approach for infinite scroll was unreliable — items would not load when scrolling to the bottom in v3, while v1's polling approach worked fine. The issue was that IntersectionObserver with a custom root element (main-content, whose height comes from flex align-items:stretch rather than an explicit height) didn't fire reliably, and renderItems() being called 3 times per fetch cycle (from both items-updated and loading-state-changed events) kept destroying and recreating the observer. Replace with a simple scroll-position check in the existing onscroll handler, matching v1's proven approach: when the user scrolls within 200px of the bottom of #main-content, trigger loadMore(). This runs on every scroll event (cheap arithmetic comparison) and only fires when content actually overflows the container. Remove the unused itemObserver module-level variable. Update regression tests to simulate scroll position instead of IntersectionObserver callbacks, with 4 cases: scroll near bottom triggers load, scroll far from bottom doesn't, loading=true blocks, and hasMore=false hides sentinel. https://claude.ai/code/session_01DpWhB9uGGMBnzqS28HxnuV
Diffstat (limited to 'web/dist/v3/index.html')
-rw-r--r--web/dist/v3/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/dist/v3/index.html b/web/dist/v3/index.html
index a9f4a35..3e08b77 100644
--- a/web/dist/v3/index.html
+++ b/web/dist/v3/index.html
@@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>neko</title>
- <script type="module" crossorigin src="/v3/assets/index-PqZwi-gF.js"></script>
+ <script type="module" crossorigin src="/v3/assets/index-j89IB65U.js"></script>
<link rel="stylesheet" crossorigin href="/v3/assets/index-CFkVnbAe.css">
</head>
<body>