Documentation
¶
Overview ¶
Package tui renders the board.
The TUI is a peer of the CLI, not a wrapper around it: both link the same core packages directly. Shelling out to the binary for every keypress would add process overhead to an interaction that must feel instant, and would mean two different paths into the store — exactly the drift the single-write-path rule exists to prevent. Every mutation here goes through the same core calls the CLI uses, so the gates apply identically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Home ¶
type Home struct {
// Chosen is the board the user picked; the caller opens it.
Chosen string
// Quit is set when the user asked to leave rather than pick.
Quit bool
// contains filtered or unexported fields
}
Home is the launcher: the icon, and every board with what it is doing.
type HomeEntry ¶
type HomeEntry struct {
Root string
Name string
Open int // tickets not in a terminal lane
Total int
// Counted is whether Open, Total and Waiting have been counted yet. They
// are counted off the first frame, because counting reads the board's refs.
Counted bool
// Agents is how many sessions are actively working this board, and Waiting
// how many tickets sit at a human checkpoint. Those are the two states worth
// colouring: one means work is happening without you, the other means it has
// stopped for you.
Agents int
Waiting int
// Logged is this board's logbook entries per day over the last
// logbookDays, oldest first, today last. Counted from the dated folder
// names, so listing a board costs no ticket read.
Logged []int
Err error
}
HomeEntry is one project on the home screen, with enough state to answer the question the screen exists for: which of my boards needs me.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the board's state.
func (*Model) View ¶
View satisfies tea.Model, and is where every screen is clamped to the terminal.
The clamp lives here, once, rather than being trusted to each screen. A line wider than the terminal does not spill — it wraps, silently pushing everything below it down a line, so one long warning could shove a footer off the bottom of a screen that had carefully measured its own height. Screens that already fit themselves lose nothing to this; the ones that never did stop being able to break the layout at all.