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 ¶
func SelectInstance ¶ added in v1.5.0
SelectInstance runs a minimal inline picker over the configured GitLab instances and returns the chosen name. It runs before the main TUI starts because the GitLab client is built for the chosen instance.
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 = runner.CheckoutFunc
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
// Chatter answers conversational questions about an MR inside its
// checkout; nil hides the chat keys.
Chatter review.Chatter
Checkout CheckoutFunc
CfgFor func(projectPath string) config.Config
// Agents is the catalog of available review agents (builtins + user
// agents); nil means builtins only.
Agents *agents.Catalog
// Selection remembers the last agent selection per project; nil is a
// no-op store.
Selection *agents.SelectionStore
// ProjectAgents caches the repo-shipped agent definitions the picker
// fetches over the API, per (project, MR head); nil fetches uncached.
ProjectAgents *agents.RemoteCache
// Logs stores each review run's progress log for later viewing; nil
// disables both storing and the log screens' content.
Logs *runlog.Store
// Results stores each review's result with its curation states, so past
// reviews can be reopened; nil disables storing and reopening.
Results *resultstore.Store
OpenURL func(url string) error
}
Deps bundles everything screens need. CfgFor resolves per-project overrides on top of the base configuration. OpenURL overrides the default browser launcher (tests inject a recorder).
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.