Documentation
¶
Overview ¶
Package tui implements the Bubble Tea TUI shared by `hive view` and `hive edit`. The two subcommands differ only in whether the archive is opened read-only and whether the detail pane accepts edits — every other piece (tree navigation, detail rendering, keymap, layout, status bar) is identical. Keeping one code path here means both modes evolve together.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run opens the archive (read-only unless opts.Editable) and starts the Bubble Tea program. Returns only after the program exits (or fails to open the archive).
Belt-and-braces cleanup: Bubble Tea handles its own terminal restoration on normal exit and on the panics it catches inside the event loop. A panic BEFORE tea.Program.Run() (or SIGKILL) can bypass that. The deferred restoreTerminal below fires unconditionally, so even a rogue exit path leaves the user with a usable terminal.
Types ¶
type Options ¶
type Options struct {
// Editable opens the archive read-write and enables the detail pane's
// edit form. False → read-only, no edit affordances.
Editable bool
// Actor is the identity stamped into col__modified_by on every write.
// Only used when Editable is true. Empty falls back to "local".
Actor string
}
Options configures Run.