Repository navigation
test: log out the jade during an open session in the locked journey - #2149
Conversation
Closing Receive after Verify on Device ends the Jade session, so the sign step reconnected instead of meeting the locked device. The journey now funds from the address Receive shows without verifying, logs out, signs, logs out again and verifies last: a send that completes keeps the session open. Verified: journey run on an Android emulator against the interactive Jade emulator; both legs logged "Marked Jade ... locked" and unlocked on the open session with no reconnect
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. |
[Low impact] The changes stay within the Jade emulator journey and its setup notes. The change appears safe to merge, with a non-blocking improvement needed to prevent the deposit sheet from interrupting the journey. Findings
SummaryUpdates the locked-Jade journey to sign before verifying an address, keeping the paired session open for both device log-outs.
Reviews (1) · Last reviewed commit: "test: log out the jade during an open se..." · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Reorders jade-device-locked.xml so both device log-outs land while the app still holds its Jade session (fund from the unverified Receive address, log out, Sign With Jade, log out again, Verify on Device), and updates the suite README to match. Reviewed 55bb6c8, light tier (journey and README only, no app code).
What I checked, and 3 candidates I ruled out
Read in full: jade-device-locked.xml, the changed README.md sections, jade-sign-on-device.xml for the send step wording
Session claims traced against the code at the head
- Closing Receive without Verify keeps the session:
HwReceiveViewModel.engagedWalletIdis set only inverifyAddress()andsubmitPassphrase(), anddisconnectEngaged()returns early while it is null. - A completed send keeps it:
SendSheetcallshwSendViewModel.completeBroadcast()on success, which nullssigningWalletIdwithout a disconnect, so the latercancel()path finds no wallet to disconnect. - Leaving Send unsent ends it:
HwSendViewModel.cancel()callsdisconnectStaleSession(signingWalletId), which is why the journey signs before it verifies.
Test tags: Send, AssetButton-switch (SendAmountScreen AssetButton-$testId), ContinueAmount, HardwareSendOpenTrezorConnect, SendSuccess, HardwareVerifyAddress all exist in app/src/main.
Ruled out
- Funding too small for the send: 0.001 BTC funded, 50 000 sats sent, fee headroom is ample.
- Emulator presses differ from the sign journey:
press frontthenpress right frontmatchesjade-sign-on-device.xml's approve path. - First log-out before any request leaves no session to lock: pairing opens it, and the PR's log shows
getMasterFingerprintmeetingDeviceLockedon that session.
Build: not built; the diff has no code, and nothing in .github/workflows reads journeys/. CI was still pending at review time.
Merge confidence: 5/5, docs-only change whose session claims hold against HwReceiveViewModel and HwSendViewModel.
Reviewer model: Claude Opus 5.5
Reasoning effort: Not exposed (the run metadata available to this reviewer does not report it)
Funding the Jade opens the Received Bitcoin sheet over the wallet, so the next step's Send tap could miss. The journey now waits for it and taps Nice!. Verified: xmllint on the journey; the 27 Nov run met and dismissed this sheet at that step
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 (aae7897), at a1f2310. The PR changes only the jade-device-locked.xml journey and its hardware-wallet README entries; no app code changes.
No new actionable code findings.
No actionable code findings. I checked the journey's new order against the app source at this head:
- Showing the Jade address on Receive without Verify never engages the device.
HwReceiveViewModelsetsengagedWalletIdonly inverifyAddress()andsubmitPassphrase(), so closing the sheet does not disconnect. - A completed send does not end the session either:
SendSheetcallshwSendViewModel.completeBroadcast()after showing success, which nullssigningWalletId, so the latercancel()on dispose skipsdisconnectStaleSession. - Leaving Send unsent, or closing Receive after Verify, does disconnect. That is why the journey signs first and verifies last.
- Pairing leaves the session open, and the Jade background release applies only to Bluetooth, not the TCP emulator.
- A Jade deposit emits through
HwWalletRepo.receivedTxs, andAppViewModelopens the received sheet, whose single button carries theReceivedTransactionButtontag.
Existing review: Greptile's deposit-sheet interruption thread is marked resolved. At this head the funding step waits for the "Received Bitcoin" sheet and dismisses it, so the concern is addressed in code.
Non-blocking consistency suggestions
- The funding step says to tap "Nice!", but the received sheet's button text is picked at random from
common__ok_random("Awesome!", "Nice!", "Cool!", …). Referring only to the test tag, as other journeys do, avoids a literal-text mismatch for a runner. - iOS parity: the same journey in open bitkit-ios#1441 (compared at
2ac5ea0) documents an intentional difference on Sign With Jade, the busy toast tracked in bitkit-ios#1517. It also lacks the received-sheet dismissal step added here ina1f2310. Consider carrying that step over so the shared action prose stays aligned. This was a scoped comparison of the journey file only, not a review of the iOS PR.
Ready for device testing: J1 (jade-device-locked.xml) with JADE_MODE=interactive in bitkit-docker, a regtest debug build with the Jade emulator enabled, and Electrum pointed at bitkit-docker.
Device testing: not performed in this review. The author reports one emulator run of the journey on aae789748 with an app log in the PR description; that is the author's evidence, not this reviewer's.
Reviewer model: claude-opus-5-5
Reasoning effort: high
The button's label is picked at random, so the step names only its test tag. Verified: xmllint on the journey
@piotr-iohk Fixed in 44665d7: the step names only the
Passed to the iOS journey's owner for synonymdev/bitkit-ios#1441. |
Funding the Jade opens the Received Bitcoin sheet over the wallet, which blocks the next Send tap; the journey now taps its button, as on Android (synonymdev/bitkit-android#2149). Verified: xmllint on the journey
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: changes since a1f2310, including affected code paths and prior findings, at 44665d7. Baseline: previous QA review. The base and merge base (aae7897) are unchanged. The README entries, the rest of the reordered jade-device-locked.xml journey and the scoped iOS journey comparison carry over from that baseline.
No new actionable code findings.
No new actionable code findings in the follow-up. The only change is the funding step in jade-device-locked.xml, which now says to tap the received sheet's button by its ReceivedTransactionButton tag instead of tapping "Nice!". This matches the app. In NewTransactionSheet, the received sheet's only button carries that tag, and its text comes from localizedRandom(R.string.common__ok_random), which picks one of eight labels ("Awesome!", "Nice!", "Cool!", …). That resolves the consistency suggestion from the previous QA review.
Existing review: Greptile's deposit-sheet interruption thread is still marked resolved, and at this head the funding step still waits for the "Received Bitcoin" sheet and dismisses it.
iOS parity: the baseline compared the journey with bitkit-ios#1441 at 2ac5ea0. The author reports that the missing received-sheet dismissal step was passed to the iOS journey's owner. That PR has since moved to a54e9ed, which this follow-up did not recheck. The comparison remains a scoped journey-file check, not a review of the iOS PR.
Ready for device testing: jade-device-locked.xml with JADE_MODE=interactive in bitkit-docker, a regtest debug build with the Jade emulator enabled, and Electrum pointed at bitkit-docker.
Device testing: not performed in this review.
Reviewer model: claude-opus-5-5
Reasoning effort: high
jvsena42
left a comment
There was a problem hiding this comment.
Code scan at 44665d7: no findings.
Checked and clean, against the app at head:
- Every tag the journey asserts exists (
ReceivedTransactionButton,HardwareVerifyAddress,Receive,AssetButton-switch,ContinueAmount,SendSuccessand the pairing tags), and the "Received Bitcoin" / "Bitcoin Sent" titles matchwallet__payment_received/wallet__send_sent. - The session stays open between the two log-outs. Opening Receive without Verify never engages the device. A completed send clears
signingWalletIdincompleteBroadcast(), and Close only hides the sheet.HwSendViewModel.cancel()runs only from the sign screen's Back. - Both the send path and
verifyJadeReceiveAddressreconnect with the PIN and retry when the Jade reports it is locked. - The received-sheet watcher takes its first event as a baseline, so history the Jade shares with the Trezor seed does not open the sheet before the deposit.
- The suite README matches the new order, the Jade emulator capability row covers every device step, and the XML parses.
- The iOS busy-toast difference on Sign With Jade predates this PR and is already noted in the QA review.
perf: not relevant.
Device gate (partial): 44665d7 — not run yet; the journey needs the Jade emulator. Result to follow.
Reviewer model: Opus 5.5 (claude-opus-5-5) coordinating, primary review and verification
Reasoning effort: Not exposed
On a fresh chain 0.001 BTC leaves under 100 000 sats spendable, so the 50 000 sat send trips the over-half-balance warning before Sign With Jade. The journey now funds 0.01 BTC, and its description says what it checks: the PIN prompt and retry, not an app message. Verified: xmllint on the journey; self review of origin/master...HEAD
|
Pushed 96995c8: the funding step now sends 0.01 BTC. On a fresh chain 0.001 BTC leaves under 100 000 sats spendable, so the 50 000 sat send would trip the over-half-balance warning before Sign With Jade. The journey description also now says what it checks: the PIN prompt on the device and the retry. |
pwltr
left a comment
There was a problem hiding this comment.
Reviewed 96995c8. The larger deposit addresses the send amount warning, and the reordered journey avoids closing an engaged Receive session before signing.
Low candidate: journeys/hardware-wallet/jade-device-locked.xml:27 can wait indefinitely for ReceivedTransactionButton if the deposit lands in the watcher's first snapshot. Receive can show the address from an account scan before that snapshot. The first snapshot updates the balance and treats the deposit as existing history, so the receipt sheet may never open. Wait for the funded Jade balance and dismiss the receipt sheet if it appears.
Pre-existing Low candidate: The PIN pad and successful completion can also follow a fresh connection if the TCP session drops after logout. The assertions for Sign With Jade and Verify on Device in journeys/hardware-wallet/jade-device-locked.xml:36 and journeys/hardware-wallet/jade-device-locked.xml:45 can therefore pass without exercising HW_LOCKED recovery. Require the operation-specific lock marker before the PIN prompt in each leg, as shown in the run attached to the PR.
Review details
Quick review: Claude Opus 5.5, high reasoning effort
General review: GPT-6.2 Sol, high reasoning effort
Verification: GPT-6.2 Sol, high reasoning effort
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: changes since 44665d7, including affected code paths and prior findings, at 96995c8. Baseline: previous QA review. The comparison base and merge base (aae7897) are unchanged, and no new files or surfaces were added beyond journeys/hardware-wallet/jade-device-locked.xml and journeys/hardware-wallet/README.md. The README entries, the ReceivedTransactionButton tag verification, and the rest of the reordered journey carry over from the baseline.
No new actionable code findings.
No new actionable code findings in the follow-up. The delta in journeys/hardware-wallet/jade-device-locked.xml makes two adjustments that match the app at this head:
- Funding is raised from
0.001BTC to0.01BTC (1,000,000 sats). InAppViewModel.handleSanityChecks,OVER_HALF_BALANCEcompares the 50,000-sat send against 50% ofhardwareAvailableSats; a0.001BTC UTXO leaves less than 100,000 sats spendable after the estimated drain fee and trips that dialog, whereas0.01BTC leaves ~999,800 sats spendable and avoids the warning (withenableSendAmountWarningdefaulting tofalseand regtest fees far below the fee warnings). - The opening sentence of
<description>now states that the journey checks the on-device PIN prompt and retry rather than an app message, matching the rest of the journey, the suite README, and Android'sDeviceLockedretry handling. - Verified
xmllint --nooutandgit diff --checkpass on the updated journey.
Existing reviews:
- Greptile's deposit-sheet interruption thread remains marked resolved, and the funding step still dismisses
ReceivedTransactionButtonat96995c8. - pwltr's approving review at
96995c8notes two non-blocking low candidates whose code mechanisms check out in source: (1) if the deposit mines before the watcher's firstTransactionsChangedevent afterHwWalletRepo.getReceiveAddressfalls back totrezorRepo.getAccountInfo,observeWatcherEvents/buildReceivedTxstreats it as baseline history and suppressesreceivedTxs, so waiting unconditionally forReceivedTransactionButtoncould stall; (2) pre-existing: a fresh reconnect after a dropped TCP session also callsJadeRepo.unlockConnected()and shows the PIN pad without loggingMarked Jade ... locked(markLockedIfLoggedOut), so UI assertions alone do not distinguishHW_LOCKEDrecovery from a reconnect.
iOS parity: refreshed against bitkit-ios#1441 at a54e9ed (scoped comparison of jade-device-locked.xml only, not a review of the iOS PR). The iOS journey now includes the ReceivedTransactionButton dismissal step, while still funding 0.001 BTC for the 50,000-sat send and still expecting the busy toast on Sign With Jade until bitkit-ios#1517.
Ready for device testing: J1 (jade-device-locked.xml) with JADE_MODE=interactive in bitkit-docker, a regtest debug build with the Jade emulator enabled, and Electrum pointed at bitkit-docker.
Device testing: not performed in this review. The author's video and log in the PR description were captured on an earlier run (aae789748), not this revision or this reviewer.
Reviewer model: gemini-4-neon
Reasoning effort: high
jvsena42
left a comment
There was a problem hiding this comment.
Approving at 96995c8. The new commit only raises the funding to 0.01 BTC and rewords the description to match the PIN-and-retry behaviour; nothing else changed.
Device gate: 96995c8 (app code 44665d7, equal to master aae7897) — journeys: 1 passed (jade-device-locked.xml, both legs); perf: not relevant; l10n: no UI text changed
- Interactive Jade emulator, local bitkit-docker chain, emulator-5554. Paired with
jade pin, funded 0.01 BTC from the Receive address without Verify, Received sheet dismissed; the session stayed open (noClosed Jade emulatorafter pairing). - Sign leg: after the on-device log-out, Sign With Jade logged
Marked Jade … lockedand one expectedgetMasterFingerprint failed, the PIN pad came up in about 2 s, and after the PIN the Jade showed Output 1/1 0.0005 BTC. One payment:Created sent onchain activityfor the txid that reached the mempool. No busy toast, noReconnected known Jade. - Verify leg: after the second log-out, Verify on Device logged
Marked Jade … lockedand one expectedverifyAddress failed, the PIN pad came up at once, and the Jade showed the same address asReceiveHardwareAddress. The button returned to Verify on Device with no toast. - One PIN prompt per leg.
Skipped — covered by CI at 96995c8: build-and-test, lint, compose-ui (all green).
Reviewer model: Opus 5.5 (claude-opus-5-5) coordinating, primary review and verification; Fable 5.2 (claude-fable-5-2) runbook; Sonnet 5.5 (claude-sonnet-5-5) device driver
Reasoning effort: Fable medium (run record); others Not exposed
Both go to a follow-up PR, so this one keeps its approvals. The second one happened on my re-run at 96995c8: on a heavily loaded host one attempt lost the TCP link after the log-out, and Sign With Jade then met |
Refs:
Description
jade-device-locked.xmlso both log-outs happen while the app holds an open Jade session, because closing Receive after Verify on Device callsdisconnectStaleSession, so the sign step reconnected with a fresh PIN prompt instead of meeting HW_LOCKED and the locked retry from fix: ask for the pin when a logged-out jade is used #2140README.mdto matchDesign
N/A — no UI changes.
Preview
The journey at this PR's head 96995c8 against the interactive Jade emulator, from pairing to the verified address (2x):
head2x.mp4
App log from the run: each leg meets the locked device on the session it already holds and unlocks it, with no
Reconnected known JadeorWarming up known Jadeanywhere in the run:QA Notes
Journeys
jade-device-locked.xml— Sign With Jade and Verify on Device each show the Jade PIN pad after a log-out and finish without an errorManual Tests
N/A
Automated Checks
N/A
Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium)Gemini 4 Neon(reasoning:high)