feat(ux): robust sync ETA, persist Explorer settings, gate export-all out of lite

- Sync ETA: a new pure util::SyncRateEstimator (App-owned) replaces the
  function-local statics that went stale after a rescan/restart (producing the
  "412h" ETA). It self-resets on a height drop and on connect/disconnect/rescan/
  restart (via an atomic flag, since onConnected can run off-thread), formats
  with days, and uses the Warning() token.
- Settings: the Explorer-tab URL fields + custom-fees/fetch-prices checkboxes
  now persist on edit — they were the only controls still relying on the
  About-only Save button that a user on this tab never sees.
- Export-all-keys: hidden in the lite build (which has its own key export),
  instead of dead-ending on "Not connected to the daemon".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-18 13:02:46 -05:00
co-authored by Claude Opus 4.8
parent 8fe20f6385
commit f3f0b32a48
5 changed files with 99 additions and 42 deletions
+5
View File
@@ -42,6 +42,7 @@
#include "resources/provision_state.h"
#include "util/background_sampler.h"
#include "util/coalescing_writer.h"
#include "util/sync_eta.h"
#include "util/fetch_backoff.h"
#include "util/idle_tracker.h"
#include "util/pool_stats_service.h"
@@ -1752,6 +1753,10 @@ private:
std::atomic<bool> mining_toggle_in_progress_{false};
// Mining error state (main-thread only — every writer is in a MainCb or render).
std::string mining_last_error_;
// Sync-ETA estimator (UI thread only). onConnected/onDisconnected may run off-thread, so they set
// the atomic flag and the status bar consumes it before update().
util::SyncRateEstimator sync_eta_;
std::atomic<bool> sync_eta_reset_pending_{false};
bool mining_error_av_ = false;
void setMiningError(std::string msg, bool av = false) { mining_last_error_ = std::move(msg); mining_error_av_ = av; }