Skip to content
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: device modal updates #5363

Merged
merged 2 commits into from
May 25, 2022
Merged

feat: device modal updates #5363

merged 2 commits into from
May 25, 2022

Conversation

dahaca
Copy link
Contributor

@dahaca dahaca commented May 10, 2022

closes #5237
closes #1576

@dahaca dahaca added the READY FOR REVIEW Developed pull request ready to be reviewed by another developer label May 10, 2022
@mroz22
Copy link
Contributor

mroz22 commented May 10, 2022

@trezor/qa pls could you test this with bridge 2.0.27 also?

@dahaca dahaca force-pushed the feat/device-modal-updates branch from ac8b07b to d1d62b5 Compare May 10, 2022 17:46
@dahaca dahaca requested a review from marekrjpolak May 13, 2022 12:19
@bosomt
Copy link
Contributor

bosomt commented May 16, 2022

QA OK for 2.0.31 Bridge /that's embedded to Suite binary/
QA NOK for 2.0.27 Bridge /that's offered for web Suite users/

2.0.27: When you cancel action via modal Suite reports: Error: device disconnected during action
2.0.31: When you cancel action via modal Suite reports: Error: Action cancelled by user

Info:

  • Suite version: desktop 22.6.0 (d1d62b5)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.6.0 Chrome/94.0.4606.81 Electron/15.3.0 Safari/537.36
  • OS: MacIntel
  • Screen: 1680x1050
  • Device: model T 2.5.0 regular (revision fd4f8601cf73c5744978f0e8c0aa43d863032a37)
  • Transport: bridge 2.0.31

@mroz22
Copy link
Contributor

mroz22 commented May 16, 2022

@bosomt thanks. I shall look into this a bit. Also we might want to reconsider marking this bridge version as outdated with update required. It would solve a bunch of issues. What does @tsusanka think about this?

Copy link
Contributor

@marekrjpolak marekrjpolak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Should it look like this?

@tsusanka
Copy link
Contributor

2.0.27: When you cancel action via modal Suite reports: Error: device disconnected during action

Yes, 2.0.27 can't do that.

Also we might want to reconsider marking this bridge version as outdated with update required. It would solve a bunch of issues. What does @tsusanka think about this?

