feat(diagnostics): persistent alert history with a status-bar bell (Foundation QoL)
Toasts fade in 1-4s, so anything that scrolled past was gone. Notifications now retains every pushed alert in a capped (100) ring buffer with a wall-clock epoch (AlertRecord) — separate from the 5-item live-toast deque — plus a monotonic total_pushed_ counter. A bell in the status-bar right cluster opens an upward popup listing recent alerts newest-first: severity icon + colour (reusing the toast palette), the message, and a relative age (formatTimeAgoShort), with a Clear-all action. An unread dot on the bell, coloured by the most-severe unseen alert, marks alerts that arrived since the panel was last opened — driven by totalPushed() deltas so it survives capping/clearing. Thread note: every push is on the UI thread (RPC results run as main-thread MainCb callbacks), matching this class's existing lock-free model; documented as a no-raw-worker-thread invariant. New i18n keys (alerts_*). Build-clean; ctest 1/1 (adds testNotificationHistory: retention, order, cap, monotonic counter, clear). Closes the QoL bundle and the Foundation tier. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1320,6 +1320,11 @@ void I18n::loadBuiltinEnglish()
|
||||
strings_["data_stale_tooltip"] =
|
||||
"Balance may be out of date — the wallet hasn't received a fresh update recently. "
|
||||
"Check your node connection.";
|
||||
// Persistent alert-history panel (status-bar bell).
|
||||
strings_["alerts_history_tooltip"] = "Recent alerts";
|
||||
strings_["alerts_recent"] = "RECENT ALERTS";
|
||||
strings_["alerts_none"] = "No alerts yet";
|
||||
strings_["alerts_clear"] = "Clear alert history";
|
||||
strings_["daemon_port_busy_warn"] =
|
||||
"Port " DRAGONX_DEFAULT_RPC_PORT " is in use but isn't responding as a DragonX node. "
|
||||
"Close the program using it (or free the port), then restart — the wallet can't start "
|
||||
|
||||
Reference in New Issue
Block a user