tui

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunRootTUI

func RunRootTUI(ctx context.Context, proj *project.Project, enableMouse bool) error

RunRootTUI starts the TUI with the new root model

Types

type BeadFormAction

type BeadFormAction int

BeadFormAction represents an action result from the panel

const (
	BeadFormActionNone BeadFormAction = iota
	BeadFormActionCancel
	BeadFormActionSubmit
)

type BeadFormMode

type BeadFormMode int

BeadFormMode indicates which mode the form is in

const (
	BeadFormModeCreate BeadFormMode = iota
	BeadFormModeAddChild
	BeadFormModeEdit
)

type BeadFormPanel

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

BeadFormPanel renders the bead create/edit form.

func NewBeadFormPanel

func NewBeadFormPanel() *BeadFormPanel

NewBeadFormPanel creates a new BeadFormPanel

func (*BeadFormPanel) Blur

func (p *BeadFormPanel) Blur()

Blur removes focus from all inputs

func (*BeadFormPanel) GetMode

func (p *BeadFormPanel) GetMode() BeadFormMode

GetMode returns the current form mode

func (*BeadFormPanel) GetResult

func (p *BeadFormPanel) GetResult() BeadFormResult

GetResult returns the current form values

func (*BeadFormPanel) Init

func (p *BeadFormPanel) Init() tea.Cmd

Init initializes the panel and returns any initial command

func (*BeadFormPanel) IsFocused

func (p *BeadFormPanel) IsFocused() bool

IsFocused returns whether the panel is focused

func (*BeadFormPanel) Render

func (p *BeadFormPanel) Render(visibleLines int) string

Render returns the bead form content

func (*BeadFormPanel) RenderWithPanel

func (p *BeadFormPanel) RenderWithPanel(contentHeight int) string

RenderWithPanel returns the panel with border styling

func (*BeadFormPanel) Reset

func (p *BeadFormPanel) Reset()

Reset resets the form to initial state for creating a new bead

func (*BeadFormPanel) SetAddChildMode

func (p *BeadFormPanel) SetAddChildMode(parentID string)

SetAddChildMode configures the form for adding a child bead

func (*BeadFormPanel) SetEditMode

func (p *BeadFormPanel) SetEditMode(beadID, title, description, beadType string, priority int, status string)

SetEditMode configures the form for editing an existing bead

func (*BeadFormPanel) SetFocus

func (p *BeadFormPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*BeadFormPanel) SetFormState

func (p *BeadFormPanel) SetFormState(
	titleInput *textinput.Model,
	descTextarea *textarea.Model,
	beadType int,
	priority int,
	focusIdx int,
)

SetFormState updates the form state (deprecated - panel owns its state now)

func (*BeadFormPanel) SetHoveredButton

func (p *BeadFormPanel) SetHoveredButton(button string)

SetHoveredButton updates which button is hovered

func (*BeadFormPanel) SetMode

func (p *BeadFormPanel) SetMode(mode BeadFormMode, editBeadID, parentID string)

SetMode updates the form mode (deprecated - use Reset/SetEditMode/SetAddChildMode)

func (*BeadFormPanel) SetSize

func (p *BeadFormPanel) SetSize(width, height int)

SetSize updates the panel dimensions

func (*BeadFormPanel) Update

func (p *BeadFormPanel) Update(msg tea.KeyMsg) (tea.Cmd, BeadFormAction)

Update handles key events and returns an action

type BeadFormResult

type BeadFormResult struct {
	Title       string
	Description string
	BeadType    string
	Priority    int
	Status      string // Only used in edit mode
	EditBeadID  string // Non-empty when editing
	ParentID    string // Non-empty when adding child
}

BeadFormResult contains form values when submitted

type CreateWorkAction

type CreateWorkAction int

CreateWorkAction represents an action result from the panel

const (
	CreateWorkActionNone CreateWorkAction = iota
	CreateWorkActionCancel
	CreateWorkActionExecute
	CreateWorkActionAuto
)

type CreateWorkPanel

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

CreateWorkPanel renders the work creation form.

func NewCreateWorkPanel

func NewCreateWorkPanel() *CreateWorkPanel

NewCreateWorkPanel creates a new CreateWorkPanel

func (*CreateWorkPanel) Blur

func (p *CreateWorkPanel) Blur()

Blur removes focus from the input

func (*CreateWorkPanel) GetBeadID

func (p *CreateWorkPanel) GetBeadID() string

GetBeadID returns the bead ID for this work

func (*CreateWorkPanel) GetResult

func (p *CreateWorkPanel) GetResult() CreateWorkResult

GetResult returns the current form values

func (*CreateWorkPanel) Init

