workbench

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 26 Imported by: 1 module, 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

Package workbench is the local-data showcase: every row component on one screen, cooperating, so a change that breaks an older feature shows up where you can see it.

┌ deployments ───────────────────┐┌ cluster ──────────┐
│ filterable, sortable, markable ││ searchable,       │
│ table                          ││ markable tree     │
└────────────────────────────────┘└───────────────────┘
┌ pods ─────────┐┌ detail ───────────┐┌ operations ───┐
│ markable list ││ filterable        ││ grouped menu  │
│               ││ inspector         ││               │
└───────────────┘└───────────────────┘└───────────────┘

What it exercises:

  • focus.Group over five panes: tab / shift+tab cycle, a click focuses, keys go to the focused pane only and the mouse to all of them (rule 6). The operations menu sits in the Group, so it leaves tab to it and jumps its sections on [ / ].
  • Master-detail: the pods list follows the table's cursor, and the detail inspector follows whichever of table, tree or pods last had focus. Enter (or a double click) on the table moves focus to its pods; on a pod, to the detail (rule 16).
  • Marking (rule 32): x, X, A, D and the ✓ gutter in the table, the tree and the pods list. Counts sit on each border, so a mark filtered or folded out of sight is still visible as a number.
  • The action menu ("a" or right-click) offers verbs for the focused pane's selection, filed read / write / danger. Describe is not Multi, so a second mark dims it; Delete confirms first and is guarded. A marked tree branch cascades to its pods for Restart but not for Describe.
  • Feedback by weight: the operations menu runs statusbar notices, the confirm modal and the alert modal.
  • Mouse: header clicks sort, ▸/▾ glyphs toggle, the wheel scrolls the pane under it without taking focus, scrollbars drag.
  • SetTheme carries every pane's cursor, filter, marks and expansion across a palette or surface swap, including a modal that is up (rule 4).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t theme.Theme) screen.Screen

New returns the workbench screen.

Types

type Screen

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

func (*Screen) Actions

func (s *Screen) Actions() action.Set

Actions satisfies action.Provider: the verbs for whatever the focused pane has selected, rebuilt on every call so they always describe the selection as it is now. Panes with nothing to act on offer nothing, and the shell leaves the actions key inert there.

Every verb reads Selection(), which is the marked keys or the cursor's key when nothing is marked. The arity difference lives in Multi, and the menu enforces it: mark a second row and Describe dims itself with a reason.

func (*Screen) Help

func (s *Screen) Help() []key.Binding

func (*Screen) HelpSections

func (s *Screen) HelpSections() []help.Section

HelpSections is the Group's, which names each pane's groups after it, or the modal's alone while one is up, since nothing else takes input then.

func (*Screen) Init

func (s *Screen) Init() tea.Cmd

func (*Screen) IsCapturingKeys

func (s *Screen) IsCapturingKeys() bool

func (*Screen) Layout

func (s *Screen) Layout() layout.Node

func (*Screen) OnEnter

func (s *Screen) OnEnter(any) tea.Cmd

func (*Screen) SetTheme

func (s *Screen) SetTheme(t theme.Theme)

func (*Screen) Title

func (s *Screen) Title() string

func (*Screen) Update

func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)

Jump to

Keyboard shortcuts

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