📌 Description
When PoolsPanel (src/components/PoolsPanel.tsx) fails to load, it renders the error message plus a "Retry" button that calls its own reload(). AnchorsPanel (src/components/AnchorsPanel.tsx), SettlementsPanel (src/components/SettlementsPanel.tsx), and MetricsBar (src/components/MetricsBar.tsx) each have an equivalent error branch (state.status === "error") but render only the bare error text with no way to retry short of a full page reload — despite AnchorsPanel/SettlementsPanel having a reload/refresh function readily available from useAsync, and MetricsBar having its own refresh from useAsync (already wired to its existing "↻" manual-refresh button, just not reused in the error branch).
🧩 Requirements and context
- Add a retry action to the error state of
AnchorsPanel, SettlementsPanel, and MetricsBar, consistent in style/placement with PoolsPanel's existing "Retry" button.
- Each panel should reuse the reload/refresh trigger it already has (
reload() for AnchorsPanel, the settlements list's own reload() for SettlementsPanel, refresh() for MetricsBar) rather than introducing a new fetch path.
- No change to the loading or ready states of any of the three components.
🛠️ Suggested execution
- Add a "Retry" button to each component's error branch that calls its existing reload/refresh function, matching
PoolsPanel's button styling and label.
- Extend
src/components/AnchorsPanel.test.tsx, src/components/SettlementsPanel.test.tsx, and src/components/MetricsBar.test.tsx with a test per component that triggers the error state, clicks "Retry", and asserts the underlying fetch function is called again.
✅ Acceptance criteria
🔒 Security notes
No new attack surface; reuses each component's already-existing, already-authorized fetch path.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
When
PoolsPanel(src/components/PoolsPanel.tsx) fails to load, it renders the error message plus a "Retry" button that calls its ownreload().AnchorsPanel(src/components/AnchorsPanel.tsx),SettlementsPanel(src/components/SettlementsPanel.tsx), andMetricsBar(src/components/MetricsBar.tsx) each have an equivalent error branch (state.status === "error") but render only the bare error text with no way to retry short of a full page reload — despiteAnchorsPanel/SettlementsPanelhaving areload/refreshfunction readily available fromuseAsync, andMetricsBarhaving its ownrefreshfromuseAsync(already wired to its existing "↻" manual-refresh button, just not reused in the error branch).🧩 Requirements and context
AnchorsPanel,SettlementsPanel, andMetricsBar, consistent in style/placement withPoolsPanel's existing "Retry" button.reload()forAnchorsPanel, the settlements list's ownreload()forSettlementsPanel,refresh()forMetricsBar) rather than introducing a new fetch path.🛠️ Suggested execution
PoolsPanel's button styling and label.src/components/AnchorsPanel.test.tsx,src/components/SettlementsPanel.test.tsx, andsrc/components/MetricsBar.test.tsxwith a test per component that triggers the error state, clicks "Retry", and asserts the underlying fetch function is called again.✅ Acceptance criteria
🔒 Security notes
No new attack surface; reuses each component's already-existing, already-authorized fetch path.
📋 Guidelines