π Description
On /dashboard, PoolsPanel (src/components/PoolsPanel.tsx) renders a StatCard label="Total liquidity" computed from state.pools β the FULL, unfiltered pool list β via state.pools.reduce((sum, p) => sum + p.total, 0). Directly below it, PoolTable's (src/components/PoolTable.tsx) <tfoot> renders its own "Total" row, computed from whatever pools array is passed in β which, when the user has typed something into the pools search box, is filteredPools (a SUBSET of state.pools). Once a search is active, these two numbers can legitimately differ, but neither is labeled to say so: the StatCard just says "Total liquidity" and the table footer just says "Total", both looking like they should mean the same thing. This is worse than SettlementTable's equivalent footer, which explicitly says "Total (visible rows)" to disambiguate from any full-dataset total shown elsewhere on the page.
π§© Requirements and context
- Disambiguate the two totals so a user with an active pools search doesn't mistake the (now filtered) table footer total for the overall network total shown in the
StatCard, or vice versa.
- The simplest fix, consistent with the existing
SettlementTable precedent, is relabeling PoolTable's footer row from "Total" to something like "Total (visible rows)" when a filter is active (or always, for consistency).
- No change to either total's underlying calculation β only labeling/clarity.
π οΈ Suggested execution
- Update
PoolTable's <tfoot> label in src/components/PoolTable.tsx to read "Total (visible rows)" (or conditionally show this only when the passed-in pools array is a filtered subset, if that distinction is passed through from PoolsPanel), mirroring SettlementTable's existing footer label.
- Extend
src/components/PoolTable.test.tsx to assert the updated footer label text.
β
Acceptance criteria
π Security notes
No new attack surface; a labeling-clarity fix preventing a misleading juxtaposition of two different totals.
π Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
π Description
On
/dashboard,PoolsPanel(src/components/PoolsPanel.tsx) renders aStatCard label="Total liquidity"computed fromstate.poolsβ the FULL, unfiltered pool list β viastate.pools.reduce((sum, p) => sum + p.total, 0). Directly below it,PoolTable's (src/components/PoolTable.tsx)<tfoot>renders its own"Total"row, computed from whateverpoolsarray is passed in β which, when the user has typed something into the pools search box, isfilteredPools(a SUBSET ofstate.pools). Once a search is active, these two numbers can legitimately differ, but neither is labeled to say so: theStatCardjust says "Total liquidity" and the table footer just says "Total", both looking like they should mean the same thing. This is worse thanSettlementTable's equivalent footer, which explicitly says"Total (visible rows)"to disambiguate from any full-dataset total shown elsewhere on the page.π§© Requirements and context
StatCard, or vice versa.SettlementTableprecedent, is relabelingPoolTable's footer row from"Total"to something like"Total (visible rows)"when a filter is active (or always, for consistency).π οΈ Suggested execution
PoolTable's<tfoot>label insrc/components/PoolTable.tsxto read"Total (visible rows)"(or conditionally show this only when the passed-inpoolsarray is a filtered subset, if that distinction is passed through fromPoolsPanel), mirroringSettlementTable's existing footer label.src/components/PoolTable.test.tsxto assert the updated footer label text.β Acceptance criteria
StatCard"Total liquidity" figure is unchanged (still the full, unfiltered total).π Security notes
No new attack surface; a labeling-clarity fix preventing a misleading juxtaposition of two different totals.
π Guidelines