-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
Quality / Stability / Reliability
-
False
-
-
True
-
-
Environment: Staging
URL : /cluster-list/archives (Cluster Archives page)
Browser: All browsers (code-level issue)
OS: All OS
Priority: Medium
Reproduction Steps:
- Navigate to the Cluster Archives page (/cluster-list/archives)
- Apply filters (ex: filter by a non existing cluster name) or enable "View only my clusters" toggle such that no archived clusters match the criteria
- Observe the pagination component at the bottom of the page
Current Result:
When no archived clusters are found, the pagination still displays stale data from a previous query, showing incorrect values like:
- "1 - 50 of 26556" even when the table shows "No archived clusters found"
Expected Result:
When no archived clusters are found:
- Pagination should display "0 - 0 of 0" or be hidden entirely
Root Cause - AI assisted (for developer reference):
The issue is in src/components/clusters/ArchivedClusterListMultiRegion/ArchivedClusterList.jsx at lines 115-120.The useEffect that updates clustersTotal in Redux has:
- Incorrect condition: !isLoading || data?.itemsCount > 0 doesn't properly handle when data loads with 0 items
- Missing dependencies: The dependency array [data?.itemsCount] is missing isLoading, dispatch, viewType, and clustersTotal
The active cluster list (ClusterList.jsx) has the correct implementation at lines 189-193 that should be used as reference.
