summaryrefslogtreecommitdiff
path: root/internal/tui/dashboard/model_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-26 09:47:28 +0200
committerPaul Buetow <paul@buetow.org>2026-02-26 09:47:28 +0200
commit81ffb947201690088ef25a1839a8993bbfc27f03 (patch)
tree948400add2b7df214c1587f04fe4ec9bd51c439a /internal/tui/dashboard/model_test.go
parentad4d7fca20d80f71ccabef3281e3f80081f4db62 (diff)
tui: fix responsive layout and stream viewport chrome
Diffstat (limited to 'internal/tui/dashboard/model_test.go')
-rw-r--r--internal/tui/dashboard/model_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/tui/dashboard/model_test.go b/internal/tui/dashboard/model_test.go
index 1e54b27..6baa62c 100644
--- a/internal/tui/dashboard/model_test.go
+++ b/internal/tui/dashboard/model_test.go
@@ -390,3 +390,25 @@ func TestRenderActiveTabUsesDirectoryFilesViewWhenGrouped(t *testing.T) {
t.Fatalf("expected grouped directory files view header, got %q", out)
}
}
+
+func TestStreamTabViewKeepsTabAndHelpChromeVisible(t *testing.T) {
+ rb := eventstream.NewRingBuffer()
+ for i := 0; i < 200; i++ {
+ rb.Push(eventstream.StreamEvent{Syscall: "read"})
+ }
+
+ m := NewModelWithConfig(nil, rb, 1000, common.DefaultKeyMap())
+ m.activeTab = TabStream
+ m.width = 120
+ m.height = 30
+ m.streamModel.SetSource(rb)
+ m.streamModel.Refresh()
+
+ out := m.View()
+ if !strings.Contains(out, "1:Overview") {
+ t.Fatalf("expected tab bar to remain visible in stream view")
+ }
+ if !strings.Contains(out, "Press ? for help") {
+ t.Fatalf("expected help hint to remain visible in stream view")
+ }
+}