tui

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 33 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

command_dispatch.go: the `:` command bar + ctrl+p palette half — word dispatch, completion options, and the palette index/keys.

Package tui is the second primary adapter: an interactive Bubble Tea front-end over the same core.Service the CLI uses. It never touches the store/fs — every read runs as a tea.Cmd against the service (commands.go), so Update and View stay I/O-free. Entities (tasks/epics/Threads/audits/research) are declared in a registry (entity.go); the lists live-reload via fsnotify (watch.go). See docs/ARCHITECTURE.md for the subsystem map.

view.go: the Model's render + layout half — View/renderBody/footer/panes/tabStrip.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(workspace core.Workspace, th design.Theme, opts ...Option) error

Run launches the TUI program over the given workspace. A filesystem watcher (live reload) is attached best-effort over the Layout's WatchPaths: if it can't start, the browser still runs and `r` refreshes manually — with a footer note so the degradation isn't silent. Layout is the narrow on-disk-layout port (the CLI injects the FS); reads still flow through the service as tea.Cmds.

Types

type Model

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

Model is the root TUI model: a multi-entity browser (tasks/epics/Threads/audits/research) over the core service. A tab strip + `:` command-jump switch the active entity; each entity keeps its own list (and cursor). The right pane shows the selection's detail.

func New

func New(svc *core.Service, opts ...Option) Model

New constructs the root model over the same *core.Service the CLI uses.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

Update is the reducer. It delegates to update, then syncs the active tab's chip into its list title — so View can stay a pure function of state (the title slot is also where bubbles draws the `/` filter prompt, so the chip can't be a separate line without losing it).

func (Model) View

func (m Model) View() tea.View

type Option added in v0.17.0

type Option func(*Model)

Option adds an optional application capability to the main TUI.

func WithAtlas added in v0.17.0

func WithAtlas(svc *core.SpaceOverviewService) Option

WithAtlas mounts the cross-space overview. The workspace opener remains a separate option because tests and future consumers may supply one capability without the other. Mounting it does NOT choose the landing screen — see WithAtlasLanding.

func WithAtlasLanding added in v0.17.0

func WithAtlasLanding() Option

WithAtlasLanding starts on the atlas instead of the workspace overview. `ui` passes it only when it was launched outside any planning repo: standing in a repo is an unambiguous statement of which space you meant, so the atlas must not interpose itself there — it stays one keystroke away. With no repo there is no such statement, and the registry is the only sensible first screen.

func WithAtlasTheme added in v0.17.0

func WithAtlasTheme(theme design.Theme) Option

WithAtlasTheme supplies the home-scoped visual identity for the cross-space shell. A repository theme still styles that repository's own screens; it must not leak into the atlas merely because that checkout happened to launch the process.

func WithConfiguration added in v0.17.0

func WithConfiguration(svc *core.ConfigurationService, start string, overrides core.ConfigurationOverrides) Option

WithConfiguration mounts the shared Config/About editor over the configuration service. Filesystem details remain behind that service's store port.

func WithWorkspaceOpening added in v0.17.0

func WithWorkspaceOpening(svc *core.WorkspaceService) Option

WithWorkspaceOpening supplies the reusable local workspace capability needed by atlas navigation. New(svc) remains valid for embedded and focused single-space consumers.

Jump to

Keyboard shortcuts

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