From 00abfcf4db3d8adfaedf3634d470e6bc8788868b Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 3 Apr 2026 21:55:11 -0400 Subject: [PATCH] fix(knowledge): remove backup load check causing duplicate items on scroll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The IntersectionObserver fires as soon as it's created (sentinel immediately intersecting after page 1 renders), while the removed backup check also fires in the same tick — two concurrent fetchItems(page 2) calls produced duplicate cards. With sentinel now properly inside the scrolling root, the observer alone handles progressive loading. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/views/KnowledgeView.vue | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/frontend/src/views/KnowledgeView.vue b/frontend/src/views/KnowledgeView.vue index a2e865b..ae9ca88 100644 --- a/frontend/src/views/KnowledgeView.vue +++ b/frontend/src/views/KnowledgeView.vue @@ -82,19 +82,6 @@ async function fetchItems(reset = false) { } finally { loading.value = false; } - - // If the sentinel is still visible in the card-grid after appending, keep loading - if (!reset && items.value.length < total.value) { - await nextTick(); - if (sentinelEl.value && cardGridEl.value) { - const containerBottom = cardGridEl.value.getBoundingClientRect().bottom; - const sentinelTop = sentinelEl.value.getBoundingClientRect().top; - if (sentinelTop < containerBottom + 200) { - page.value++; - await fetchItems(); - } - } - } } async function fetchTags() {