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

flatten

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package flatten provides a TUI component for displaying flatten 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 flatten is complete

type Model

type Model struct {
	core.BaseModel // Embedded for ReadySignaler interface
	Phases         []PhaseItem
	CurrentPhase   Phase
	Progress       progress.Model

	ValidatingIdx   int
	ValidatingTotal int
	CurrentBranch   string
	Summary         string
	// contains filtered or unexported fields
}

Model is the bubbletea model for flatten progress. It embeds core.BaseModel for standard lifecycle handling.

func NewModel

func NewModel() *Model

NewModel creates a new flatten model

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init initializes the model

func (*Model) Update

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

Update handles messages

func (*Model) View

func (m *Model) View() tea.View

View renders the model

type Phase

type Phase string

Phase represents a flatten phase

const (
	PhaseAnalyzing  Phase = "analyzing"
	PhaseValidating Phase = "validating"
	PhaseFlattening Phase = "flattening"
	PhaseRestacking Phase = "restacking"
)

Phase constants

type PhaseDetailMsg

type PhaseDetailMsg struct {
	Phase   Phase
	Message string
}

PhaseDetailMsg adds a detail line to a phase

type PhaseItem

type PhaseItem struct {
	Phase   Phase
	Status  core.Status
	Message string
	Details []string // Lines of detail output for this phase
}

PhaseItem represents progress for a single phase

type PhaseStartMsg

type PhaseStartMsg struct {
	Phase Phase
}

PhaseStartMsg indicates a phase has started

type ValidationProgressMsg

type ValidationProgressMsg struct {
	Current int
	Total   int
	Branch  string
}

ValidationProgressMsg updates validation progress

Jump to

Keyboard shortcuts

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