Skip to content

Conversation

vojtatranta
Copy link
Contributor

@vojtatranta vojtatranta commented Oct 10, 2025

…g and waiting for restart

Description

Related Issue

Resolve #22256
Resolve #22257

Screenshots:

Screenshot 2025-10-10 at 2 19 52 PM

🔍🖥️ Suite web test results: View in Currents

🔍🖥️ Suite desktop test results: View in Currents

🔍🖥️ Suite native android test results: View in Currents

if (uiEvent?.type === 'ui-firmware_reconnect') {
const isDone = progress === 100;

if (uiEvent?.type === 'ui-firmware_reconnect' && !isDone) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept this condition, coz I am not sure why is it here. But I keep rendering the progress when the installation is done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll try to remove the condition completely

@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch 3 times, most recently from ba6cf38 to b5a919b Compare October 10, 2025 13:01
@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch from b5a919b to eef217c Compare October 13, 2025 07:56
@trezor-bot
Copy link
Contributor

trezor-bot bot commented Oct 13, 2025

✅ Previously successful run of [Test] PR Suite Web e2e tests workflow has been found.
⏭️ Skipping tests for this run.
💡 If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)

@trezor-bot
Copy link
Contributor

trezor-bot bot commented Oct 13, 2025

✅ Previously successful run of [Test] PR Suite Desktop e2e tests workflow has been found.
⏭️ Skipping tests for this run.
💡 If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)

@vojtatranta vojtatranta marked this pull request as draft October 13, 2025 09:47
@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch from eef217c to 93b948b Compare October 13, 2025 10:24
return {
operation: 'restarting',
// NOTE: when restarting to the normal mode, assume that the installation is finished
progress: restartingToNormalModeAfterInstallation ? 100 : 0,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Altough, this works fine on Desktop, I will check the mobile if it doesn't break anything. I could put ti to mine userDesktopFirmwareIInstallation

@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch 7 times, most recently from 82e7b04 to 3394a61 Compare October 13, 2025 12:05
@vojtatranta vojtatranta requested a review from jvaclavik October 13, 2025 12:11
firmwareUpdate: desktopFirmwareUpdate,
toggleLowBatteryModal: useCallback(() => setShowLowBatteryModal(prev => !prev), []),
showLowBatteryModal,
reconnectEvent,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

so this is only for desktop, it is not the pretiest, but prevetns problem with mobile guys

return (
<Modal.Backdrop onClick={isCancelable ? handleClose : undefined}>
{showConfirmationPill && (
<ConfirmOnDevicePill
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am removing the pill here @jvaclavik which I hope it is correct. The Device sercuirty check is within <OnboardinCard> and that has got its own pill

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand this comment. This has nothing to do with onboarding, since this only affects the firmware installation in settings, not the one in onboarding, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, but @jvaclavik mentioned it on Slack taht this pill is used in the onboarding. So I was ensuring that this usage of the pill is only within the update context.

Copy link
Contributor

Choose a reason for hiding this comment

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

Still don't get it. This pill has to be used anywhere there's device action required, it has nothing to do with onboarding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It has to do with onboardin that it is also used in onboardin eg. in the security check. But Komar requested this pill to be removed from the FW update steps because these steps are handled with modals.

So I did that. ANd here I am making sure that the pill is only removed from the FW update, and not from eg. security check in onboarding.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vojtatranta could you please add video of passing through the firmware install?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

Copy link
Contributor

Choose a reason for hiding this comment

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

"But Komar requested this pill to be removed from the FW update steps because these steps are handled with modals." This doesn't make sense. The pill has to remain, it is present in all modals requiring device action.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does make sense in the Firmware update modal, because there the actions required on the device are replaced with the modals.

Copy link
Contributor

Choose a reason for hiding this comment

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

I get it now, sorry!

@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch 2 times, most recently from ba64db7 to e112215 Compare October 13, 2025 12:32
completed: 'TR_FIRMWARE_STATUS_INSTALLATION_COMPLETED',
};

if (uiEvent?.type === 'ui-firmware_reconnect') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: I am looking if this won't break anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks fine @komret objections, ideas?


const restartingToBootloader = reconnectEvent && reconnectEvent.target === 'bootloader';

const updateOperation: FirmwareOperationStatus =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

no the prettiest, but workign safely (won't affect mobile)

@vojtatranta vojtatranta marked this pull request as ready for review October 13, 2025 12:55
@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch from e112215 to 7ebc047 Compare October 13, 2025 13:22
@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch 2 times, most recently from 491cb4c to 93e114b Compare October 14, 2025 07:49
@vojtatranta
Copy link
Contributor Author

I tested also when connected via USB and it looks good.

},
TR_RESTARTING_TREZOR_ENTER_PIN_IF_NEEDED: {
defaultMessage: 'Restarting Trezor. Enter PIN if prompted.',
TR_RESTARTING_TREZOR_ENTER_PIN_WHEN_NEEDED: {
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't it pity to loose all the translations because of this?

Suggesting use it only in crowdin

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, the text means somethign different now. I think overriding the original makes sense right now. There is also "IF" in the text.

return (
<Modal.Backdrop onClick={isCancelable ? handleClose : undefined}>
{showConfirmationPill && (
<ConfirmOnDevicePill
Copy link
Contributor

Choose a reason for hiding this comment

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

No idea, I went through onboarding and it looked OK, but not sure if there is also this screen 🤷‍♂️

@jvaclavik
Copy link
Contributor

Why is trezor missing here?
image

do you use getDeviceInternalModel ?

@vojtatranta
Copy link
Contributor Author

Why is trezor missing here? image

do you use getDeviceInternalModel ?

yes, that's the same code , but I think the device is litearlly not available at that moment. There is no device as it is restarting - guess

@vojtatranta
Copy link
Contributor Author

Why is trezor missing here? image
do you use getDeviceInternalModel ?

yes, that's the same code , but I think the device is litearlly not available at that moment. There is no device as it is restarting - guess

@jvaclavik in which scenario trezore disapears? I tried it now and it didn't disapear?

@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch from 93e114b to b155c53 Compare October 15, 2025 08:16
@jvaclavik
Copy link
Contributor

@jvaclavik in which scenario trezore disapears? I tried it now and it didn't disapear?

I don't know, I saw it in your screenshot above 😅

@vojtatranta
Copy link
Contributor Author

@jvaclavik in which scenario trezore disapears? I tried it now and it didn't disapear?

I don't know, I saw it in your screenshot above 😅

ah, cool, I am removing that, so it is on the pill in the modal, cool.

@vojtatranta vojtatranta requested a review from jvaclavik October 15, 2025 12:00
@vojtatranta vojtatranta force-pushed the 22256-improvement-restarting-device branch from b155c53 to 59d68c9 Compare October 15, 2025 12:01
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.

Better indication that firmware installation is done Show progress bar when Trezor is restarting after firmware installation

3 participants