Skip to content

SettlementsPanel's search doesn't match against settlement status, unlike the visible Status columnΒ #310

Description

@Jagadeeshftw

πŸ“Œ Description

SettlementsPanel's visibleSettlements filter (src/components/SettlementsPanel.tsx) calls matchesQuery([s.id, s.anchor, s.asset], query) β€” only the id, anchor, and asset fields are searchable. SettlementTable (src/components/SettlementTable.tsx) renders a StatusBadge showing each settlement's status ("Pending", "Executed", "Cancelled") as a clearly visible column, but a user typing "pending" (or any status word) into the settlements search box gets zero matches on that basis, because status is never passed into matchesQuery. Unlike AnchorsPanel, which has dedicated status filter buttons (All/Active/Inactive) as a separate, deliberate mechanism for filtering by status, SettlementsPanel has no equivalent status filter at all β€” the search box is the only textual filtering mechanism available, making this gap the only way to narrow the list by status, and it silently doesn't work.

🧩 Requirements and context

  • SettlementsPanel's search should also match against each settlement's status (e.g. typing "pending" should surface pending settlements), consistent with it being a visible, meaningful column in the same table.
  • The existing id/anchor/asset matching behavior, and the AND semantics across multiple search terms, must be unchanged.
  • No new status-specific filter UI is required β€” this only extends what the existing free-text search box matches against.

πŸ› οΈ Suggested execution

  • In src/components/SettlementsPanel.tsx, add s.status (or its formatted label via formatStatus from @/lib/format, to match what's actually displayed) to the fields array passed into matchesQuery for visibleSettlements.
  • Extend src/components/SettlementsPanel.test.tsx with a test asserting typing a status word (e.g. "pending") into the search box filters the list to settlements with that status.

βœ… Acceptance criteria

  • Typing a settlement status into the search box filters the list to matching settlements.
  • Existing id/anchor/asset search behavior is unchanged.
  • Test coverage for status-based search matching.

πŸ”’ Security notes

No new attack surface; a client-side search-completeness fix over already-fetched, already-displayed data.

πŸ“‹ Guidelines

  • Minimum 95% test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't workingfrontendFrontend / UI work

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions