Documentation
¶
Overview ¶
Package tui implements the terminal UI: a stack of screens over the gitlabx service, built on Bubble Tea.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the root Bubble Tea model: it owns the screen stack and window chrome and routes every other message to the top screen.
type CheckoutFunc ¶
type CheckoutFunc func(ctx context.Context, mr gitlabx.MRDetail, progress func(string)) (path string, cleanup func(context.Context) error, err error)
CheckoutFunc prepares a review worktree for an MR and returns its path plus a cleanup function. Progress lines go to the TUI's review log.
type Deps ¶
type Deps struct {
Cfg config.Config
Svc gitlabx.Service
Reviewer review.Reviewer
Checkout CheckoutFunc
CfgFor func(projectPath string) config.Config
}
Deps bundles everything screens need. CfgFor resolves per-project overrides on top of the base configuration.
type Screen ¶
type Screen interface {
Init() tea.Cmd
Update(msg tea.Msg) (Screen, tea.Cmd)
View() string
Title() string
// Hints is the contextual key help shown in the status bar.
Hints() string
}
Screen is one screen on the navigation stack. Screens receive an adjusted WindowSizeMsg (content area only) and may emit pushScreenMsg/popScreenMsg commands to navigate.