tui

package
v0.22.28 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 14 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 3 of ADR-028). The production "teammate panel" for clawtool: live byte stream from every active dispatch, scrollable per-task viewport, theme-aware adaptive colours, key hints rendered via bubbles/help. Inspired by lazygit / gh-dash / k9s layout conventions: sidebar + detail pane + status bar.

Architecture:

  • Left sidebar (sticky 28 col): tasks list with status pills and message counts. Arrow keys select, enter focuses, the stream pane on the right reflects the selected task.
  • Right detail pane (flex): bubbles/viewport rendering the selected task's StreamFrame ringbuffer line by line. Auto- scroll-to-bottom when new frames arrive UNLESS the operator scrolled up (tail-follow toggle).
  • Header bar: app banner + version + live indicator.
  • Footer bar: key bindings (q quit · ↑↓ select · pgup/pgdn scroll · f tail-follow · r reconnect) + at-a-glance counts.

The orchestrator subscribes to the daemon's WatchEnvelope socket; task transitions update sidebar rows, frames append to the per- task ringbuffer. A 5-second post-terminal grace window keeps the task visible after it finishes so the operator catches the final lines.

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.

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

Directories

Path Synopsis
Package theme — color palette + lipgloss style factory shared across every clawtool TUI surface (dashboard, orchestrator, future split-pane views).
Package theme — color palette + lipgloss style factory shared across every clawtool TUI surface (dashboard, orchestrator, future split-pane views).

Jump to

Keyboard shortcuts

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