func (p *CreateWorkPanel) Init() tea.Cmd

Init initializes the panel and returns any initial command

func (*CreateWorkPanel) IsFocused

func (p *CreateWorkPanel) IsFocused() bool

IsFocused returns whether the panel is focused

func (*CreateWorkPanel) Render

func (p *CreateWorkPanel) Render() string

Render returns the work creation form content

func (*CreateWorkPanel) RenderWithPanel

func (p *CreateWorkPanel) RenderWithPanel(contentHeight int) string

RenderWithPanel returns the panel with border styling

func (*CreateWorkPanel) Reset

func (p *CreateWorkPanel) Reset(beadID string, branchName string)

Reset resets the form to initial state

func (*CreateWorkPanel) SetBranches

func (p *CreateWorkPanel) SetBranches(branches []string)

SetBranches sets the available branches for selection

func (*CreateWorkPanel) SetFocus

func (p *CreateWorkPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*CreateWorkPanel) SetFormState

func (p *CreateWorkPanel) SetFormState(
	beadID string,
	branchInput *textinput.Model,
	fieldIdx int,
	buttonIdx int,
)

SetFormState updates the form state (deprecated - panel owns its state now)

func (*CreateWorkPanel) SetHoveredButton

func (p *CreateWorkPanel) SetHoveredButton(button string)

SetHoveredButton updates which button is hovered

func (*CreateWorkPanel) SetSize

func (p *CreateWorkPanel) SetSize(width, height int)

SetSize updates the panel dimensions

func (*CreateWorkPanel) Update

func (p *CreateWorkPanel) Update(msg tea.KeyMsg) (tea.Cmd, CreateWorkAction)

Update handles key events and returns an action

type CreateWorkResult

type CreateWorkResult struct {
	BranchName        string
	BeadID            string
	UseExistingBranch bool
}

CreateWorkResult contains form values when submitted

type IssueDetailsPanel

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

IssueDetailsPanel renders issue details for the focused bead.

func NewIssueDetailsPanel

func NewIssueDetailsPanel() *IssueDetailsPanel

NewIssueDetailsPanel creates a new IssueDetailsPanel

func (*IssueDetailsPanel) GetViewport

func (p *IssueDetailsPanel) GetViewport() *viewport.Model

GetViewport returns the viewport for external updates

func (*IssueDetailsPanel) IsFocused

func (p *IssueDetailsPanel) IsFocused() bool

IsFocused returns whether the panel is focused

func (*IssueDetailsPanel) Render

func (p *IssueDetailsPanel) Render() string

Render returns the details panel content (without border/panel styling)

func (*IssueDetailsPanel) RenderWithPanel

func (p *IssueDetailsPanel) RenderWithPanel(contentHeight int) string

RenderWithPanel returns the details panel with border styling

func (*IssueDetailsPanel) ScrollDown

func (p *IssueDetailsPanel) ScrollDown()

ScrollDown scrolls the content down (shows later content)

func (*IssueDetailsPanel) ScrollToBottom

func (p *IssueDetailsPanel) ScrollToBottom()

ScrollToBottom scrolls to the end of the content

func (*IssueDetailsPanel) ScrollToTop

func (p *IssueDetailsPanel) ScrollToTop()

ScrollToTop scrolls to the beginning of the content

func (*IssueDetailsPanel) ScrollUp

func (p *IssueDetailsPanel) ScrollUp()

ScrollUp scrolls the content up (shows earlier content)

func (*IssueDetailsPanel) SetData

func (p *IssueDetailsPanel) SetData(focusedBead *beadItem, hasActiveSession bool, childBeadMap map[string]*beadItem)

SetData updates the panel's data with the focused bead

func (*IssueDetailsPanel) SetFocus

func (p *IssueDetailsPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*IssueDetailsPanel) SetSize

func (p *IssueDetailsPanel) SetSize(width, height int)

SetSize updates the panel dimensions

type IssuesPanel

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

IssuesPanel renders the issues list with filtering, tree structure, and selection.

func NewIssuesPanel

func NewIssuesPanel() *IssuesPanel

NewIssuesPanel creates a new IssuesPanel

func (*IssuesPanel) DetectHoveredIssue

func (p *IssuesPanel) DetectHoveredIssue(msg tea.MouseMsg) int

DetectHoveredIssue determines which issue is at the mouse position using bubblezone Returns the absolute index in beadItems, or -1 if not over an issue

func (*IssuesPanel) GetHoveredIssue

func (p *IssuesPanel) GetHoveredIssue() int

GetHoveredIssue returns the currently hovered issue index

func (*IssuesPanel) IsFocused

func (p *IssuesPanel) IsFocused() bool

IsFocused returns whether the panel is focused

