Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v0.0.0-...-7b4a1ed Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconActive   = "●"
	IconComplete = "✓"
	IconFailed   = "✗"
	IconClaude   = "🤖"
	IconValidate = "🧪"
	IconCommit   = "📝"
	IconWaiting  = "⏳"
)

Icons used in the TUI

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

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

Bridge connects the event bus to the bubbletea program

func NewBridge

func NewBridge(program *tea.Program) *Bridge

NewBridge creates a new bridge for the given program

func (*Bridge) Handler

func (b *Bridge) Handler() events.Handler

Handler returns an event handler function for the event bus

func (*Bridge) SendDone

func (b *Bridge) SendDone()

SendDone sends a DoneMsg to the program

func (*Bridge) SendQuit

func (b *Bridge) SendQuit()

SendQuit sends a QuitMsg to the program

type DoneMsg

type DoneMsg struct{}

DoneMsg signals the TUI should exit

type Model

type Model struct {
	// Configuration
	TotalUnits  int
	Parallelism int
	Styles      Styles

	// State
	ActiveUnits    map[string]*UnitState
	CompletedUnits int
	FailedUnits    int
	StartTime      time.Time

	// Control
	Quitting bool
	Done     bool
}

Model is the bubbletea model for the TUI

func NewModel

func NewModel(totalUnits, parallelism int) *Model

NewModel creates a new TUI model

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init implements tea.Model

func (*Model) Update

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

Update implements tea.Model

func (*Model) View

func (m *Model) View() string

View implements tea.Model

type OrchStartedMsg

type OrchStartedMsg struct {
	TotalUnits int
}

OrchStartedMsg indicates orchestration has started with unit count

type QuitMsg

type QuitMsg struct{}

QuitMsg signals the user requested quit (q or Ctrl+C)

type Styles

type Styles struct {
	// Header styling
	Title       lipgloss.Style
	Timer       lipgloss.Style
	Parallelism lipgloss.Style

	// Unit styling
	UnitActive   lipgloss.Style
	UnitComplete lipgloss.Style
	UnitFailed   lipgloss.Style
	UnitName     lipgloss.Style

	// Progress bar colors
	ProgressFilled lipgloss.Style
	ProgressEmpty  lipgloss.Style

	// Phase icons and text
	PhaseIcon lipgloss.Style
	PhaseText lipgloss.Style

	// Footer styling
	Footer    lipgloss.Style
	FooterKey lipgloss.Style

	// Status counts
	StatusComplete lipgloss.Style
	StatusFailed   lipgloss.Style
	StatusActive   lipgloss.Style
}

Styles contains all lipgloss styles for the TUI

func DefaultStyles

func DefaultStyles() Styles

DefaultStyles returns the default TUI styles

type TaskCompletedMsg

type TaskCompletedMsg struct {
	UnitID  string
	TaskNum int
}

TaskCompletedMsg indicates a task within a unit completed

type TaskPhaseMsg

type TaskPhaseMsg struct {
	UnitID    string
	TaskNum   int
	TaskTitle string
	Phase     string
	PhaseIcon string
}

TaskPhaseMsg indicates a task phase change

type TickMsg

type TickMsg time.Time

TickMsg is sent every second to update the timer

type UnitCompletedMsg

type UnitCompletedMsg struct {
	UnitID string
}

UnitCompletedMsg indicates a unit has completed

type UnitFailedMsg

type UnitFailedMsg struct {
	UnitID string
	Error  string
}

UnitFailedMsg indicates a unit has failed

type UnitStartedMsg

type UnitStartedMsg struct {
	UnitID         string
	TotalTasks     int
	CompletedTasks int // Already-completed tasks (for resume scenarios)
}

UnitStartedMsg indicates a unit has started

type UnitState

type UnitState struct {
	ID             string
	TotalTasks     int
	CompletedTasks int
	CurrentTask    int
	TaskTitle      string
	Phase          string
	PhaseIcon      string
}

UnitState tracks the state of a single unit in the TUI

Jump to

Keyboard shortcuts

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