tui

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package tui holds the bubbletea models for `wb sync`'s progress display and its post-run interactive results browser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reviewable

func Reviewable(r fleetsync.Result) bool

Reviewable reports whether a result belongs in the drill-down list.

Types

type ProgressModel

type ProgressModel struct {
	Results []fleetsync.Result
	// contains filtered or unexported fields
}

ProgressModel renders an overall bar, one bar per org, and a bounded live tail of in-flight repos while a sync runs.

func NewProgressModel

func NewProgressModel(orgTotal map[string]int, maxInFlight int) ProgressModel

NewProgressModel builds a ProgressModel for the given per-org repo counts (orgTotal) and the worker count (maxInFlight, the live-tail row limit).

func (ProgressModel) Init

func (m ProgressModel) Init() tea.Cmd

func (ProgressModel) Update

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

func (ProgressModel) View

func (m ProgressModel) View() string

type RepoDone

type RepoDone struct{ Result fleetsync.Result }

RepoDone signals a worker finished processing a repo.

type RepoStarted

type RepoStarted struct{ Org, Name string }

RepoStarted signals a worker began processing org/name.

type ResultsModel

type ResultsModel struct {
	// contains filtered or unexported fields
}

ResultsModel is the interactive drill-down: a list of repos that need review, and a detail view for the currently selected one.

func NewResultsModel

func NewResultsModel(results []fleetsync.Result) ResultsModel

NewResultsModel builds a ResultsModel over the reviewable results — Failed, SkippedDirty, or KeptArchived. Results in other states are omitted; they synced cleanly and need no review.

func (ResultsModel) Init

func (m ResultsModel) Init() tea.Cmd

func (ResultsModel) Update

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

func (ResultsModel) View

func (m ResultsModel) View() string

type SyncDone

type SyncDone struct{}

SyncDone signals every repo has been processed; the program should quit.

Jump to

Keyboard shortcuts

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