Documentation
¶
Overview ¶
Package tui implements the persistent Jira dashboard.
Architecture mirrors pagerduty-client/internal/tui:
- App is a value-typed Bubble Tea root model owning all sub-models, overlays and the global key map.
- WindowSizeMsg cascades down a single source of truth (bodyH) to every child so layout never drifts.
- Update routes overlay keys first (cascade), then global keys, then per-view actions, then forwards unhandled keys to the active view.
- View composes header / body / footer zones and layers overlays.
Index ¶
- func ApplyTheme(th *clibtheme.Theme)
- func DefaultHelpRenderer() key.Renderer
- func RenderShell(width, height int, body, footer string) string
- func ResolveTheme(name string) *clibtheme.Theme
- func Run(ctx context.Context) (tea.Model, error)
- func RunWithOptions(ctx context.Context, opts Options) (tea.Model, error)
- type App
- func (a App) ActiveProfile() string
- func (a App) ActiveTab() string
- func (a App) Cursor() int
- func (a App) Filter() string
- func (a App) HelpVisible() bool
- func (a App) Init() tea.Cmd
- func (a App) LastAction() string
- func (a *App) SetFilter(value string)
- func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (a App) View() tea.View
- type Dashboard
- type IssueProvider
- type IssueProviderFunc
- type IssueSelected
- type MutationService
- type Options
- type SubmitCloneMsg
- type SubmitCommentMsg
- type SubmitCreateMsg
- type SubmitDeleteMsg
- type SubmitEditMsg
- type SubmitMoveMsg
- type SubmitTransitionMsg
- type SubmitWorklogMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTheme ¶
func DefaultHelpRenderer ¶
func RenderShell ¶
func ResolveTheme ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the root Bubble Tea model.
func NewWithOptions ¶
NewWithOptions builds an App wired to the supplied provider/services.
func (App) ActiveProfile ¶
ActiveProfile returns the currently selected profile name.
func (App) Cursor ¶
Cursor exposes the list cursor for legacy tests; returns 0 in the new design (cursor is internal to the issuesList view).
func (App) HelpVisible ¶
HelpVisible reports whether the help overlay is currently shown.
func (App) LastAction ¶
LastAction returns the current view name as a coarse intent label (kept for legacy callers; the prior ad-hoc string field is gone).
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard wraps the issues list view and forwards the body region's WindowSizeMsg to it. Mirrors pdc/internal/tui/dashboard.go: the wrapper owns no chrome — header, status bar and overlays live at App level.
func (Dashboard) FilterActive ¶
FilterActive reports whether the list filter input is focused.
func (Dashboard) SelectedIssue ¶
SelectedIssue returns the currently highlighted issue, if any.
type IssueProvider ¶
IssueProvider supplies issues for the dashboard list. (Preserved from prior API for cmd/jira/tui.go integration.)
type IssueProviderFunc ¶
IssueProviderFunc adapts a function to IssueProvider.
func (IssueProviderFunc) ListIssues ¶
ListIssues calls the wrapped function.
type IssueSelected ¶
IssueSelected is emitted by the issue list when the user opens a row.
type MutationService ¶
type MutationService interface {
UpdateIssue(context.Context, string, map[string]any) (*jira.Issue, error)
CreateIssue(context.Context, *jira.IssueCreateRequest) (*jira.Issue, error)
TransitionIssue(context.Context, string, *jira.TransitionRequest) error
AddComment(context.Context, string, *jira.CommentAddRequest) (*jira.Comment, error)
AddWorklog(context.Context, string, *jira.WorklogAddRequest) (*jira.Worklog, error)
CloneIssue(context.Context, string, *jira.IssueCloneRequest) (*jira.Issue, error)
MoveIssue(context.Context, string, *jira.IssueMoveRequest) (*jira.Issue, error)
DeleteIssue(context.Context, string) error
}
MutationService is the seam for issue mutations triggered from the TUI. (Preserved from prior API.)
type Options ¶
type Options struct {
IssueProvider IssueProvider
MutationService MutationService
InitialError string
Profiles []string
ActiveProfile string
BaseURL string
RefreshEvery time.Duration
Theme string
// Identity used to resolve "me" / "team" filters in the issues tab.
// Email is matched against assignee.email_address (Jira Cloud).
// AccountID is matched against assignee.account_id when known.
// TeamAccountIDs lists teammates whose issues count as "my team".
Email string
AccountID string
TeamAccountIDs []string
}
Options configures a TUI run.
type SubmitCloneMsg ¶
type SubmitCloneMsg struct {
IssueKey string
Request *jira.IssueCloneRequest
}
type SubmitCommentMsg ¶
type SubmitCreateMsg ¶
type SubmitCreateMsg struct {
Request *jira.IssueCreateRequest
}
type SubmitDeleteMsg ¶
type SubmitEditMsg ¶
type SubmitMoveMsg ¶
type SubmitMoveMsg struct {
IssueKey string
Request *jira.IssueMoveRequest
}
type SubmitTransitionMsg ¶
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package components contains reusable Bubble Tea overlays and chrome for the Jira TUI.
|
Package components contains reusable Bubble Tea overlays and chrome for the Jira TUI. |
|
Package editor is the in-TUI ADF-native rich-text editor.
|
Package editor is the in-TUI ADF-native rich-text editor. |
|
Package theme defines lipgloss styles shared across the Jira TUI.
|
Package theme defines lipgloss styles shared across the Jira TUI. |