From 0c60368280e906fe8ca2ea8eaf400c2497085c33 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 08:50:20 -0400 Subject: [PATCH] Build 11: node card tells 'can't reach node' apart from syncing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A flaky external node read as 'Syncing…' forever — the card now goes red with 'Can't reach node' on wallet sync errors (wallet.sync_error()) and recovers on the next good cycle. Validated against a dead node and back on a live one. Co-Authored-By: Claude Fable 5 --- src/gui/views/goblin/mod.rs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/gui/views/goblin/mod.rs b/src/gui/views/goblin/mod.rs index 954d61e..3b944a8 100644 --- a/src/gui/views/goblin/mod.rs +++ b/src/gui/views/goblin/mod.rs @@ -525,7 +525,10 @@ impl GoblinWalletView { .get_data() .map(|d| d.info.last_confirmed_height) .unwrap_or(0); - let synced = height > 0 && !wallet.syncing(); + // Distinguish "scanning" from "can't reach the node": a flaky + // external node otherwise reads as syncing forever. + let error = wallet.sync_error(); + let synced = height > 0 && !wallet.syncing() && !error; w::card(ui, |ui| { ui.set_min_width(ui.available_width()); ui.horizontal(|ui| { @@ -533,14 +536,26 @@ impl GoblinWalletView { ui.painter().circle_filled( dot.center(), 4.0, - if synced { t.pos } else { t.accent }, + if error { + t.neg + } else if synced { + t.pos + } else { + t.accent + }, ); ui.add_space(8.0); ui.vertical(|ui| { ui.label( - RichText::new(if synced { "Node synced" } else { "Syncing…" }) - .font(FontId::new(14.0, fonts::semibold())) - .color(t.surface_text), + RichText::new(if error { + "Can't reach node" + } else if synced { + "Node synced" + } else { + "Syncing…" + }) + .font(FontId::new(14.0, fonts::semibold())) + .color(t.surface_text), ); // Single line: wrapping strands the "·" separator at the // end of the first line in the narrow sidebar card.