feat(wallet): explain notes + why to consolidate in the large-wallet nudge

The large-wallet notification just said "This wallet file is large" — users who
don't know what a shielded "note" is had no idea what to do or why. The nudge now
teaches: its message explains that each payment is stored as a separate note,
that notes pile up and enlarge/slow the wallet, and that consolidating merges
them while leaving the balance unchanged. The text wraps in full in the bell/
alert panel and the Settings wallet-size banner (and shows on hover from the
ellipsized toast), and the hover tooltip adds the detail plus points at the new
Auto-consolidate toggle.

When Auto-consolidate is ON the nudge no longer stays silent — it shows a calm
one-time info (wallet_size_auto_info) telling the user the background
consolidator is already handling it, so the accumulating notes never look like an
unexplained problem. When it's OFF, the educational warning keeps its
"Consolidate notes…" action that opens the dialog.

The Consolidate dialog's own intro (consolidate_desc) is likewise expanded from a
one-liner into a plain-language explanation of what notes are and why consolidate.

English source updated; the reworded existing keys keep their prior (valid, if
terser) translations and the new wallet_size_auto_info falls back to English
pending a translation pass. Build + tests + hygiene green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 13:27:36 -05:00
co-authored by Claude Opus 4.8
parent 64294d1518
commit 045289115d
2 changed files with 14 additions and 8 deletions
+6 -1
View File
@@ -6467,7 +6467,6 @@ void App::maybeWarnLargeWallet()
if (capture_mode_ || lite_wallet_) return; // no live nags during a UI sweep; lite has no wallet.dat if (capture_mode_ || lite_wallet_) return; // no live nags during a UI sweep; lite has no wallet.dat
if (window_background_) return; // when someone can see it if (window_background_) return; // when someone can see it
if (!supportsFullNodeLifecycleActions() || !settings_) return; if (!supportsFullNodeLifecycleActions() || !settings_) return;
if (settings_->getAutoConsolidate()) return; // the background consolidator handles bloat quietly
if (!state_.connected || !state_.encryption_state_known) return; if (!state_.connected || !state_.encryption_state_known) return;
if (state_.warming_up || state_.daemon_initializing || !state_.sync.isSynced()) return; if (state_.warming_up || state_.daemon_initializing || !state_.sync.isSynced()) return;
if (large_wallet_checked_) return; // stat wallet.dat at most once per launch if (large_wallet_checked_) return; // stat wallet.dat at most once per launch
@@ -6484,6 +6483,12 @@ void App::maybeWarnLargeWallet()
if (settings_->getLargeWalletWarned()) return; // already warned once for this bloat episode if (settings_->getLargeWalletWarned()) return; // already warned once for this bloat episode
settings_->setLargeWalletWarned(true); settings_->setLargeWalletWarned(true);
settings_->save(); settings_->save();
// The message itself explains what notes are and why consolidating helps (it wraps in full in the
// bell/alert panel and the Settings banner). With auto-consolidation on, reassure the user it's being
// handled in the background rather than nudging manual action; otherwise offer the Consolidate dialog.
if (settings_->getAutoConsolidate())
ui::Notifications::instance().info(TR("wallet_size_auto_info"), 12.0f);
else
ui::Notifications::instance().action( ui::Notifications::instance().action(
TR("wallet_size_warn"), ui::NotificationType::Warning, TR("wallet_size_warn"), ui::NotificationType::Warning,
[]() { ui::ShieldDialog::showConsolidate(); }, []() { ui::ShieldDialog::showConsolidate(); },
+4 -3
View File
@@ -874,8 +874,9 @@ void I18n::loadBuiltinEnglish()
strings_["wiz_pin_mismatch"] = "PINs do not match"; strings_["wiz_pin_mismatch"] = "PINs do not match";
strings_["settings_data_dir"] = "Data Dir"; strings_["settings_data_dir"] = "Data Dir";
strings_["settings_wallet_size_label"] = "Wallet Size"; strings_["settings_wallet_size_label"] = "Wallet Size";
strings_["wallet_size_warn"] = "This wallet file is large. Consolidating your notes can curb further growth."; strings_["wallet_size_warn"] = "Your wallet has built up a lot of notes. Each payment you receive is stored as a separate \"note\"; as they pile up they enlarge the wallet file and slow down syncing. Consolidating merges them into fewer notes to keep it small and fast \xE2\x80\x94 your balance stays exactly the same.";
strings_["tt_wallet_size_warn"] = "Shielded wallets grow with each note's witness data — merging many notes into one address reduces it. Back up first."; strings_["wallet_size_auto_info"] = "Your wallet has built up a lot of notes \xE2\x80\x94 separate pieces of received funds that enlarge the file and slow syncing. Auto-consolidation is quietly merging them in the background to keep it small and fast, so there's nothing you need to do.";
strings_["tt_wallet_size_warn"] = "Each payment arrives as a separate shielded note, and every note carries witness data that grows the wallet file and slows scans. Merging many notes into one per address shrinks it \xE2\x80\x94 your funds and balance are unchanged. Back up your seed first. You can also turn on Auto-consolidate in Settings to do this automatically in the background.";
strings_["wallet_size_consolidate"] = "Consolidate notes\xE2\x80\xA6"; strings_["wallet_size_consolidate"] = "Consolidate notes\xE2\x80\xA6";
strings_["settings_debug_changed"] = "Debug categories changed \xe2\x80\x94 restart daemon to apply"; strings_["settings_debug_changed"] = "Debug categories changed \xe2\x80\x94 restart daemon to apply";
strings_["settings_auto_detected"] = "Auto-detected from DRAGONX.conf"; strings_["settings_auto_detected"] = "Auto-detected from DRAGONX.conf";
@@ -2822,7 +2823,7 @@ void I18n::loadBuiltinEnglish()
strings_["merge_title"] = "Merge to Address"; strings_["merge_title"] = "Merge to Address";
// Consolidate-funds flow (rich merge modal + wallet-bloat preset). // Consolidate-funds flow (rich merge modal + wallet-bloat preset).
strings_["consolidate_title"] = "Consolidate funds"; strings_["consolidate_title"] = "Consolidate funds";
strings_["consolidate_desc"] = "Combine many small inputs into a single shielded note. Fewer notes means a smaller wallet file and better privacy."; strings_["consolidate_desc"] = "Each payment you receive is stored as a separate \"note\" \xE2\x80\x94 like an individual bill in a wallet. They pile up over time, and every note adds witness data that makes the wallet file larger and slower to sync. Consolidating combines many small notes into one per address: your balance doesn't change, but the wallet stays small, scans faster, and reveals less about your funds.";
strings_["consolidate_funds_btn"] = "Consolidate"; strings_["consolidate_funds_btn"] = "Consolidate";
strings_["merge_scope_loading"] = "Checking your inputs\xE2\x80\xA6"; strings_["merge_scope_loading"] = "Checking your inputs\xE2\x80\xA6";
strings_["merge_scope_fmt"] = "%d transparent + %d shielded inputs \xC2\xB7 ~%s DRGX spendable"; strings_["merge_scope_fmt"] = "%d transparent + %d shielded inputs \xC2\xB7 ~%s DRGX spendable";