issues

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

JQL completion engine for the search editor: a small tokenizer classifies where the cursor is in the query (field, operator, value, or connective position) and builds full-line candidates from the instance's autocomplete reference data, so the textinput's whole-line ghost suggestion completes just the token being typed. Pure functions — the async parts (fetching the reference data and live field values) live in the search section.

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

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

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

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

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

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

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