Help us shape the future of Go! Take the 2026 Go Developer Survey

dashboard

package
v1.59.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 22 Imported by: 0

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 ActionItem struct {
	Action   string
	RepoName string
	FullPath string
}

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).

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type NotificationType added in v1.17.0

type NotificationType int
const (
	NotifySuccess NotificationType = iota
	NotifyError
	NotifyWarn
)

type PaneFocus

type PaneFocus int
const (
	FocusLeft PaneFocus = iota
	FocusRight
)

type Project added in v1.53.0

type Project struct {
	Name  string
	Repos []Repo
}

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

type Repo struct {
	URL  string
	Path string
}

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.

Jump to

Keyboard shortcuts

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