1 minor finding · 1 suggestion
Findings
[minor] · The import banner can clear another wallet load's busy flag
Opening an imported wallet through the persistent success banner while another wallet loads clears walletLoadInProgress, re-enabling commands that then queue behind the pending load.
Location: qml/pages/MainWindow.qml:522 (head).
Details and suggested fix
Leave wallet A selected when importing B, keep B's success banner, and start loading a closed wallet C. Pressing Open on the banner calls DesktopWallets.openWallet(B), then setSelectedWallet(B.name). Its already-open-wallet branch calls clearWalletLoadStatus(), which unconditionally clears walletLoadInProgress although C is still loading. The selector and walletWorkerBusy() guards now report an idle worker, allowing further loads, imports or creates to queue behind C. The reset predates this PR; the persistent banner introduces this unguarded route to it. No recorded interaction demonstrates how often the sequence occurs in practice. Disable the banner's Open action while walletLoadInProgress is true, or keep generic status resets from clearing an outstanding load's flag.
Optional improvements
[suggestion] · New import strings lack translator context
The new import messages and short action labels omit the repository's required //: comments, leaving translators without explanations of %1 and what Open or Details does.
Location: qml/pages/MainWindow.qml:460 (head).
Details and suggested fix
doc/translator-comments.md requires comments describing where a string appears, what it means and what its action does. Add that context to the new quit confirmation, result banners, import-progress text and migration-refusal message. In particular, explain that %1 is a wallet name, Open selects the imported wallet, and Details opens the import error page. The policy permits explicitly deferring these comments to a follow-up, but the supplied PR description does not do so.
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
Wallet restoration was introduced to replace unintuitive manual wallet-file manipulation, and its GUI exposure was explicitly motivated by making backup recovery accessible to non-technical users.
The affected QML action calls restoreWallet(), rather than merely opening the selected external file. Historical restore behavior imports a backup into the managed wallet directory and loads it. This explains why the workflow includes naming, loading, possible rescanning and recoverable errors rather than acting like a simple file picker.
Source 1 · Source 2 · Source 3
Earlier GUI discussions distinguished temporary unavailability of operations on a busy wallet from freezing the application: moving work off the GUI thread was favored so other wallets and node operations could remain available.
This is directly relevant to separating import activity from the global load-busy state. The base already runs restoration on a worker, but its shared flag also restricts UI behavior. The head distinguishes selecting an already-open wallet from submitting another load or create operation to the occupied wallet-command worker. Issue #840 independently records the user expectation that the application remain usable during a minutes-long import rescan.
Source 1 · Source 2 · Source 3
Sharing restoration between RPC and GUI was an explicit architectural goal, and failed restoration was deliberately made to remove the invalid restored wallet directory.
The pinned Core implementation copies the backup, calls LoadWallet(), and removes the copied database if loading fails, also removing a parent directory it created. Consequently, a wallet-directory entry observed while import is running is not necessarily a durable successful import. This explains the relationship between import-result state, recoverable failure details and refreshing the selector's disk-derived rows.
Historical GUI work treated notification subscription and initial data loading as an ordering problem: notifications were queued until initial transaction retrieval and rescan completed, both to avoid missed updates and to enable background loading.
The affected integration has two completion-related paths: Core's loaded-wallet notification and the restore command's eventual result. At the dependency pin, NotifyWalletLoaded() runs before LoadWalletInternal() and restoreWallet() return. The history explains why receiving a backend notification and declaring a GUI operation finished are separate concerns; it does not establish that the historical Widgets implementation and this QML implementation have identical timing.
The preceding QML startup/shutdown work explicitly sought to keep event processing available while stopping query producers and draining accepted backend work before releasing Core.
Closing the import dialog cannot be equated with destroying its worker or releasing Core. The inspected BackendExecutor retains accepted work, guards GUI receivers and supports asynchronous draining. The import's lifetime therefore belongs to application/controller shutdown coordination rather than solely to the modal's lifetime.
Ralph's inferences
The quit warning reflects a distinction between hiding progress and cancelling the underlying restoration, not merely a preference for an extra confirmation dialog.
At the exact Core pin, scanning checks shutdownRequested(), shutdown produces USER_ABORT, wallet initialization rejects an unsuccessful scan, and RestoreWallet() cleans up a failed restored copy. Combined with the historical failed-restore cleanup policy, this explains why dismissing a progress modal can preserve useful work while application shutdown can require importing again. No inspected historical source specifically prescribes this confirmation's wording or presentation.
Preserving the user's active wallet and delivering a background result without forced navigation follows naturally from the historical goal of allowing unrelated wallet work to continue.
Once existing wallets remain usable during import, the import result may arrive while the user is working elsewhere. The head's explicit completed-wallet reference, separate import-error storage and user-invoked Open action separate the identity of the background operation from current selection. This is an inference from the responsiveness goal, not a documented historical mandate for banners or a conclusion about present correctness.