tui

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package tui implements `focus tui`: a Bubble Tea TUI over the same internal/board layer the CLI and MCP server use.

Layout: a split-pane board view. Nav (the card list) sits on the left when the terminal is wide enough; otherwise nav stacks on top of the preview. Cursor movement in the nav loads the highlighted card into the preview pane on every keystroke. There's no separate "detail view" mode — `e` and `enter` jump straight to $EDITOR.

Vim keybindings are first-class per wiki/decisions/focus-tui-keybinds.md. Arrows still work for users who don't speak vim.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(b *board.Board) error

Run boots the TUI program against the given board and runs until the user quits. Caller is responsible for board resolution; this matches the CLI handler shape (open the board, hand it to the TUI).

We pin the lipgloss default renderer's color profile based on TERM/COLORTERM. termenv's auto-detection sometimes returns Ascii in tmux/screen contexts where colors actually work fine; the pin makes the TUI's colors deterministic.

Types

type Model

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

Model is the root Bubble Tea model. Holds the resolved board, the current view + input modes, and references to each sub-model.

func (*Model) Init

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

Init is Bubble Tea's startup hook. We use it to fire off the first board reload so the screen has data before any keystroke.

func (*Model) Update

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

Update routes messages to handlers. Cursor movement in the board triggers a preview reload as a side effect.

func (*Model) View

func (m *Model) View() string

View renders the screen. Help overlays everything; otherwise we render the bordered split board layout above a bordered status bar.

Jump to

Keyboard shortcuts

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