func (*IssuesPanel) Render

func (p *IssuesPanel) Render(visibleLines int) string

Render returns the issues panel content (without border/panel styling)

func (*IssuesPanel) RenderWithPanel

func (p *IssuesPanel) RenderWithPanel(contentHeight int) string

RenderWithPanel returns the issues panel with border styling

func (*IssuesPanel) SetData

func (p *IssuesPanel) SetData(
	beadItems []beadItem,
	cursor int,
	filters beadFilters,
	expanded bool,
	selectedBeads map[string]bool,
	activeSessions map[string]bool,
	newBeads map[string]time.Time,
)

SetData updates the panel's data

func (*IssuesPanel) SetFocus

func (p *IssuesPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*IssuesPanel) SetHoveredIssue

func (p *IssuesPanel) SetHoveredIssue(index int)

SetHoveredIssue updates which issue is hovered

func (*IssuesPanel) SetSize

func (p *IssuesPanel) SetSize(width, height int)

SetSize updates the panel dimensions

func (*IssuesPanel) SetWorkContext

func (p *IssuesPanel) SetWorkContext(focusedWorkID string)

SetWorkContext updates work-related display state

type LinearImportAction

type LinearImportAction int

LinearImportAction represents an action result from the panel

const (
	LinearImportActionNone LinearImportAction = iota
	LinearImportActionCancel
	LinearImportActionSubmit
)

type LinearImportPanel

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

LinearImportPanel renders the Linear import form.

func NewLinearImportPanel

func NewLinearImportPanel() *LinearImportPanel

NewLinearImportPanel creates a new LinearImportPanel

func (*LinearImportPanel) Blur

func (p *LinearImportPanel) Blur()

Blur removes focus from the input

func (*LinearImportPanel) GetResult

func (p *LinearImportPanel) GetResult() LinearImportResult

GetResult returns the current form values

func (*LinearImportPanel) Init

func (p *LinearImportPanel) Init() tea.Cmd

Init initializes the panel and returns any initial command

func (*LinearImportPanel) IsFocused

func (p *LinearImportPanel) IsFocused() bool

IsFocused returns whether the panel is focused

func (*LinearImportPanel) Render

func (p *LinearImportPanel) Render() string

Render returns the Linear import form content

func (*LinearImportPanel) RenderWithPanel

func (p *LinearImportPanel) RenderWithPanel(contentHeight int) string

RenderWithPanel returns the panel with border styling

func (*LinearImportPanel) Reset

func (p *LinearImportPanel) Reset()

Reset resets the form to initial state

func (*LinearImportPanel) SetFocus

func (p *LinearImportPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*LinearImportPanel) SetHoveredButton

func (p *LinearImportPanel) SetHoveredButton(button string)

SetHoveredButton updates which button is hovered

func (*LinearImportPanel) SetImporting

func (p *LinearImportPanel) SetImporting(importing bool)

SetImporting sets the importing state

func (*LinearImportPanel) SetSize

func (p *LinearImportPanel) SetSize(width, height int)

SetSize updates the panel dimensions

func (*LinearImportPanel) Update

Update handles key events and returns an action

type LinearImportResult

type LinearImportResult struct {
	IssueIDs   string
	CreateDeps bool
	Update     bool
	DryRun     bool
	MaxDepth   int
}

LinearImportResult contains form values when submitted

type PRImportAction

type PRImportAction int

PRImportAction represents an action result from the panel

const (
	PRImportActionNone PRImportAction = iota
	PRImportActionCancel
	PRImportActionSubmit
	PRImportActionPreview
)

type PRImportPanel

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

PRImportPanel renders the PR import form.

func NewPRImportPanel

func NewPRImportPanel() *PRImportPanel

NewPRImportPanel creates a new PRImportPanel

func (*PRImportPanel) Blur

func (p *PRImportPanel) Blur()

Blur removes focus from the input

func (*PRImportPanel) GetResult

func (p *PRImportPanel) GetResult() PRImportResult

GetResult returns the current form values

func (*PRImportPanel) Init

func (p *PRImportPanel) Init() tea.Cmd

Init initializes the panel and returns any initial command

func (*PRImportPanel) IsFocused

func (p *PRImportPanel) IsFocused() bool

IsFocused returns whether the panel is focused

func (*PRImportPanel) Render

func (p *PRImportPanel) Render() string

Render returns the PR import form content

func (*PRImportPanel) RenderWithPanel

func (p *PRImportPanel) RenderWithPanel(contentHeight int) string

RenderWithPanel returns the panel with border styling

func (*PRImportPanel) Reset

func (p *PRImportPanel) Reset()

Reset resets the form to initial state

func (*PRImportPanel) SetFocus

