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

flowlist

package
v0.7.225 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package flowlist is the read-only flow list component. Its host forwards messages to it, renders Content, and handles the messages it emits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackMsg

type BackMsg struct{}

BackMsg asks the host to show runs, without ending the program.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is a Bubble Tea component, not a standalone tea.Model.

func New

func New(ctx context.Context, list func(context.Context) ([]circleci.Flow, error), preview func(context.Context, string) (string, []circleci.PlanComment, error)) Model

New creates a list of the flows list returns, each previewed with preview. Both callbacks must honor ctx cancellation.

func (Model) Content

func (m Model) Content() string

Content draws the flow list, its footer included, within the last WindowSizeMsg. The host draws the header above it.

func (Model) Init

func (m Model) Init() tea.Cmd

Init requests the first list. Polling starts when that request finishes.

func (Model) Len

func (m Model) Len() int

Len is how many open flows the list shows.

func (Model) Refresh

func (m Model) Refresh() tea.Cmd

Refresh requests fresh list and preview data. Concurrent refresh requests coalesce; only one list callback can be in flight at a time.

func (Model) Select

func (m Model) Select(id string) Model

Select selects a flow. The next Update starts its preview; hosts can issue Refresh after Select to start that update immediately when returning from a workspace.

func (Model) Update

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

Update advances the component. Navigation and quit requests are commands; the host decides whether it is safe to leave a workspace or end the program.

func (Model) WithNote

func (m Model) WithNote(note string) Model

WithNote sets the host's note, a line under the help bar. An empty note clears it.

type NewMsg

type NewMsg struct{}

NewMsg asks the host to start a new plan workspace.

type OpenMsg

type OpenMsg struct{ ID, Title string }

OpenMsg asks the host to open a flow's plan workspace. ID is the flow's, which is its plan's.

type QuitMsg

type QuitMsg struct{}

QuitMsg asks the host to quit after checking for unsent workspace input.

Jump to

Keyboard shortcuts

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