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

submit

package
v0.17.14 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package submit provides a TUI component for displaying the progress of a stack submission.

Package submit provides a TUI component for displaying the progress of a stack submission.

Index

Constants

View Source
const (
	// StatusSubmitting indicates the branch is currently being submitted
	StatusSubmitting = "submitting"
	// StatusSyncing indicates the branch metadata is being synced
	StatusSyncing = "syncing"
	// StatusDone indicates the branch submission was successful
	StatusDone = "done"
	// StatusError indicates the branch submission failed
	StatusError = "error"
	// StatusPending indicates the branch is waiting to be submitted
	StatusPending = "pending"
	// SkipReasonNoChanges indicates the branch was skipped because it has no changes
	SkipReasonNoChanges = "no changes"
	// ActionUpdate indicates the branch will update an existing PR
	ActionUpdate = "update"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalMessageMsg

type GlobalMessageMsg string

GlobalMessageMsg is sent to display a global message (e.g., "Submitting...")

type Item

type Item struct {
	BranchName string
	Action     string // "create" or "update"
	PRNumber   *int
	Status     string // "pending", "submitting", "done", "error"
	IsSkipped  bool
	SkipReason string
	URL        string
	Error      error
}

Item represents a branch being submitted

type Model

type Model struct {
	core.BaseModel // Embedded for ReadySignaler interface
	Items          []Item
	Renderer       *tree.StackTreeRenderer
	RootBranch     string

	Styles        Styles
	GlobalMessage string
	IsSequential  bool // Sequential submission mode for PR ordering
	// contains filtered or unexported fields
}

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

func NewModel

func NewModel(items []Item) *Model

NewModel creates a new submit 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 and updates the model.

func (*Model) View

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

View renders the model as a string.

type PlanUpdateMsg

type PlanUpdateMsg struct {
	BranchName string
	Action     string
	IsCurrent  bool
	Skip       bool
	SkipReason string
}

PlanUpdateMsg is sent when a branch plan is updated

type ProgressCompleteMsg

type ProgressCompleteMsg struct{}

ProgressCompleteMsg is sent when all submissions are finished

type ProgressUpdateMsg

type ProgressUpdateMsg struct {
	BranchName string
	Status     string
	URL        string
	Err        error
}

ProgressUpdateMsg is sent to update the status of a specific branch submission

type SetSequentialMsg

type SetSequentialMsg struct {
	IsSequential bool
}

SetSequentialMsg indicates sequential submission mode for PR ordering

type StartSubmitMsg

type StartSubmitMsg struct {
	Items []Item
}

StartSubmitMsg is sent when the submission phase begins

type Styles

type Styles struct {
	SpinnerStyle lipgloss.Style
	DoneStyle    lipgloss.Style
	ErrorStyle   lipgloss.Style
	BranchStyle  lipgloss.Style
	URLStyle     lipgloss.Style
	DimStyle     lipgloss.Style
}

Styles defines the visual styling for the submit component. It uses the shared style definitions from internal/tui/style for consistency.

func DefaultStyles

func DefaultStyles() Styles

DefaultStyles returns the default styles for the submit component, using shared styles from the style package for consistency.

Jump to

Keyboard shortcuts

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