tui

package
v0.0.0-...-d98bda9 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchEditor

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

BranchEditor wraps textinput for editing branch names with locked prefix

func NewBranchEditor

func NewBranchEditor(prefix, defaultSuffix string) BranchEditor

NewBranchEditor creates a new branch editor with locked prefix

func (*BranchEditor) Blur

func (e *BranchEditor) Blur()

Blur removes focus from the text input

func (*BranchEditor) Focus

func (e *BranchEditor) Focus() tea.Cmd

Focus sets focus on the text input

func (BranchEditor) Init

func (e BranchEditor) Init() tea.Cmd

Init implements tea.Model

func (BranchEditor) Update

func (e BranchEditor) Update(msg tea.Msg) (BranchEditor, tea.Cmd)

Update implements tea.Model

func (BranchEditor) Value

func (e BranchEditor) Value() string

Value returns the full sanitized branch name

func (BranchEditor) View

func (e BranchEditor) View() string

View implements tea.Model

type IssueDelegate

type IssueDelegate struct{}

IssueDelegate is a custom delegate for rendering issue items

func (IssueDelegate) Height

func (d IssueDelegate) Height() int

Height implements list.ItemDelegate

func (IssueDelegate) Render

func (d IssueDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)

Render implements list.ItemDelegate

func (IssueDelegate) Spacing

func (d IssueDelegate) Spacing() int

Spacing implements list.ItemDelegate

func (IssueDelegate) Update

func (d IssueDelegate) Update(_ tea.Msg, _ *list.Model) tea.Cmd

Update implements list.ItemDelegate

type IssueItem

type IssueItem struct {
	Issue        linear.Issue
	BranchExists bool
}

IssueItem wraps a Linear issue for use in bubbles/list

func (IssueItem) Description

func (i IssueItem) Description() string

Description implements list.DefaultItem interface

func (IssueItem) FilterValue

func (i IssueItem) FilterValue() string

FilterValue implements list.Item interface for fuzzy search

func (IssueItem) Title

func (i IssueItem) Title() string

Title implements list.DefaultItem interface

type Model

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

Model is the main TUI model

func NewModel

func NewModel(client *linear.Client) Model

NewModel creates a new TUI model

func (Model) Init

func (m Model) Init() tea.Cmd

Init implements tea.Model

func (Model) Update

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

Update implements tea.Model

func (Model) View

func (m Model) View() string

View implements tea.Model

type State

type State int

State represents the current state of the TUI

const (
	StateLoading State = iota
	StateIssueList
	StateBranchEdit
	StateConfirm
	StateExistingBranch
	StateResult
	StateError
)

Jump to

Keyboard shortcuts

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