tui

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyQuitManager   = "q"
	KeyEscapeManager = "esc"
	KeySpaceManager  = "space"
)

Keyboard shortcuts for manager

View Source
const (
	ModalBorderColor = "6"
	ModalTitle       = "Bubble Tea Overlay"
	ModalContent     = "Hello! I'm in a modal window.\n\nPress <space> to close the window."
)

Modal styling constants

View Source
const (
	ShortListThreshold = 50
	StatusColumnWidth  = 4
	EllipsisLength     = 3
	NotStartedDuration = "<not started>"
)

Display constants for step formatting

View Source
const (
	NameColumnPercent     = 65
	TagsColumnPercent     = 15
	DurationColumnPercent = 20
)

Column width percentages for wide layouts

View Source
const (
	ListWidthPercentage       = 30.0
	LayoutAreaHeight          = 3
	FilterInputHeightOffset   = 1
	TagsHeightOffset          = 1
	AlignHorizontalBreakpoint = 130
)

UI dimensions and layout constants

View Source
const (
	KeyFilter = "/"
	KeyEscape = "esc"
	KeyTab    = "tab"
	KeyEnter  = "enter"
	KeyQuit   = "ctrl+c"
	KeyQ      = "q"
)

Keyboard shortcuts

View Source

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager added in v0.0.30

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

Manager implements tea.Model and manages the overall UI state including modals It coordinates between the main UI and any overlay components

func NewManager added in v0.0.30

func NewManager(ui tea.Model) *Manager

NewManager creates a new Manager instance with the given background UI model

func (*Manager) Init added in v0.0.30

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

Init initializes the Manager on program load It implements part of the tea.Model interface

func (*Manager) Update added in v0.0.30

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

Update handles events and manages internal state It implements part of the tea.Model interface

func (*Manager) View added in v0.0.30

func (m *Manager) View() tea.View

View renders the appropriate view based on current state It implements part of the tea.Model interface

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

Modal implements tea.Model and represents a modal dialog overlay It provides a simple information display with styling

func (*Modal) Init added in v0.0.30

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

Init initializes the Modal on program load It implements part of the tea.Model interface

func (*Modal) Update added in v0.0.30

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

Update handles events and manages internal state It implements part of the tea.Model interface

func (*Modal) View added in v0.0.30

func (m *Modal) View() tea.View

View renders the modal with appropriate styling It implements part of the tea.Model interface

type Panel added in v0.0.29

type Panel int8

Panel represents which panel is currently active

const (
	// PanelList represents the left list panel
	PanelList Panel = iota
	// PanelDetails represents the right details panel
	PanelDetails
)

type PipelineDoneMsg added in v0.0.29

type PipelineDoneMsg struct {
	Status StepStatus
	Error  error
}

PipelineDoneMsg represents a message when the pipeline is complete

type StepMsg added in v0.0.29

type StepMsg struct {
	Name        string
	DisplayName string
	Tags        []processor.Tag
	Status      StepStatus
	// contains filtered or unexported fields
}

StepMsg represents a pipeline step with its state and UI components

func NewStep added in v0.0.29

func NewStep() StepMsg

NewStep creates a new StepMsg with initialized components

func (StepMsg) Description added in v0.0.29

func (t StepMsg) Description() string

Description returns the description for list display (used in narrow layouts)

func (StepMsg) FilterValue added in v0.0.29

func (t StepMsg) FilterValue() string

FilterValue returns the value used for filtering

func (StepMsg) GetName added in v0.0.29

func (t StepMsg) GetName() string

GetName returns the display name of the step

func (*StepMsg) TagsAsString added in v0.0.29

func (t *StepMsg) TagsAsString() string

TagsAsString returns a formatted string representation of all tags

func (StepMsg) Title added in v0.0.29

func (t StepMsg) Title() string

Title returns the formatted title for list display

func (StepMsg) WithStatus added in v0.0.29

func (t StepMsg) WithStatus(status StepStatus) StepMsg

WithStatus creates a new StepMsg with the given status, updating timestamps

func (StepMsg) Write added in v0.0.29

func (t StepMsg) Write(b []byte) (int, error)

Write implements io.Writer interface for the step's viewport

type StepStatus

type StepStatus int

StepStatus represents the current state of a pipeline step

const (
	StepStatusWaiting StepStatus = iota
	StepStatusRunning
	StepStatusFailed
	StepStatusDone
	StepStatusSkipped
)

func (StepStatus) Render

func (e StepStatus) Render() string

Render returns the styled visual representation of the step status

func (StepStatus) String

func (e StepStatus) String() string

String returns the string representation of the step status

type TickMsg added in v0.0.29

type TickMsg time.Time

TickMsg represents a tick message for animations

type UI

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

UI represents the main tui model

func NewUI added in v0.0.29

func NewUI(logger logr.Logger) UI

NewUI creates a new UI instance with the given logger

func (UI) Init added in v0.0.29

func (m UI) Init() tea.Cmd

Init initializes the UI model

func (UI) Update added in v0.0.29

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

Update handles all UI updates and events

func (UI) View added in v0.0.29

func (m UI) View() tea.View

View renders the UI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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