From f3aed5203b309f1d452a5dc3f05c1ecba8e1134b Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 8 May 2026 23:34:49 +0300 Subject: reconnect flamegraph live trie after in-place filter swap PrepareForTraceRestart was designed for the full-restart path, where the dashboard's live-trie reference is rebound when TracingStartedMsg fires. The in-place filter swap skips that message, leaving the flamegraph tab stuck on 'Flame: waiting for data...' until the next real trace restart. Re-bind via SetLiveTrie immediately after PrepareForTraceRestart in both applyGlobalFilter and undoGlobalFilter. --- internal/tui/tui.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 42441a1..a0a033b 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -949,6 +949,12 @@ func (m Model) applyGlobalFilter(filter globalfilter.Filter, action string) (tea // the multi-second 'Attaching tracepoints' overlay on filter changes. if m.runtime.applyLiveFilter(nextFilter) { m.dashboard.PrepareForTraceRestart() + // PrepareForTraceRestart nils the dashboard's live-trie reference + // because the full-restart path expects TracingStartedMsg to + // rebind it. We skip that message on in-place swaps, so reconnect + // the flamegraph to the still-running trace's live trie here. + // Without this the Flame tab gets stuck on 'waiting for data...'. + m.dashboard.SetLiveTrie(m.runtime.liveTrie()) m.lastErr = nil return m, nil } @@ -981,6 +987,7 @@ func (m Model) undoGlobalFilter() (tea.Model, tea.Cmd) { // Same in-place swap path as applyGlobalFilter — see comment there. if m.runtime.applyLiveFilter(prev) { m.dashboard.PrepareForTraceRestart() + m.dashboard.SetLiveTrie(m.runtime.liveTrie()) m.lastErr = nil return m, nil } -- cgit v1.2.3