func (p *PRImportPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*PRImportPanel) SetHoveredButton

func (p *PRImportPanel) SetHoveredButton(button string)

SetHoveredButton updates which button is hovered

func (*PRImportPanel) SetImporting

func (p *PRImportPanel) SetImporting(importing bool)

SetImporting sets the importing state

func (*PRImportPanel) SetPreviewResult

func (p *PRImportPanel) SetPreviewResult(metadata *github.PRMetadata, err error)

SetPreviewResult sets the PR metadata preview result

func (*PRImportPanel) SetPreviewing

func (p *PRImportPanel) SetPreviewing(previewing bool)

SetPreviewing sets the previewing state

func (*PRImportPanel) SetSize

func (p *PRImportPanel) SetSize(width, height int)

SetSize updates the panel dimensions

func (*PRImportPanel) Update

func (p *PRImportPanel) Update(msg tea.KeyMsg) (tea.Cmd, PRImportAction)

Update handles key events and returns an action

type PRImportResult

type PRImportResult struct {
	PRURL string
}

PRImportResult contains form values when submitted

type Panel

type Panel int

Panel represents which panel is currently focused

const (
	PanelLeft        Panel = iota // Left panel (issues)
	PanelMiddle                   // Middle panel at current depth (used by tui.go)
	PanelRight                    // Right panel (details/forms)
	PanelWorkDetails              // Work details in split view
	PanelWorkTabs                 // Work tabs bar for work selection
)

type StatusBar

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

StatusBar is the status bar panel at the bottom of the TUI. It renders command buttons, status messages, and handles hover/click detection.

func NewStatusBar

func NewStatusBar() *StatusBar

NewStatusBar creates a new StatusBar panel

func (*StatusBar) ClearStatus

func (s *StatusBar) ClearStatus()

ClearStatus clears the status message

func (*StatusBar) DetectButton

func (s *StatusBar) DetectButton(msg tea.MouseMsg) string

DetectButton determines which button is at the mouse position using bubblezone

func (*StatusBar) GetHoveredButton

func (s *StatusBar) GetHoveredButton() string

GetHoveredButton returns which button is currently hovered

func (*StatusBar) Render

func (s *StatusBar) Render() string

Render returns the status bar content

func (*StatusBar) SetContext

func (s *StatusBar) SetContext(ctx StatusBarContext)

