-
-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core/ui): T3T1 success screens between shares #3992
Conversation
|
On the 2nd thought, the new screens do not have the ability to cancel the flow, as discussed on Slack. |
Ah, yes, forgot about this. Let's wait with the merge, we do not rush anywhere now. |
Maybe should be rebased on #4023 ? |
4f30ef8
to
63602b6
Compare
c5b236e
to
c491ea4
Compare
Restarting device sounds like something where bootloader is involved but this is not the case right? Perhaps change "restarting the device" to "restarting python main loop"? UI tests would be great but even without them this is big improvement. I still need to carefully review the python control flow changes but preliminary LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code-wise LGTM, did not test.
match (self, msg) { | ||
(Self::Main, FlowMsg::Info) => Self::Menu.transit(), | ||
(Self::Menu, FlowMsg::Choice(0)) => Self::CancelIntro.swipe_left(), | ||
(Self::Menu, FlowMsg::Cancelled) => Self::Main.swipe_right(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is gonna send ButtonRequest too right? Is Suite OK with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will send BR too.
Yes, I think Suite should be fine with it because sending BRs behaves in the same way as in the old implementation of homescreen_dialog
, i.e. the success/instruction screen sends BR and the confirmation of flow cancellation also sends BR. These two screens are called in a loop (until you confirm the success/instruction screen) so they possibly send the BRs repeatedly. Anyway, I'll ask QA for thorough testing of these scenarios.
# TODO: info_func should be changed to return data to be shown (and not show | ||
# them) so that individual models can implement showing logic on their own. | ||
# T3T1 should move the data to `flow_continue_recovery` and hide them | ||
# in the context menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So on T3T1 there's currently no way to show the remaining shares, also trezorui2.show_remaining_shares
is never called, right?
I'd turn this comment into an issue since it sounds like a regression to me (minor as it only affects slip39 advanced).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, currently we never use show_remaining_shares
. I'd like to use it also for regular shamir. But not for this release.
I added it here: #3748
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw. it's not used even on TS3... space-wise, it's more challening
@lapohoda @Hannsek This new test shows the following scenario:
See the whole flow here: https://data.trezor.io/dev/firmware/ui_report/10164723283/T3T1-en-core_device_test/new/T3T1_en-device_tests-reset_recovery-test_recovery_slip39_basic.py%3A%3Atest_abort_between_shares.html |
Changes the content and visual appearance of the screens between shares during multi-share (shamir) recovery. Context menu with the option to cancel is added to the screen.
This commit allows creating a rust flow in which a component sends the configured ButtonRequest repeatedly on every Event::Attach. This is necessary in recovery homescreen flow where we want to send ButtonRequest also after restarting the device. [no changelog]
[no changelog]
[no changelog]
[no changelog]
Update as a part of T3T1 recovery share success screens and adding a new test of aborting the recovery process between shares for all models. [no changelog]
fc2b0f4
to
f94d6be
Compare
|
Rebased on I expect conflicts in |
Did this change made it to freeze ?
![]() |
QA OK firmware-T3T1-2.8.1-5bba2e0aa.bin |
@bosomt thank you |
Changes the instruction/success screens between shares during multi-share (shamir) recovery. It adds the information and also the menu button with an option to "Cancel recovery" or "Cancel backup check".
![image](https://private-user-images.githubusercontent.com/14001709/352870945-1ac6d9ae-c458-4a05-9794-b2893072b933.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjk5ODAsIm5iZiI6MTczOTI2OTY4MCwicGF0aCI6Ii8xNDAwMTcwOS8zNTI4NzA5NDUtMWFjNmQ5YWUtYzQ1OC00YTA1LTk3OTQtYjI4OTMwNzJiOTMzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDEwMjgwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA1YzUzMjhmMmFkYzM0MDYyMGNmYTI4YWQyZDQwMmFkNWNhZWY3Njg2M2ZjYzYxNjI0MDQyMTQ1N2E0MDQ2MTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oIZTRwExEQDInqZAjpCkjM7oFP4KSw9wXt54zIjJ9Gc)
In case this flow is called between shares, the "Cancel recovery/backup check" button takes to a "long" cancel with explanation and "Tap to confirm" screen. This is not true for the first call of this flow (before any progress is made) where "Cance" button immediately cancels the flow.
In addition, this PR adds ability to rust components to send
ButtonRequest
repeatedly on everyEvent::Attach
(7be9ed6).Refactoring was needed in
core/src/trezor/ui/layouts/mercury/recovery.py::homescreen_dialog
. Namely, the "flow" logic was moved deeper into the layouts of individual models. This results in basically duplication ofcontinue_recovery
function inmodel_t
andmodel_r
, but formodel_mercury
, the function only awaits the newflow_continue_recovery
.The
homescreen_dialog
is a persistent workflow which endures device restart, that's why the repeatedButtonRequest
is necessary.TODO:
-> kept as is for now