tui

package
v0.21.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package tui — multi-pane dashboard for clawtool's runtime surface. Bubble Tea-based, deferred from the v0.19 sketch and resurrected for the operator's "I want to see what every agent is doing" directive.

What ships now (v1):

Pane 1 — Dispatches: BIAM tasks (active first, then recent)
Pane 2 — Agents:     supervisor.Agents() snapshot
Pane 3 — Stats:      counters (total / done / failed / active)

Refresh is via 1s poll over the BIAM SQLite store; real-time push hook (biam.Notifier subscription when launched alongside `clawtool serve`) lands in v1.1 alongside #185 (Unix socket push). Polling has the same negligible-cost SQLite WAL profile `clawtool task watch` uses.

Keybindings:

q / esc / ctrl+c   exit
r                   force refresh (don't wait for tick)
tab                 cycle focused pane (cosmetic; v2 will
                    allow scroll inside the focused pane)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(store *biam.Store, sup agents.Supervisor) error

Run is the entry point the CLI verb calls. Wraps Bubble Tea's program lifecycle.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the Bubble Tea state. One per `clawtool dashboard` invocation; shut down on quit.

func New

func New(store *biam.Store, sup agents.Supervisor) Model

New constructs a Model with the supplied BIAM store and supervisor. Call New(...).Run() from the CLI verb. A nil store yields a model that renders an empty Pane 1 — useful when the operator hasn't dispatched anything yet, so the CLI doesn't crash on first launch.

func (Model) Init

func (m Model) Init() tea.Cmd

Init kicks off the first refresh.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

View is the render entry point.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL