Repository navigation
fix: show the jade not set up message - #2144
Conversation
Connecting a Jade with no wallet now throws JadeException.DeviceUninitialized, so the Found step shows the Jade text, as iOS does, instead of the generic hardware message. J1 opens Show details before it checks FROM, and the psbt journey mines a block every 20 sends and parses as XML. Verified: just compile, JadeRepoTest and HwErrorPresenterTest, just test, just lint
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Verified: none (file rename only)
[Low impact] The PR appears safe to merge; no actionable issues were found. SummaryFixes the setup message shown when a Jade has no wallet.
Reviews (1) · Last reviewed commit: "fix: show the jade not set up message" · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Makes JadeRepo reject a Jade with no wallet with JadeException.DeviceUninitialized, which HwErrorPresenter already maps to hardware__jade_uninitialized, removes the now unused HwDeviceUninitializedError, and updates J1 and J7 setup text. Reviewed 2ea193f, light tier.
What I checked, and 3 candidates I ruled out
Read in full: JadeRepo.kt (connect path, rejectUnusableDevice, connectExpectedDevice, cleanupFailedConnection), HwErrorPresenter.kt, JadeExceptionExt.kt
Call sites traced: HwDeviceUninitializedError has no remaining reference at the head; JadeException.DeviceUninitialized is matched only in HwErrorPresenter (and its test)
Build: not built here. On the Bitkit track a review does not run the branch's Gradle build; this is reasoned from the code and from CI.
CI: build-and-test, build-local, ui-tests and lint still running when this was posted.
Ruled out
- Retry loop on the new type:
connectExpectedDevicekeeps trying the next candidate only forJadeIdentityMismatchErrorandHwWalletMismatchError; the new exception is rethrown just as the old one was, and thefinallycleanup is unchanged. - Reclassified as a session failure:
isJadeSessionFailureandisJadeDeviceBusylist specific subtypes and neither includesDeviceUninitialized, so the reconnect and busy handling treat it as before. - Journey drift:
SendConfirmToggleDetailsandSendConfirmAssetButtonboth exist inSendConfirmScreen.kt; both edited journey files still parse as XML.
Merge confidence: 4/5, CI had not finished and the branch was not built here; JadeRepoTest.kt covers the changed throw.
Reviewer model: Claude Opus 5.5
Reasoning effort: Not exposed (the review session does not report an effort setting)
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at 2ea193f.
No new actionable code findings.
No actionable code findings. When JadeRepo connects to a Jade that reports UNINIT, it now rejects it with JadeException.DeviceUninitialized. HwErrorPresenter already maps that to hardware__jade_uninitialized, so the Found step (through HwConnectViewModel.onConnectFailed) and the repository error state (JadeRepo.errorMessage) both resolve to the Jade-specific text. This covers pairing, known-device reconnect and auto-reconnect. Error handling is otherwise unchanged:
connectExpectedDevicestill rethrows anything except identity or wallet mismatches.cleanupFailedConnectionstill runs infinally.- The new type is not in
isJadeSessionFailureorisJadeDeviceBusy.
The removed HwDeviceUninitializedError has no remaining references, and at the base it was only thrown by JadeRepo. The no-argument DeviceUninitialized() constructor already compiled at the base in HwErrorPresenterTest, and the head's CI build-and-test passed (run).
iOS parity: bitkit-ios at d30d2d6ecd323650b0d076bf08df1d0918cee99b throws JadeError.DeviceUninitialized for .uninit in JadeManager.swift and maps it to the same string key, so Android now matches. This was checked from source only, with no visual comparison.
Journeys:
- J1: the new
SendConfirmToggleDetailsstep is correct. For an on-chain send, details start collapsed (initialShowDetailsdefaults to false), andSendConfirmAssetButtonis only shown insideOnChainDetailsonce they are expanded. - J7: the base file failed to parse as XML because of the literal
<jade address>. The head file parses. The new loop mines 10 blocks over 200 sends, keeps unconfirmed chains at 20 or fewer, and confirms the last batch. jade-uninitialized.xml(J5): the PR description calls it updated, but this PR does not change it. It already expected the Jade text at the base.
Validation: I parsed the journey XML and checked the loop arithmetic locally. I did not run a Gradle build or tests here. The CI e2e and compose UI jobs were still pending when I checked.
Device testing: not performed in this review. The author reports that J5 passed on an emulator at d07d6c9. J1 and J7 were not rerun, according to the author's own notes on gaps.
Ready for device testing on the requested journeys J1, J5 and J7, using the author's bitkit-docker and Jade emulator setup.
Reviewer model: claude-opus-5-5
Reasoning effort: high
|
@piotr-iohk Corrected the description: this PR leaves |
jvsena42
left a comment
There was a problem hiding this comment.
Code scan at 2ea193f: no findings.
Checked and clean:
rejectUnusableDevicenow throwsJadeException.DeviceUninitializedforUNINIT. The throw is still inconnectDevicebeforeunlockConnected/exportAccounts, and theNonCancellablecleanup still disconnects, so no session stays connected (JadeRepoTestasserts it).- The new type is classified like the old one everywhere: not a session failure (no reconnect-and-sign-again in
HwSendViewModel.sign, no retry inverifyJadeReceiveAddress/signJadeFunding), not busy, not a user cancellation, not a firmware error.connectExpectedDevicestill rethrows it. - In a send it can only arise in
ensureConnected, before anything reaches the device.handleFailuretakes the plain error branch with no pending broadcast. - Every Jade connect error display goes through
HwErrorPresenter(HwConnectViewModel.onConnectFailed,JadeRepo.errorMessage,HwSendViewModel.handleFailure,HwReceiveViewModel.handleVerifyFailure), which already maps the type tohardware__jade_uninitialized. No hardware path renders the raw message. A locked device still maps to the busy text. HwDeviceUninitializedErrorhas no remaining references.- Journeys: J1's new
SendConfirmToggleDetailsstep matches the app, since on-chain details start collapsed andSendConfirmAssetButtonlives inside them. J7 now parses as XML and its funding loop keeps unconfirmed chains under 25. J5 already expects this text. - No string resources changed.
perf: not relevant.
Device gate (partial): 2ea193f — not run yet; J5, J1 and J7 need the Jade emulator. Result to follow.
Reviewer model: Opus 5.5 (claude-opus-5-5) coordinating; Fable 5.2 (claude-fable-5-2) primary review
Reasoning effort: Not exposed
|
Outside this PR's scope; no change needed here. Trezor send journey has the same stale review-screen step J1 had. |
On-chain send details start collapsed, so the FROM field only appears after Show details; the Trezor send journey now taps it, as J1 does, and the suite README lists the tag. Verified: xmllint on the journey
pwltr
left a comment
There was a problem hiding this comment.
Reviewed 9e442d2. No issues found. A Jade with no wallet is now rejected with JadeException.DeviceUninitialized, which HwErrorPresenter already maps to the Jade set-up text, so the Found step shows it instead of the generic connect error. The Trezor send journey now opens Show details before checking the FROM field, as the Jade journey does.
Review details
General review: Claude Opus 5.5, high reasoning effort
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: changes since 2ea193f, including affected code paths and prior findings, at 9e442d2. Baseline: prior QA review.
No new actionable code findings.
The follow-up only updates journeys/hardware-wallet/send-onchain.xml and journeys/hardware-wallet/README.md; all six surfaces from the baseline remain unchanged and inherited. For a normal Trezor on-chain send, SendConfirmScreen.kt defaults initialShowDetails to false (lines 226 and 429) and only renders SendConfirmAssetButton inside OnChainDetails (lines 500–507, 683–693) once SendConfirmToggleDetails (line 577) is tapped—the collapsed funding-source button (lines 473–481) is gated on isPaymentRequest. Adding the SendConfirmToggleDetails tap before checking SendConfirmAssetButton in send-onchain.xml and listing SendConfirmToggleDetails in journeys/hardware-wallet/README.md matches the app and jade-connect-sign.xml, and no other hardware-wallet journey asserts SendConfirmAssetButton without expanding details.
Reconciliation: The earlier J5 description note was corrected by the author, and this follow-up addresses the stale Trezor review-screen step raised in review comment. No open review threads or unresolved findings remain.
iOS parity: synonymdev/bitkit-ios at af19cc1 (journeys/hardware-wallet/send-onchain.xml) already uses the same SendConfirmToggleDetails identifier on the review screen (source comparison only; no visual comparison performed).
Validation: Verified XML well-formedness (xmllint --noout) on send-onchain.xml, jade-connect-sign.xml, and jade-psbt-too-large.xml and ran git diff --check locally; no local Gradle build or tests were run because this delta touches only journey specs and docs. On 9e442d2, CI build-and-test, compose-ui / ui-tests, build, lint, and detekt passed (build run, lint run); e2e-tests-local shards were still running when checked (e2e run).
Device testing: not performed in this review. The author reports J5 passed on an Android emulator at d07d6c9 and notes J1, J7, and Trezor send-onchain.xml were not rerun (only journey setup and step text changed).
Ready for device testing on the requested journeys: J1, J5, and J7 using the Jade emulator setup, and Trezor send-onchain.xml using the Bridge emulator setup in journeys/hardware-wallet/README.md.
Reviewer model: gemini-4-neon
Reasoning effort: high
|
Placed in 3.2.0: this PR merged to master before the 3.2.0 cut, so it ships in 3.2.0. |
Refs:
Description
JadeException.DeviceUninitialized, so the step shows the Jade text, as iOS doesThese are the review points raised on #2052, moved here so its approval stood.
Out of Scope
Design
N/A — no design available.
Preview
J5 at the head of this branch: the Found step for a Jade with no wallet.
QA Notes
Setup
docker compose up -d, thenJADE_MNEMONIC= ./scripts/jade-emulator startfor J5.JADE_EMULATOR=trueinlocal.propertiesand no Jade paired.Journeys
jade-connect-sign.xml— taps Show details before checking FROMjade-uninitialized.xml(unchanged) — the Found step shows the Jade not set up textjade-psbt-too-large.xml— setup mines every 20 sends so 200 inputs fund the Jadesend-onchain.xml— taps Show details before checking FROMManual Tests
N/A
Automated Checks
JadeRepoTest.kt— connecting a Jade with no wallet fails withJadeException.DeviceUninitializedEvidence
just compile,just testandjust lintpassed at d07d6c9.Gaps
Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium)Claude Sonnet 5.5(reasoning:high)