Documentation
¶
Overview ¶
Package spinner provides a Bubble Tea progress display for `prosa sync`. The view is compact and fixed-height: one header, one found-summary, two phase rows, one current line, and up to 5 rolling error blocks. View() runs in O(K) where K = visible error slots — independent of N.
Callers outside an interactive TTY must NOT call Run — sync.go gates on cli.IsInteractive() and falls back to slog-linear output instead.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Title prints on the very top line (defaults to "prosa sync · local store").
Title string
// Banner is a free-form fragment displayed after Title (legacy bundle path).
Banner string
// Found summarizes discovered work per agent. Optional.
Found string
// RemoteEnabled shows the remote catch-up row and waits for it before quit.
RemoteEnabled bool
}
Options tune the compact view's framing.
type Update ¶
type Update struct {
Phase Phase
Begin bool
Total int
Verb string
SetTotal bool
Done bool
Extra string
Index int
Started bool
Skipped bool
Err error
// Active sets the current line for the given phase without bumping counters.
Active *Item
}
Update is produced by the sync driver goroutine for lifecycle events and per-item progress.
Click to show internal directories.
Click to hide internal directories.