I would love that, but unfortunately we can not do that at the moment, because the overall Trezor Bridge signing process is broken (trezor/trezord-go#204 and some other issues).

We basically can't release a new standalone Bridge (built-in is just fine, as the app is notarised as a whole) so we are stuck at 27. This sucks tremendously and the plan is basically either to (a) fix it - but we need someone dedicate for Bridge and that is something we were discussing just on Monday together (b) kill standalone Bridge altogether (product discussion needed though!). Before we can decide for either (a) or (b) I would really like to know the result of #4770. Because if that works (b) might be an option (might!).

So tl;dr: I do not think we can roll out this feature to web version of Suite 😞. So I would either postpone this feature or just make it desktop-only (which sounds more reasonable to me). We might theoretically also somehow hack it and make it work on older Bridge versions but I would definitely not spend our energy on that.

Copy link
Member

@tomasklim tomasklim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well on webusb.

  1. On touch devices, the button should probably not expand because it is shaking otherwise.
Screen.Recording.2022-05-18.at.11.22.42.mov
  1. Actions in onboarding are not cancelable from UI.

Not sure, if it is good to show an error modal and error notification when the user cancels action from UI. (Moreover, I do not think it is good to allow cancelling backup as user has to reset the device if he does so)
https://user-images.githubusercontent.com/33235762/169007363-bf7fd6d2-0ee5-4b17-ae65-3a4821243c21.mov

@mroz22
Copy link
Contributor

mroz22 commented May 18, 2022

So tl;dr: I do not think we can roll out this feature to web version of Suite . So I would either postpone this feature or just make it desktop-only (which sounds more reasonable to me). We might theoretically also somehow hack it and make it work on older Bridge versions but I would definitely not spend our energy on that.

  1. It is not only web. Might affect desktop as well. Scenario: you have 2.0.27 standalone bridge installed already -> you run desktop -> it sees running bridge so it does not start built-in bridge.
  2. It might be fixable in connect, there is a workaround for older bridges but it has never worked properly.
    if (
    activeName &&
    activeName === 'BridgeTransport' &&
    versionCompare(version, '2.0.28') < 1
    ) {
    await this.device.legacyForceRelease();
    } else {

@mroz22 mroz22 added blocked Blocked by external force. Third party inputs required. connect Connect API related (ie. fee calculation) labels May 18, 2022
@mroz22
Copy link
Contributor

mroz22 commented May 18, 2022

Or maybe you could render the "x" button based on bridge version that is running.

@dahaca
Copy link
Contributor Author

dahaca commented May 18, 2022

@mroz22 @tsusanka Since it's related to Bridge ver, it makes sense to rely on it, not the platform. Please confirm that the only ver that's not supporting the .cancel() method is '2.0.27' :)

And should I be checking state.suite.transport.bridge.version or state.suite.transport.version?

@tsusanka
Copy link
Contributor

Please confirm that the only ver that's not supporting the .cancel() method is '2.0.27' :)

The other way around, v2.0.31 is the only one that supports it fully 🙂. I would simply make it >= v2.0.31 and that's it (future-ready when some new version gets released).

Also cc-ing @ondracja for context when this moves to QA.

@dahaca
Copy link
Contributor Author

dahaca commented May 19, 2022

@tsusanka Ok! I am removing the blocked label then. Are there plans to make it work in earlier versions, should I create an issue?

@tsusanka
Copy link
Contributor

@tsusanka Ok! I am removing the blocked label then. Are there plans to make it work in earlier versions, should I create an issue?

Let's not worry about that, it is very minor part of our user base.

@dahaca dahaca removed the blocked Blocked by external force. Third party inputs required. label May 19, 2022
@dahaca dahaca force-pushed the feat/device-modal-updates branch from cbd7670 to 2f93318 Compare May 19, 2022 19:09
@dahaca
Copy link
Contributor Author

dahaca commented May 19, 2022

@tsusanka @mroz22 So I see that the latest bundled version of bridge for desktop is 2.0.27 so the button is gone, although it works well. When will it be updated?

cbd7670

@tsusanka
Copy link
Contributor

Wait, Suite should have 2.0.31 bundled inside. Make sure you do not have a standalone bridge running before launching Suite (pgrep trezord).

@dahaca dahaca force-pushed the feat/device-modal-updates branch from 67feddd to fe25940 Compare May 23, 2022 18:03
Copy link
Member

@tomasklim tomasklim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bosomt
Copy link
Contributor

bosomt commented May 25, 2022

edit: already solved
QA OK

QA NOK
I'm not sure if this is part of this modal change but i just noted strange artifact that's not on production version.
Please see video.
When you open of detail of signed transaction one element is present and not expected in tx detail section.

Info:

  • Suite version: desktop 22.6.0 (d72ff4c)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.6.0 Chrome/94.0.4606.81 Electron/15.3.0 Safari/537.36
  • OS: MacIntel
  • Screen: 1680x1050
  • Device: model T 2.5.1 regular (revision a1d22890ee6a9ffec4edfc6e1b5b6c74d23855a3)
  • Transport: bridge 2.0.31
Screen.Recording.2022-05-25.at.9.41.24.mov

@dahaca dahaca force-pushed the feat/device-modal-updates branch 2 times, most recently from 59f7342 to eb3dfcf Compare May 25, 2022 15:12
@dahaca dahaca force-pushed the feat/device-modal-updates branch from eb3dfcf to 9d06155 Compare May 25, 2022 18:04
@dahaca dahaca merged commit 8b90bdd into develop May 25, 2022
@dahaca dahaca deleted the feat/device-modal-updates branch May 25, 2022 19:13
@bosomt
Copy link
Contributor

bosomt commented May 31, 2022

QA OK

Info:

  • Suite version: desktop 22.6.0 (2c0b29a)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/22.6.0 Chrome/94.0.4606.81 Electron/15.3.0 Safari/537.36
  • OS: MacIntel
  • Screen: 1680x1050
  • Device: model T 2.4.3 regular (revision 595b14254c1abb2be3f69e42c7932f1eca8cf1b1)
  • Transport: bridge 2.0.27
  • Transport: bridge 2.0.31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connect Connect API related (ie. fee calculation) READY FOR REVIEW Developed pull request ready to be reviewed by another developer
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

"Device" modal improvements Implement "cancel" action in modals
6 participants