status_tui

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const RollingPlanName = "rolling"

RollingPlanName is the name of the auto-created rolling plan. This constant is duplicated here to avoid import cycles with cmd package.

Variables

View Source
var (
	FindRootJobsFunc      func(*orchestration.Plan) []*orchestration.Job
	FindAllDependentsFunc func(*orchestration.Job, *orchestration.Plan) []*orchestration.Job
)

Helper function type declarations - will be set by the cmd package

View Source
var (
	VerifyRunningJobStatusFunc func(*orchestration.Plan)
	CompleteJobFunc            func(*orchestration.Job, *orchestration.Plan, bool) error
)

Helper function type declarations - will be set by the cmd package

Functions

func SetProgramRef

func SetProgramRef(program *tea.Program)

SetProgramRef sets the package-level program reference This is called by runStatusTUI before starting the program

Types

type ArchiveConfirmedMsg

type ArchiveConfirmedMsg struct{ Job *orchestration.Job }

type BriefingContentLoadedMsg

type BriefingContentLoadedMsg struct {
	Content string
	Err     error
}

type CreateJobCompleteMsg

type CreateJobCompleteMsg struct{ Err error }

type DetailPane

type DetailPane int
const (
	NoPane DetailPane = iota
	LogsPaneDetail
	FrontmatterPane
	BriefingPane
	EditPane
)

type EditContentLoadedMsg

type EditContentLoadedMsg struct {
	Content string
	Err     error
}

type EditFileAndQuitMsg

type EditFileAndQuitMsg struct{ FilePath string }

type EditFileInTmuxMsg

type EditFileInTmuxMsg struct{ Err error }

type FrontmatterContentLoadedMsg

type FrontmatterContentLoadedMsg struct {
	Content string
	Err     error
}

type InitProgramMsg

type InitProgramMsg struct{}

Message types

type JobCompletedMsg

type JobCompletedMsg struct {
	Err error
}

JobCompletedMsg is sent when a job completion attempt finishes

type JobRunFinishedMsg

type JobRunFinishedMsg struct {
	Jobs []*orchestration.Job // The jobs that were executed
	Err  error
}

type KeyMap

type KeyMap struct {
	keymap.Base
	Select           key.Binding
	SelectAll        key.Binding
	SelectNone       key.Binding
	Archive          key.Binding
	AddXmlPlan       key.Binding
	Edit             key.Binding
	Run              key.Binding
	SetCompleted     key.Binding
	SetStatus        key.Binding
	SetType          key.Binding
	SetTemplate      key.Binding
	AddJob           key.Binding
	AddFromRecipe    key.Binding
	Implement        key.Binding
	AgentFromChat    key.Binding
	Rename           key.Binding
	Resume           key.Binding
	EditDeps         key.Binding
	ToggleSummaries  key.Binding
	ToggleView       key.Binding
	ToggleColumns    key.Binding
	GoToTop          key.Binding
	GoToBottom       key.Binding
	PageUp           key.Binding
	PageDown         key.Binding
	ViewLogs         key.Binding
	ViewFrontmatter  key.Binding
	ViewBriefing     key.Binding
	ViewEdit         key.Binding
	CycleDetailPane  key.Binding
	CloseDetailPane  key.Binding
	SwitchFocus      key.Binding
	ToggleLayout     key.Binding
	ToggleFullscreen key.Binding
}

func NewKeyMap

func NewKeyMap() KeyMap

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

type LogContentLoadedMsg

type LogContentLoadedMsg struct {
	Content        string
	Err            error
	ShouldRetry    bool   // If true, we should retry loading after a delay
	StartStreaming bool   // If true, we should start streaming (agent session is ready)
	LogFilePath    string // The path to the log file to stream
	JobID          string // The ID of the job this message belongs to
}

LogContentLoadedMsg is sent when historical log content has been loaded from a file.

type Model

type Model struct {
	Plan                 *orchestration.Plan
	Graph                *orchestration.DependencyGraph
	Orchestrator         *orchestration.Orchestrator // Direct orchestrator for job execution
	Jobs                 []*orchestration.Job
	JobParents           map[string]*orchestration.Job // Track parent in tree structure
	JobIndents           map[string]int                // Track indentation level
	Cursor               int
	ScrollOffset         int             // Track scroll position for viewport
	Selected             map[string]bool // For multi-select
	ShowSummaries        bool            // Toggle for showing job summaries
	StatusSummary        string
	Err                  error
	Width                int
	Height               int
	ConfirmArchive       bool   // Show archive confirmation
	ShowStatusPicker     bool   // Show status picker
	StatusPickerCursor   int    // Cursor position in status picker
	ShowTypePicker       bool   // Show type picker
	TypePickerCursor     int    // Cursor position in type picker
	ShowTemplatePicker   bool   // Show template picker
	TemplatePickerCursor int    // Cursor position in template picker
	PlanDir              string // Store plan directory for refresh
	KeyMap               KeyMap
	Help                 help.Model
	WaitingForG          bool // Track if we're waiting for second 'g' in 'gg' sequence
	CursorVisible        bool // Track cursor visibility for blinking animation
	Renaming             bool
	RenameInput          textinput.Model
	RenameJobIndex       int

	EditingDeps      bool
	EditDepsJobIndex int
	EditDepsSelected map[string]bool // Track which jobs are selected as dependencies
	CreatingJob      bool
	CreateJobInput   textinput.Model
	CreateJobType    string // "xml" or "impl"
	CreateJobBaseJob *orchestration.Job
	CreateJobDeps    []*orchestration.Job // For multi-select case
	ShowLogs         bool
	LogViewer        logviewer.Model
	ActiveLogJob     *orchestration.Job
	StreamingJobID   string // Track which job is currently streaming to prevent duplicates
	ActiveDetailPane DetailPane

	Focus             ViewFocus // Track which pane is active
	LogSplitVertical  bool      // Track log viewer layout
	LogPaneFullscreen bool      // Track if logs pane is fullscreen
	IsRunningJob      bool      // Track if a job is currently running

	RunLogFile      string       // Path to temporary log file for job output
	Program         *tea.Program // Reference to the tea.Program for sending messages
	LogViewerWidth  int          // Cached log viewer width
	LogViewerHeight int          // Cached log viewer height
	JobsPaneWidth   int          // Cached jobs pane width for vertical split
	// contains filtered or unexported fields
}

Model represents the state of the TUI

func New

New creates a new Model

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the TUI

func (*Model) SetProgram

func (m *Model) SetProgram(program *tea.Program)

SetProgram sets the program reference in the model (deprecated - kept for compatibility)

func (Model) Update

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

Update handles messages and updates the model

func (Model) View

func (m Model) View() string

View renders the TUI

type RefreshMsg

type RefreshMsg struct{}

type RefreshTickMsg

type RefreshTickMsg time.Time

type RenameCompleteMsg

type RenameCompleteMsg struct{ Err error }

type RetryLoadAgentLogsMsg

type RetryLoadAgentLogsMsg struct{}

type StatusUpdateMsg

type StatusUpdateMsg string

type TickMsg

type TickMsg time.Time

type UpdateDepsCompleteMsg

type UpdateDepsCompleteMsg struct{ Err error }

type ViewFocus

type ViewFocus int
const (
	JobsPane ViewFocus = iota
	LogsPane
)

Jump to

Keyboard shortcuts

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