fix(tx-history): keep both date bounds when only one filter date changes#671
Open
joshuakrueger-dfx wants to merge 1 commit into
Open
Conversation
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).
59395c9 to
11d9a33
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) passednullfor 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
blocTestregression: "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 analyzeclean.🤖 Fleet analysis (Big Brother run …-28958-2, gate-stopped at the human test-authorization boundary) + hand-finished by operator. Ref #657.