From 3d08ddfdbe26d259545e67f658bee462f4ad6f9c Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 13 Feb 2026 17:52:30 +0000 Subject: fix: show heading in expanded view by finishing after draw target switch The 'fetching updates...' heading was finished with finish_with_message while the draw target was still hidden, so indicatif never rendered it. Move the draw target switch before the heading insertion so the heading renders immediately when added. --- src/lib/client.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/client.rs b/src/lib/client.rs index 4acccb6..0c76fb1 100644 --- a/src/lib/client.rs +++ b/src/lib/client.rs @@ -474,8 +474,13 @@ impl Connect for Client { if let Some(spinner) = spinner_for_timer { spinner.finish_and_clear(); } + // Switch draw target to make bars visible + detail_multi_for_timer + .set_draw_target(ProgressDrawTarget::stderr()); // Add heading as a finished progress bar so it gets cleared - // along with the other bars by progress_reporter.clear() + // along with the other bars by progress_reporter.clear(). + // Must be inserted after the draw target switch so that + // finish_with_message renders it. let heading = detail_multi_for_timer.insert( 0, ProgressBar::new(0).with_style( @@ -483,9 +488,6 @@ impl Connect for Client { ), ); heading.finish_with_message("fetching updates..."); - // Switch draw target to make bars visible - detail_multi_for_timer - .set_draw_target(ProgressDrawTarget::stderr()); // Mark as revealed and flush all bars that finished while // the draw target was hidden. Hold the lock across the flag // update and drain so no bar can slip through unseen (see -- cgit v1.2.3