You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: Smart Batch Suggestions ignore active filters and select invoices hidden from the table #331
Batch suggestions on the Received Invoices page are computed once, from the whole fetched page (findBatchSuggestions(decryptedInvoices)), and stored in state. They never take the active filters into account.
With a filter applied:
Suggestions are still shown for invoices that the filter hides.
Clicking Select & Pay selects those hidden invoices.
The selection-pruning effect only runs when filteredAndSortedInvoices changes, so the hidden ids stay selected.
Pay Selected (N) and the batch payment then include invoices that the user cannot see in the table.
File:frontend/src/page/ReceivedInvoice.jsx
Steps to reproduce
Receive 2+ invoices from the same sender on the same day in token A, plus some invoices in token B.
On the Received Invoices page, filter by token B.
The suggestion for token A is still visible. Click Select & Pay.
The selected count now includes token A invoices that are not shown in the table, and paying sends funds for them.
Expected behavior
Suggestions should only be built from the invoices currently visible after filtering, so a user never pays for an invoice they can't see.
Proposed fix
Derive the suggestions from the filtered list instead of storing them at fetch time:
Activity