summaryrefslogtreecommitdiff
path: root/internal/tui/tui_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-14 08:23:35 +0300
committerPaul Buetow <paul@buetow.org>2026-05-14 08:23:35 +0300
commit2eb861796de41e87de071987ed864b79a0007ab2 (patch)
tree65b3a612c9a113d094b97407c04748c2713ddd4b /internal/tui/tui_test.go
parent34d88ba4c82dac2646db27c74e1cafb0c97dbcf2 (diff)
wire TUIFastRefreshInterval into dashboard model and update tests
Add fastRefreshMs parameter to NewModelWithConfig so callers can supply the high-frequency tick cadence for stream and flame tabs. Convert the streamTickCmd/flameTickCmd package-level functions to model methods that honour fastRefreshEvery (falling back to the 200 ms constants when zero for backward-compatibility). Add SetFastRefreshInterval setter so RunWithTraceStarterConfig can apply cfg.TUIFastRefreshInterval after construction. Update all 68 test call sites to pass fastRefreshMs=200 and add three new tests covering zero-fallback, stored value, and setter behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/tui/tui_test.go')
-rw-r--r--internal/tui/tui_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/tui/tui_test.go b/internal/tui/tui_test.go
index dae45f7..9e62c55 100644
--- a/internal/tui/tui_test.go
+++ b/internal/tui/tui_test.go
@@ -2091,7 +2091,7 @@ func TestBlurPausesDashboardRefreshAndFocusResumesIt(t *testing.T) {
m := NewModel(-1, func(context.Context) error { return nil })
m.screen = ScreenDashboard
m.attaching = false
- m.dashboard = dashboardui.NewModelWithConfig(nil, nil, 1, m.keys)
+ m.dashboard = dashboardui.NewModelWithConfig(nil, nil, 1, 200, m.keys)
m.focused = true
next, _ := m.Update(tea.BlurMsg{})