Documentation
¶
Overview ¶
Package sync provides a TUI component for displaying sync progress.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteMsg ¶
type CompleteMsg struct {
Summary string
}
CompleteMsg indicates sync is complete
type DetailMark ¶ added in v0.19.2
type DetailMark int
DetailMark selects the status glyph shown on a detail row. Using a typed constant (rather than a bare bool) keeps the three states distinct at the call site and matches the streaming handler's markers.
const ( // MarkDone shows a green ✓ for a completed item. MarkDone DetailMark = iota // MarkWarn shows an orange ⚠ for a skipped/attention item. MarkWarn // MarkInProgress shows a dim → for an item still in flight. MarkInProgress )
type Model ¶
type Model struct {
core.BaseModel // Embedded for ReadySignaler interface
CurrentPhase Phase
CurrentDetail string // Current operation being performed
TotalOps int
CompletedOps int
Progress progress.Model
Summary string
// contains filtered or unexported fields
}
Model is the bubbletea model for sync progress. It embeds core.BaseModel for standard lifecycle handling. Uses tea.Printf to print completed items above the active UI.
type PhaseCompleteMsg ¶
type PhaseCompleteMsg struct {
Phase Phase
}
PhaseCompleteMsg indicates a phase has completed
type PhaseDetailMsg ¶
type PhaseDetailMsg struct {
Phase Phase
Message string
Mark DetailMark // Status glyph for the row (defaults to MarkDone)
}
PhaseDetailMsg adds a detail line to a phase (printed above TUI)
type PhaseStartMsg ¶
type PhaseStartMsg struct {
Phase Phase
Message string // Phase header message (e.g., "📥 Pulling from remote...")
}
PhaseStartMsg indicates a phase has started
type ProgressTickMsg ¶
ProgressTickMsg updates the progress bar