Documentation
¶
Overview ¶
Package chrome provides always-visible shell components for the workspace.
Index ¶
- Constants
- func SetTerminalTitle(title string) tea.Cmd
- type AccountEntry
- type AccountSwitchCloseMsg
- type AccountSwitchedMsg
- type AccountSwitcher
- type Breadcrumb
- func (b *Breadcrumb) AccountBadge() string
- func (b *Breadcrumb) BadgeGlobal() bool
- func (b *Breadcrumb) BadgeIndex() int
- func (b Breadcrumb) Init() tea.Cmd
- func (b *Breadcrumb) SetAccountBadge(label string, global bool)
- func (b *Breadcrumb) SetAccountBadgeIndexed(index int, name string)
- func (b *Breadcrumb) SetCrumbs(crumbs []string)
- func (b *Breadcrumb) SetExperimental(v bool)
- func (b *Breadcrumb) SetWidth(w int)
- func (b Breadcrumb) Update(msg tea.Msg) (Breadcrumb, tea.Cmd)
- func (b Breadcrumb) View() string
- type Help
- func (h *Help) ResetScroll()
- func (h *Help) SetGlobalKeys(keys [][]key.Binding)
- func (h *Help) SetSize(width, height int)
- func (h *Help) SetViewKeys(keys [][]key.Binding)
- func (h *Help) SetViewTitle(title string)
- func (h *Help) Update(msg tea.KeyMsg) (shouldClose bool, cmd tea.Cmd)
- func (h Help) View() string
- type MetricsPanel
- type Palette
- type PaletteCloseMsg
- type PaletteExecMsg
- type PoolMetricsSummary
- type QuickJump
- type QuickJumpCloseMsg
- type QuickJumpExecMsg
- type QuickJumpSource
- type StatusBar
- func (s *StatusBar) ClearStatus()
- func (s *StatusBar) HasPersistentError() bool
- func (s StatusBar) Init() tea.Cmd
- func (s *StatusBar) SetAccount(name string)
- func (s *StatusBar) SetGlobalHints(hints []key.Binding)
- func (s *StatusBar) SetKeyHints(hints []key.Binding)
- func (s *StatusBar) SetMetrics(summary *PoolMetricsSummary)
- func (s *StatusBar) SetStatus(text string, isError bool)
- func (s *StatusBar) SetWidth(w int)
- func (s *StatusBar) StatusGen() uint64
- func (s StatusBar) Update(msg tea.Msg) (StatusBar, tea.Cmd)
- func (s StatusBar) View() string
- type Toast
Constants ¶
const MetricsPanelHeight = 8
MetricsPanelHeight is the vertical space consumed by the metrics panel.
const ToastDuration = 3 * time.Second
ToastDuration is how long a toast remains visible.
Variables ¶
This section is empty.
Functions ¶
func SetTerminalTitle ¶
SetTerminalTitle returns a Cmd that sets the terminal window/tab title using Bubble Tea's built-in OSC escape sequence support.
Types ¶
type AccountEntry ¶
AccountEntry holds a resolved account for display in the switcher.
type AccountSwitchCloseMsg ¶
type AccountSwitchCloseMsg struct{}
AccountSwitchCloseMsg is sent when the switcher is dismissed without selecting.
type AccountSwitchedMsg ¶
AccountSwitchedMsg is sent when the user selects an account.
type AccountSwitcher ¶
type AccountSwitcher struct {
// contains filtered or unexported fields
}
AccountSwitcher is an overlay that lists available Basecamp accounts and lets the user pick one. Structurally similar to the command palette.
func NewAccountSwitcher ¶
func NewAccountSwitcher(styles *tui.Styles) AccountSwitcher
NewAccountSwitcher creates a new account switcher component.
func (*AccountSwitcher) Focus ¶
func (a *AccountSwitcher) Focus(accounts []AccountEntry) tea.Cmd
Focus activates the switcher with pre-loaded account data.
func (*AccountSwitcher) SetSize ¶
func (a *AccountSwitcher) SetSize(width, height int)
SetSize sets the available dimensions for the overlay.
func (*AccountSwitcher) Update ¶
func (a *AccountSwitcher) Update(msg tea.Msg) tea.Cmd
Update handles messages for the account switcher. Returns a tea.Cmd when the switcher produces an action or wants to close.
func (AccountSwitcher) View ¶
func (a AccountSwitcher) View() string
View renders the account switcher overlay.
type Breadcrumb ¶
type Breadcrumb struct {
// contains filtered or unexported fields
}
Breadcrumb renders a navigable scope trail.
func NewBreadcrumb ¶
func NewBreadcrumb(styles *tui.Styles) Breadcrumb
NewBreadcrumb creates a new breadcrumb component.
func (*Breadcrumb) AccountBadge ¶
func (b *Breadcrumb) AccountBadge() string
AccountBadge returns the current badge label (for testing).
func (*Breadcrumb) BadgeGlobal ¶
func (b *Breadcrumb) BadgeGlobal() bool
BadgeGlobal returns whether the badge is in global mode (for testing).
func (*Breadcrumb) BadgeIndex ¶
func (b *Breadcrumb) BadgeIndex() int
BadgeIndex returns the badge index (for testing).
func (*Breadcrumb) SetAccountBadge ¶
func (b *Breadcrumb) SetAccountBadge(label string, global bool)
SetAccountBadge sets the account badge displayed before the breadcrumb trail. When global is true, the badge is rendered in a standout color to indicate the view aggregates across all accounts.
func (*Breadcrumb) SetAccountBadgeIndexed ¶
func (b *Breadcrumb) SetAccountBadgeIndexed(index int, name string)
SetAccountBadgeIndexed sets a scoped account badge with a numbered index. The index is rendered in Foreground and the name in Muted to visually connect to the account switcher's numbered shortcuts.
func (*Breadcrumb) SetCrumbs ¶
func (b *Breadcrumb) SetCrumbs(crumbs []string)
SetCrumbs updates the breadcrumb trail.
func (*Breadcrumb) SetExperimental ¶ added in v0.1.1
func (b *Breadcrumb) SetExperimental(v bool)
SetExperimental enables or disables the [experimental] badge.
func (*Breadcrumb) SetWidth ¶
func (b *Breadcrumb) SetWidth(w int)
SetWidth sets the available width.
func (Breadcrumb) Update ¶
func (b Breadcrumb) Update(msg tea.Msg) (Breadcrumb, tea.Cmd)
Update implements tea.Model.
type Help ¶
type Help struct {
// contains filtered or unexported fields
}
Help renders the full-screen keyboard shortcuts overlay.
func (*Help) ResetScroll ¶
func (h *Help) ResetScroll()
ResetScroll resets the scroll position to the top.
func (*Help) SetGlobalKeys ¶
SetGlobalKeys sets the global keybinding groups displayed in the overlay.
func (*Help) SetViewKeys ¶
SetViewKeys sets the view-specific keybinding groups.
func (*Help) SetViewTitle ¶
SetViewTitle sets the name of the current view's section header.
type MetricsPanel ¶
type MetricsPanel struct {
// contains filtered or unexported fields
}
MetricsPanel renders a table of per-pool stats for observability.
func NewMetricsPanel ¶
func NewMetricsPanel(styles *tui.Styles, statsFn func() []data.PoolStatus, apdexFn func() float64) MetricsPanel
NewMetricsPanel creates a metrics panel that reads live stats.
func (*MetricsPanel) SetWidth ¶
func (m *MetricsPanel) SetWidth(w int)
SetWidth sets the available width.
type Palette ¶
type Palette struct {
// contains filtered or unexported fields
}
Palette is the command palette overlay — a text input with a filtered list of actions underneath. It is driven by the workspace and does not own the registry directly.
func NewPalette ¶
NewPalette creates a new command palette component.
func (*Palette) SetActions ¶
func (p *Palette) SetActions(names []string, descriptions []string, categories []string, executors []func() tea.Cmd)
SetActions replaces the full action list (already scope-filtered by the workspace).
type PaletteCloseMsg ¶
type PaletteCloseMsg struct{}
PaletteCloseMsg is sent when the palette wants to close itself.
type PaletteExecMsg ¶
PaletteExecMsg carries the command returned by the selected action.
type PoolMetricsSummary ¶
PoolMetricsSummary is the status bar's view of pool health.
type QuickJump ¶
type QuickJump struct {
// contains filtered or unexported fields
}
QuickJump is an overlay for jumping to projects and recent items.
func NewQuickJump ¶
NewQuickJump creates a new quick-jump overlay component.
func (*QuickJump) Focus ¶
func (q *QuickJump) Focus(src QuickJumpSource) tea.Cmd
Focus activates the text input and populates items from the given source.
type QuickJumpCloseMsg ¶
type QuickJumpCloseMsg struct{}
QuickJumpCloseMsg is sent when the quick-jump overlay is dismissed.
type QuickJumpExecMsg ¶
QuickJumpExecMsg carries the navigation command from the selected item.
type QuickJumpSource ¶
type QuickJumpSource struct {
RecentProjects []recents.Item
RecentRecordings []recents.Item
Projects []data.ProjectInfo
AccountID string
NavigateProject func(projectID int64, accountID string) tea.Cmd
NavigateRecording func(recordingID, projectID int64, accountID string) tea.Cmd
NavigateTool func(toolName string, toolID, projectID int64, accountID string) tea.Cmd
}
QuickJumpSource provides the data needed to populate the quick-jump list. This avoids importing workspace/data and recents directly, breaking the dependency direction.
type StatusBar ¶
type StatusBar struct {
// contains filtered or unexported fields
}
StatusBar renders the bottom status bar with key hints and status info.
func NewStatusBar ¶
NewStatusBar creates a new status bar.
func (*StatusBar) ClearStatus ¶
func (s *StatusBar) ClearStatus()
ClearStatus clears the status message.
func (*StatusBar) HasPersistentError ¶
HasPersistentError returns whether an error is being displayed.
func (*StatusBar) SetAccount ¶
SetAccount sets the displayed account name.
func (*StatusBar) SetGlobalHints ¶
SetGlobalHints sets the always-visible global key hints shown on the right.
func (*StatusBar) SetKeyHints ¶
SetKeyHints sets the key bindings shown as hints.
func (*StatusBar) SetMetrics ¶
func (s *StatusBar) SetMetrics(summary *PoolMetricsSummary)
SetMetrics updates the pool health metrics display.