Wallet backup: add async progress, success state, and destination handling #625

Open
opened 2026-05-06 08:55:32 +00:00 by johnny9 · 1 comment
johnny9 commented 2026-05-06 08:55:32 +00:00 (Migrated from github.com)

Code Gap

The wallet settings backup action calls the model backup method synchronously and only reports failure. On success the UI clears the error text, but it does not confirm the backup, show the destination, or offer a reliable way to open the saved location.

Work Needed

  • Move wallet backup work off the QML/UI thread or otherwise add a non-blocking busy state.
  • Disable duplicate backup submissions while a backup is in progress.
  • Show a success state with the destination path after backup completes.
  • Provide release-scoped open-file or open-folder behavior for the saved backup.
  • Surface failures from both backup creation and open-location handling.
  • Add coverage for success, failure, cancel, duplicate submit, and open-location failure.
<!-- migrated-from: https://github.com/johnny9/BitcoinCoreAppDevelopment/issues/83 --> ## Code Gap The wallet settings backup action calls the model backup method synchronously and only reports failure. On success the UI clears the error text, but it does not confirm the backup, show the destination, or offer a reliable way to open the saved location. ## Work Needed - Move wallet backup work off the QML/UI thread or otherwise add a non-blocking busy state. - Disable duplicate backup submissions while a backup is in progress. - Show a success state with the destination path after backup completes. - Provide release-scoped open-file or open-folder behavior for the saved backup. - Surface failures from both backup creation and open-location handling. - Add coverage for success, failure, cancel, duplicate submit, and open-location failure.
jarolrod commented 2026-11-13 14:42:01 +00:00 (Migrated from github.com)

The failure report is not visible at the default window size either, so today a failed backup and a successful one look the same.

For a wallet with private keys in the default 800x665 window, "The wallet could not be backed up." is in the last row of Wallet settings, below the visible part of the page. The page does not scroll to it and there is no popup.

To reproduce:

  1. Fresh profile, default window. Open Settings → Wallet settings and do not scroll.
  2. Choose Back up wallet with a destination Core refuses: a folder that is not writable, or the name of an existing file that is not an SQLite database, such as a backup of a legacy wallet.

Nothing on the page changes. No file is written, or the existing file is left byte-identical, and debug.log has "Unable to continue sqlite backup: file is not a database". In a 1180x900 window the same click shows the red line under Sign or verify message.

At efc4a2c754eb the row sits at y 652 to 714 while the page shows y 98 to 665, and the red text is at y 678 to 688, so a window about 25 px taller shows it (at 2bd5a61e8304: y 670 to 732 against 116 to 665). It is the last child of the page:

github.com/bitcoin-core/gui-qml@efc4a2c754/qml/pages/settings/WalletSectionPage.qml (L209-L213)

The refusal is Core's: backupwallet fails on the same paths with "Error: Wallet backup failed!". Bitcoin-Qt reports both outcomes in a message box.

The same row also keeps an old error. After a wrong current password on Update password and Back, "The current wallet password was incorrect." stays in it until the password page is opened again or a backup is started.

#1057 at fc657610b860 moves the failure text into a popup, by its diff. Its success banner is added as the last child of the same page, so at this window size it would land where the error is now.

Reproduced on qt6 at 2bd5a61e8304 and eed1f426fcb6, macOS arm64 / Qt 6.9.0, isolated regtest, offscreen and native. Limits:

  • The destination went through the test path field, not the Save panel, so I did not answer the panel's Replace question. By the source the panel only returns a path.
  • I did not scroll the page. The row's position comes from its geometry and from screenshots at larger window sizes.
  • A watch-only wallet has one row fewer, which by arithmetic puts the text inside the window. I did not run that.
The failure report is not visible at the default window size either, so today a failed backup and a successful one look the same. For a wallet with private keys in the default 800x665 window, "The wallet could not be backed up." is in the last row of Wallet settings, below the visible part of the page. The page does not scroll to it and there is no popup. To reproduce: 1. Fresh profile, default window. Open **Settings → Wallet settings** and do not scroll. 2. Choose **Back up wallet** with a destination Core refuses: a folder that is not writable, or the name of an existing file that is not an SQLite database, such as a backup of a legacy wallet. Nothing on the page changes. No file is written, or the existing file is left byte-identical, and `debug.log` has "Unable to continue sqlite backup: file is not a database". In a 1180x900 window the same click shows the red line under **Sign or verify message**. At `efc4a2c754eb` the row sits at y 652 to 714 while the page shows y 98 to 665, and the red text is at y 678 to 688, so a window about 25 px taller shows it (at `2bd5a61e8304`: y 670 to 732 against 116 to 665). It is the last child of the page: https://github.com/bitcoin-core/gui-qml/blob/efc4a2c754eb74b1d370e4bf2313ed8d22988a36/qml/pages/settings/WalletSectionPage.qml#L209-L213 The refusal is Core's: `backupwallet` fails on the same paths with "Error: Wallet backup failed!". Bitcoin-Qt reports both outcomes in a message box. The same row also keeps an old error. After a wrong current password on **Update password** and Back, "The current wallet password was incorrect." stays in it until the password page is opened again or a backup is started. #1057 at `fc657610b860` moves the failure text into a popup, by its diff. Its success banner is added as the last child of the same page, so at this window size it would land where the error is now. Reproduced on `qt6` at `2bd5a61e8304` and `eed1f426fcb6`, macOS arm64 / Qt 6.9.0, isolated regtest, offscreen and native. Limits: - The destination went through the test path field, not the Save panel, so I did not answer the panel's Replace question. By the source the panel only returns a path. - I did not scroll the page. The row's position comes from its geometry and from screenshots at larger window sizes. - A watch-only wallet has one row fewer, which by arithmetic puts the text inside the window. I did not run that.
Sign in to join this conversation.
No description provided.