From 43809e507635596b74dc09c0319f30e676abf037 Mon Sep 17 00:00:00 2001 From: mixeme Date: Thu, 25 Jun 2026 07:34:19 +0300 Subject: [PATCH] fix(ui): refresh activity panel when switching selected job The "Selected job activity" list kept showing the previous job's entries when a different job was selected. dp.update() reassigned the backing slice but never refreshed the widget.List, and only the refreshView path appended an explicit refresh. Move d.logs.Refresh() into update()/clear() so every caller redraws the panel. Co-Authored-By: Claude Opus 4.8 --- src/ui/jobs_view_details.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/jobs_view_details.go b/src/ui/jobs_view_details.go index 407c126..3b0567b 100644 --- a/src/ui/jobs_view_details.go +++ b/src/ui/jobs_view_details.go @@ -87,6 +87,10 @@ func (d *detailsPanel) update(j job, rt *domain.JobRuntime, globalOverlapPolicy d.stats.SetText(app.DisplayStats(rt)) d.commandOutput.SetText(rt.Output) d.selectedLogs = lastJobLogs(rt.Logs) + // The activity list renders d.selectedLogs but, unlike the labels above whose + // SetText refreshes them, only its backing slice changed. Refresh it here so + // switching jobs immediately redraws the panel instead of keeping stale rows. + d.logs.Refresh() } func (d *detailsPanel) clear() { @@ -103,6 +107,7 @@ func (d *detailsPanel) clear() { d.stats.SetText("") d.commandOutput.SetText("") d.selectedLogs = nil + d.logs.Refresh() } // container assembles the details pane layout: metadata rows pin to the top,