From 8290e96ec427d648dbbfec290e15a3867c5daf8c Mon Sep 17 00:00:00 2001 From: DanS Date: Tue, 14 Jul 2026 13:29:02 -0500 Subject: [PATCH] test(sweep): add modal-pin-setup/-change/-remove capture surfaces Register the three redesigned PIN dialogs as sweep surfaces for visual review. Each setup only sets the show flag (never fires the async vault store/verify); the teardown clears the status and zeroes the PIN/passphrase buffers. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app_sweep.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/app_sweep.cpp b/src/app_sweep.cpp index 490e0fd..ae211b6 100644 --- a/src/app_sweep.cpp +++ b/src/app_sweep.cpp @@ -302,6 +302,29 @@ void App::buildSweepCatalog() a.show_decrypt_dialog_ = false; a.wallet_security_workflow_.reset(); memset(a.decrypt_pass_buf_, 0, sizeof(a.decrypt_pass_buf_)); }); + // PIN setup / change / remove dialogs (never fire the async vault store/verify). + add("modal-pin-setup", ui::NavPage::Settings, + [](App& a) { a.show_pin_setup_ = true; }, + [](App& a) { + a.show_pin_setup_ = false; a.pin_status_.clear(); + memset(a.pin_passphrase_buf_, 0, sizeof(a.pin_passphrase_buf_)); + memset(a.pin_buf_, 0, sizeof(a.pin_buf_)); + memset(a.pin_confirm_buf_, 0, sizeof(a.pin_confirm_buf_)); + }); + add("modal-pin-change", ui::NavPage::Settings, + [](App& a) { a.show_pin_change_ = true; }, + [](App& a) { + a.show_pin_change_ = false; a.pin_status_.clear(); + memset(a.pin_old_buf_, 0, sizeof(a.pin_old_buf_)); + memset(a.pin_buf_, 0, sizeof(a.pin_buf_)); + memset(a.pin_confirm_buf_, 0, sizeof(a.pin_confirm_buf_)); + }); + add("modal-pin-remove", ui::NavPage::Settings, + [](App& a) { a.show_pin_remove_ = true; }, + [](App& a) { + a.show_pin_remove_ = false; a.pin_status_.clear(); + memset(a.pin_old_buf_, 0, sizeof(a.pin_old_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,