fix(suite): retry FW revision check if offline - #30822
Conversation
| import { type TimerId } from '@trezor/type-utils'; | ||
| import { isArrayMember } from '@trezor/utils'; | ||
|
|
||
| const REFRESH_INTERVAL = 5_000; // [ms] |
There was a problem hiding this comment.
5 seconds instead of 3. Just felt too often when I tested it – when you reconnect to internet, there is more stuff happenning that takes time to resolve.
| `${DEVICE_MODULE_PREFIX}/rerunFwAuthenticityChecksThunk`, | ||
| (_, { getState }) => { | ||
| if (selectIsDeviceLocked(getState())) return; | ||
| TrezorConnect.getFeatures(); |
There was a problem hiding this comment.
in native we have device-mutex, which is a global singleton outside of redux so rerunFwAuthenticityChecksCall can be a simple pure function.
In Desktop we have only locks – not as sophisticated, and also a redux selector so I am making this a thunk.
52d3ee4 to
a0edc7e
Compare
|
/rebase |
|
Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/30975961284 |
a0edc7e to
0924708
Compare
|
✅ Previously successful run of [Test] suite-native Android E2E workflow has been found. |
Description
useRetryFwAuthenticityChecksfrom mobile to suite-common, parametrizeRelated Issue
Resolve #30821
Screenshots:
Before
The banner does not go away by itself. You have to incidentally make a call on Device, like starting discovery or something, so that it reruns FW Authenticity checks.
be4.webm
After
getFeatures are periodically polled when FW revision check is in "offline error", and when you connect to internet, it resolves to a final result.
after.webm
🤖 LLM Test Recommendations
Summary: The change set focuses on firmware authenticity check retry logic, app preloading/initialization, and device connection thunks. Most risk is concentrated in the onboarding authenticity flow. The recommended tests target that flow plus app initialization and device session management. The suite-native files are not exercised by the Playwright E2E suite.
Changed files (8)
packages/suite/src/components/suite/Preloader/Preloader.tsxsuite-common/firmware-authenticity/src/index.tssuite-common/firmware-authenticity/src/useRetryFwAuthenticityChecks.tssuite-native/app/src/hooks/useGlobalHooks.tsxsuite-native/device/src/hooks/useRetryFwAuthenticityChecks.tssuite-native/device/src/index.tssuite-native/device/src/rerunFwAuthenticityChecksCall.tssuite/device/src/deviceThunks.tsRecommended tests (4)
🔴 High priority (2)
suite/e2e/tests/onboarding/authenticity-check.test.ts— Directly exercises the device authenticity check flow during onboarding, which is the primary behavior affected by the firmware-authenticity retry logic changes and device thunks.suite/e2e/tests/onboarding/firmware-check.test.ts— Tests firmware readiness detection during onboarding; firmware checks share infrastructure with authenticity checks and are affected by preloader and device-thunk changes.🟡 Medium priority (2)
suite/e2e/tests/onboarding/initial-run.test.ts— Verifies onboarding state and persistence across reloads; the Preloader component controls the initial app render and onboarding entry point.suite/e2e/tests/suite/multiple-sessions.test.ts— Exercises bridge session acquisition/enumeration and device connection status, which are handled by device thunks. Inferred coverage since the changed file had no static mapping.suite-native/app/src/hooks/useGlobalHooks.tsxsuite-native/device/src/hooks/useRetryFwAuthenticityChecks.tssuite-native/device/src/index.tssuite-native/device/src/rerunFwAuthenticityChecksCall.tsUpdated: 2026-08-05T04:48:46.917Z
🔍 Currents Test Results
🔍 Suite web test results: View in Currents
🔍 Suite desktop test results: View in Currents
🔍 Suite native android test results: View in Currents
🔒 Quarantined E2E Tests
Trezor Suite (desktop) — 2 test(s)
Updated: 2026-08-05T04:50:22.960Z • 2 test(s) total
Trezor Suite (web) — 3 test(s)
Updated: 2026-08-05T04:51:28.227Z • 3 test(s) total
🌐 Preview deployments
🌐 Suite Web preview: https://dev.suite.sldev.cz/suite-web/fix/retry-fw-rev-check-offline/web/