summaryrefslogtreecommitdiff
path: root/internal/tui/dashboard/model.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-06 18:33:44 +0200
committerPaul Buetow <paul@buetow.org>2026-03-06 18:33:44 +0200
commita76e81adca48fea5df4a16382ec7e7b0ab461e7f (patch)
tree633e239adddceb7ef1ca5fc3c1301fe4e1206716 /internal/tui/dashboard/model.go
parentb3bbf184dcdff908abbd4413c77e1455b24de0c9 (diff)
feat(tui): add files icicle visualization mode (task 383)
Diffstat (limited to 'internal/tui/dashboard/model.go')
-rw-r--r--internal/tui/dashboard/model.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/tui/dashboard/model.go b/internal/tui/dashboard/model.go
index c0bcc11..08272b9 100644
--- a/internal/tui/dashboard/model.go
+++ b/internal/tui/dashboard/model.go
@@ -47,6 +47,7 @@ const (
tabVizModeTable tabVizMode = iota
tabVizModeBubbles
tabVizModeTreemap
+ tabVizModeIcicle
)
// Model is the dashboard tab framework model.
@@ -284,7 +285,7 @@ func (m Model) handleKey(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) {
case key.Matches(msg, m.keys.DirGroup):
if m.activeTab == TabFiles {
m.filesDirGrouped = !m.filesDirGrouped
- if !m.filesDirGrouped && m.filesVizMode == tabVizModeBubbles {
+ if !m.filesDirGrouped && m.filesVizMode != tabVizModeTable {
m.filesVizMode = tabVizModeTable
}
if m.bubbleEnabledForTab(m.activeTab) && m.refreshBubbleData() {
@@ -522,6 +523,9 @@ func (m Model) renderActiveContent(width, activeHeight int, streamModel *eventst
if m.activeTab == TabSyscalls && m.syscallsVizMode == tabVizModeTreemap {
return renderSyscallsTreemap(m.latest, width, activeHeight, m.syscallsChart.Metric(), m.syscallsTreemapSelection, m.isDark)
}
+ if m.activeTab == TabFiles && m.filesVizMode == tabVizModeIcicle && m.filesDirGrouped {
+ return renderFilesIcicle(m.latest, width, activeHeight, m.filesChart.Metric(), m.filesDirOffset, m.isDark)
+ }
if m.bubbleEnabledForTab(m.activeTab) {
switch m.activeTab {
case TabSyscalls:
@@ -726,7 +730,7 @@ func (m Model) allowedVizModes(tab Tab) []tabVizMode {
return []tabVizMode{tabVizModeTable, tabVizModeBubbles}
case TabFiles:
if m.filesDirGrouped {
- return []tabVizMode{tabVizModeTable, tabVizModeBubbles}
+ return []tabVizMode{tabVizModeTable, tabVizModeBubbles, tabVizModeIcicle}
}
return []tabVizMode{tabVizModeTable}
default: