Skip to content

fix(tx-history): keep both date bounds when only one filter date changes#671

Open
joshuakrueger-dfx wants to merge 1 commit into
RealUnitCH:developfrom
joshuakrueger-dfx:joshua/fix-657-p3-filter-bounds
Open

fix(tx-history): keep both date bounds when only one filter date changes#671
joshuakrueger-dfx wants to merge 1 commit into
RealUnitCH:developfrom
joshuakrueger-dfx:joshua/fix-657-p3-filter-bounds

Conversation

@joshuakrueger-dfx
Copy link
Copy Markdown
Collaborator

Addresses Issue #657 — Part 3, finding #1 (HIGH).

Problem

changeFilter() forwarded the raw partial picker argument into _applyFilter: selecting only a start date (or only an end date) passed null for the other bound and silently dropped the previously-set bound from the filtered list (the state kept it, the visible result didn't).

Fix

Resolve each bound by merging the partial argument with the bound already in state; use the merged values for both the emitted state and the filtered list. 2 files, minimal.

Tests (RED→GREEN, proven)

New blocTest regression: "changeFilter keeps the previously-set bound when only the other changes" — fails on the old code (verified), passes with the fix. Full filter-cubit suite green (8/8), flutter analyze clean.

🤖 Fleet analysis (Big Brother run …-28958-2, gate-stopped at the human test-authorization boundary) + hand-finished by operator. Ref #657.

changeFilter() forwarded the raw partial picker argument straight into
_applyFilter, so selecting only a start date (or only an end date) passed
null for the other bound and silently dropped the previously-set one from
the filtered result — the visible list lost a constraint the state still
held. Resolve each bound by merging the partial argument with the bound
already in state and use the merged values for both the emitted state and
the filtered list.

Regression: test/screens/transaction_history/.../transaction_history_filter_cubit_test.dart
("keeps the previously-set bound when only the other changes")

Issue RealUnitCH#657 — Part 3, finding #1 (HIGH).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant