ui

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventColor

func EventColor(eventType string, theme blit.Theme) lipgloss.Color

EventColor returns the color for a given event type, derived from theme tokens.

func LabelColor added in v0.7.3

func LabelColor(label string, theme blit.Theme) lipgloss.Color

LabelColor maps a display label back to its themed color.

Types

type DebugLog added in v0.2.0

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

DebugLog is a thread-safe log that writes directly to a blit.LogViewer.

func NewDebugLog added in v0.2.0

func NewDebugLog() *DebugLog

func (*DebugLog) Error added in v0.2.0

func (d *DebugLog) Error(format string, args ...interface{})

func (*DebugLog) GetStats added in v0.2.0

func (d *DebugLog) GetStats() FetchStats

func (*DebugLog) Info added in v0.2.0

func (d *DebugLog) Info(format string, args ...interface{})

func (*DebugLog) Log added in v0.2.0

func (d *DebugLog) Log(level blit.LogLevel, format string, args ...interface{})

func (*DebugLog) RecordFetch added in v0.2.0

func (d *DebugLog) RecordFetch(repo string, success bool, eventCount int, usingCache bool)

func (*DebugLog) SetLogViewer added in v0.7.3

func (d *DebugLog) SetLogViewer(lv *blit.LogViewer)

SetLogViewer wires a blit.LogViewer so that new log entries are appended to it.

func (*DebugLog) SetRateLimit added in v0.2.5

func (d *DebugLog) SetRateLimit(remaining, limit int)

func (*DebugLog) Warn added in v0.2.0

func (d *DebugLog) Warn(format string, args ...interface{})

type DebugOverlay added in v0.3.0

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

DebugOverlay shows API stats and recent log entries using blit.LogViewer. Implements blit.Component and blit.Overlay. Renders as a full-screen modal.

func NewDebugOverlay added in v0.3.0

func NewDebugOverlay(debugLog *DebugLog) *DebugOverlay

func (*DebugOverlay) Close added in v0.3.0

func (d *DebugOverlay) Close()

func (*DebugOverlay) Focused added in v0.3.0

func (d *DebugOverlay) Focused() bool

func (*DebugOverlay) Init added in v0.3.0

func (d *DebugOverlay) Init() tea.Cmd

func (*DebugOverlay) IsActive added in v0.3.0

func (d *DebugOverlay) IsActive() bool

func (*DebugOverlay) KeyBindings added in v0.3.0

func (d *DebugOverlay) KeyBindings() []blit.KeyBind

func (*DebugOverlay) SetActive added in v0.3.0

func (d *DebugOverlay) SetActive(v bool)

func (*DebugOverlay) SetFocused added in v0.3.0

func (d *DebugOverlay) SetFocused(f bool)

func (*DebugOverlay) SetSize added in v0.3.0

func (d *DebugOverlay) SetSize(w, h int)

func (*DebugOverlay) SetTheme added in v0.7.3

func (d *DebugOverlay) SetTheme(t blit.Theme)

func (*DebugOverlay) Update added in v0.3.0

func (d *DebugOverlay) Update(msg tea.Msg, ctx blit.Context) (blit.Component, tea.Cmd)

func (*DebugOverlay) View added in v0.3.0

func (d *DebugOverlay) View() string

View renders the debug overlay as a full-screen bordered modal.

type DisplayEvent

type DisplayEvent struct {
	Event   github.Event
	AddedAt time.Time
}

DisplayEvent holds a parsed event for display.

type EventStream added in v0.3.0

type EventStream struct {
	DetailOverlay *blit.DetailOverlay[DisplayEvent]
	// contains filtered or unexported fields
}

EventStream displays a scrollable table of GitHub events. Implements blit.Component.

func NewEventStream added in v0.3.0

func NewEventStream(cfg *config.Config, debugLog *DebugLog) *EventStream

func (*EventStream) ClearFilters added in v0.3.0

func (s *EventStream) ClearFilters()

func (*EventStream) CycleTypeFilter added in v0.3.0

func (s *EventStream) CycleTypeFilter(forward bool)

func (*EventStream) DebugLog added in v0.3.0

func (s *EventStream) DebugLog() *DebugLog

func (*EventStream) Focused added in v0.3.0

func (s *EventStream) Focused() bool

func (*EventStream) ForceRefresh added in v0.3.0

func (s *EventStream) ForceRefresh()

func (*EventStream) HasLocalRepos added in v0.3.0

