diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-08 23:34:49 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-08 23:34:49 +0300 |
| commit | f3aed5203b309f1d452a5dc3f05c1ecba8e1134b (patch) | |
| tree | de728a26f8432be840a1fa3a5c280ad86f80953d | |
| parent | 75c483ec6443f731cc6f2149c4738547eb602c6f (diff) | |
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.
| -rw-r--r-- | internal/tui/tui.go | 7 |
1 files changed, 7 insertions, 0 deletions
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 } |
