Documentation
¶
Overview ¶
Package overview owns the app-level cross-project Overview model.
Index ¶
- Constants
- Variables
- func IsAsyncMessage(msg tea.Msg) bool
- type Model
- func (m *Model) CanOpenInGit() bool
- func (m *Model) Commands() []struct{ ... }
- func (m *Model) ConsumeValidation(generation int, requestID uint64) bool
- func (m *Model) Ensure(projects []Project) tea.Cmd
- func (m *Model) InteractiveExitKey() string
- func (m *Model) IsCurrentNavigation(generation int, requestID uint64) bool
- func (m *Model) OpenRenameShell() tea.Cmd
- func (m *Model) OpenSelectedInGit() tea.Cmd
- func (m *Model) PreviewCanType() bool
- func (m *Model) PreviewFocused() bool
- func (m *Model) PreviewInteractive() bool
- func (m *Model) RenameShellOpen() bool
- func (m *Model) RenameShellPaste(text string) bool
- func (m *Model) RequestNavigation(workspace workspaceinventory.Workspace) tea.Cmd
- func (m *Model) SelectedShell() bool
- func (m *Model) SelectedWorkspace() (workspaceinventory.Workspace, bool)
- func (m *Model) SetTerminalConfig(config tty.Config)
- func (m *Model) SetWorkspacesVisible(visible bool) tea.Cmd
- func (m *Model) Start(projects []Project) tea.Cmd
- func (m *Model) Stop()
- func (m *Model) TerminalConfig() tty.Config
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- func (m *Model) Validate(msg NavigateMsg) tea.Cmd
- func (m *Model) View(width, height int) string
- func (m *Model) ViewFlyoutOpen() bool
- func (m *Model) WorkspaceFocusContext() string
- func (m *Model) WorkspaceSidebarVisible() bool
- func (m *Model) WorkspacesCursor() *tea.Cursor
- func (m *Model) WorkspacesFilterActive() bool
- func (m *Model) WorkspacesFilterFocused() bool
- func (m *Model) WorkspacesKey(msg tea.KeyPressMsg) (bool, tea.Cmd)
- func (m *Model) WorkspacesMouse(msg tea.Msg) tea.Cmd
- func (m *Model) WorkspacesPaste(text string) bool
- func (m *Model) WorkspacesPreviewActive() bool
- func (m *Model) WorkspacesPreviewCmd() tea.Cmd
- func (m *Model) WorkspacesPreviewVisible() bool
- func (m *Model) WorkspacesResize(width, height int) tea.Cmd
- func (m *Model) WorkspacesSummary() string
- func (m *Model) WorkspacesTerminalKeySequence(msg tea.Msg) (bool, tea.Cmd)
- func (m *Model) WorkspacesTerminalMsg(msg tea.Msg) tea.Cmd
- func (m *Model) WorkspacesTerminalPaste(content string) (bool, tea.Cmd)
- func (m *Model) WorkspacesView(width, height int) string
- type NavigateMsg
- type OpenInGitMsg
- type Project
- type ValidationMsg
Constants ¶
const DormantAfter = time.Hour
DormantAfter is when an idle session stops competing for attention. The idle lane holds both "finished a minute ago" and "untouched since Tuesday"; dimming past this threshold separates them without a sixth lane.
Variables ¶
var ActivityStorePath = func() string { return filepath.Join(config.StateDir(), activitystore.FileName) }
ActivityStorePath is overridable so tests never touch the user's state dir.
Functions ¶
func IsAsyncMessage ¶
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func New ¶
func New(collector workspaceinventory.Collector) *Model
func (*Model) CanOpenInGit ¶ added in v0.98.0
CanOpenInGit reports that the list cursor has a checkout the Git plugin can open.
func (*Model) ConsumeValidation ¶
ConsumeValidation accepts a result at most once. A later duplicate or a result superseded by another activation cannot navigate.
func (*Model) Ensure ¶ added in v0.98.0
Ensure starts collection only when the shared catalog has nothing live behind it. The Agents board and the global Workspaces list are two projections of one cache: whichever becomes visible first starts the cycle, and the other reuses its results, its trackers, and its poll. A second collector here would double every project's tmux and Git fan-out for a view that already has the data.
func (*Model) InteractiveExitKey ¶ added in v0.98.0
InteractiveExitKey is the chord that ends interactive mode here.
func (*Model) IsCurrentNavigation ¶
func (*Model) OpenRenameShell ¶ added in v0.98.0
OpenRenameShell opens the same Rename Shell modal the project plugin uses, prefilled with the selected shell's display name. Worktrees are ignored.
func (*Model) OpenSelectedInGit ¶ added in v0.98.0
OpenSelectedInGit jumps to the project's Git plugin at the checkout the mini-diff showed: worktree Path, or ProjectRoot for a shell.
func (*Model) PreviewCanType ¶ added in v0.98.0
PreviewCanType reports that the selection has a live pane this surface could hand the keyboard to. The footer asks so it never offers a key the preview itself is refusing.
func (*Model) PreviewFocused ¶ added in v0.98.0
PreviewFocused reports that the preview owns the keyboard.
func (*Model) PreviewInteractive ¶ added in v0.98.0
PreviewInteractive reports that the focused preview is forwarding keys to a live pane. The app asks so the keymap context, the footer hints, the mouse mode and the native cursor all follow the same fact.
func (*Model) RenameShellOpen ¶ added in v0.98.0
RenameShellOpen reports that the Rename Shell overlay owns the keyboard.
func (*Model) RenameShellPaste ¶ added in v0.98.0
RenameShellPaste inserts pasted text into the rename field.
func (*Model) RequestNavigation ¶
func (m *Model) RequestNavigation(workspace workspaceinventory.Workspace) tea.Cmd
RequestNavigation binds a card activation to the current Overview lifecycle and supersedes any prior in-flight destination validation.
func (*Model) SelectedShell ¶ added in v0.98.0
SelectedShell reports that the list cursor is on a shell row.
func (*Model) SelectedWorkspace ¶ added in v0.98.0
func (m *Model) SelectedWorkspace() (workspaceinventory.Workspace, bool)
SelectedWorkspace resolves the list cursor back to its catalog record.
func (*Model) SetTerminalConfig ¶ added in v0.98.0
SetTerminalConfig adopts the user's terminal settings, so the browser's live pane and the project plugin's answer the same chords for the same acts. It is a setter rather than a constructor argument because this package must not import internal/config: the app resolves the values once and hands the same value to both surfaces.
func (*Model) SetWorkspacesVisible ¶ added in v0.98.0
SetWorkspacesVisible tells the preview whether anyone is looking at it. Becoming visible opens one model for the selected Output pane; becoming hidden closes that model and its control subscription.
func (*Model) TerminalConfig ¶ added in v0.98.0
TerminalConfig is the resolved configuration this surface answers. The app asks so the keymap binding, the footer, and the palette describe the keys the surface actually answers.
func (*Model) ViewFlyoutOpen ¶ added in v0.98.0
func (*Model) WorkspaceFocusContext ¶ added in v0.98.0
WorkspaceFocusContext distinguishes the list from a pane being typed into (and the leftover preview-only layout when the sidebar is hidden), so binding, footer and help discovery follow mouse/keyboard focus. There is no watched-preview keyboard mode: the only way onto the pane is typing.
func (*Model) WorkspaceSidebarVisible ¶ added in v0.98.0
func (*Model) WorkspacesCursor ¶ added in v0.98.0
WorkspacesCursor is the live pane's own cursor, in tab-local coordinates. It is placed against the window this surface drew, not against a second one the terminal component rendered for itself, so the cell the cursor sits in is the cell a click there is forwarded to.
It is nil for every other state: a watched pane has no cursor to place, and drawing one would invite typing into something that forwards nothing.
func (*Model) WorkspacesFilterActive ¶ added in v0.98.0
WorkspacesFilterActive reports that a query is still narrowing the list, even after enter handed navigation back to it. The app asks so that esc clears the query the user can see before it means "leave the global space".
func (*Model) WorkspacesFilterFocused ¶ added in v0.98.0
WorkspacesFilterFocused reports that the inline filter owns the keyboard, so the app can report a text-input context and keep its own printable shortcuts off the query.
func (*Model) WorkspacesKey ¶ added in v0.98.0
WorkspacesKey handles one key for the global Workspaces tab and reports whether it consumed it. While the filter has focus it consumes everything except live navigation, which is what keeps app shortcuts from stealing printable characters mid-query.
func (*Model) WorkspacesMouse ¶ added in v0.98.0
WorkspacesMouse routes a mouse event to the list using the regions the last render registered.
func (*Model) WorkspacesPaste ¶ added in v0.98.0
WorkspacesPaste appends pasted text to a focused filter.
func (*Model) WorkspacesPreviewActive ¶ added in v0.98.0
WorkspacesPreviewActive reports whether the visible-selection terminal owns a live target. It is diagnostic state for lifecycle tests, not another surface.
func (*Model) WorkspacesPreviewCmd ¶ added in v0.98.0
WorkspacesPreviewCmd is the command a paste or another caller-side selection change owes the preview: the cursor may have moved to a different item, and the preview follows the cursor.
func (*Model) WorkspacesPreviewVisible ¶ added in v0.98.0
WorkspacesPreviewVisible reports whether the preview believes anyone is looking at it. It exists so the app can prove that scope and tab changes actually reach terminal reconciliation.
func (*Model) WorkspacesResize ¶ added in v0.98.0
WorkspacesResize adopts a new tab size ahead of the frame that will use it, so a live pane is resized when the window is, rather than the next time a message happens to reach the terminal.
func (*Model) WorkspacesSummary ¶ added in v0.98.0
WorkspacesSummary is the header-right text for the tab.
func (*Model) WorkspacesTerminalKeySequence ¶ added in v0.98.0
WorkspacesTerminalKeySequence routes an unparsed CSI sequence — a modified key like shift+enter, which never becomes a KeyPressMsg — into a live pane, and reports whether it took it. Without it those keys would be dropped on their way past the global scope, and the pane would see a plain enter.
func (*Model) WorkspacesTerminalMsg ¶ added in v0.98.0
WorkspacesTerminalMsg offers the browser's terminal one of the terminal component's own messages. Every one of them is scope-tagged, so the app hands them to this surface and to the plugins alike and each activation keeps only its own.
func (*Model) WorkspacesTerminalPaste ¶ added in v0.98.0
WorkspacesTerminalPaste routes bracketed-paste content into a live pane and reports whether it took it. A paste with no terminal up belongs to the filter or to nobody.
func (*Model) WorkspacesView ¶ added in v0.98.0
WorkspacesView renders the global Workspaces tab: the list on the left and exactly one terminal box on the right.
At widths that cannot sustain two useful panes the list is full width and the preview replaces it when focused, rather than shrinking both into unreadable columns.
type NavigateMsg ¶
type NavigateMsg struct {
}
type OpenInGitMsg ¶ added in v0.98.0
type OpenInGitMsg struct {
Path string
}
OpenInGitMsg asks the app to leave global, switch to this checkout, and focus the Git plugin. Sequence (not Batch) is the app's job — plugin reinit deadlocks if SwitchWorktree and FocusPlugin run concurrently.
type ValidationMsg ¶
type ValidationMsg struct {
Workspace workspaceinventory.Workspace
Generation int
RequestID uint64
Err error
}