From 5985f05fb2af6d552db7cf21e96307e08fb558d2 Mon Sep 17 00:00:00 2001 From: DanS Date: Tue, 14 Jul 2026 11:31:31 -0500 Subject: [PATCH] test(sweep): add modal-encrypt & modal-change-passphrase capture surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The redesigned settings-tab Encrypt Wallet and Change Passphrase dialogs had no sweep surfaces, so the full UI sweep only captured the first-run wizard-encrypt / wizard-pin variants — the settings modals were never rendered for visual review. Register modal-encrypt (redesigned passphrase-entry phase) and modal-change-passphrase, each with a defensive teardown that resets the phase and zeroes the passphrase buffers. Neither setup path fires the async encrypt/change. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app_sweep.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/app_sweep.cpp b/src/app_sweep.cpp index 092f485..e4cdf4e 100644 --- a/src/app_sweep.cpp +++ b/src/app_sweep.cpp @@ -277,6 +277,23 @@ void App::buildSweepCatalog() [](App& a) { ui::BootstrapDownloadDialog::show(&a); }, [](App&) { ui::BootstrapDownloadDialog::hide(); }); add("modal-backup", ui::NavPage::Overview, [](App& a) { a.show_backup_ = true; }, [](App& a) { a.show_backup_ = false; a.backup_status_.clear(); }); + // Encrypt-wallet dialog — the redesigned passphrase-entry phase (never fires the async encrypt). + add("modal-encrypt", ui::NavPage::Settings, + [](App& a) { a.encrypt_dialog_phase_ = EncryptDialogPhase::PassphraseEntry; a.show_encrypt_dialog_ = true; }, + [](App& a) { + a.show_encrypt_dialog_ = false; a.encrypt_dialog_phase_ = EncryptDialogPhase::PassphraseEntry; + a.encrypt_status_.clear(); + memset(a.encrypt_pass_buf_, 0, sizeof(a.encrypt_pass_buf_)); + memset(a.encrypt_confirm_buf_, 0, sizeof(a.encrypt_confirm_buf_)); + }); + add("modal-change-passphrase", ui::NavPage::Settings, + [](App& a) { a.show_change_passphrase_ = true; }, + [](App& a) { + a.show_change_passphrase_ = false; a.encrypt_status_.clear(); + memset(a.change_old_pass_buf_, 0, sizeof(a.change_old_pass_buf_)); + memset(a.change_new_pass_buf_, 0, sizeof(a.change_new_pass_buf_)); + memset(a.change_confirm_buf_, 0, sizeof(a.change_confirm_buf_)); + }); add("modal-about", ui::NavPage::Overview, [](App& a) { a.show_about_ = true; }, [](App& a) { a.show_about_ = false; }); add("modal-settings", ui::NavPage::Settings,