From 0c45864ef0bf47328334252eba021a9259a416c8 Mon Sep 17 00:00:00 2001 From: LinYushen Date: Wed, 8 Apr 2026 16:33:17 +0800 Subject: [PATCH] fix(board): show total count in Done column and infinite scroll (#501) * fix(board): show total count in Done column header and auto-load on scroll - Column header now shows server-side doneTotal instead of loaded count - Replace "Load more" button with IntersectionObserver sentinel for infinite scroll in the Done column Co-Authored-By: Claude Opus 4.6 (1M context) * fix(board): move sentinel below imports and stabilize observer - Move InfiniteScrollSentinel after all import statements - Use callback ref to avoid recreating IntersectionObserver on every render Co-Authored-By: Claude Opus 4.6 (1M context) * fix(board): add optional chaining for IntersectionObserver entry Co-Authored-By: Claude Opus 4.6 (1M context) --------- Co-authored-by: Claude Opus 4.6 (1M context) --- apps/web/features/issues/components/board-view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/features/issues/components/board-view.tsx b/apps/web/features/issues/components/board-view.tsx index 6ea8ba0a..a33119a4 100644 --- a/apps/web/features/issues/components/board-view.tsx +++ b/apps/web/features/issues/components/board-view.tsx @@ -43,7 +43,7 @@ function InfiniteScrollSentinel({ onVisible, loading }: { onVisible: () => void; const node = sentinelRef.current; if (!node) return; const observer = new IntersectionObserver( - ([entry]) => { if (entry.isIntersecting) onVisibleRef.current(); }, + ([entry]) => { if (entry?.isIntersecting) onVisibleRef.current(); }, { rootMargin: "100px" }, ); observer.observe(node);