3 minor findings · 4 suggestions
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Hidden Activity drops export feedback, and rejected exports are silent
An export finishing while Activity is hidden has no replayed result; synchronous rejection is also silent, although no current UI producer of an empty path was found.
Location: qml/pages/wallet/ActivityListPage.qml:102 (head).
Details and suggested fix
onExportFinished records exportSucceeded but opens exportResultPopup only when root.visible. Switching tabs or opening transaction details while an export runs therefore loses its success or failure feedback, including the recoverable activity-changed error. Returning to Activity does not present the stored result, and exportError appears only in that popup. Keep an unshown result pending and present it when its Activity page becomes visible again, without opening a popup over another page.
exportActivity also discards the return value from exportCsv, whose pending and empty-path rejections emit no completion. Handle a false return in QML as well. The export button already prevents the pending case during normal use.
[minor] · Reconciliation can report a persisted request as failed
If a refresh for an external label change is already in flight when an untouched prefilled request is saved, reconciliation changes its revision and makes a successful save report failure.
Location: qml/models/walletqmlmodel.cpp:825 (head).
Details and suggested fix
submitReceiveCommand captures the draft's revision, but PaymentRequest advances that revision for programmatic changes as well as user edits. A refresh already submitted before the save can complete first and call followPrefilledNote, changing the untouched note to the externally updated address label. The backend still saves successfully because note_is_prefill reads the current label. The save completion then finds a revision mismatch, skips applying the saved entry to the draft and forces result.success = false. Consequently, PaymentRequestCard shows an error instead of emitting created() and opening the saved request. The command's own returned snapshot does not cause this mismatch because the comparison precedes its application. The request remains accessible in Activity, and the saved-address check prevents a duplicate on that address. Distinguish user edits or draft replacement from reconciliation changes, or defer followPrefilledNote while a save holds that draft.
[minor] · Worker security-state reads race GUI wallet encryption
The wallet worker reads encryption state without cs_wallet while GUI encryption can modify mapMasterKeys, introducing an in-process race beyond the pre-existing RPC concurrency.
Location: qml/models/walletstatesnapshot.cpp:129 (head).
Details and suggested fix
WalletStateBackend::read() calls isCrypted() and isLocked() after ReadWalletKeyScheme has released cs_wallet. In the pinned Core, both reach HasEncryptionKeys(), which reads the plain mapMasterKeys container without locking; EncryptWallet inserts into it while holding cs_wallet. The settings action calls encryption synchronously on the GUI thread without excluding worker tasks, so the cached security-state reads have a formal data race. No runtime failure was demonstrated. Read these values under cs_wallet, whose recursive locking permits the nested IsLocked() call. Protect the worker-side checks in execute() and message signing as well, releasing the wallet lock before waiting for the unlock session to preserve lock ordering.
Optional improvements
[suggestion] · Receive holds cs_wallet and the unlock session across a full scan
During encrypted Save or EnsureAddress, the full pre-write scan holds cs_wallet and WalletUnlockSession, so competing Send attempts can report busy; the duration has not been measured.
Location: qml/models/walletstatesnapshot.cpp:312 (head).
Details and suggested fix
execute() acquires these locks before read(node), which enumerates addresses and coins, visits every wallet transaction, queries details for request payments and may persist observed-payment flags. Other cs_wallet users must wait, and Send preparation rejects an overlapping attempt when its session tryAcquire() fails. Address preparation also runs automatically on entering Receive. Measure this held interval on a large wallet, or narrow the pre-write work to the request IDs, saved addresses, relevant payment observation and address-purpose checks that must be atomic with the write. Keep the full reconciliation snapshot after releasing the locks, as complete() already does. Preserve the unlock session from the lock-state check through relocking; acquiring it only when the wallet appears locked would allow temporary unlocks to interfere.
[suggestion] · Async coin locking discards the selection needed for retry
As an improvement over the pre-existing mark-clearing behavior, retaining markedIds until async lock success would let users retry failed persistent lock writes without selecting every coin again.
Location: qml/components/CoinsList.qml:64 (head).
Details and suggested fix
lockMarked clears the marks when setCoinsLocked() returns true, which now means only that the command was queued. A later write failure displays “Some coins could not be updated. Try again.”, but both bulk-action buttons require the discarded selection. Keep the marks until successful completion, or restore the submitted marks on failure. The backend forwards every marked outpoint and reapplies lock writes even if the snapshot already shows them locked, so this permits a one-click retry. This does not repair a failed persistent unlock erase: Core removes that entry from memory before attempting the database erase, so a repeated unlock cannot retry that erase.
[suggestion] · RememberAddress performs an unused full-wallet read
RememberAddress performs two full wallet reads even though it needs only the final reconciliation snapshot, adding avoidable work to the wallet's serial worker queue.
Location: qml/models/walletstatesnapshot.cpp:416 (head).
Details and suggested fix
execute() calls read(node) before dispatching on command.kind, then complete() calls finish() for another full read. The RememberAddress branch only writes or removes a QSettings key and uses none of the pre-read state. Both handing an address from Addresses to Receive and choosing Request again therefore incur an unnecessary scan. Skip the pre-read for RememberAddress while retaining the final reconciliation read. The scan and queue-latency costs have not been measured.
[suggestion] · The wallet-refactor commit adds an unexplained QML package
Commit 9d4d8c4 adds qml6-module-qt-labs-folderlistmodel to CI, artifacts and README without identifying a consumer, while the current file-dialog implementation explicitly avoids that dependency.
Location: .github/workflows/ci.yml:66 at 9d4d8c4ded11 (commit) (commit).
Details and suggested fix
9d4d8c4ded11736a0075a8e5bf34f076b32be704, the carried-over asynchronous wallet-refactor commit, includes three package-list edits but has no explanatory body. No QML imports QtQuick.Dialogs or Qt.labs.folderlistmodel, and qmlfiledialog.h already documents the replacement that removes this module requirement. Move those three edits into a preparatory dependency commit whose message identifies the consuming job or test, or omit them if unnecessary. This lets the environment change be understood and validated separately from the wallet refactor. If preserving the carried-over commit boundary is important, add that explanation to its message instead. This is a review-flow suggestion, not a demonstrated build failure.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Unused label aliases contradict their documented contracts (earlier report)
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
The asynchronous boundary must include work performed after a background query, not just the initial query. The earlier Receive requirements explicitly identified completion callbacks that persisted payment observations or queried transaction details on the GUI thread. They distinguished Qt image capture, which must remain on its required thread, from encoding and file writing that should run in background work.
This explains the affected behavior across payment reconciliation, QR saves and snapshot application: an asynchronous entry point alone does not establish a nonblocking GUI path. The historical objective was for GUI completions to apply results, while backend queries, persistence and file work remained outside that path.
Explicit terminal task outcomes arose from a lifecycle constraint: a live model must be able to leave its pending state even when submission is rejected or shutdown intervenes. Issue #1054 described the older executor as 'run this closure, maybe call me back' and separately identified request identity, cancellation, resource lifetime and missed one-time drain signals. The subsequent #1109 proposal retained worker-side cleanup and shutdown draining while adding outcomes and replayable drain observation.
These are the historical reasons behind the included executor changes and migration to submitTask(). The head contract distinguishes cancellation delivery from eventual worker cleanup, and makes completion observation independent of the executor object's lifetime.
Wallet identity was deliberately made structural rather than dependent on every popup remembering a selection guard. PR #1049 proposed one persistent view per wallet because selection changes could otherwise redirect backups, drafts, exports or signing to another wallet. It explicitly accepted additional memory consumption to preserve per-wallet navigation and drafts. Later Receive requirements distinguished completing a change in its original wallet from presenting that completion in a newer dialog or draft.
The asynchronous work operates within an existing architecture where hidden wallet views remain alive. A fixed wallet prevents selection from changing an operation's target, but does not identify which dialog opening or draft should receive a delayed result. This explains the separate wallet, opening and presentation checks affected here.
Temporary unlocking has an operation-scoped security contract: preserve the wallet's original lock state and prevent another operation from interfering with the unlock/relock interval. The earlier address-and-signature requirements stated this explicitly, alongside keeping results from overwriting changed or cleared drafts.
The base message-signing implementation performs unlock, signing and guarded relock synchronously. Moving signing and address preparation onto workers introduces overlap with other operations. The head's shared unlock session and captured signing inputs address a historically stated authorization and lock-state constraint, not merely a performance concern.
Current payment status and historical address exposure serve different purposes. Issue #1042 documented a replacement paying elsewhere that reduced the received amount to zero while a permanent observed-payment flag kept the request marked as paid. It explicitly separated correcting the displayed status from retaining sharing and reuse restrictions. Earlier Core history also removed creating requests with reused addresses: request history already served the invoice-resending use case, while the removed UI warned of security and privacy issues.
This explains why the affected badge follows current received value while the backend retains observed-payment history and refuses certain address reuse. A payment ceasing to count does not erase the fact that its receiving address was previously exposed.
Successful image loading or file creation is not equivalent to producing a usable payment QR code. The earlier Receive discussion documented oversized requests producing a transparent fallback image that QML considered ready, allowing a blank PNG export without an error.
This supplies the historical reason for distinguishing QR encodability from request-text availability and image readiness. The affected QR behavior concerns a recoverable representation limit, rather than failure of the saved payment request itself.
Ralph's inferences
Notifications alone cannot keep every relevant cached wallet property fresh under the pinned backend contract. In the inspected Core implementation, coin locking changes in-memory state and may perform a database write without emitting a wallet notification; a failed persistent write can occur after the in-memory change.
This explains the head's periodic comparison of locked coins and its reconciliation read after a lock command. It also explains why command success and the subsequently displayed state are distinct pieces of information.
Discarding an obsolete query result and undoing an already-running command are different operations. The head executor skips queued work when cancelled but does not interrupt running work; discarding a running result is an explicit policy. Receive execution also preserves a successful save's result and identifier if the following refresh fails.
Together these contracts reflect a side-effect boundary: a stale screen or failed refresh cannot be treated as evidence that persistence never happened. This distinction matters to repeated actions, shutdown and retry behavior without implying that cancellation reverses a wallet write.
Unresolved disagreements
The inspected upstream history does not establish a single agreed migration strategy for synchronous GUI code. Issue #10504 contrasted continuation-style asynchronous handlers with nested event loops that preserve existing control flow. Promag argued nested loops were pointless here; Ryan Ofsky defended their retrofit value while generally preferring asynchronous requests; Wladimir van der Laan warned about unexpected lifetime hazards. No resolution is shown in the inspected record.
The current work uses queued completions and owned results. The historical debate explains the tradeoff between retaining synchronous control flow and accepting explicit continuation/lifetime machinery, but does not prove either approach correct for the current Qt application.