stackview

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchNode

type BranchNode struct {
	Ref          stack.BranchRef
	IsCurrent    bool
	IsLinear     bool // whether history is linear with base branch
	BaseBranch   string
	Commits      []git.CommitInfo   // commits unique to this branch (base..head)
	FilesChanged []git.FileDiffStat // per-file diff stats
	PR           *ghapi.PRDetails
	Additions    int
	Deletions    int

	// UI state
	CommitsExpanded bool
	FilesExpanded   bool
}

BranchNode holds all display data for a single branch in the stack.

func LoadBranchNodes

func LoadBranchNodes(cfg *config.Config, s *stack.Stack, currentBranch string) []BranchNode

LoadBranchNodes populates branch display data from a stack.

type Model

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

Model is the Bubbletea model for the interactive stack view.

func New

func New(nodes []BranchNode, trunk stack.BranchRef, version string) Model

New creates a new stack view model.

func (Model) CheckoutBranch

func (m Model) CheckoutBranch() string

CheckoutBranch returns the branch to checkout after the TUI exits, if any.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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