feat(lite): Console tab with connection + open/create diagnostics
The lite variant had no visibility into why a wallet failed to open — just a "disconnected" spinner. Add a lite-only Console tab (full-node keeps its RPC console) that shows a live diagnostic log. - LiteDiagnostics: a small thread-safe, bounded ring buffer (header-only). The controller writes to it from its background threads: each failover server attempt and result, wallet open/create/restore outcomes, sync start, and blocked-open reasons. The App logs controller (re)builds with the preferred server. - lite_console_tab: a terminal-styled, read-only view of the log (newest at the bottom, error/success lines coloured) with Clear / Copy / Auto-scroll. Reachable even when the wallet is locked (it's diagnostics, no secrets). Registered as NavPage::LiteConsole, gated lite-only via WalletUiSurface::LiteConsole. A unit test drives an open-with-failover and asserts the log records the connection attempt and the successful open. Built clean for full-node, lite, and Windows cross-compile. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,8 @@ enum class WalletUiSurface {
|
||||
BootstrapDownload,
|
||||
SetupWizard,
|
||||
NodeSettings,
|
||||
LiteNetwork // lite-wallet-only server browser (replaces Peers in lite builds)
|
||||
LiteNetwork, // lite-wallet-only server browser (replaces Peers in lite builds)
|
||||
LiteConsole // lite-wallet-only diagnostics console (full-node uses the RPC Console)
|
||||
};
|
||||
|
||||
struct WalletCapabilities {
|
||||
@@ -155,6 +156,7 @@ constexpr bool isUiSurfaceAvailable(const WalletCapabilities& capabilities,
|
||||
case WalletUiSurface::Explorer:
|
||||
return capabilities.fullNodePagesAvailable;
|
||||
case WalletUiSurface::LiteNetwork:
|
||||
case WalletUiSurface::LiteConsole:
|
||||
return !capabilities.fullNodePagesAvailable; // lite builds only
|
||||
case WalletUiSurface::BootstrapDownload:
|
||||
case WalletUiSurface::SetupWizard:
|
||||
|
||||
Reference in New Issue
Block a user