SetContext updates the status bar context (which panel's commands to show)

func (*StatusBar) SetDataProviders

func (s *StatusBar) SetDataProviders(
	getBeadItems func() []beadItem,
	getBeadsCursor func() int,
	getActiveSessions func() map[string]bool,
	getViewMode func() ViewMode,
	getTextInput func() string,
)

SetDataProviders sets the functions to get data from the coordinator

func (*StatusBar) SetFailedTaskSelectedProvider

func (s *StatusBar) SetFailedTaskSelectedProvider(isFailedTaskSelected func() bool)

SetFailedTaskSelectedProvider sets the provider for checking if a failed task is selected

func (*StatusBar) SetHoveredButton

func (s *StatusBar) SetHoveredButton(button string)

SetHoveredButton updates which button is hovered

func (*StatusBar) SetLastUpdate

func (s *StatusBar) SetLastUpdate(t time.Time)

SetLastUpdate records when data was last refreshed

func (*StatusBar) SetLoading

func (s *StatusBar) SetLoading(loading bool)

SetLoading updates the loading state

func (*StatusBar) SetSize

func (s *StatusBar) SetSize(width int)

SetSize updates the panel dimensions

func (*StatusBar) SetStatus

func (s *StatusBar) SetStatus(message string, isError bool)

SetStatus updates the status message

func (*StatusBar) UpdateSpinner

func (s *StatusBar) UpdateSpinner(msg tea.Msg) tea.Cmd

UpdateSpinner updates the spinner animation

type StatusBarContext

type StatusBarContext int

StatusBarContext indicates which panel the status bar should show commands for

const (
	StatusBarContextIssues StatusBarContext = iota
	StatusBarContextWorkDetail
)

type ViewMode

type ViewMode int

ViewMode represents the current view mode

const (
	ViewNormal ViewMode = iota
	ViewCreateWork
	ViewCreateBead
	ViewCreateBeadInline // Create issue inline in description area
	ViewCreateEpic
	ViewAddChildBead // Add child issue to selected issue
	ViewEditBead     // Edit selected issue
	ViewDestroyConfirm
	ViewCloseBeadConfirm
	ViewAssignBeads
	ViewBeadSearch
	ViewLabelFilter
	ViewLinearImportInline // Import from Linear (inline in details panel)
	ViewPRImportInline     // Import from GitHub PR (inline in details panel)
	ViewHelp
)

type WorkDetailAction

type WorkDetailAction int

WorkDetailAction represents an action result from the work details panel

const (
	WorkDetailActionNone                WorkDetailAction = iota
	WorkDetailActionOpenTerminal                         // Open terminal/console (t)
	WorkDetailActionOpenClaude                           // Open Claude session (c)
	WorkDetailActionRun                                  // Run work (r)
	WorkDetailActionReview                               // Create review task (v)
	WorkDetailActionPR                                   // Create PR task (p)
	WorkDetailActionNavigateUp                           // Navigate up (k/up)
	WorkDetailActionNavigateDown                         // Navigate down (j/down)
	WorkDetailActionRestartOrchestrator                  // Restart orchestrator (o)
	WorkDetailActionCheckFeedback                        // Check PR feedback (f)
	WorkDetailActionDestroy                              // Destroy work (d)
	WorkDetailActionAddChildIssue                        // Add child issue to root issue (a)
	WorkDetailActionResetTask                            // Reset failed task (x)
)

type WorkDetailsPanel

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

WorkDetailsPanel is a coordinator that manages the work detail sub-panels. It handles layout, keyboard/mouse events, and coordinates which right panel to show.

func NewWorkDetailsPanel

func NewWorkDetailsPanel() *WorkDetailsPanel

NewWorkDetailsPanel creates a new WorkDetailsPanel coordinator

func (*WorkDetailsPanel) DetectClickedItem

func (p *WorkDetailsPanel) DetectClickedItem(msg tea.MouseMsg) int

DetectClickedItem determines which item was clicked and returns its index

func (*WorkDetailsPanel) DetectClickedTask

func (p *WorkDetailsPanel) DetectClickedTask(msg tea.MouseMsg) string

DetectClickedTask returns the task ID if a task was clicked, empty string otherwise

func (*WorkDetailsPanel) DetectHoveredItem

func (p *WorkDetailsPanel) DetectHoveredItem(msg tea.MouseMsg) int

DetectHoveredItem determines which item is at the mouse position for hover detection. Returns the absolute index (0 = root, 1+ = tasks, N+ = unassigned beads), or -1 if not over an item.

func (*WorkDetailsPanel) GetFocusedWork

func (p *WorkDetailsPanel) GetFocusedWork() *progress.WorkProgress

GetFocusedWork returns the currently focused work, or nil if none

func (*WorkDetailsPanel) GetHoveredItem

func (p *WorkDetailsPanel) GetHoveredItem() int

GetHoveredItem returns the currently hovered item index

func (*WorkDetailsPanel) GetSelectedBeadIDs

func (p *WorkDetailsPanel) GetSelectedBeadIDs() []string

GetSelectedBeadIDs returns the bead IDs that should be shown based on current selection.

func (*WorkDetailsPanel) GetSelectedIndex

func (p *WorkDetailsPanel) GetSelectedIndex() int

GetSelectedIndex returns the currently selected index (0 = root issue, 1+ = tasks)

func (*WorkDetailsPanel) GetSelectedTaskID

func (p *WorkDetailsPanel) GetSelectedTaskID() string

GetSelectedTaskID returns the currently selected task ID, or empty if root issue is selected

func (*WorkDetailsPanel) IsOrchestratorHealthy

func (p *WorkDetailsPanel) IsOrchestratorHealthy() bool

IsOrchestratorHealthy returns whether the orchestrator is running

func (*WorkDetailsPanel) IsSelectedTaskFailed

func (p *WorkDetailsPanel) IsSelectedTaskFailed() bool

IsSelectedTaskFailed returns true if the selected task has failed status

func (*WorkDetailsPanel) IsTaskSelected

func (p *WorkDetailsPanel) IsTaskSelected() bool

IsTaskSelected returns true if a task is currently selected (vs root issue)

func (*WorkDetailsPanel) NavigateDown

func (p *WorkDetailsPanel) NavigateDown()

NavigateDown moves selection to the next item

func (*WorkDetailsPanel) NavigateTaskDown

func (p *WorkDetailsPanel) NavigateTaskDown()

NavigateTaskDown is an alias for NavigateDown (for compatibility)

func (*WorkDetailsPanel) NavigateTaskUp

func (p *WorkDetailsPanel) NavigateTaskUp()

NavigateTaskUp is an alias for NavigateUp (for compatibility)

func (*WorkDetailsPanel) NavigateUp

func (p *WorkDetailsPanel) NavigateUp()

NavigateUp moves selection to the previous item

func (*WorkDetailsPanel) Render

func (p *WorkDetailsPanel) Render() string

Render returns the work details split view (uses p.height from SetSize)

func (*WorkDetailsPanel) RenderWithPanel

func (p *WorkDetailsPanel) RenderWithPanel(contentHeight int) string

RenderWithPanel returns the work details split view with the given total height This matches the IssuesPanel.RenderWithPanel pattern exactly

func (*WorkDetailsPanel) ScrollDown

func (p *WorkDetailsPanel) ScrollDown()

ScrollDown scrolls the right panel content down (shows later content)

func (*WorkDetailsPanel) ScrollToBottom

func (p *WorkDetailsPanel) ScrollToBottom()

ScrollToBottom scrolls to the end of the right panel content

func (*WorkDetailsPanel) ScrollToTop

func (p *WorkDetailsPanel) ScrollToTop()

ScrollToTop scrolls to the beginning of the right panel content

func (*WorkDetailsPanel) ScrollUp

func (p *WorkDetailsPanel) ScrollUp()

ScrollUp scrolls the right panel content up (shows earlier content)

func (*WorkDetailsPanel) SetColumnRatio

func (p *WorkDetailsPanel) SetColumnRatio(ratio float64)

SetColumnRatio sets the column width ratio to match the issues panel

func (*WorkDetailsPanel) SetFocus

func (p *WorkDetailsPanel) SetFocus(leftFocused, rightFocused bool)

SetFocus updates which side is focused

func (*WorkDetailsPanel) SetFocusedWork

func (p *WorkDetailsPanel) SetFocusedWork(focusedWork *progress.WorkProgress)

SetFocusedWork updates the focused work, preserving selection if valid

func (*WorkDetailsPanel) SetHoveredItem

func (p *WorkDetailsPanel) SetHoveredItem(index int)

SetHoveredItem updates which item is hovered

func (*WorkDetailsPanel) SetOrchestratorHealth

func (p *WorkDetailsPanel) SetOrchestratorHealth(healthy bool)

SetOrchestratorHealth updates the orchestrator health status

func (*WorkDetailsPanel) SetSelectedIndex

func (p *WorkDetailsPanel) SetSelectedIndex(idx int)

SetSelectedIndex sets the selected index

func (*WorkDetailsPanel) SetSelectedTaskID

func (p *WorkDetailsPanel) SetSelectedTaskID(id string)

SetSelectedTaskID sets selection to the task with given ID

func (*WorkDetailsPanel) SetSize

func (p *WorkDetailsPanel) SetSize(width, height int)

SetSize updates the panel dimensions

func (*WorkDetailsPanel) Update

func (p *WorkDetailsPanel) Update(msg tea.KeyMsg) (tea.Cmd, WorkDetailAction)

Update handles key events and returns an action.

func (*WorkDetailsPanel) UpdateViewport

func (p *WorkDetailsPanel) UpdateViewport(msg tea.Msg) tea.Cmd

UpdateViewport handles mouse wheel events for the right panel viewport. The caller (handleMouseWheel) has already verified the mouse is over the right panel.

type WorkOverviewPanel

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

WorkOverviewPanel renders the left side of the work details view. It displays the work header, branch info, progress, orchestrator health, and a selectable list of tasks and unassigned beads.

func NewWorkOverviewPanel

func NewWorkOverviewPanel() *WorkOverviewPanel

NewWorkOverviewPanel creates a new WorkOverviewPanel

func (*WorkOverviewPanel) DetectClickedItem

func (p *WorkOverviewPanel) DetectClickedItem(msg tea.MouseMsg) int

DetectClickedItem determines which item was clicked using bubblezone and returns its index

func (*WorkOverviewPanel) DetectHoveredItem

func (p *WorkOverviewPanel) DetectHoveredItem(msg tea.MouseMsg) int

DetectHoveredItem determines which item is at the mouse position for hover detection. Returns the absolute index (0 = root, 1+ = tasks, N+ = unassigned beads), or -1 if not over an item.

func (*WorkOverviewPanel) GetFocusedWork

func (p *WorkOverviewPanel) GetFocusedWork() *progress.WorkProgress

GetFocusedWork returns the currently focused work, or nil if none

func (*WorkOverviewPanel) GetHoveredItem

func (p *WorkOverviewPanel) GetHoveredItem() int

GetHoveredItem returns the currently hovered item index

func (*WorkOverviewPanel) GetSelectedBeadIDs

func (p *WorkOverviewPanel) GetSelectedBeadIDs() []string

GetSelectedBeadIDs returns the bead IDs that should be shown based on current selection. - If root issue is selected (index 0): returns all work beads (root + dependents) - If a task is selected: returns only the beads assigned to that task - If an unassigned bead is selected: returns just that bead's ID Returns nil if no work is focused.

func (*WorkOverviewPanel) GetSelectedIndex

func (p *WorkOverviewPanel) GetSelectedIndex() int

GetSelectedIndex returns the currently selected index (0 = root issue, 1+ = tasks)

func (*WorkOverviewPanel) GetSelectedTaskID

func (p *WorkOverviewPanel) GetSelectedTaskID() string

GetSelectedTaskID returns the currently selected task ID, or empty if root issue is selected

func (*WorkOverviewPanel) IsOrchestratorHealthy

func (p *WorkOverviewPanel) IsOrchestratorHealthy() bool

IsOrchestratorHealthy returns whether the orchestrator is running

func (*WorkOverviewPanel) IsSelectedTaskFailed

func (p *WorkOverviewPanel) IsSelectedTaskFailed() bool

IsSelectedTaskFailed returns true if the selected task has failed status

func (*WorkOverviewPanel) IsTaskSelected

func (p *WorkOverviewPanel) IsTaskSelected() bool

IsTaskSelected returns true if a task is currently selected (vs root issue or unassigned bead)

func (*WorkOverviewPanel) NavigateDown

func (p *WorkOverviewPanel) NavigateDown()

NavigateDown moves selection to the next item

func (*WorkOverviewPanel) NavigateUp

func (p *WorkOverviewPanel) NavigateUp()

NavigateUp moves selection to the previous item

func (*WorkOverviewPanel) Render

func (p *WorkOverviewPanel) Render(panelHeight, panelWidth int) string

Render returns the left panel content

func (*WorkOverviewPanel) SetFocus

func (p *WorkOverviewPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*WorkOverviewPanel) SetFocusedWork

func (p *WorkOverviewPanel) SetFocusedWork(focusedWork *progress.WorkProgress)

SetFocusedWork updates the focused work, preserving selection if valid

func (*WorkOverviewPanel) SetHoveredItem

func (p *WorkOverviewPanel) SetHoveredItem(index int)

SetHoveredItem updates which item is hovered

func (*WorkOverviewPanel) SetOrchestratorHealth

func (p *WorkOverviewPanel) SetOrchestratorHealth(healthy bool)

SetOrchestratorHealth updates the orchestrator health status

func (*WorkOverviewPanel) SetSelectedIndex

func (p *WorkOverviewPanel) SetSelectedIndex(idx int)

SetSelectedIndex sets the selected index

func (*WorkOverviewPanel) SetSelectedTaskID

func (p *WorkOverviewPanel) SetSelectedTaskID(id string)

SetSelectedTaskID sets selection to the task with given ID

func (*WorkOverviewPanel) SetSize

func (p *WorkOverviewPanel) SetSize(width, height int)

SetSize updates the panel dimensions

type WorkState

type WorkState int

WorkState represents the current state of a work for display purposes

const (
	WorkStateIdle      WorkState = iota // Orchestrator alive, no tasks running
	WorkStateRunning                    // Task is processing
	WorkStateCompleted                  // Work is completed
	WorkStateFailed                     // Work failed
	WorkStateDead                       // Orchestrator is dead
	WorkStateMerged                     // PR was merged
)

type WorkSummaryPanel

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

WorkSummaryPanel renders the right side of the work details view when the root issue is selected. It displays work overview, alerts, root issue details, and statistics.

func NewWorkSummaryPanel

func NewWorkSummaryPanel() *WorkSummaryPanel

NewWorkSummaryPanel creates a new WorkSummaryPanel

func (*WorkSummaryPanel) GetViewport

func (p *WorkSummaryPanel) GetViewport() *viewport.Model

GetViewport returns the viewport for external updates

func (*WorkSummaryPanel) Render

func (p *WorkSummaryPanel) Render(panelWidth int) string

Render returns the work summary content using the viewport

func (*WorkSummaryPanel) ScrollDown

func (p *WorkSummaryPanel) ScrollDown()

ScrollDown scrolls the content down (shows later content)

func (*WorkSummaryPanel) ScrollToBottom

func (p *WorkSummaryPanel) ScrollToBottom()

ScrollToBottom scrolls to the end of the content

func (*WorkSummaryPanel) ScrollToTop

func (p *WorkSummaryPanel) ScrollToTop()

ScrollToTop scrolls to the beginning of the content

func (*WorkSummaryPanel) ScrollUp

func (p *WorkSummaryPanel) ScrollUp()

ScrollUp scrolls the content up (shows earlier content)

func (*WorkSummaryPanel) SetFocus

func (p *WorkSummaryPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*WorkSummaryPanel) SetFocusedWork

func (p *WorkSummaryPanel) SetFocusedWork(focusedWork *progress.WorkProgress)

SetFocusedWork updates the focused work

func (*WorkSummaryPanel) SetSize

func (p *WorkSummaryPanel) SetSize(width, height int)

SetSize updates the panel dimensions

type WorkTabsBar

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

WorkTabsBar renders a horizontal tab bar showing all works. Each tab can be clicked to focus that work. Running works show a spinner. Styled similar to zellij with seamless color transitions between tabs.

func NewWorkTabsBar

func NewWorkTabsBar() *WorkTabsBar

NewWorkTabsBar creates a new WorkTabsBar

func (*WorkTabsBar) DetectHoveredTab

func (b *WorkTabsBar) DetectHoveredTab(msg tea.MouseMsg) string

DetectHoveredTab returns the work ID of the tab under the mouse using bubblezone

func (*WorkTabsBar) GetSpinner

func (b *WorkTabsBar) GetSpinner() spinner.Model

GetSpinner returns the spinner model for update handling

func (*WorkTabsBar) HandleClick

func (b *WorkTabsBar) HandleClick(msg tea.MouseMsg) string

HandleClick handles a mouse click and returns the clicked work ID (if any)

func (*WorkTabsBar) Height

func (b *WorkTabsBar) Height() int

Height returns the height of the tab bar (always 1 line)

func (*WorkTabsBar) Render

func (b *WorkTabsBar) Render() string

Render renders the tab bar with zellij-like styling

func (*WorkTabsBar) SetActivePanel

func (b *WorkTabsBar) SetActivePanel(panel Panel)

SetActivePanel sets which panel is currently active

func (*WorkTabsBar) SetFocusedWorkID

func (b *WorkTabsBar) SetFocusedWorkID(id string)

SetFocusedWorkID sets which work is currently focused

func (*WorkTabsBar) SetHoveredTabID

func (b *WorkTabsBar) SetHoveredTabID(id string)

SetHoveredTabID sets which tab is being hovered

func (*WorkTabsBar) SetOrchestratorHealth

func (b *WorkTabsBar) SetOrchestratorHealth(healthMap map[string]bool)

SetOrchestratorHealth sets the orchestrator health for a work

func (*WorkTabsBar) SetSize

func (b *WorkTabsBar) SetSize(width int)

SetSize updates the bar width

func (*WorkTabsBar) SetWorkTiles

func (b *WorkTabsBar) SetWorkTiles(workTiles []*progress.WorkProgress)

SetWorkTiles updates the work tiles data

func (*WorkTabsBar) UpdateSpinner

func (b *WorkTabsBar) UpdateSpinner(s spinner.Model)

UpdateSpinner updates the spinner animation frame

type WorkTaskPanel

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

WorkTaskPanel renders the right side of the work details view when a task or unassigned bead is selected. It displays task details including ID, type, status, beads, and errors, or unassigned bead details.

func NewWorkTaskPanel

func NewWorkTaskPanel() *WorkTaskPanel

NewWorkTaskPanel creates a new WorkTaskPanel

func (*WorkTaskPanel) Clear

func (p *WorkTaskPanel) Clear()

Clear clears the panel content

func (*WorkTaskPanel) GetViewport

func (p *WorkTaskPanel) GetViewport() *viewport.Model

GetViewport returns the viewport for external updates

func (*WorkTaskPanel) Render

func (p *WorkTaskPanel) Render(panelWidth int) string

Render returns the task/bead details content using the viewport

func (*WorkTaskPanel) ScrollDown

func (p *WorkTaskPanel) ScrollDown()

ScrollDown scrolls the content down (shows later content)

func (*WorkTaskPanel) ScrollToBottom

func (p *WorkTaskPanel) ScrollToBottom()

ScrollToBottom scrolls to the end of the content

func (*WorkTaskPanel) ScrollToTop

func (p *WorkTaskPanel) ScrollToTop()

ScrollToTop scrolls to the beginning of the content

func (*WorkTaskPanel) ScrollUp

func (p *WorkTaskPanel) ScrollUp()

ScrollUp scrolls the content up (shows earlier content)

func (*WorkTaskPanel) SetFocus

func (p *WorkTaskPanel) SetFocus(focused bool)

SetFocus updates the focus state

func (*WorkTaskPanel) SetSize

func (p *WorkTaskPanel) SetSize(width, height int)

SetSize updates the panel dimensions

func (*WorkTaskPanel) SetTask

func (p *WorkTaskPanel) SetTask(task *progress.TaskProgress)

SetTask sets the task to display

func (*WorkTaskPanel) SetUnassignedBead

func (p *WorkTaskPanel) SetUnassignedBead(bead *progress.BeadProgress)

SetUnassignedBead sets the unassigned bead to display

Jump to

Keyboard shortcuts

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