Documentation
¶
Overview ¶
Package issues is the triage-home section: the personal queue a reviewer works down. It lands on "my open issues", renders them as a list with an issue-detail sidebar, and offers quick-filter lenses and a local text filter.
Index ¶
- Constants
- func New(ctx *core.ProgramContext) core.Section
- func NewEpics(ctx *core.ProgramContext) core.Section
- func NewQuery(id core.SectionID, title, jql string) func(*core.ProgramContext) core.Section
- func NewSearch(ctx *core.ProgramContext) core.Section
- func QueryID(i int) core.SectionID
- type EpicsModel
- func (m *EpicsModel) CapturesInput() bool
- func (m *EpicsModel) Count() (int, bool)
- func (m *EpicsModel) HelpBindings() []key.Binding
- func (m *EpicsModel) ID() core.SectionID
- func (m *EpicsModel) Init(ctx *core.ProgramContext) tea.Cmd
- func (m *EpicsModel) Title() string
- func (m *EpicsModel) Update(msg tea.Msg) (core.Section, tea.Cmd)
- func (m *EpicsModel) View() string
- type Lens
- type Model
- func (m *Model) CapturesInput() bool
- func (r *Model) Count() (int, bool)
- func (m *Model) HelpBindings() []key.Binding
- func (m *Model) ID() core.SectionID
- func (m *Model) Init(ctx *core.ProgramContext) tea.Cmd
- func (m *Model) Title() string
- func (m *Model) Update(msg tea.Msg) (core.Section, tea.Cmd)
- func (m *Model) View() string
- type QueryModel
- func (m *QueryModel) CapturesInput() bool
- func (r *QueryModel) Count() (int, bool)
- func (m *QueryModel) HelpBindings() []key.Binding
- func (m *QueryModel) ID() core.SectionID
- func (m *QueryModel) Init(ctx *core.ProgramContext) tea.Cmd
- func (m *QueryModel) Title() string
- func (m *QueryModel) Update(msg tea.Msg) (core.Section, tea.Cmd)
- func (m *QueryModel) View() string
- type SearchModel
- func (s *SearchModel) CapturesInput() bool
- func (r *SearchModel) Count() (int, bool)
- func (s *SearchModel) HelpBindings() []key.Binding
- func (s *SearchModel) ID() core.SectionID
- func (s *SearchModel) Init(ctx *core.ProgramContext) tea.Cmd
- func (s *SearchModel) Title() string
- func (s *SearchModel) Update(msg tea.Msg) (core.Section, tea.Cmd)
- func (s *SearchModel) View() string
Constants ¶
const BoardID core.SectionID = "board"
BoardID is the default-board query tab's identifier; users opt in by naming "board" in tui.tabs. The wiring layer registers it only when the profile's default board resolves from the boards cache.
const EpicsID core.SectionID = "epics"
EpicsID is the epics section's identifier — already named by the default tui.tabs, so registering the factory lights the tab up.
const ID core.SectionID = "issues"
ID is the section identifier.
const SearchID core.SectionID = "search"
SearchID is the search section identifier.
Variables ¶
This section is empty.
Functions ¶
func NewEpics ¶ added in v0.12.0
func NewEpics(ctx *core.ProgramContext) core.Section
NewEpics builds the epics section.
Types ¶
type EpicsModel ¶ added in v0.12.0
type EpicsModel struct {
// contains filtered or unexported fields
}
EpicsModel is the epics section. The carousel is the query source: its active epic's children fill the embedded results list.
func (*EpicsModel) CapturesInput ¶ added in v0.12.0
func (m *EpicsModel) CapturesInput() bool
CapturesInput reports filter/action focus.
func (*EpicsModel) Count ¶ added in v0.12.0
func (m *EpicsModel) Count() (int, bool)
Count overrides the embedded results.Count for the tab bar: the Epics tab counts epics, not the active epic's children. Without this the section would inherit results.Count (len(all) — the loaded child page of the selected epic), so "Epics (N)" showed a child total that shifted per selection and read like a stray issue number. ok stays false until the strip has loaded.
func (*EpicsModel) HelpBindings ¶ added in v0.12.0
func (m *EpicsModel) HelpBindings() []key.Binding
HelpBindings lists the epic-cycling keys ahead of the shared list verbs. The lens-cycle keys are reused deliberately — "cycle the query source" keeps one muscle memory across sections — with epic-specific help text.
func (*EpicsModel) ID ¶ added in v0.12.0
func (m *EpicsModel) ID() core.SectionID
ID returns the section identifier.
func (*EpicsModel) Init ¶ added in v0.12.0
func (m *EpicsModel) Init(ctx *core.ProgramContext) tea.Cmd
Init sizes the list (two header rows: the strip and the active-epic line) and loads the epics.
func (*EpicsModel) Title ¶ added in v0.12.0
func (m *EpicsModel) Title() string
Title returns the tab-bar label.
func (*EpicsModel) Update ¶ added in v0.12.0
Update handles the epic strip and refresh, then delegates the shared results behavior.
func (*EpicsModel) View ¶ added in v0.12.0
func (m *EpicsModel) View() string
View renders the strip, the active epic's summary line, and the shared list.
type Lens ¶
Lens is a saved quick-filter: a named JQL the user can toggle to slice the queue. Config ([[tui.lenses]]) can replace the built-in set.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the issues triage section: the shared results view plus quick-filter lenses as its query source.
func (*Model) CapturesInput ¶
CapturesInput reports filter/action focus.
func (*Model) Count ¶
Count reports the loaded issue total for the tab bar (core.Counter); ok is false until the first fetch lands, so an unvisited section shows no count.
func (*Model) HelpBindings ¶
HelpBindings lists the section's contextual bindings, verbs first so the footer hint leads with the triage actions.
func (*Model) Init ¶
func (m *Model) Init(ctx *core.ProgramContext) tea.Cmd
Init sizes the list (reserving one row for the chips header) and fetches the configured default lens (tui.default_lens, first lens otherwise).
type QueryModel ¶
type QueryModel struct {
// contains filtered or unexported fields
}
QueryModel is a config-defined section: the shared results view bound to one saved JQL query from tui.sections. It has no query editing — Search is for that — so the whole surface is the shared results behavior plus a fixed fetch.
func (*QueryModel) CapturesInput ¶
func (m *QueryModel) CapturesInput() bool
CapturesInput reports filter/action focus.
func (*QueryModel) Count ¶
Count reports the loaded issue total for the tab bar (core.Counter); ok is false until the first fetch lands, so an unvisited section shows no count.
func (*QueryModel) HelpBindings ¶
func (m *QueryModel) HelpBindings() []key.Binding
HelpBindings lists the section's contextual bindings — the triage verbs and shared list controls, with no lens or query-edit keys.
func (*QueryModel) ID ¶
func (m *QueryModel) ID() core.SectionID
ID returns the section's configured identifier.
func (*QueryModel) Init ¶
func (m *QueryModel) Init(ctx *core.ProgramContext) tea.Cmd
Init sizes the list (one row reserved for the JQL header) and runs the query.
func (*QueryModel) View ¶
func (m *QueryModel) View() string
View renders the section's JQL as a faint one-line header above the results, so the running query is always visible.
type SearchModel ¶
type SearchModel struct {
// contains filtered or unexported fields
}
SearchModel is the JQL explore section: the same results view as Issues, but its query source is a free-form JQL input plus saved queries. It never auto-runs a partial query — the user commits with enter.
func (*SearchModel) CapturesInput ¶
func (s *SearchModel) CapturesInput() bool
CapturesInput reports JQL-edit focus on top of the shared filter/action focus.
func (*SearchModel) Count ¶
Count reports the loaded issue total for the tab bar (core.Counter); ok is false until the first fetch lands, so an unvisited section shows no count.
func (*SearchModel) HelpBindings ¶
func (s *SearchModel) HelpBindings() []key.Binding
HelpBindings lists the section's contextual bindings.
func (*SearchModel) ID ¶
func (s *SearchModel) ID() core.SectionID
ID returns the search section's identifier.
func (*SearchModel) Init ¶
func (s *SearchModel) Init(ctx *core.ProgramContext) tea.Cmd
Init sizes the list and lands in browse mode (not editing), so the section can be tabbed away from immediately. The user presses enter (or the search key) to start writing a JQL query. It runs nothing until a query is submitted.
func (*SearchModel) Update ¶
Update edits/commits the JQL, then delegates shared behavior to results.
func (*SearchModel) View ¶
func (s *SearchModel) View() string
View renders the JQL query box above the shared results body. The box border brightens while editing so focus is obvious.