From 0f8005352d02236c923ac9c593de47f886ca4305 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 6 Apr 2026 22:48:26 +0300 Subject: ui: add --ultra CLI flag to start in ultra modus (yw) Add --ultra boolean flag mirroring the --disco pattern. Add SetUltra() method to Model so the flag sets showUltra=true before the TUI starts, opening directly in ultra mode. Co-Authored-By: Claude Opus 4.6 --- cmd/tasksamurai/main.go | 2 ++ internal/ui/table.go | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/cmd/tasksamurai/main.go b/cmd/tasksamurai/main.go index 15ee037..8596fab 100644 --- a/cmd/tasksamurai/main.go +++ b/cmd/tasksamurai/main.go @@ -25,6 +25,7 @@ func main() { debugDir := flag.String("debug-dir", "", "directory for runtime debug output (goroutine dumps, profiles)") browserCmd := flag.String("browser-cmd", browserCmdDefault, "command used to open URLs") disco := flag.Bool("disco", false, "enable disco mode") + ultra := flag.Bool("ultra", false, "start directly in ultra mode") flag.Parse() if err := task.SetDebugLog(*debugLog); err != nil { @@ -43,6 +44,7 @@ func main() { } m.SetDisco(*disco) + m.SetUltra(*ultra) // Clear the screen before starting the TUI to avoid leaving any // previous command line artefacts behind. diff --git a/internal/ui/table.go b/internal/ui/table.go index b829501..ef81b9a 100644 --- a/internal/ui/table.go +++ b/internal/ui/table.go @@ -1325,3 +1325,9 @@ func (m *Model) applyTheme() { func (m *Model) SetDisco(d bool) { m.disco = d } + +// SetUltra enables or disables ultra mode, causing the UI to start directly +// in the ultra task list view instead of the default table view. +func (m *Model) SetUltra(u bool) { + m.showUltra = u +} -- cgit v1.2.3