tui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package tui implements the interactive terminal dashboard for monitoring the aetherflow daemon. It provides a k9s/btop-style interface with a dashboard overview, agent detail panels, and log streaming.

The TUI communicates with the daemon via the existing Unix socket RPC protocol and polls for updates on a configurable interval.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg Config) error

Run starts the TUI program with alternate screen buffer.

Types

type Config

type Config struct {
	// SocketPath is the Unix socket path for the daemon RPC.
	SocketPath string
}

Config holds the configuration needed to run the TUI.

type LogStreamModel

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

LogStreamModel is the full-screen event log viewer. It reads events from the daemon's in-memory buffer via the events.list RPC, formats them, and renders in a scrollable viewport. New events are polled on each tick (every 2s from the parent).

func NewLogStreamModel

func NewLogStreamModel(agentID string, c *client.Client, width, height int) LogStreamModel

NewLogStreamModel creates a new log stream viewer for the given agent.

func (LogStreamModel) Init

func (m LogStreamModel) Init() tea.Cmd

Init returns the initial fetch command.

func (LogStreamModel) Update

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

Update handles messages for the log stream screen.

func (LogStreamModel) View

func (m LogStreamModel) View() string

View renders the full-screen log stream.

type Model

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

Model is the top-level bubbletea model for the TUI.

func New

func New(cfg Config) Model

New creates a new TUI model with the given configuration.

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model. Kicks off the first status poll and tick. Agent details for all running agents are fetched once the first statusMsg arrives.

func (Model) Update

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

Update implements tea.Model. Handles key presses, window resize, and status polls.

func (Model) View

func (m Model) View() string

View implements tea.Model. Renders the current screen.

type PanelModel

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

PanelModel holds the state for the agent master panel screen.

func NewPanelModel

func NewPanelModel(agent client.AgentStatus, width, height int) PanelModel

NewPanelModel creates a new panel for the given agent.

func (PanelModel) Init

func (m PanelModel) Init() tea.Cmd

Init returns the command to fetch task detail.

func (PanelModel) Update

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

Update handles messages for the panel screen.

func (PanelModel) View

func (m PanelModel) View() string

View renders the agent master panel.

type TaskDetail

type TaskDetail struct {
	ID               string    `json:"id"`
	Title            string    `json:"title"`
	Type             string    `json:"type"`
	Status           string    `json:"status"`
	Priority         int       `json:"priority"`
	Project          string    `json:"project"`
	Parent           string    `json:"parent"`
	Description      string    `json:"description"`
	DefinitionOfDone *string   `json:"definition_of_done"`
	Labels           []string  `json:"labels"`
	Dependencies     []string  `json:"dependencies"`
	Logs             []TaskLog `json:"logs"`
}

TaskDetail holds the parsed output from `prog show --json <task_id>`.

type TaskLog

type TaskLog struct {
	Message   string `json:"message"`
	CreatedAt string `json:"created_at"`
}

TaskLog is a single log entry from prog.

Jump to

Keyboard shortcuts

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