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
- func New(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 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 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 ¶
Types ¶
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
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) 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
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 ¶
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.