func (s *EventStream) HasLocalRepos() bool

func (*EventStream) Init added in v0.3.0

func (s *EventStream) Init() tea.Cmd

func (*EventStream) IsNewestFirst added in v0.3.0

func (s *EventStream) IsNewestFirst() bool

func (*EventStream) IsPaused added in v0.3.0

func (s *EventStream) IsPaused() bool

func (*EventStream) KeyBindings added in v0.3.0

func (s *EventStream) KeyBindings() []blit.KeyBind

func (*EventStream) RepoFilter added in v0.3.0

func (s *EventStream) RepoFilter() string

func (*EventStream) SetFocused added in v0.3.0

func (s *EventStream) SetFocused(f bool)

func (*EventStream) SetRepoFilter added in v0.3.0

func (s *EventStream) SetRepoFilter(repo string)

func (*EventStream) SetSize added in v0.3.0

func (s *EventStream) SetSize(w, h int)

func (*EventStream) SetTheme added in v0.7.3

func (s *EventStream) SetTheme(t blit.Theme)

SetTheme implements blit.Themed so the App's theme propagates through Tabs → EventStream → Table.

func (*EventStream) SetTypeFilter added in v0.7.3

func (s *EventStream) SetTypeFilter(t string)

func (*EventStream) TogglePause added in v0.3.0

func (s *EventStream) TogglePause()

func (*EventStream) ToggleSort added in v0.3.0

func (s *EventStream) ToggleSort()

func (*EventStream) TypeFilter added in v0.3.0

func (s *EventStream) TypeFilter() string

func (*EventStream) Update added in v0.3.0

func (s *EventStream) Update(msg tea.Msg, ctx blit.Context) (blit.Component, tea.Cmd)

func (*EventStream) View added in v0.3.0

func (s *EventStream) View() string

type FetchStats added in v0.2.0

type FetchStats struct {
	TotalCalls   int
	SuccessCalls int
	FailedCalls  int
	TotalEvents  int
	LastFetchAt  time.Time
	RepoHealth   map[string]*RepoHealth
	RateRemain   int // GitHub API rate limit remaining
	RateLimit    int // GitHub API rate limit total
}

FetchStats tracks API call statistics.

type RepoHealth added in v0.2.5

type RepoHealth struct {
	LastSuccess bool
	FailStreak  int
	UsingCache  bool // true when serving cached events due to fetch failure
}

RepoHealth tracks per-repo fetch health.

type StatusPanel added in v0.3.0

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

StatusPanel displays local repo git status. Implements blit.Component.

func NewStatusPanel added in v0.3.0

func NewStatusPanel() *StatusPanel

func (*StatusPanel) Focused added in v0.3.0

func (p *StatusPanel) Focused() bool

func (*StatusPanel) Init added in v0.3.0

func (p *StatusPanel) Init() tea.Cmd

func (*StatusPanel) KeyBindings added in v0.3.0

func (p *StatusPanel) KeyBindings() []blit.KeyBind

func (*StatusPanel) SetFocused added in v0.3.0

func (p *StatusPanel) SetFocused(f bool)

func (*StatusPanel) SetSize added in v0.3.0

func (p *StatusPanel) SetSize(w, h int)

func (*StatusPanel) SetTheme added in v0.7.3

func (p *StatusPanel) SetTheme(t blit.Theme)

SetTheme implements blit.Themed so the App's theme propagates to the ListView.

func (*StatusPanel) Update added in v0.3.0

func (p *StatusPanel) Update(msg tea.Msg, ctx blit.Context) (blit.Component, tea.Cmd)

func (*StatusPanel) View added in v0.3.0

func (p *StatusPanel) View() string

type Styles added in v0.7.4

type Styles struct {
	Title    lipgloss.Style
	Subtitle lipgloss.Style
	Detail   lipgloss.Style

	PanelRepo   lipgloss.Style
	PanelDim    lipgloss.Style
	PanelClean  lipgloss.Style
	PanelDirty  lipgloss.Style
	PanelWarn   lipgloss.Style
	PanelCIFail lipgloss.Style

	DetailRepo  lipgloss.Style
	DetailActor lipgloss.Style
	DetailTime  lipgloss.Style
}

Styles holds all UI styles derived from the current theme. Rebuild via NewStyles whenever the theme changes.

func NewStyles added in v0.7.4

func NewStyles(t blit.Theme) Styles

NewStyles constructs a full Styles set from a blit.Theme.

Jump to

Keyboard shortcuts

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