tui

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 12 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.

v1.1 fixes (operator feedback): the tick chain was breaking after the first refresh because tickCmd only fired AFTER a successful refresh. Now the tick runs on its own cadence independent of refresh completion, so the dashboard stays live even during transient SQLite hiccups. Plus: every pane respects the terminal viewport — rows beyond the visible area are truncated with a "(…N more)" tail line, and the layout adapts to the operator's terminal height instead of overflowing the scrollback.

Package tui — orchestrator TUI (Phase 2 of ADR-028). Split-pane Bubble Tea view that auto-spawns one pane per active BIAM dispatch, fades panes 5 seconds after they hit terminal so the operator sees the final tail before the layout reflows. Feeds from the daemon's task-watch Unix socket — no SQLite poll.

Layout: lipgloss horizontal+vertical join, square-ish grid sized to the terminal viewport. With 4 active dispatches, 2x2; with 6, 3x2; with 1, the single pane spans the whole window.

Pane content per task:

┌─ task abc12345 (codex) ─────┐
│ [21:47:01] active  · 12 msg │
│                             │
│ > applying patch 3/12       │
└─────────────────────────────┘

Pane fades to dim style 5s after terminal so the operator notices the transition; pane closes 5s after fade so the layout reflows around remaining live dispatches.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

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

func RunOrchestrator added in v0.22.0

func RunOrchestrator() error

RunOrchestrator boots the Bubble Tea program. Invoked from the CLI dispatcher.

Types

type Model

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

Model is the Bubble Tea state.

func New

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

func (Model) Init

func (m Model) Init() tea.Cmd

Init kicks off the FIRST refresh AND starts the tick loop. Both are independent commands so the tick stays alive even if a refresh fails.

func (Model) Update

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

func (Model) View

func (m Model) View() string

View renders the model. Layout is height-aware: each pane gets a budget so the total fits the terminal viewport.

type OrchModel added in v0.22.0

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

OrchModel is the orchestrator's Bubble Tea state.

func NewOrchestrator added in v0.22.0

func NewOrchestrator() OrchModel

NewOrchestrator constructs a fresh orchestrator model. The watch-socket dial happens in Init so a transient daemon outage at construct time doesn't cancel the model.

func (OrchModel) Init added in v0.22.0

func (m OrchModel) Init() tea.Cmd

func (OrchModel) Update added in v0.22.0

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

func (OrchModel) View added in v0.22.0

func (m OrchModel) View() string

Jump to

Keyboard shortcuts

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