Skip to content

test: drive jade flows with an emulator - #1441

Merged
ovitrif merged 16 commits into
masterfrom
feat/jade-emulator
Nov 28, 2026
Merged

ovitrif merged 16 commits into
masterfrom
feat/jade-emulator

Conversation

@ovitrif

@ovitrif ovitrif commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Refs synonymdev/bitkit-android#2049

Twin: synonymdev/bitkit-android#2052
Dependency: synonymdev/bitkit-docker#45

This PR lets debug builds drive every Jade flow against the Blockstream Jade emulator from bitkit-docker, and adds a journey for each.

Description

  • Adds a TCP link to the Blockstream Jade emulator in bitkit-docker, behind JADE_EMULATOR in debug builds, so the Jade flows run on a simulator without a device. The emulator shows up in scans as one more Jade, and the connect flow skips its Bluetooth check for it.
  • Reports a closed emulator socket as the Jade disconnecting, as a dropped Bluetooth or USB link does, so the next request after an emulator restart reconnects instead of reusing a dead session.
  • Adds a journey for each Jade flow the app has, the same files as Android: pairing, receive address check, signing on the device, each hardware__jade_* error the app can reach, logging out on the device and a passphrase wallet.

Out of Scope

  • Bluetooth, USB and QR mode: the emulator is serial over TCP only.
  • JadeEmulatorLink: no unit test; the journeys cover it.

Design

N/A — no UI changes.

Preview

The app reconnects after the emulator restarts: the first send reports the Jade disconnected, the next asks for the PIN and sends:

ios-restart-reconnect2x.mp4

QA Notes

Setup

  1. bitkit-docker main (feat: add a jade emulator bitkit-docker#45, merged): docker compose up -d, then ./scripts/jade-emulator start (each journey names the JADE_* settings it needs; docs/jade-emulator.md has the recipes).
  2. A regtest debug build launched with JADE_EMULATOR=true in the scheme's environment or -JADE_EMULATOR true as a launch argument; the app reaches the emulator at 127.0.0.1:30121 (JADE_EMULATOR_URL overrides it).
  3. Interactive journeys press the device's buttons with ./scripts/jade-emulator press, pin and passphrase in bitkit-docker.

Journeys

  • J1: new jade-connect-sign.xml — pairs the emulated Jade, verifies a receive address on it and sends from it
  • J2: new jade-sign-on-device.xml — declining on the device cancels the send; approving it sends
  • J3: new jade-wrong-pin.xml — a wrong PIN shows the Found step's message, then the right PIN pairs
  • J4: new jade-network-mismatch.xml — a mainnet Jade shows the network mismatch message
  • J5: new jade-uninitialized.xml — a Jade with no seed shows the not set up message
  • J6: new jade-wallet-mismatch.xml — a Jade with another seed shows the different wallet message
  • J7: new jade-psbt-too-large.xml — a send over 200 inputs shows the transaction too large message
  • J8: new jade-device-locked.xml — after a log-out on the device, Sign With Jade shows the Jade busy message (until bug: sign with jade on a logged-out jade can still show busy #1517), then Verify on Device asks for the PIN on the device again and goes through
  • J9: new jade-passphrase.xml — a passphrase typed on the Jade pairs as a second wallet of the same Jade

Manual Tests

N/A

Automated Checks

  • updated JadeTransportTests.swift — a closed emulator socket reports the Jade disconnected

Evidence

  • J1 to J9 driven on the iPhone 17 Pro simulator, debug build, regtest, before this branch was rebased onto master; each showed the expected step or message.
  • On 428cff5: J2 declined then approved a 50,000 sat send, and a send signed after the emulator restarted under the app (the first request reports the disconnect, the next reconnects and asks for the PIN).

Gaps

  • J1 and J3 to J9 were not driven again after the rebase; master's hardware send changes are covered by J2 and the unit suite.
  • Bluetooth, USB and QR mode need a physical Jade.

Models used

  • Planning/scoping: Claude Opus 5.5 (reasoning: medium)
  • Implementation: Claude Opus 5.5 (reasoning: medium)
  • Review: Claude Sonnet 5.5 (reasoning: high)
  • Review rounds: 1

Verified: debug build on a simulator paired, verified and signed a send against the jade emulator
Adds a journey for each hardware__jade_* error the app can reach, for signing on the device and for a passphrase wallet. Lets the emulator build skip the Bluetooth check, since it connects over TCP.

Verified: unit tests pass (4586, 0 failures); SwiftFormat lint clean on the changed files
A closed emulator socket now reports the Jade as disconnected, as a dropped Bluetooth link does, so the next request reconnects instead of reusing a dead session.

Verified: unit tests pass (4587, 0 failures); on a simulator a send signed after the emulator restarted under the app
@ovitrif ovitrif self-assigned this Nov 25, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T22:09:22.503378Z 428cff5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5 · The PR appears safe to merge, with a non-blocking socket cleanup fix recommended.RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The changes reach the Jade simulator and journey workflows in debug and E2E builds.

The PR appears safe to merge, with a non-blocking socket cleanup fix recommended.

Findings

  1. P2 Pending calls keep closed sockets ▶

Summary

Adds an opt-in TCP connection to the Jade emulator for debug and E2E builds.

  • Debug builds can use a Jade emulator in the simulator.
  • The journey suite now covers Jade pairing, signing, and device states.

No builds, tests, or simulator journeys were run during this review.

Acknowledged scope:

  • ovitrif states that the first request after an emulator restart reports the disconnect and the next reconnects. This known behavior is not reported as a separate defect.
  • ovitrif leaves dedicated JadeEmulatorLink unit tests out of scope because the journeys cover it.
  • ovitrif excludes Bluetooth, USB, and QR emulator coverage.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Flag["JADE_EMULATOR enabled"] --> Scan["Offer TCP Jade"]
    Scan --> Manager["JadeManager"]
    Manager --> Core["BitkitCore"]
    Core --> Transport["JadeTransport"]
    Transport --> Link["JadeEmulatorLink"]
    Link --> Emulator["Jade emulator"]
    Link --> Drop["Read or write reports disconnect"]
    Drop --> Cleanup["Clear session before reconnect"]
Loading

Reviews (1) · Last reviewed commit: "fix: reconnect the jade emulator after i..." · Reviewed by Greptile

@talosmachina talosmachina left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No findings. Adds a debug and E2E only TCP link to the Jade emulator, routes tcp: paths to it, merges its socket closes into externalDisconnects, skips the Bluetooth check in the connect sheet while the emulator is on, lets a paired Jade be matched on its exact path for any transport, and adds journeys J1 to J9. Reviewed 428cff5, full tier, static: iOS does not build on this reviewer's Linux host, so this rests on the code and on CI.

What I checked, and 6 candidates I ruled out

Read in full: JadeEmulatorLink.swift, the JadeTransport.swift diff, Env.swift (configValue, boolConfigValue, the new flags), JadeManager.knownDeviceCandidate and resolveDevice, handleExternalDisconnect, HardwareConnectSheet.isBluetoothUsable, the new JadeTransportTests case.
Journeys: every accessibilityIdentifier the nine Jade journeys assert exists in Bitkit/ (literal or through the Tab-, Suggestion-, AssetButton- builders); the diffs against the Android files are only the platform tags and the documented jade-device-locked difference.
CI: SwiftFormat and validate green; Run Tests, integration tests and build-local still running at review time.

Ruled out

  • Emulator reachable in a release build: jadeEmulatorEnabled needs isDebug || isE2E, and configValue only reads environment and launch arguments under DEBUG || E2E_BUILD.
  • knownDeviceCandidate change altering production matching: without the emulator every scanned Jade on iOS is Bluetooth, so the exact-path match over all transports returns what the Bluetooth-only filter did.
  • Fallback dialling a tcp: path over Bluetooth: openDevice checks isEmulatorPath before the BLE driver, so a stored emulator path never reaches it.
  • SIGPIPE on a write after the emulator restarts: SO_NOSIGPIPE is set on every socket.
  • Chunk size: 509 matches jade-client-rs and Android's serial MAX_CHUNK_SIZE.
  • fd reuse when closeDevice races a pending poll/recv: real in principle (Greptile's thread covers it), but debug-only and below the posting tier.

Merge confidence: 4/5, no findings, but the unit and integration runs were still pending, the app was not built here, and the knownDeviceCandidate change has no test of its own.

Reviewer model: Claude Opus 5.5
Reasoning effort: Not exposed (this review session does not report its reasoning setting)

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: full PR at 428cff5, re-reviewed after explicit full review or forced re-review was requested (merge base 8094973).

3 actionable findings — resolve or provide an evidence-backed rebuttal.

Compared against the Android twin synonymdev/bitkit-android#2052 at 9f5af34: the J8 difference in jade-device-locked.xml matches an intentional platform difference (JadeManager.retryingOnceIfLocked re-prompts for the PIN and retries on iOS, while Android currently reports busy per synonymdev/bitkit-android#2050), and Android's wrong-PIN scan-loop fix is not needed on iOS because HwConnectViewModel.onConnectFailed does not restart scanning. The J7 setup command omission also appears in the Android twin, while Android's JadeTransportTest already isolates enabled = false and JadeEmulatorTransport resolves hostnames via InetSocketAddress.

Compatibility against synonymdev/bitkit-docker#45 at ff07520 (compatibility scope only — only the Jade emulator port 127.0.0.1:30121, scripts/jade-emulator commands, JADE_* environment flags, and bitcoin-cli funding recipe were checked, not a full review): the port, scripts/jade-emulator subcommands (start, pin, passphrase, press, screen), and JADE_MNEMONIC= / JADE_NETWORK=mainnet / JADE_MODE=interactive / JADE_PASSPHRASE=always contracts align with iOS, except jade-psbt-too-large.xml omits the periodic mining every 20 sends documented in bitkit-docker/docs/jade-emulator.md.

Recommended before device testing

  • Fix the J7 funding command in journeys/hardware-wallet/jade-psbt-too-large.xml to mine periodically every 20 sends (matching bitkit-docker/docs/jade-emulator.md) so the journey setup does not fail on Bitcoin Core's mempool ancestor limit.
  • Address the concurrent close(fd) / spurious-disconnect race in JadeEmulatorLink and JadeTransport.onEmulatorResult.
  • Re-run J1 and J3–J9 on the current rebased commit 428cff5, as author execution evidence on that revision currently covers J2 and emulator-restart signing.

Suggested additional test cases

  • iOS (Debug simulator, -JADE_EMULATOR true) — Cancel during interactive PIN prompt and immediately retry: Start JADE_MODE=interactive ./scripts/jade-emulator start, begin Jade pairing until the PIN prompt appears on the emulator, tap Cancel in Bitkit, immediately tap Connect again, and enter the correct PIN. Expected: the cancelled read/write terminates cleanly without closing the newly opened retry socket or triggering a spurious disconnect error, and pairing completes.
  • iOS (Debug simulator, -JADE_EMULATOR true -JADE_EMULATOR_URL localhost:30121) — Hostname URL override: Start the emulator on the host and launch Bitkit with -JADE_EMULATOR_URL localhost:30121, then open Connect Device. Expected: the emulator is discovered and pairs (if hostname resolution is supported), or a clear diagnostic log explains that only numeric IPv4 addresses are accepted.

Device testing: not performed in this review (code-only review). The author reports running J1–J9 on an iPhone 17 Pro simulator before rebasing onto master, and re-running J2 plus emulator-restart signing on 428cff5; J1 and J3–J9 remain unverified at 428cff5, and physical Bluetooth, USB, and QR paths are outside emulator scope. CI checks (Run Tests, Run Integration Tests, SwiftFormat, build-local, e2e-tests-local - e2e, validate) passed on 428cff5; local Xcode builds and simulator runs were not executed in this Linux environment.

Earlier findings reconciled at this revision: 1 duplicate.

Findings

  • [MEDIUM] Mine periodically in J7 (jade-psbt-too-large.xml) setup command to stay under Bitcoin Core's mempool chain limit — inline at journeys/hardware-wallet/jade-psbt-too-large.xml:8.
  • [LOW] Resolve hostnames (or log invalidAddress) in JadeEmulatorLink.connect instead of silently failing on non-IPv4 hosts — inline at Bitkit/Services/Jade/JadeEmulatorLink.swift:126.
  • [LOW] Isolate existing JadeTransportTests from Env.jadeEmulatorEnabled instead of defaulting to JadeEmulatorLink.shared — inline at Bitkit/Services/Jade/JadeTransport.swift:41.

Existing concerns

Reviewer model: gemini-4-neon
Reasoning effort: high

Bitcoin Core refuses a chain of more than 25 unconfirmed sends, so funding 200 inputs needs a block every 20 sends, as the bitkit-docker recipe does. The journey now parses as XML.

Verified: xmllint on the journey
J1 opens Show details before it checks FROM, since the confirmation screen starts with them collapsed. The locked journey no longer describes Android as reporting busy: synonymdev/bitkit-android#2050 makes Android ask for the PIN and retry as iOS does.

Verified: xmllint on the journeys
JADE_EMULATOR_URL now resolves a hostname such as localhost, and a scan logs an address it cannot use. JadeTransportTests run with the emulator off, so a Debug environment that turns it on no longer changes them.

Verified: swiftformat --lint, JadeTransportTests (28 passed)
The locked journey also signs a send after a logout, as on Android (synonymdev/bitkit-android#2140). iOS does not retry the fingerprint read on Sign With Jade yet, so that step can still report busy until #1517.

Verified: xmllint on the journey

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: changes since fdbad90, including affected code paths, at 6a1b1e3. Baseline: the completed QA review at fdbad90 (same base and merge base 8094973; fdbad90 is an ancestor of the new head). Coverage of the unchanged emulator link, transport, Env gating, reconnect, connect-sheet and other journey surfaces comes from that baseline.

No new actionable code findings.

The only change is documentation: journeys/hardware-wallet/jade-device-locked.xml adds a second log-out on the device followed by a Sign With Jade send, and the hardware-wallet README adds a matching note. I checked the new steps against the app source and the bitkit-docker emulator docs. The test IDs Send, AssetButton-switch (built at runtime in SendAmountView), ContinueAmount, HardwareSendOpenTrezorConnect and SendSuccess exist. The emulator commands are the documented ones: press front right front for Session → Log Out, press front past Output and press right front to sign. git diff --check on the change is clean and the journey file parses as XML.

Existing concern (not introduced here): at this head the journey's Sign With Jade locked-device steps (the PIN pad appears, then Bitcoin Sent) will fail on iOS. Before signing, HwWalletManager.signingFingerprint calls JadeManager.masterFingerprint(). Unlike verifyAddress and signPsbt, that call is not wrapped in retryingOnceIfLocked (JadeManager.swift#L811). The DeviceLocked error it gets back is shown as the Jade busy message. This PR does not change that code, and the journey description and README name it as the known gap tracked in #1517 (author's reference; this run did not open the issue). The journey asserts the intended behavior, so expect that step to fail until #1517 lands.

Parity: the Android twin (bitkit-android#2052 at 9f5af34) keeps the shorter locked-device journey that expects the busy toast on Verify on Device. The bitkit-docker recipe table records this difference on purpose (Android shows busy; iOS asks for the PIN again and retries). I compared only the journey text, not runtime behavior.

Device testing: not performed in this review. No build or unit tests were run; the change is docs only.

Earlier findings reconciled at this revision: 1 still present.

Existing concerns

  • [MEDIUM] Avoid concurrent POSIX close(fd) while read/write holds raw descriptor and suppress spurious local-close disconnects — The mechanism is unchanged at 6a1b1e3. The only change since the previous assessed head fdbad90 is documentation: journeys/hardware-wallet/jade-device-locked.xml and journeys/hardware-wallet/README.md. JadeEmulatorLink.closeDevice(path:) removes the fd from sockets under the lock and then calls POSIX close(fd) at line 72. It does not call shutdown(fd, SHUT_RDWR) and does not track in-flight I/O. write (lines 83-98) and read (lines 100-114) get the raw fd through socket(for:) (lines 120-122), which takes and releases the lock, and then call send/poll/recv on that number outside the lock. JadeManager.beginTeardown (JadeManager.swift:546-569) still runs LinkRelease.release concurrently with core(service) at lines 563-565. That reaches JadeTransport.disconnectDevice/closeAllConnections/releaseAllImmediately, which call emulator.closeDevice/closeAll (JadeTransport.swift:67-83). JadeTransport.onEmulatorResult (lines 90-94, called from lines 138 and 153) still closes the path and sends emulatorDisconnects on any .disconnected result. It does not suppress user-initiated closes or check socket generations, so an interrupted read or write can report a spurious external disconnect and close a newly opened retry socket on the same tcp: path. The file is new in this PR (absent at merge base 8094973). Greptile's thread on this line (discussion_r4701460177) is unresolved, not outdated and has no replies. The published QA review 6069982090 listed it under existing concerns. A focused issue search found no canonical issue, and there is no material new evidence, so reference it as an existing concern rather than republishing. Severity stays MEDIUM; the path is reachable only in Debug/E2E builds with JADE_EMULATOR enabled.

Reviewer model: claude-opus-5-5
Reasoning effort: high

The description names the bitkit-docker Electrum and the funding command for the send steps, and the PIN pad step no longer checks the sheet's Back button, as on Android (synonymdev/bitkit-android#2140).

Verified: xmllint on the journey
Each socket counts its in-flight reads and writes; closing shuts it down at once and frees the descriptor only after the last call returns, so a reused descriptor never receives an old call's bytes. Only a remote close reports a disconnect.

Verified: JadeTransportTests (29 tests) on the iOS simulator
@ovitrif
ovitrif requested a review from piotr-iohk November 26, 2026 21:13

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: full PR at b24eb0dfa, re-reviewed after explicit full review or forced re-review requested.

1 actionable finding — resolve or provide an evidence-backed rebuttal.

The debug/E2E TCP emulator link (JadeEmulatorLink), transport integration (JadeTransport), known-device path matching (JadeManager), connect-sheet Bluetooth bypass (HardwareConnectSheet), and the three new emulator tests in JadeTransportTests.swift look sound: release builds keep the emulator disabled, socket refcounting with shutdown(SHUT_RDWR) prevents file-descriptor reuse races and suppresses spurious external disconnects on local close, and remote closes properly propagate through externalDisconnects to JadeManager.handleExternalDisconnect. One low-severity journey defect was found in journeys/hardware-wallet/jade-device-locked.xml, where dismissing Receive after Verify on Device tears down the Jade session before the Sign With Jade leg begins, preventing that leg from exercising HW_LOCKED on a live session.

Twin and dependency comparison:

  • Compared against twin synonymdev/bitkit-android#2052 at 9f5af34a7 (merged): iOS matches the tcp: path contract and 509-byte serial chunk size, adds descriptor refcounting and shutdown-before-close over Android's JadeEmulatorTransport, does not need Android's HwConnectViewModel error-retention fix (iOS cancels scanning in onDeviceFound), and aligns 8 of 9 journeys with documented iOS identifier adaptations (Tab-jade, SendConfirmToggleDetails, HardwareSendSignAmount). jade-device-locked.xml diverges because iOS already retries DeviceLocked on verifyAddress and adds a Sign With Jade leg (with synonymdev/bitkit-ios#1517 still open).
  • Compatibility checked against dependency synonymdev/bitkit-docker#45 at a6e9ed091 (merged; checked only serial TCP port 30121, scripts/jade-emulator CLI commands/env flags, and error recipes for synonymdev/bitkit-ios#1441 — not a full review): all commands, env overrides, and interactive button sequences referenced by the 9 journeys match. Note the PR QA Notes Setup cites earlier commit 48b6c9f rather than merged head a6e9ed091 (docs-only delta).

Validation and coverage limits:

  • CI at b24eb0dfa: Run Tests, Run Integration Tests, build-local, SwiftFormat, and validate passed; e2e-tests-local was still pending when inspected. Local XML parsing confirmed all 9 journey files are well-formed; no local Xcode build was run in this Linux code-only review.
  • Unit test coverage in JadeTransportTests.swift exercises remote-close external disconnect, hostname resolution, and local close during an in-flight read; write/read byte round-trip, writeChunk remote-close disconnect, getChunkSize returning 509, and disabled/unreachable scanDevices are not unit-tested (the PR notes JadeEmulatorLink is covered by journeys).

Recommended before device testing:

  • Fix the step ordering in J8 (journeys/hardware-wallet/jade-device-locked.xml) and update J8's summary line in the PR QA Notes so the Sign With Jade check runs with an active session rather than after ReceiveQr teardown (and keep its assertion aligned with synonymdev/bitkit-ios#1517).
  • In QA setup, pass JADE_EMULATOR=true via launch arguments (-JADE_EMULATOR true) or process environment rather than Xcode build settings (--extra-args), because JADE_EMULATOR and JADE_EMULATOR_URL are not defined in Bitkit/Info.plist.

Suggested additional test cases:

  • iOS simulator (cancel during interactive PIN wait): Start JADE_MODE=interactive ./scripts/jade-emulator start, launch debug build with -JADE_EMULATOR true, open Connect Hardware, tap Connect on Found Jade until HwFoundUnlockHint is visible, tap Cancel (HardwareWalletFoundCancel), then reopen Connect Hardware and pair with ./scripts/jade-emulator pin 012345. Expected: cancelling aborts the in-flight read without a spurious disconnect error, and the subsequent pairing succeeds cleanly.
  • iOS simulator (live-session logout before Sign With Jade): After pairing and funding the Jade (reading the address from Receive without tapping Verify on Device, so the pairing session stays open), run ./scripts/jade-emulator press front right front and immediately run Send -> Sign With Jade. Expected: confirms actual live-session HW_LOCKED behavior on Sign With Jade (currently expected to hit synonymdev/bitkit-ios#1517 until fixed) rather than a fresh reconnect.

Device testing: not performed in this review (code-only). The author reports J1–J9 passed pre-rebase and J2 plus emulator-restart reconnect passed on 428cff5; J1–J9 have not yet been executed on b24eb0dfa.

Earlier findings reconciled at this revision: 1 verified fixed.

Findings

  • [LOW] Closing Receive drops the Jade session before the Sign With Jade locked-device check — inline at journeys/hardware-wallet/jade-device-locked.xml:37.

Reviewer model: gemini-4-neon
Reasoning effort: high

Closing Receive after Verify on Device ends the Jade session, so the send leg reconnected instead of meeting the locked device. The journey now funds from the address Receive shows, signs first and verifies the address last, each right after a log-out on an open session.

Verified: xmllint on the journey
@ovitrif
ovitrif requested a review from piotr-iohk November 26, 2026 22:49

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: changes since b24eb0d, including affected code paths, at 9c86c04. Baseline: previous QA review, whose unchanged Swift, test, documentation, and other Jade journey surfaces are inherited under the verified merge base 8094973.

1 actionable finding — resolve or provide an evidence-backed rebuttal.

Source analysis confirms the session-retention logic behind the reordering in journeys/hardware-wallet/jade-device-locked.xml: finishing pairing (HwConnectViewModel.reset()), reading a watch-only Receive address without verifying (ReceiveQr / HwEngagedSession), and closing SendSuccess after a completed send (HwSendCoordinator / SendSheet.cleanup()) all leave the Jade session open. However, reordering J8 to execute Sign With Jade first on an open session now hits the unretried JadeManager.masterFingerprint() call (pre-existing synonymdev/bitkit-ios#1517), so the journey dead-ends before reaching the working Verify on Device leg.

Validation and comparison: xmllint and git diff --check passed locally on the updated journey. On CI at 9c86c04, SwiftFormat and validate passed, while Run Tests, Run Integration Tests, and build-local failed to compile on unrelated Bitkit/Managers/SparkExitManager.swift:912 from the PR merge commit's newer master base (4465abb), so automated Swift tests did not run on this revision. Compared against Android twin synonymdev/bitkit-android#2052 at 9f5af34 (whose jade-device-locked.xml asserts Android's current busy-toast behavior on Receive Verify on Device) and dependency synonymdev/bitkit-docker#45 at a6e9ed0 (all jade-emulator and bitcoin-cli commands cited in J8 match the fixture contract).

Recommended before device testing:

  • Adapt journeys/hardware-wallet/jade-device-locked.xml (J8) so it asserts current iOS behavior on Sign With Jade until synonymdev/bitkit-ios#1517 lands and does not block the working Verify on Device leg.
  • Rerun CI unit/integration/E2E builds once master's unrelated SparkExitManager.swift compile error is resolved.

Device testing: not performed in this review. The author's reported simulator runs predate 9c86c04, and the updated J8 journey has only been syntax-checked with xmllint.

Earlier findings reconciled at this revision: 1 verified fixed.

Findings

  • [MEDIUM] Locked-Jade journey asserts PIN unlock and send success on Sign With Jade before #1517 is fixed — inline at journeys/hardware-wallet/jade-device-locked.xml:37.

Reviewer model: gemini-4-neon
Reasoning effort: high

Until #1517 lands, Sign With Jade on a logged-out Jade shows the busy message instead of the PIN pad, so the locked journey checks that, keeps the device logged out and goes on to the Verify on Device retry.

Verified: xmllint on the journey

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: changes since 9c86c04, including affected code paths, at caf69f3. Baseline: previous review. Inherited coverage from the verified baseline covers the unchanged Jade emulator configuration, TCP link/transport code, connect Bluetooth-gate bypass, reconnect matching, emulator unit tests, and the other eight Jade journeys.

No new actionable code findings.

Commit caf69f3 updates journeys/hardware-wallet/jade-device-locked.xml and journeys/hardware-wallet/README.md so the locked-Jade Sign With Jade step expects the busy toast ("Your Jade is busy. Finish what is shown on the device, then try again.", tracked in synonymdev/bitkit-ios#1517), closes the send sheet with the device still logged out, and then verifies that Verify on Device prompts for the PIN again and retries. Source inspection confirms this sequence matches current iOS behavior: HwWalletManager.signingFingerprint calls JadeManager.masterFingerprint() without retryingOnceIfLocked, JadeError.DeviceLocked is not treated as a session failure (isJadeSessionFailure() returns false) so the open session stays intact while HwFundingSigner.compose surfaces HwTransferError.deviceBusy(.blockstream) (hardware__jade_device_busy), HwSendCoordinator.signAndBroadcast clears operationSession in its defer so dismissing HwSendSignView/SendSheet does not tear down the session, and the subsequent Verify on Device reaches JadeManager.verifyAddress -> retryingOnceIfLocked -> unlockConnected(). Local XML parsing and whitespace checks passed.

Cross-platform and dependency checks: compared against twin synonymdev/bitkit-android#2052 at 9f5af34, where jade-device-locked.xml covers only Verify on Device expecting the busy toast; the iOS journey and README document the platform divergence accurately. Checked the interactive emulator command contracts against synonymdev/bitkit-docker#45 at a6e9ed0 (compatibility check only, not a full review): JADE_MODE=interactive, press front right front (Session -> Log Out), pin 012345, and press right front (Verify Address) match docs/jade-emulator.md.

Recommended before device testing: Wait for the unrelated master compile error in Bitkit/Managers/SparkExitManager.swift (unexpected non-void return value in void function on return utxos, causing Run Tests to fail on the PR merge commit while Run Integration Tests and build-local were still in progress) to clear and confirm unit/integration checks pass on the PR; then drive the updated J8 (jade-device-locked.xml) on a simulator, since author evidence predates the rebase and the updated Sign With Jade expectation.

Device testing: not performed in this review (code-only pass; author evidence notes J1 and J3–J9 have not been re-run after the rebase, and J8 was updated afterward in caf69f3).

Earlier findings reconciled at this revision: 1 verified fixed.

Reviewer model: gemini-4-neon
Reasoning effort: high

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: full PR at 2ac5ea0, re-reviewed after the merge base changed to 003a8dc.

No new actionable code findings.

Source inspection across all changed Swift, test, and journey surfaces found no new actionable code findings. Release builds keep Env.jadeEmulatorEnabled disabled (isDebug || isE2E), JadeEmulatorLink resolves IPv4 literals and hostnames via getaddrinfo with non-blocking connect timeouts, SO_NOSIGPIPE/TCP_NODELAY, and reference-counted EmulatorSocket retirement (Darwin.shutdown(SHUT_RDWR) before deferred close) so local closes do not race descriptor reuse or emit spurious external disconnects, while remote closes propagate through JadeTransport.externalDisconnects to JadeManager.handleExternalDisconnect. JadeManager.knownDeviceCandidate preserves exact-path matching across transports without altering Bluetooth reconnects, and all 26 accessibilityIdentifiers and localized strings referenced across journeys/hardware-wallet/jade-*.xml match the app source. All six prior review threads on this PR are marked resolved and verified fixed at 2ac5ea0, including jade-device-locked.xml matching current iOS behavior (Sign With Jade hitting the unretried JadeManager.masterFingerprint() call tracked in synonymdev/bitkit-ios#1517 while keeping the session open after dismissing the send sheet, followed by Verify on Device prompting for the PIN and retrying).

Twin and dependency comparison:

  • Compared against twin synonymdev/bitkit-android#2052 at 9f5af34 (merged): iOS matches the tcp: path contract and 509-byte serial chunk size, does not need Android's wrong-PIN scan-loop fix (HwConnectViewModel.onDeviceFound stops scanning on iOS), and adapts platform-specific selectors (Tab-jade, SendConfirmToggleDetails, HardwareSendSignAmount) and the documented jade-device-locked.xml behavior.
  • Compatibility checked against dependency synonymdev/bitkit-docker#45 at a6e9ed0 (merged; compatibility scope only for synonymdev/bitkit-ios#1441 — only TCP port 30121, scripts/jade-emulator CLI commands/environment overrides, and the bitcoin-cli funding/error recipes were checked, not a full review): all referenced ports, commands, env vars, and button sequences align.

Validation and limitations: Local git diff --check and XML parsing of all 9 journeys/hardware-wallet/jade-*.xml files passed; no local Xcode build or simulator run was executed in this Linux environment. On CI at 2ac5ea0, SwiftFormat and validate passed, while Run Tests, Run Integration Tests, and build-local were still in progress at inspection time. Unit tests in JadeTransportTests.swift cover remote-close external disconnects, hostname resolution, and local close during an in-flight read; write/read byte round-trip, writeChunk remote-close disconnect, 509-byte chunk size, disabled/unreachable scanDevices, and JadeManager.knownDeviceCandidate serial exact-path matching remain covered by journeys rather than dedicated unit tests.

Recommended before device testing:

  • Wait for the in-progress CI jobs (Run Tests, Run Integration Tests, and build-local) on 2ac5ea0 to complete and confirm they pass.
  • Drive J1 and J3–J9 on a simulator build of 2ac5ea0 (especially J8 jade-device-locked.xml, which was rewritten after the author's earlier simulator runs).

Suggested additional test cases:

  • iOS simulator (Debug, -JADE_EMULATOR true) — Cancel during interactive PIN prompt and immediately reconnect: Start JADE_MODE=interactive ./scripts/jade-emulator start, open Connect Hardware, tap Connect (HardwareWalletFoundConnect) until HwFoundUnlockHint is shown, tap Cancel (HardwareWalletFoundCancel), then reopen Connect Hardware, tap Connect again, and enter ./scripts/jade-emulator pin 012345. Expected: cancelling aborts the in-flight read without emitting a spurious disconnect error or closing the retry socket, and pairing completes cleanly.

Device testing: not performed in this review (code-only review). The author reports J1–J9 passed on an iPhone 17 Pro simulator (Debug, regtest) before rebasing onto master, and J2 plus emulator-restart reconnect passed on 428cff5; J1 and J3–J9 have not been re-run on 2ac5ea0, and physical Bluetooth, USB, and QR flows remain outside emulator scope.

Reviewer model: gemini-4-neon
Reasoning effort: high

@ovitrif

ovitrif commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

QA

J8 (jade-device-locked.xml) passed on an iOS simulator at 2ac5ea0, against the bitkit-docker Jade emulator in interactive mode and the local regtest Electrum.

j8-locked-ios.mp4

  • Pairing: Found Jade, PIN on the device, Device Connected.
  • Funding: read the Jade address in Receive without Verify on Device, sent 0.001 BTC to it and mined a block; Receive closed with the Jade session still open.
  • Log out on the device (Session → Log Out), then Send 50 000 sats from the Jade and Sign With Jade: the app shows "Your Jade is busy. Finish what is shown on the device, then try again." The log shows getMasterFingerprint failing with DeviceLocked on the open session, as bug: sign with jade on a logged-out jade can still show busy #1517 describes.
  • With the device still logged out, Verify on Device: the app logs The Jade locked since it connected; unlocking and retrying, the Jade shows its PIN pad, and after the PIN and the on-device confirmation the button returns to "Verify on Device" with no error.

Unit and integration tests pass at this head.

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
@ovitrif

ovitrif commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

a54e9ed adds the Received Bitcoin sheet dismissal (ReceivedTransactionButton) after the funding step in jade-device-locked.xml, matching synonymdev/bitkit-android#2149. It changes only the journey text, so the J8 run above at 2ac5ea0 covers this head's app code.

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: changes since 2ac5ea0, including affected code paths and prior findings, at a54e9ed. Baseline: previous QA review (unchanged Swift, unit-test, and emulator-link surfaces inherited under merge base 003a8dc).

No new actionable code findings.

No new actionable code findings in the follow-up. Commit a54e9ed changes only journeys/hardware-wallet/jade-device-locked.xml (J8) to wait for the "Received Bitcoin" sheet and tap ReceivedTransactionButton after closing Receive and funding the Jade address. Source verification confirms this matches current iOS behavior: once the hardware watcher populates watcherData (from which HwWalletManager.watcherReceiveAddress serves the Jade receive address), funding and mining a block triggers HwWalletManager.emitReceivedTxs -> MainNavView presenting .receivedTx, whose ReceivedTx view uses wallet__payment_received ("Received Bitcoin") and button identifier ReceivedTransactionButton. None of the other eight jade-*.xml journeys fund the Jade mid-journey. All six earlier review threads on this PR remain resolved and verified fixed.

Twin and dependency comparison:

  • Compared against Android twin synonymdev/bitkit-android#2052 at 9f5af34 (merged): Android's jade-device-locked.xml exercises only Verify on Device expecting the busy toast and does not fund or send mid-journey, so the received-sheet dismissal applies specifically to iOS's documented Sign With Jade leg (until synonymdev/bitkit-ios#1517 lands).
  • Compatibility checked against dependency synonymdev/bitkit-docker#45 at a6e9ed0 (compatibility scope only for synonymdev/bitkit-ios#1441 — only the bitcoin-cli and scripts/jade-emulator commands referenced by jade-device-locked.xml were checked, not a full review): all referenced commands and button sequences match.

Validation and limitations: Local git diff --check and XML well-formedness checks across all nine journeys/hardware-wallet/jade-*.xml files passed; no local Xcode build or simulator run was executed in this Linux code-only review. On CI at a54e9ed, SwiftFormat and validate passed, while Run Tests, Run Integration Tests, and build-local were still in progress at inspection time (all three passed on the identical Swift code at 2ac5ea0: Run Tests, Run Integration Tests, build-local).

Recommended before device testing:

Device testing: not performed in this review (code-only review). The author reports in PR comment that J8 passed on an iOS simulator at 2ac5ea0 (with identical app code to a54e9ed), that J2 and emulator-restart reconnect passed on 428cff5, and that J1–J9 passed pre-rebase; J1, J3–J7, and J9 have not been re-run post-rebase, and physical Bluetooth, USB, and QR paths remain outside emulator scope.

Reviewer model: gemini-4-neon
Reasoning effort: high

@ovitrif

ovitrif commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Cancelled the queued e2e-tests run so #1457 gets the iOS runner first; it will be re-run once that PR's e2e has started.

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: full PR at 70b936e, re-reviewed after the merge base changed.

No new actionable code findings.

No actionable code findings. With JADE_EMULATOR set, debug and E2E builds reach the Jade emulator over TCP at 127.0.0.1:30121. A closed emulator socket is reported as the Jade disconnecting, and a close the app starts during a read stays a local close. Release builds leave the link disabled. Signing, the amount, and consent stay on the existing Jade session; the new code is the byte pipe.

Compared with twin bitkit-android#2052 at 9f5af34: both use a tcp: path and a 509-byte serial chunk. While the flag is on, iOS scan returns only the emulator, which the hardware-wallet README records because the simulator has no Bluetooth LE scan. J8 on iOS expects the busy toast on Sign With Jade; the Android journey at that revision expects it on Verify on Device.

Compatibility with bitkit-docker#45 at a6e9ed0 for bitkit-ios#1441: only port 30121, scripts/jade-emulator (start, pin, press, passphrase), the JADE_* recipes, and the bitcoin-cli funding commands were checked, not a full review. Those contracts match the journeys. The docker locked-device note says iOS asks for the PIN again; J8 matches the app more closely. Sign With Jade shows "Your Jade is busy…" while bitkit-ios#1517 is open, and Verify on Device then asks for the PIN.

Existing concern: #1517 is unchanged. JadeManager.masterFingerprint() still returns DeviceLocked to the send flow as the busy toast, and J8 expects that. The six earlier review threads on this pull request are resolved. Hostname resolution, test isolation from JADE_EMULATOR, socket lifetime across an in-flight read, J7 mining every 20 sends, and the J8 step order all hold at this revision.

Recommended before device testing: Let Run Tests, Run Integration Tests, and build-local finish on this commit. SwiftFormat and validate have passed. This review did not run an Xcode build. git diff --check was clean and the nine Jade journey files parse.

Device testing: not performed in this review. The author reports J8 on a simulator at 2ac5ea0. The Jade session and sign sources are the same between that merge's master and this base. J1, J3–J7, and J9 have not been re-run after the later master merge.

Suggested additional test cases:

  • iOS simulator, debug build with -JADE_EMULATOR true, Jade already paired. Restart the emulator with ./scripts/jade-emulator start while the app still holds the session, then send. Expected: the first Sign With Jade reports that the Jade disconnected, and the next attempt asks for the PIN and can broadcast.

Reviewer model: grok-4.7
Reasoning effort: xhigh

As on Android (synonymdev/bitkit-android#2158), the funding step waits for the deposit's received row, with the Received Bitcoin sheet optional, and each leg checks the app log for the line only the HW_LOCKED path writes, so a dropped connection that also ends in the PIN pad cannot pass for it.

Verified: xmllint on the journey; both log lines appear in the J8 run at 2ac5ea0
@ovitrif

ovitrif commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

bb88be9 ports synonymdev/bitkit-android#2158 to jade-device-locked.xml: the funding step waits for the deposit's received row, with the Received Bitcoin sheet optional, and each leg checks the app log for the line only the HW_LOCKED path writes (getMasterFingerprint failing with JadeError.DeviceLocked on Sign With Jade, "The Jade locked since it connected; unlocking and retrying" on Verify on Device). Both lines are in the J8 run above; app code is unchanged.

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: changes since 70b936e, including affected code paths and prior findings, at bb88be9. Baseline: previous QA review. Inherited coverage is the unchanged emulator link, transport, configuration, reconnect, connect sheet, unit tests, and the other Jade journeys.

No new actionable code findings.

No new actionable code findings in the follow-up.

jade-device-locked.xml now waits for a received row of 100 000 sats, with the Received Bitcoin sheet optional, and requires the log lines only the locked-device path writes: getMasterFingerprint with JadeError.DeviceLocked on Sign With Jade, and "The Jade locked since it connected; unlocking and retrying" on Verify on Device. Those strings match the current send and verify paths. A dropped emulator socket is a session failure, so it does not satisfy either line or the busy toast. Sign With Jade still shows "Your Jade is busy…" because masterFingerprint() is not retried; that remains #1517. The six earlier review threads on this pull request are resolved, and their fixes are unchanged since the baseline.

Compared with twin bitkit-android#2052 at 9f5af34: that journey only expects the busy toast on Verify on Device. The funding and log checks follow the later Android journey shape, and iOS keeps the busy-toast step until #1517. The bitcoin-cli and jade-emulator commands in this file are the ones already checked against bitkit-docker#45 at a6e9ed0; this pass did not re-review that repository.

Validation: xmllint and git diff --check passed on the journey. No simulator run. App code is unchanged from 70b936e, where Run Tests, Run Integration Tests, and build-local passed. On this commit, SwiftFormat and validate passed; Run Tests, Run Integration Tests, and build-local were still in progress.

Ready for device testing: the follow-up does not change app code from the green baseline above. Drive J8 on this revision; its funding wait and log checks are new relative to the written steps of the author's simulator run at 2ac5ea0.

Device testing: not performed in this review. The author reports J8 at 2ac5ea0, including these log lines.

Reviewer model: grok-4.7
Reasoning effort: xhigh

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code scan at bb88be9: one LOW inline. I reviewed this as hardware-wallet code despite the test: title, since it changes Env, JadeManager, JadeTransport, HardwareConnectSheet and adds JadeEmulatorLink.

Checked and clean:

  • A release build cannot reach the emulator. jadeEmulatorEnabled is (isDebug || isE2E) && JADE_EMULATOR, and both are false at compile time in Release without E2E_BUILD, which only the CI test workflows set.
  • Every emulator entry point (scan, open, close, write, read, chunk size, disconnect) checks the flag through enabled or isEmulatorPath. closeAll only walks an empty socket map. The Bluetooth bypass in the connect sheet sits behind the same flag. This is the same pattern as TREZOR_BRIDGE.
  • 7 of the 9 journeys match Android master byte for byte. jade-connect-sign.xml differs only by Tab-jade and HardwareSendSignAmount, both in the identifier table. The jade-device-locked.xml busy toast on Sign With Jade is recorded against #1517.
  • The funding step already carries the received-row wait from synonymdev/bitkit-android#2158.

perf: not relevant.

Device gate (partial): bb88be9 — not run yet; the Jade journeys on the iOS simulator with 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 a 50 000 sat send from a 100 000 sat Jade shows the over 50% of balance warning before Sign With Jade; funding 0.01 BTC avoids it, as on Android (synonymdev/bitkit-android#2158).

Verified: xmllint on the journey
@ovitrif
ovitrif requested a review from jvsena42 November 27, 2026 16:46

@piotr-iohk piotr-iohk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

QA review

Scope: changes since bb88be9, including affected code paths and prior findings, at 65c43ec. Baseline: previous QA review. Inherited coverage is the unchanged emulator link, transport, configuration, reconnect, connect sheet, unit tests, and the other Jade journeys.

No new actionable code findings.

No new actionable code findings in the follow-up.

J8 now funds 0.01 BTC and waits for a received row of 1 000 000 sats, then still sends 50 000 sats. That is the text requested in the half-balance thread, which is marked resolved. On swipe, validatePayment shows the over-50% dialog only when the send is greater than half of the Jade's spendable amount (SendConfirmationView, hardware branch of the balance check). Spendable is the max after the fee, or the balance minus HwFundingSigner.feeReserve when that estimate is missing (10% of the balance with no fee rate). Half of the remaining amount from 1 000 000 sats stays well above 50 000, so the dialog does not appear and the journey can reach Sign With Jade. 0.01 BTC is 1 000 000 sats, and the modern bitcoin display groups it as "1 000 000".

Existing concern: #1517 is unchanged. JadeManager.masterFingerprint() still does not retry a locked device, and J8 still expects the busy toast on Sign With Jade and the PIN retry on Verify on Device. The six earlier review threads remain resolved; this commit does not change their code.

Compared with bitkit-android#2158 at 968ad8d: the funding command and 1 000 000 sat row match. The pinned twin bitkit-android#2052 at 9f5af34 still has the shorter locked-device journey, which does not fund. Compatibility with bitkit-docker#45 at a6e9ed0 for bitkit-ios#1441: only the bitcoin-cli sendtoaddress amount and -generate 1 in this journey were checked, not a full review. The command is the one already checked; the amount is now 0.01 BTC.

Validation: xmllint --noout and git diff --check passed on the journey at this revision. Device testing: not performed in this review. The author's J8 pass (comment) is at 2ac5ea0 with 0.001 BTC, so it does not cover this amount.

Ready for device testing: J8 can be driven at this revision. The fresh-chain half-balance stop is no longer in the journey.

Reviewer model: grok-4.7
Reasoning effort: xhigh

@jvsena42 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving at 65c43ec. 65c43ec fixed my LOW (it now funds 0.01 BTC and expects a 1 000 000 sat row), and the device gate passed.

Device gate: 65c43ec — journeys: 9 passed (jade-uninitialized, jade-network-mismatch, jade-connect-sign, jade-device-locked, jade-sign-on-device, jade-wallet-mismatch, jade-passphrase, jade-wrong-pin, jade-psbt-too-large); perf: not relevant; l10n: no UI text changed

  • Debug + E2E_BUILD app launched with -JADE_EMULATOR true on an iPhone 17 Pro Max simulator, with the bitkit-docker Jade emulator at 8685ebd (including #47) and the local regtest chain.
  • J5: HwFoundError shows the exact uninitialized text 1 s after Connect, logged as Connected … state 'uninit' → Jade connect failed: DeviceUninitialized. A second Connect gives the same result, and reopening shows no stale error.
  • J1: paired with ₿ 500 000. Verify on Device succeeded with no error. A 50 000 sat send reached SendSuccess 2 s after the tap, with exactly one Sent row (−50 141) and one mempool txid.
  • J8 from a Jade balance of 0 with the new 0.01 funding: no over-50% dialog.
    • Sign leg: the busy toast (#1517, as recorded), DeviceLocked next to getMasterFingerprint, no PIN pad and no payment.
    • Verify leg: DeviceLocked → "The Jade locked since it connected; unlocking and retrying", one PIN prompt, then the matching address.
    • No reconnect or close lines between pairing and the end of the verify leg.
  • J2: Decline leaves no payment (UserCancelled, empty mempool). Approve gives one send, with one hw_retained_send_jade save and one delete.
  • J3, J4, J6, J9: exact texts and log lines as the journeys state. The passphrase never appears in the app log.
  • J7: 201 inputs. The PSBT size error (size: 75293, max: 16384) shows the exact toast, with no send and an empty mempool.
  • Release build: source check only. jadeEmulatorEnabled needs isDebug || isE2E, and launch-argument reading sits under #if DEBUG || E2E_BUILD. Release defines neither.

Driving notes, no change needed: the Received sheet button reads "Cool!"; the sign-screen amount text carries MoneyText inside the HardwareSendSignAmount container; AvailableAmount is not tappable on iOS, so J7's amount was typed on the pad.

CI at 65c43ec: green except e2e-tests-local - e2e, still pending.

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: Not exposed

@ovitrif

ovitrif commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Merging: approved at 65c43ec with checks green and no open threads.

@ovitrif
ovitrif merged commit 934a982 into master Nov 28, 2026
20 checks passed
@ovitrif
ovitrif deleted the feat/jade-emulator branch November 28, 2026 14: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.

4 participants