Skip to content

fix: WillPopScope migration - #1375

Open
sneurlax wants to merge 10 commits into
stagingfrom
fix/WillPopScope
Open

sneurlax wants to merge 10 commits into
stagingfrom
fix/WillPopScope

Conversation

@sneurlax

Copy link
Copy Markdown
Member

Migrate the deprecated WillPopScope widget to PopScope across the app. Simple barrier dialogs become canPop: false/true. Cases that ran side effects or conditionally gated the pop move that work into onPopInvokedWithResult.

@codecov

codecov Bot commented May 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.65049% with 546 lines in your changes missing coverage. Please review.
✅ Project coverage is 14.16%. Comparing base (9ce80be) to head (4771bd7).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
...p_views/sub_views/stack_restore_progress_view.dart 0.00% 90 Missing ⚠️
..._view/wallet_view/sub_widgets/desktop_receive.dart 0.00% 61 Missing ⚠️
...ages/paynym/subwidgets/desktop_paynym_details.dart 0.00% 50 Missing ⚠️
lib/pages/churning/churning_progress_view.dart 0.00% 36 Missing ⚠️
lib/pages/cashfusion/fusion_progress_view.dart 0.00% 33 Missing ⚠️
...wallet_views/select_wallet_for_sol_token_view.dart 0.00% 30 Missing ⚠️
...add_wallet_views/select_wallet_for_token_view.dart 0.00% 26 Missing ⚠️
lib/pages/receive_view/receive_view.dart 0.00% 22 Missing ⚠️
...iew/stack_backup_views/restore_from_file_view.dart 0.00% 21 Missing ⚠️
...y_phrase_view/new_wallet_recovery_phrase_view.dart 0.00% 18 Missing ⚠️
... and 32 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1375      +/-   ##
===========================================
+ Coverage    13.92%   14.16%   +0.23%     
===========================================
  Files         1139     1140       +1     
  Lines       114707   114745      +38     
===========================================
+ Hits         15976    16256     +280     
+ Misses       98731    98489     -242     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sneurlax

Copy link
Copy Markdown
Member Author

Converting to draft because I have too many open PRs ready--will take another review pass over this before re-readying it

@sneurlax
sneurlax marked this pull request as draft August 20, 2026 18:58
WillPopScope is deprecated and cannot take part in Android predictive
back. Static vetoes become canPop, callbacks that navigate on their own
move to onPopInvokedWithResult, and the sheets that pop a value declare
the result type of the route they close.
@sneurlax
sneurlax marked this pull request as ready for review August 20, 2026 23:46
PopScope decides canPop synchronously, so the eight screens that awaited
a decision in onWillPop get a wrapper that runs the callback from
onPopInvokedWithResult, coalesces repeated presses, and reproduces
Route.popDisposition: an approved back on the first route is handed to
the platform rather than emptying the navigator.
WillPopScope is deprecated and cannot take part in Android predictive
back. Static vetoes become canPop, callbacks that navigate on their own
move to onPopInvokedWithResult, and the sheets that pop a value declare
the result type of the route they close.
PopScope decides canPop synchronously, so the eight screens that awaited
a decision in onWillPop get a wrapper that runs the callback from
onPopInvokedWithResult, coalesces repeated presses, and reproduces
Route.popDisposition: an approved back on the first route is handed to
the platform rather than emptying the navigator.
@sneurlax

Copy link
Copy Markdown
Member Author

Merged staging d29d84c66049, preserving its payment validation, swap extra/refund IDs, and native-warning/cancellation handling. Also integrated the cypherstack-only FROST callback update. Review found that its callback could request cancellation after a successful pop; the callback now handles only blocked pops, with a widget regression test.

Validation: 47 navigation/widget tests pass, including the completed FROST route regression. Changed-file formatting and whitespace checks pass; analysis has no errors, with existing warnings/informational lints remaining. Physical-device back gestures were not exercised.

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