Repository navigation
Done
Labels
UIUI specific issues
Description
Detail Bug Report
Introduced in #33578 by @harsh-vador on Oct 3, 2026
Summary
- Context:
TasksTabrenders the personal/entity inbox's task list with an IntersectionObserver-driven infinite scroll gated by a client-side "bounded scan" cap (MAX_NARROWED_SCAN = 200) applied whenever the list is narrowed by Type filter, Status filter, or title-search; a "Load more" button in the no-match empty state is supposed to let the user raise that cap and continue scanning. - Bug: The cap raise in
handleScanFurtheradvancesscanLimitby a fixedMAX_NARROWED_SCANstep, butcanLoadMorecompares that cap against the total already-loaded task count (tasks.length), not against the number of tasks loaded since the narrowing was applied; so when more thanMAX_NARROWED_SCANraw tasks were already loaded before narrowing, the raise is smaller than the load andcanLoadMorestaysfalse, so the IntersectionObserver inuseInboxInfiniteListnever callsfetchNextPage. - Actual vs. expected: Clicking the "Load more" button should trigger one extra page fetch on the first click; instead it is silent — multiple consecutive clicks produce no fetch, no UI change, and no visible feedback, until the accumulated cap finally overtakes
tasks.length. - Impact: When a user has already loaded ≥ 400 raw tasks (≥ 16 pages of
TASK_LIMIT = 25) before narrowing — e.g. scrolling a long Open queue and then picking a Type/Status filter whose matches are none of the loaded rows — the "Load more" button is dead forfloor((tasks.length - 200) / 200)clicks before the next page loads: 1 dead click at 400 loaded, 4 at 1000, 24 at 5000. Below 400 loaded the buggy and fixed code paths are behaviourally indistinguishable.
Code with Bug
openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/InboxPage/tabs/TasksTab.tsx:
const scanKey = JSON.stringify([
status,
searchQuery,
typeFilter,
statusFilter,
]);
const [scanRaise, setScanRaise] = useState({ key: scanKey, extra: 0 });
const scanLimit =
MAX_NARROWED_SCAN + (scanRaise.key === scanKey ? scanRaise.extra : 0);
const canLoadMore = useCallback(
(loaded: Task[]) => !isClientNarrowed || loaded.length < scanLimit, // <-- BUG 🔴 cap is compared against ALL loaded raw tasks, not the count scanned under this narrow
[isClientNarrowed, scanLimit]
);
const handleScanFurther = useCallback(
() =>
setScanRaise((raise) => ({
key: scanKey,
// <-- BUG 🔴 raise is fixed +MAX step regardless of how far loaded.length already exceeds it
extra: (raise.key === scanKey ? raise.extra : 0) + MAX_NARROWED_SCAN,
})),
[scanKey]
);Also in TasksTab.tsx (empty state wiring):
emptyState={
showEmptyState ? (
<TasksEmptyState
isNarrowed={isNarrowed}
scannedCount={hasMore ? tasks.length : undefined}
status={status}
onClearFilters={handleClearFilters}
onLoadMore={handleScanFurther} // <-- BUG 🔴 dead clicks when tasks.length > MAX_NARROWED_SCAN at narrow time
/>
) : undefined
}Explanation
useInboxInfiniteListonly callsfetchNextPage()whencanLoadMore(items) !== false. With a narrowed list,canLoadMorereturnsloaded.length < scanLimit.- If the user scrolls first (e.g.,
tasks.length = 1000) and then applies a Type/Status filter that yields zero matches among already-loaded tasks,scanLimitstarts at 200 andcanLoadMoreisfalse. - Each "Load more" click only increases
scanLimitby 200, socanLoadMoreremainsfalseuntilscanLimitexceeds the entire already-loaded backlog (e.g., 5 clicks to pass 1000). WhilecanLoadMoreisfalse, the IntersectionObserver-triggeredloadMoreno-ops and no network request is sent. - The UI provides no loading/disabled feedback for the dead clicks, so the button appears broken.
Codebase Inconsistency
openmetadata-ui/src/main/resources/ui/src/hooks/useInboxInfiniteList.ts gates fetching on canLoadMore:
const loadMore = useCallback(() => {
const allowed = canLoadMore?.(items) !== false;
if (hasNextPage && !isFetchingNextPage && allowed) {
fetchNextPage();
}
}, [hasNextPage, isFetchingNextPage, canLoadMore, items, fetchNextPage]);Recommended Fix
Raise the scan cap past the already-loaded backlog in one click when it is already exceeded, so the next page fetch can happen immediately.
openmetadata-ui/src/main/resources/ui/src/components/discovery/personal-space/InboxPage/tabs/TasksTab.tsx:
const handleScanFurther = useCallback(
() =>
setScanRaise((raise) => {
const base = raise.key === scanKey ? raise.extra : 0;
return {
key: scanKey,
extra: Math.max(base, tasks.length),
};
}),
[scanKey, tasks.length]
);History
This bug was introduced in commit 36729ad (PR #33578), which added the client-side bounded-scan feature (MAX_NARROWED_SCAN, scanRaise, scanLimit, canLoadMore, handleScanFurther).
Metadata
Metadata
Assignees
Labels
UIUI specific issues
Activity
fix(inbox): raise the task scan cap past the loaded backlog in one click
fix(ui): count the entity feed only once its tab is opened, and never…
fix(ui): count the entity feed only once its tab is opened, and never…
[2.1] Fixes 35006: ActivityFeed: the Inbox's Activity and Tasks on ev…
Fixes 35006: ActivityFeed: the Inbox's Activity and Tasks on every en…