Documentation
¶
Index ¶
- func BuildNameColumn(check ghclient.CheckRunInfo, widths ColumnWidths, enableLinks bool) string
- func FormatAlignedColumns(queueText, nameText, durationText string, widths ColumnWidths) (string, string, string)
- func FormatCheckName(check ghclient.CheckRunInfo) string
- func FormatCheckNameWithTruncate(check ghclient.CheckRunInfo, maxWidth int) string
- func FormatDescription(description string, widths ColumnWidths) string
- func FormatDuration(check ghclient.CheckRunInfo) string
- func FormatHeaderColumns(widths ColumnWidths) (string, string, string)
- func FormatLink(url, text string) string
- func FormatQueueLatency(check ghclient.CheckRunInfo, headCommitTime time.Time) string
- func GetCheckIcon(status, conclusion string) string
- type ChecksUpdateMsg
- type ColumnWidths
- type ErrorMsg
- type Model
- type PRInfoMsg
- type Styles
- type TickMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildNameColumn ¶
func BuildNameColumn(check ghclient.CheckRunInfo, widths ColumnWidths, enableLinks bool) string
BuildNameColumn returns a left-aligned name column of exactly widths.NameWidth visible characters. If enableLinks is true and the check has a DetailsURL, the visible text is wrapped in an OSC 8 hyperlink; padding spaces are appended outside the link so that len()-based width measurement stays accurate for the rest of the line.
func FormatAlignedColumns ¶
func FormatAlignedColumns(queueText, nameText, durationText string, widths ColumnWidths) (string, string, string)
FormatAlignedColumns formats the three columns with proper padding
func FormatCheckName ¶
func FormatCheckName(check ghclient.CheckRunInfo) string
FormatCheckName formats the check name as "Workflow / Job" or just "Job"
func FormatCheckNameWithTruncate ¶
func FormatCheckNameWithTruncate(check ghclient.CheckRunInfo, maxWidth int) string
FormatCheckNameWithTruncate formats the check name and truncates if needed
func FormatDescription ¶
func FormatDescription(description string, widths ColumnWidths) string
FormatDescription truncates description to fit within the total visual width
func FormatDuration ¶
func FormatDuration(check ghclient.CheckRunInfo) string
FormatDuration returns the duration/runtime text or placeholder
func FormatHeaderColumns ¶
func FormatHeaderColumns(widths ColumnWidths) (string, string, string)
FormatHeaderColumns formats the column headers with proper padding
func FormatLink ¶
FormatLink wraps text in an OSC 8 terminal hyperlink
func FormatQueueLatency ¶
func FormatQueueLatency(check ghclient.CheckRunInfo, headCommitTime time.Time) string
FormatQueueLatency returns the queue time text or placeholder
func GetCheckIcon ¶
GetCheckIcon returns the appropriate icon for a check run based on status and conclusion
Types ¶
type ChecksUpdateMsg ¶
type ChecksUpdateMsg struct {
CheckRuns []ghclient.CheckRunInfo
RateLimitRemaining int
Err error
}
ChecksUpdateMsg contains updated check runs
type ColumnWidths ¶
type ColumnWidths struct {
QueueWidth int // Right-aligned queue latency
NameWidth int // Left-aligned check name
DurationWidth int // Right-aligned duration
}
ColumnWidths holds pre-calculated column widths for aligned rendering
func CalculateColumnWidths ¶
func CalculateColumnWidths(checkRuns []ghclient.CheckRunInfo, headCommitTime time.Time) ColumnWidths
CalculateColumnWidths scans all check runs and determines max width for each column
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model holds the application state
func NewModel ¶
func NewModel(ctx context.Context, token, owner, repo string, prNumber int, refreshInterval time.Duration, styles Styles, enableLinks bool) Model
NewModel creates a new TUI model
type PRInfoMsg ¶
type PRInfoMsg struct {
Number int
Title string
HeadSHA string
CreatedAt time.Time
HeadCommitTime time.Time
Err error
}
PRInfoMsg contains PR metadata