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 ¶
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 pass the color profile via tea.WithColorProfile based on TERM/COLORTERM. v2 dropped lipgloss's global default renderer so the program-level option is now the way to pin profile detection in tmux/screen contexts where auto-detection returns Ascii.
Types ¶
type KeyMap ¶ added in v0.1.3
type KeyMap struct {
// Pane focus
FocusNext, FocusPrev key.Binding
// Nav movement (also re-used for preview when preview is focused)
Up, Down, Top, Bottom key.Binding
JumpDown, JumpUp key.Binding
// Preview-only scroll (full-page)
ScrollPgDown, ScrollPgUp key.Binding
// Filter cycle
FilterNext, FilterPrev key.Binding
// Layout cycle
LayoutCycle key.Binding
// Actions
Edit, Activate, Park, Done, Kill, Revive key.Binding
// Modes
Search, Command, Help, Quit key.Binding
}
KeyMap collects every keystroke the TUI responds to. The router dispatches via key.Matches against this struct rather than switching on raw key strings, and bubbles/help renders the help view from the same struct so the two can never drift.
func DefaultKeyMap ¶ added in v0.1.3
func DefaultKeyMap() KeyMap
DefaultKeyMap returns the canonical keybinding set, matching the contract in wiki/decisions/focus-tui-keybinds.md.
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 ¶
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.