issues

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 43 Imported by: 0

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

View Source
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.

View Source
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.

View Source
const ID core.SectionID = "issues"

ID is the section identifier.

View Source
const SearchID core.SectionID = "search"

SearchID is the search section identifier.

Variables

This section is empty.

Functions

func New

func New(ctx *core.ProgramContext) core.Section

New builds the issues triage section.

func NewEpics added in v0.12.0

func NewEpics(ctx *core.ProgramContext) core.Section

NewEpics builds the epics section.

func NewQuery

func NewQuery(id core.SectionID, title, jql string) func(*core.ProgramContext) core.Section

NewQuery returns a registry factory for a configured query section.

func NewSearch

func NewSearch(ctx *core.ProgramContext) core.Section

NewSearch builds the search section. It opens in edit mode with no results, since there is no default query to run.

func QueryID

func QueryID(i int) core.SectionID

QueryID returns the section ID for the i-th configured query section. The index keeps IDs stable and collision-free regardless of user titles.

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

func (m *EpicsModel) Update(msg tea.Msg) (core.Section, tea.Cmd)

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

type Lens = core.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.

func DefaultLens

func DefaultLens() Lens

DefaultLens returns the triage landing lens.

func Lenses

func Lenses() []Lens

Lenses are the built-in quick filters, ordered. "Mine" is the triage default: my issues that are not done, most-recently-updated first — the working queue.

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

func (m *Model) CapturesInput() bool

CapturesInput reports filter/action focus.

func (*Model) Count

func (r *Model) Count() (int, bool)

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

func (m *Model) HelpBindings() []key.Binding

HelpBindings lists the section's contextual bindings, verbs first so the footer hint leads with the triage actions.

func (*Model) ID

func (m *Model) ID() core.SectionID

ID returns the issues section's identifier.

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).

func (*Model) Title

func (m *Model) Title() string

Title returns the tab-bar label.

func (*Model) Update

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

Update delegates shared behavior to results and handles the lens/refresh keys.

func (*Model) View

func (m *Model) View() string

View renders the lens chips (with the active lens's JQL hint) above the shared results body.

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

func (r *QueryModel) Count() (int, bool)

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) Title

func (m *QueryModel) Title() string

Title returns the tab-bar label.

func (*QueryModel) Update

func (m *QueryModel) Update(msg tea.Msg) (core.Section, tea.Cmd)

Update delegates shared behavior to results and handles refresh.

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

func (r *SearchModel) Count() (int, bool)

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) Title

func (s *SearchModel) Title() string

Title returns the tab-bar label.

func (*SearchModel) Update

func (s *SearchModel) Update(msg tea.Msg) (core.Section, tea.Cmd)

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.

Jump to

Keyboard shortcuts

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