From 0fe12d65df9fc315b117771b56afd188f914031d Mon Sep 17 00:00:00 2001 From: DanS Date: Wed, 17 Jun 2026 07:48:53 -0500 Subject: [PATCH] fix(ui): drop duplicate daemon log on the startup overlay renderLoadingOverlay() rendered the daemon's recent output twice during startup: a bare 4-line centered tail (section 2c, init/warmup only) and the styled terminal-style box (section 4, always shown when the embedded daemon exists). The bare tail was a strict subset of the box, so the same dragonxd output showed stacked twice. Remove the redundant bare tail; keep the terminal box (which also matches the shutdown screen's panel). Co-Authored-By: Claude Opus 4.8 --- src/app.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index a2c88b5..9a93cdf 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -3542,41 +3542,6 @@ void App::renderLoadingOverlay(float contentH) curY += ts.y + gap; } - // ------------------------------------------------------------------- - // 2c. Live daemon console tail (init/warmup only) — show the last few lines the node - // printed so the user can watch real progress (UpdateTip height=…, Verifying blocks…) - // without leaving the blocked overlay. Full-node only (lite has no daemon_controller_). - // ------------------------------------------------------------------- - if ((state_.daemon_initializing || state_.warming_up) && daemon_controller_) { - const auto lines = daemon_controller_->recentLines(4); - if (!lines.empty()) { - ImFont* logFont = Type().caption(); - if (!logFont) logFont = ImGui::GetFont(); - const float blockW = std::min(ws.x * 0.8f, 560.0f); - const ImU32 logCol = IM_COL32(140, 150, 165, 150); - curY += gap * 0.5f; - for (const auto& raw : lines) { - // Trim trailing CR/whitespace; skip blanks. - std::string line = raw; - while (!line.empty() && (line.back() == '\r' || line.back() == '\n' || - line.back() == ' ' || line.back() == '\t')) - line.pop_back(); - if (line.empty()) continue; - // Truncate (with an ellipsis) to keep each line on one row within blockW. - if (logFont->CalcTextSizeA(logFont->LegacySize, FLT_MAX, 0.0f, line.c_str()).x > blockW) { - while (line.size() > 1 && - logFont->CalcTextSizeA(logFont->LegacySize, FLT_MAX, 0.0f, (line + "…").c_str()).x > blockW) - line.pop_back(); - line += "…"; - } - dl->AddText(logFont, logFont->LegacySize, - ImVec2(wp.x + cx - blockW * 0.5f, curY), logCol, line.c_str()); - curY += logFont->LegacySize + 2.0f; - } - curY += gap; - } - } - // ------------------------------------------------------------------- // 3. Sync progress bar (if connected and syncing) // -------------------------------------------------------------------