diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-05 22:31:23 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-05 22:31:23 +0200 |
| commit | c432bae0f3afaa05766ca8fcb1a3916f67d747a1 (patch) | |
| tree | 5b61c01773a56dea1290f45845fb52bfdee66422 /internal/tui/flamegraph/model.go | |
| parent | 63b9ad7c7692b3bedb4d0051c080946e38e058f9 (diff) | |
task 356: implement flamegraph terminal view renderer
Diffstat (limited to 'internal/tui/flamegraph/model.go')
| -rw-r--r-- | internal/tui/flamegraph/model.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/tui/flamegraph/model.go b/internal/tui/flamegraph/model.go index 637ba11..765e784 100644 --- a/internal/tui/flamegraph/model.go +++ b/internal/tui/flamegraph/model.go @@ -90,11 +90,10 @@ func (m Model) Update(tea.Msg) (tea.Model, tea.Cmd) { // View renders the flamegraph viewport. func (m Model) View() tea.View { - content := "Flame: waiting for data..." - if m.snapshot != nil { - content = fmt.Sprintf("Flame: live snapshot v%d", m.lastVersion) + content := RenderTerminalView(m.frames, m.width, m.height, m.selectedIdx) + if m.snapshot != nil && len(m.frames) == 0 { + content = common.PanelStyle.Render(fmt.Sprintf("Flame: snapshot v%d has no visible frames", m.lastVersion)) } - content = common.PanelStyle.Render(content) return tea.NewView(content) } |
