render

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package render draws the task roster sidebar: Frame is a pure function from config, state and pane list to the exact pane-sized text, and Model is the bubbletea program that keeps it fresh in the pane.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Frame

func Frame(o Options) string

Frame renders one complete pane-sized frame: exactly Height lines, each exactly Width visible columns, so a repaint never leaves stale text.

func FrameWithMap

func FrameWithMap(o Options) (string, []string)

FrameWithMap renders the frame and reports which task row owns each line. A line with no row, such as a blank separator or trailing padding, maps to "". The renderer keeps that map so a mouse click can be turned into a row.

func NewModel

func NewModel(o Options) tea.Model

NewModel builds the interactive model and starts the state watch. It never fails: a missing or unreadable state file renders as an empty roster.

Types

type Model

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

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init starts the tick and the state wait.

func (*Model) SelectedID

func (m *Model) SelectedID() string

SelectedID is the task id under the cursor.

func (*Model) Update

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

Update refreshes the frame on ticks, window sizes and state changes, and routes keys to the roster navigation and filter.

func (*Model) View

func (m *Model) View() string

View renders the current frame.

type Options

type Options struct {
	Config       *config.Config
	State        *model.State
	Panes        []tmux.Pane
	Width        int
	Height       int
	Selected     string // task id
	Filter       string // case-insensitive substring over id, title, group
	Layout       string // "" falls back to Config.Sidebar.Layout
	SpinnerFrame int
}

Options is everything a frame needs. It is a value, not a pointer, so a caller can snapshot it per tick.

Jump to

Keyboard shortcuts

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