ui

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintPlainProgress

func PrintPlainProgress(out io.Writer, id PhaseID, status string, summary string, err error)

PrintPlainProgress writes a single non-TTY progress line for one phase.

func RunSyncProgress

func RunSyncProgress(visiblePhases []PhaseID, markerSlots int) (*tea.Program, *syncModel)

RunSyncProgress starts the Bubbletea inline program for sync progress. markerSlots pre-allocates lines for marker sub-items so the view height stays constant (prevents ghost lines from terminal scroll).

Types

type MarkerDoneMsg

type MarkerDoneMsg struct {
	PackID string
	Index  int
	Label  string
	Lines  int
	Err    error
}

MarkerDoneMsg is sent by fetch goroutines when a marker fetch completes.

type MarkerItem

type MarkerItem struct {
	PackID string
	Index  int
	Label  string
	State  string // "fetching", "done", "failed"
	Lines  int
}

MarkerItem represents a single marker sub-item in the sync progress display.

type PhaseDoneMsg

type PhaseDoneMsg struct {
	ID      PhaseID
	Summary string
	Err     error
}

PhaseDoneMsg is sent when a sync phase completes (successfully or with error).

type PhaseID

type PhaseID int

PhaseID identifies a sync phase.

const (
	PhaseContent PhaseID = iota
	PhaseCompany
	PhaseMarkers
	PhaseChangelog
	PhaseEvents
	PhaseYouTube
	PhaseNews
	PhaseDiscovery
	PhaseTutorials
	PhaseLearning
)

type PhaseSkipMsg

type PhaseSkipMsg struct{ ID PhaseID }

PhaseSkipMsg is sent when a sync phase is skipped (e.g. content is fresh).

type PhaseStartMsg

type PhaseStartMsg struct{ ID PhaseID }

PhaseStartMsg is sent when a sync phase begins.

type SetMarkersMsg

type SetMarkersMsg struct{ Items []MarkerItem }

SetMarkersMsg populates marker sub-items in the model.

type SyncDoneMsg

type SyncDoneMsg struct{ FatalErr error }

SyncDoneMsg signals that all sync work is complete.

type WarnMsg

type WarnMsg struct{ Text string }

WarnMsg queues a warning to be printed after the progress display exits.

Jump to

Keyboard shortcuts

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