tui

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MinHeight = 24

MinHeight is the minimum terminal height.

View Source
const MinWidth = 80

MinWidth is the minimum terminal width.

View Source
const TabCount = 5

TabCount is the total number of tabs.

Variables

View Source
var ErrEditorNotSet = errors.New("$EDITOR is not set — set the EDITOR environment variable to your preferred editor")

ErrEditorNotSet is returned when $EDITOR is not set.

View Source
var TabNames = [TabCount]string{
	"1 Status",
	"2 Docs",
	"3 Iterations",
	"4 Check",
	"5 Quality",
}

TabNames maps TabID to display labels.

Functions

This section is empty.

Types

type App

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

App is the top-level Bubble Tea model for the TUI dashboard.

func NewApp

func NewApp(deps *deps.Deps, version string) App

NewApp constructs the TUI application with injected dependencies.

func (App) Init

func (a App) Init() tea.Cmd

Init dispatches initial data loading commands.

func (App) Update

func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update processes messages and delegates to the active tab.

func (App) View

func (a App) View() string

View renders the full TUI screen.

type ChecksView

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

ChecksView is Tab 4: accordion validation suites with lazy loading.

func NewChecksView

func NewChecksView(deps *deps.Deps) ChecksView

NewChecksView creates a ChecksView.

func (ChecksView) Init

func (v ChecksView) Init() tea.Cmd

func (ChecksView) Update

func (v ChecksView) Update(msg tea.Msg) (ChecksView, tea.Cmd)

func (ChecksView) View

func (v ChecksView) View() string

type DocsView

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

DocsView is Tab 2: document list with zone filter, search, and preview.

func NewDocsView

func NewDocsView(deps *deps.Deps) DocsView

NewDocsView creates a DocsView.

func (DocsView) CursorInfo

func (v DocsView) CursorInfo() string

cursorInfo returns a "cursor/total" string for list views, or "" if not applicable.

func (DocsView) Init

func (v DocsView) Init() tea.Cmd

Init returns nil (data propagated from health load).

func (DocsView) Update

func (v DocsView) Update(msg tea.Msg) (DocsView, tea.Cmd)

Update handles messages for the Docs tab.

func (DocsView) View

func (v DocsView) View() string

View renders the Docs tab.

type GlobalKeyMap

type GlobalKeyMap struct {
	Quit      key.Binding
	ForceQuit key.Binding
	Help      key.Binding
	Refresh   key.Binding
	Tab1      key.Binding
	Tab2      key.Binding
	Tab3      key.Binding
	Tab4      key.Binding
	Tab5      key.Binding
	NextTab   key.Binding
	PrevTab   key.Binding
}

GlobalKeyMap defines keys that work in every tab.

type HelpModel

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

HelpModel renders a context-sensitive help overlay.

func NewHelpModel

func NewHelpModel() HelpModel

NewHelpModel creates a HelpModel.

func (*HelpModel) SetSize

func (h *HelpModel) SetSize(w, h2 int)

SetSize updates the overlay dimensions.

func (HelpModel) View

func (h HelpModel) View(activeTab TabID) string

View renders the help overlay centered on screen.

type IterationsView

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

IterationsView is Tab 3: iteration table with type filter and detail expander.

func NewIterationsView

func NewIterationsView() IterationsView

NewIterationsView creates an IterationsView.

func (IterationsView) CursorInfo

func (v IterationsView) CursorInfo() string

CursorInfo returns a "cursor/total" string for the iterations list.

func (IterationsView) Init

func (v IterationsView) Init() tea.Cmd

func (IterationsView) Update

func (v IterationsView) Update(msg tea.Msg) (IterationsView, tea.Cmd)

func (IterationsView) View

func (v IterationsView) View() string
type NavigationKeyMap struct {
	Up   key.Binding
	Down key.Binding
}

NavigationKeyMap defines up/down navigation shared by multiple tabs.

type QualityView

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

QualityView is Tab 5: convergence score chart and analysis detail.

func NewQualityView

func NewQualityView() QualityView

NewQualityView creates a QualityView.

func (QualityView) Init

func (v QualityView) Init() tea.Cmd

func (QualityView) Update

func (v QualityView) Update(msg tea.Msg) (QualityView, tea.Cmd)

func (QualityView) View

func (v QualityView) View() string

type StatusView

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

StatusView is Tab 1: zone health, staleness, workflow, warnings, suggestions.

func NewStatusView

func NewStatusView() StatusView

NewStatusView creates a StatusView.

func (StatusView) Init

func (v StatusView) Init() tea.Cmd

Init returns nil (data loads via app-level commands).

func (StatusView) Update

func (v StatusView) Update(msg tea.Msg) (StatusView, tea.Cmd)

Update handles messages for the Status tab.

func (StatusView) View

func (v StatusView) View() string

View renders the Status tab content.

type TabID

type TabID int

TabID identifies a dashboard tab.

const (
	TabStatus     TabID = iota // 0
	TabDocs                    // 1
	TabIterations              // 2
	TabChecks                  // 3
	TabQuality                 // 4
)

type Theme

type Theme struct {
	// Zone colors
	ZoneSpec       lipgloss.Style
	ZoneBlueprints lipgloss.Style
	ZoneState      lipgloss.Style
	ZoneIterations lipgloss.Style
	ZoneKnowledge  lipgloss.Style

	// Severity
	Pass lipgloss.Style
	Fail lipgloss.Style
	Warn lipgloss.Style
	Dim  lipgloss.Style

	// Chrome
	TitleBar    lipgloss.Style
	TabActive   lipgloss.Style
	TabInactive lipgloss.Style
	StatusBar   lipgloss.Style
	Separator   lipgloss.Style

	// Content
	Selected lipgloss.Style
	Border   lipgloss.Style
	Heading  lipgloss.Style
	Subtle   lipgloss.Style

	// Progress bars
	BarFilled lipgloss.Style
	BarEmpty  lipgloss.Style

	// Iteration type colors
	TypeNew         lipgloss.Style
	TypeEnhancement lipgloss.Style
	TypeBugFix      lipgloss.Style
	TypeRefactor    lipgloss.Style
}

Theme holds all Lip Gloss styles for the TUI.

func DefaultTheme

func DefaultTheme() Theme

DefaultTheme returns the standard TUI theme per BP-05 Section 6.

type ViewState

type ViewState int

ViewState tracks data loading status for a tab.

const (
	ViewLoading ViewState = iota
	ViewError
	ViewEmpty
	ViewReady
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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