Documentation
¶
Overview ¶
Package views provides pure rendering components for TUI views.
Index ¶
- func FormatLogLine(level, message string) string
- func FormatLogLines(logs []LogEntry) string
- func RenderWithChrome(config ChromeConfig, renderBody func(contentHeight int) string) string
- type ChromeConfig
- type HeaderFooterView
- type KeyBinding
- type LogEntry
- type LogsView
- type ResultView
- type RunStatus
- type RunsTableView
- type SummaryView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLogLine ¶
FormatLogLine formats a single log entry with appropriate styling
func FormatLogLines ¶
FormatLogLines formats multiple log entries
func RenderWithChrome ¶
func RenderWithChrome( config ChromeConfig, renderBody func(contentHeight int) string, ) string
RenderWithChrome renders a page body with consistent header and footer chrome
Types ¶
type ChromeConfig ¶
type ChromeConfig struct {
Width int
Height int
ConfigFile string
CompletedCount int
TotalRuns int
Elapsed time.Duration
KeyBindings []KeyBinding
}
ChromeConfig contains configuration for rendering page chrome
type HeaderFooterView ¶
type HeaderFooterView struct {
// contains filtered or unexported fields
}
HeaderFooterView renders header and footer components
func NewHeaderFooterView ¶
func NewHeaderFooterView(width int) *HeaderFooterView
NewHeaderFooterView creates a new header/footer view
func (*HeaderFooterView) RenderFooter ¶
func (v *HeaderFooterView) RenderFooter(keyBindings []KeyBinding) string
RenderFooter renders the bottom help text with dynamic key bindings
func (*HeaderFooterView) RenderHeader ¶
func (v *HeaderFooterView) RenderHeader( configFile string, completedCount, totalRuns int, elapsed time.Duration, ) string
RenderHeader renders the top banner with progress
type KeyBinding ¶
type KeyBinding struct {
Keys string // e.g., "↑/↓ j/k", "enter", "q/ctrl+c"
Description string // e.g., "navigate", "select file", "quit"
}
KeyBinding represents a keyboard shortcut with description
type LogsView ¶
type LogsView struct {
// contains filtered or unexported fields
}
LogsView renders the logs panel with viewport
type ResultView ¶
type ResultView struct{}
ResultView renders a detailed result for a completed run
func (*ResultView) Render ¶
func (v *ResultView) Render(res *statestore.RunResult, status RunStatus) string
Render renders the result details
type RunsTableView ¶
type RunsTableView struct {
// contains filtered or unexported fields
}
RunsTableView renders the active runs table
func NewRunsTableView ¶
func NewRunsTableView() *RunsTableView
NewRunsTableView creates a new RunsTableView
func (*RunsTableView) GetColumns ¶
func (v *RunsTableView) GetColumns() []table.Column
GetColumns returns the table columns
func (*RunsTableView) GetTableStyle ¶
func (v *RunsTableView) GetTableStyle() table.Styles
GetTableStyle returns the table style
func (*RunsTableView) Render ¶
func (v *RunsTableView) Render(vm *viewmodels.RunsTableViewModel) string
Render renders the runs table with the given view model
func (*RunsTableView) SetDimensions ¶
func (v *RunsTableView) SetDimensions(width, height int)
SetDimensions updates the view dimensions
func (*RunsTableView) SetFocused ¶
func (v *RunsTableView) SetFocused(focused bool)
SetFocused sets the focused state
type SummaryView ¶
type SummaryView struct {
// contains filtered or unexported fields
}
SummaryView renders the final execution summary
func NewSummaryView ¶
func NewSummaryView(width int, ciMode bool) *SummaryView
NewSummaryView creates a new summary view
func (*SummaryView) Render ¶
func (v *SummaryView) Render(vm *viewmodels.SummaryViewModel) string
Render renders the summary using the provided ViewModel