tasks

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconOpen       = "○"
	IconInProgress = "◉"
	IconDone       = " "
	IconCancelled  = ""
	IconExpanded   = ""
	IconCollapsed  = ""
	BadgeBlocked   = "[blocked]"
)

Status icon characters.

Variables

This section is empty.

Functions

func StatusIcon

func StatusIcon(status hc.Status) string

StatusIcon returns the styled icon string for a status.

Types

type ActionRequestMsg

type ActionRequestMsg struct {
	Action action.Action
}

ActionRequestMsg requests the parent to execute a resolved action.

type CommandPaletteRequestMsg

type CommandPaletteRequestMsg struct{}

CommandPaletteRequestMsg requests the parent to open the command palette.

type FlatNode

type FlatNode struct {
	Node   *TreeNode
	Depth  int
	IsLast bool // last child of parent
}

FlatNode is a flattened tree node for rendering.

type KeyResolver

type KeyResolver interface {
	// IsAction checks if a key maps to the given built-in action type.
	IsAction(key string, actionType action.Type) bool

	// ResolveAction resolves a key to an action without session context.
	ResolveAction(key string) (action.Action, bool)

	// HelpEntries returns formatted help strings for current view keybindings.
	HelpEntries() []string
}

KeyResolver resolves keybindings to actions. Satisfied by the parent package's KeybindingResolver. Exists to avoid an import cycle.

type RefreshTasksMsg

type RefreshTasksMsg struct{}

RefreshTasksMsg signals the tasks view to reload its data.

type StatusFilter

type StatusFilter int

StatusFilter represents a filter for task status in the tree view.

const (
	FilterAll    StatusFilter = iota
	FilterOpen                // open + in_progress
	FilterActive              // in_progress only
	FilterDone                // done + cancelled
)

func (StatusFilter) String

func (f StatusFilter) String() string

type TaskActionCompleteMsg

type TaskActionCompleteMsg struct {
	Err error
}

TaskActionCompleteMsg carries the result of a task mutation (status change, delete, prune).

type TreeNode

type TreeNode struct {
	Item     hc.Item
	Children []*TreeNode
	Expanded bool
}

TreeNode represents an item in the tree hierarchy.

type View

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

View is the Bubble Tea sub-model for the tasks tab.

func New

func New(svc *hive.HoneycombService, repoKey string, handler KeyResolver, kvStore corekv.KV, splitRatio int) *View

New creates a new tasks View.

func (*View) CycleFilter

func (v *View) CycleFilter() tea.Cmd

CycleFilter advances the status filter, persists it, and rebuilds the tree.

func (*View) HasDetailFocus

func (v *View) HasDetailFocus() bool

HasDetailFocus returns true when the detail pane has focus.

func (*View) HelpSections

func (v *View) HelpSections() []components.HelpDialogSection

HelpSections returns view-specific help sections for the help dialog.

func (*View) Init

func (v *View) Init() tea.Cmd

Init initializes the tasks view.

func (*View) RepoKey

func (v *View) RepoKey() string

RepoKey returns the current repository scope.

func (*View) SelectedItem

func (v *View) SelectedItem() *hc.Item

SelectedItem returns the currently selected item, or nil if none.

func (*View) SetActive

func (v *View) SetActive(active bool)

SetActive sets whether this view is the currently active tab.

func (*View) SetRepoKey

func (v *View) SetRepoKey(repoKey string) tea.Cmd

SetRepoKey changes the repository scope, clears state, and reloads items.

func (*View) SetSize

func (v *View) SetSize(w, h int)

SetSize updates the view dimensions.

func (*View) Svc

func (v *View) Svc() *hive.HoneycombService

Svc returns the honeycomb service, or nil if not configured.

func (*View) TogglePreview

func (v *View) TogglePreview() tea.Cmd

TogglePreview toggles the preview panel visibility.

func (*View) Update

func (v *View) Update(msg tea.Msg) tea.Cmd

Update handles messages for the tasks view.

func (*View) View

func (v *View) View() string

View renders the tasks view.

Jump to

Keyboard shortcuts

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