Each row's status chip shows the live status (polled via tradeStatusProvider),
but the filter dropdown buckets trades using the status loaded once from the DB
snapshot (rawTradesProvider → filteredTradesWithOrderStateProvider,
trades_providers.dart:195-199). The snapshot only refreshes on
pull-to-refresh / retry / after create-take — changing the filter does not
reload it (trades_screen.dart:71-76).
Two stale layers cause chip-vs-filter mismatches:
- Cache: status changes arriving via gift wrap / 38383 don't invalidate the
snapshot, so a taken order stays in the "Pending" bucket while its chip says
"Waiting Invoice".
- DB: for own orders the 38383 ingest skips syncing
Pending
(orders.rs:2873), so after a taker-timeout republish the row stays frozen
at waiting-buyer-invoice — after pull-to-refresh the order appears under
"Waiting Invoice" with a Pending chip (verified manually).
Proposed fix
Bucket the filter with the same live status the chip uses (single source of
truth), and/or invalidate rawTradesProvider on status-change events. Also
consider allowing the 38383 ingest to write Pending back for own trades so
the persisted status matches reality.
Each row's status chip shows the live status (polled via
tradeStatusProvider),but the filter dropdown buckets trades using the status loaded once from the DB
snapshot (
rawTradesProvider→filteredTradesWithOrderStateProvider,trades_providers.dart:195-199). The snapshot only refreshes onpull-to-refresh / retry / after create-take — changing the filter does not
reload it (
trades_screen.dart:71-76).Two stale layers cause chip-vs-filter mismatches:
snapshot, so a taken order stays in the "Pending" bucket while its chip says
"Waiting Invoice".
Pending(
orders.rs:2873), so after a taker-timeout republish the row stays frozenat
waiting-buyer-invoice— after pull-to-refresh the order appears under"Waiting Invoice" with a Pending chip (verified manually).
Proposed fix
Bucket the filter with the same live status the chip uses (single source of
truth), and/or invalidate
rawTradesProvideron status-change events. Alsoconsider allowing the 38383 ingest to write
Pendingback for own trades sothe persisted status matches reality.