Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(projects []Project, devPath, editor string, provider ProjectProvider) error
Run launches the interactive project and git dashboard.
Projects are passed in as plain DTOs plus a provider for reloading them after mutations, so this package never reads configuration storage. Callers in cmd/ adapt config types (see FromConfigProjects) before calling.
Types ¶
type ActionItem ¶
type ActionRow ¶ added in v1.51.0
type ActionRow struct {
RepoName string
PrettyName string
Status ActionStatus
Detail string
}
ActionRow is one stable row in the action modal.
type ActionStatus ¶ added in v1.51.0
type ActionStatus int
ActionStatus is the Docker-like per-repo state shown in the action modal.
const ( // ActionPending marks a queued repo that has not started yet. ActionPending ActionStatus = iota // ActionRunning marks the repo currently being processed. ActionRunning // ActionDone marks a repo that completed successfully. ActionDone // ActionSkipped marks a repo that was skipped (not cloned / already cloned). ActionSkipped // ActionFailed marks a repo whose action returned an error. ActionFailed )
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubble Tea model for the dashboard.
func NewModel ¶
func NewModel(projects []Project, devPath, editor string, provider ProjectProvider) Model
NewModel initializes the dashboard model with the given projects. provider reloads projects after mutations (may be nil only in tests that never add projects; add flows with a nil provider keep current state).
type NotificationType ¶ added in v1.17.0
type NotificationType int
const ( NotifySuccess NotificationType = iota NotifyError NotifyWarn )
type Project ¶ added in v1.53.0
Project is a dashboard-local view of a project: a named group of repos.
type ProjectItem ¶
type ProjectItem struct {
Project Project
}
ProjectItem adapts Project to the list.Item interface.
func (ProjectItem) Description ¶
func (i ProjectItem) Description() string
func (ProjectItem) FilterValue ¶
func (i ProjectItem) FilterValue() string
func (ProjectItem) Title ¶
func (i ProjectItem) Title() string
type ProjectProvider ¶ added in v1.53.0
type ProjectProvider func() []Project
ProjectProvider reloads the current project list (e.g. after the `eng project add` subprocess adds a repository). Injected by the caller so the dashboard never reads configuration storage directly.
type Repo ¶ added in v1.53.0
Repo is a dashboard-local view of a repository: its clone URL plus an optional custom directory name. It mirrors config.ProjectRepo without importing the config package, keeping presentation decoupled from domain.
type RepoStatus ¶
type RepoStatus struct {
IsCloned bool
IsDirty bool
Branch string
IsDetached bool
AheadCount int
BehindCount int
HasUpstream bool
UnstagedCount int
StagedCount int
UntrackedCount int
ConflictCount int
OngoingOp string
Error error
Loading bool
LastUpdated time.Time
}
RepoStatus holds the asynchronously loaded status of a repository.