diff options
| author | Claude <noreply@anthropic.com> | 2026-02-17 16:35:56 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-02-17 16:35:56 +0000 |
| commit | 90177f1645bf886a2e4f84f4db287ba379f01773 (patch) | |
| tree | 3f19efc1c79acd3143730b9d677fc2d921e22644 /web/dist/v3/index.html | |
| parent | 7f0b9ae0f53f26304d26a8d45191f268821425c8 (diff) | |
| download | neko-90177f1645bf886a2e4f84f4db287ba379f01773.tar.gz neko-90177f1645bf886a2e4f84f4db287ba379f01773.tar.bz2 neko-90177f1645bf886a2e4f84f4db287ba379f01773.zip | |
fix: store sentinel IntersectionObserver in module-level variable to prevent GC
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
Diffstat (limited to 'web/dist/v3/index.html')
| -rw-r--r-- | web/dist/v3/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ <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-CZ6KJbnj.js"></script> + <script type="module" crossorigin src="/v3/assets/index-PqZwi-gF.js"></script> <link rel="stylesheet" crossorigin href="/v3/assets/index-CFkVnbAe.css"> </head> <body> |
