app

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NCBg          = lipgloss.Color("#000087") // dark blue panel background
	NCSelected    = lipgloss.Color("#00AAAA") // cyan selected row background
	NCSelFg       = lipgloss.Color("#000000") // selected row foreground
	NCBorder      = lipgloss.Color("#FFFFFF") // active panel border
	NCBorderDim   = lipgloss.Color("#444466") // inactive panel border
	NCTitleActive = lipgloss.Color("#008888") // active panel title bar background
	NCTitleDim    = lipgloss.Color("#000066") // inactive panel title bar background
	NCFnBg        = lipgloss.Color("#00AAAA") // F-key button background
	NCFnFg        = lipgloss.Color("#000000") // F-key number foreground
	NCFnDescFg    = lipgloss.Color("#FFFFFF") // F-key description foreground
	NCStatus      = lipgloss.Color("#000087") // status bar background
	NCStatusFg    = lipgloss.Color("#00FFFF") // status bar foreground
	NCColHeader   = lipgloss.Color("#00AAAA") // column header background
)
View Source
var (
	StyleBase = lipgloss.NewStyle().
				Foreground(colorFg)

	StyleDim = lipgloss.NewStyle().
				Foreground(colorFgDim)

	StyleBold = lipgloss.NewStyle().
				Bold(true)

	StyleAccent = lipgloss.NewStyle().
				Foreground(colorAccent).
				Bold(true)

	StyleSuccess = lipgloss.NewStyle().
					Foreground(colorSuccess)

	StyleError = lipgloss.NewStyle().
				Foreground(colorError)

	StyleWarning = lipgloss.NewStyle().
					Foreground(colorWarning)

	StyleBlue = lipgloss.NewStyle().
				Foreground(colorBlue)

	// Panel borders
	BorderNormal = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(colorBorder)

	BorderFocused = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(colorFocus)

	// Header
	StyleHeader = lipgloss.NewStyle().
				Background(colorAccent).
				Foreground(lipgloss.Color("#FFFFFF")).
				Bold(true).
				Padding(0, 1)

	// Footer / status
	StyleFooter = lipgloss.NewStyle().
				Foreground(colorFgDim).
				BorderTop(true).
				BorderStyle(lipgloss.NormalBorder()).
				BorderForeground(colorBorder)

	StyleStatusOK  = lipgloss.NewStyle().Foreground(colorSuccess).Bold(true)
	StyleStatusErr = lipgloss.NewStyle().Foreground(colorError).Bold(true)

	// Tabs
	StyleTab = lipgloss.NewStyle().
				Foreground(colorFgDim).
				Padding(0, 2)

	StyleTabActive = lipgloss.NewStyle().
					Foreground(colorAccent).
					Bold(true).
					Padding(0, 2).
					Underline(true)

	// List items
	StyleListItem = lipgloss.NewStyle().
					Foreground(colorFg).
					Padding(0, 1)

	StyleListItemSelected = lipgloss.NewStyle().
							Foreground(colorBg).
							Background(colorFocus).
							Padding(0, 1)

	// Label badge
	StyleLabel = lipgloss.NewStyle().
				Foreground(lipgloss.Color("#FFFFFF")).
				Background(colorBlue).
				Padding(0, 1)
)
View Source
var Create = CreateKeys{
	Next:    key.NewBinding(key.WithKeys("tab"), key.WithHelp("tab", "next")),
	Prev:    key.NewBinding(key.WithKeys("shift+tab"), key.WithHelp("shift+tab", "prev")),
	Submit:  key.NewBinding(key.WithKeys("ctrl+s"), key.WithHelp("ctrl+s", "submit")),
	Cancel:  key.NewBinding(key.WithKeys("ctrl+c"), key.WithHelp("ctrl+c", "cancel")),
	Confirm: key.NewBinding(key.WithKeys("y"), key.WithHelp("y", "confirm create")),
	Regen:   key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "regenerate")),
}
View Source
var Detail = DetailKeys{
	Up:      key.NewBinding(key.WithKeys("up", "k"), key.WithHelp("↑/k", "scroll up")),
	Down:    key.NewBinding(key.WithKeys("down", "j"), key.WithHelp("↓/j", "scroll down")),
	Comment: key.NewBinding(key.WithKeys("c"), key.WithHelp("c", "comment")),
	Edit:    key.NewBinding(key.WithKeys("e"), key.WithHelp("e", "edit")),
	Assign:  key.NewBinding(key.WithKeys("a"), key.WithHelp("a", "assign me")),
	Close:   key.NewBinding(key.WithKeys("x"), key.WithHelp("x", "close")),
	Reopen:  key.NewBinding(key.WithKeys("o"), key.WithHelp("o", "reopen")),
	Save:    key.NewBinding(key.WithKeys("ctrl+s"), key.WithHelp("ctrl+s", "save")),
}
View Source
var Global = GlobalKeys{
	Create:     key.NewBinding(key.WithKeys("c"), key.WithHelp("c", "create")),
	Settings:   key.NewBinding(key.WithKeys("s"), key.WithHelp("s", "settings")),
	Help:       key.NewBinding(key.WithKeys("?"), key.WithHelp("?", "help")),
	Quit:       key.NewBinding(key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit")),
	Back:       key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "back")),
	SwitchPane: key.NewBinding(key.WithKeys("tab"), key.WithHelp("tab", "switch pane")),
}
View Source
var List = ListKeys{
	Up:      key.NewBinding(key.WithKeys("up", "k"), key.WithHelp("↑/k", "up")),
	Down:    key.NewBinding(key.WithKeys("down", "j"), key.WithHelp("↓/j", "down")),
	Open:    key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "open")),
	Toggle:  key.NewBinding(key.WithKeys("o"), key.WithHelp("o", "toggle state")),
	Filter:  key.NewBinding(key.WithKeys("/"), key.WithHelp("/", "filter")),
	Refresh: key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "refresh")),
}

Functions

This section is empty.

Types

type AgentFinalMsg

type AgentFinalMsg struct{ Resp types.AgentResponse }

type AgentResponseMsg

type AgentResponseMsg struct{ Resp types.AgentResponse }

type BackMsg

type BackMsg struct{}

type ClearStatusMsg

type ClearStatusMsg struct{}

type ConfigSavedMsg

type ConfigSavedMsg struct{}

type CreateKeys

type CreateKeys struct {
	Next      key.Binding
	Prev      key.Binding
	Submit    key.Binding
	Cancel    key.Binding
	EditTitle key.Binding
	Confirm   key.Binding
	Regen     key.Binding
}

CreateKeys are active in the create screen.

type CursorToMsg

type CursorToMsg struct{ Row int }

CursorToMsg asks a pane to move its cursor to the given row index.

type DetailKeys

type DetailKeys struct {
	Up      key.Binding
	Down    key.Binding
	Comment key.Binding
	Edit    key.Binding
	Assign  key.Binding
	Close   key.Binding
	Reopen  key.Binding
	Save    key.Binding
}

DetailKeys are active in the detail screen.

type ErrMsg

type ErrMsg struct{ Err error }

func (ErrMsg) Error

func (e ErrMsg) Error() string

type GlobalKeys

type GlobalKeys struct {
	Create     key.Binding
	Settings   key.Binding
	Help       key.Binding
	Quit       key.Binding
	Back       key.Binding
	SwitchPane key.Binding
}

GlobalKeys are active on every screen.

type IssueActionDoneMsg

type IssueActionDoneMsg struct {
	Action string
	Number int
}

type IssueCreatedMsg

type IssueCreatedMsg struct {
	URL   string
	Draft types.Draft
}

type IssueEditedMsg

type IssueEditedMsg struct {
	Number int
	Title  string
	Body   string
}

type IssueLoadedMsg

type IssueLoadedMsg struct{ Issue *types.Issue }

type IssuesLoadedMsg

type IssuesLoadedMsg struct {
	Issues []types.Issue
	State  string
}

type KeyInterceptor

type KeyInterceptor interface {
	InterceptsKeys() bool
}

KeyInterceptor is implemented by screens that want all keystrokes when an input is focused, preventing global shortcuts from firing.

type ListKeys

type ListKeys struct {
	Up      key.Binding
	Down    key.Binding
	Open    key.Binding
	Toggle  key.Binding
	Filter  key.Binding
	Refresh key.Binding
}

ListKeys are active in the issue list screen.

type NCLiner

type NCLiner interface {
	NCLines(w, h int) []string
}

NCLiner is implemented by pane models that can produce fixed-width content lines for the NC frame renderer.

type NavigateMsg struct{ Screen Screen }

type OpenIssueMsg

type OpenIssueMsg struct{ Number int }

OpenIssueMsg navigates to the detail screen and fetches the given issue.

type Root

type Root struct {
	Cfg types.Config // exported so main.go can set it before first render

	Local    tea.Model // left pane — LocalPane
	List     tea.Model // right pane — ListModel
	Create   tea.Model
	Detail   tea.Model
	Settings tea.Model
	// contains filtered or unexported fields
}

Root is the top-level Bubble Tea model. It owns screen routing and the NC two-pane layout.

func New

func New() Root

func (Root) ActiveScreen

func (r Root) ActiveScreen() Screen

func (Root) Init

func (r Root) Init() tea.Cmd

func (Root) Update

func (r Root) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Root) View

func (r Root) View() string

type Screen

type Screen int

Screen identifies which top-level view is active.

const (
	ScreenNC       Screen = iota // two-pane Norton Commander mode (default)
	ScreenCreate                 // full-screen overlay: create issue
	ScreenDetail                 // full-screen overlay: issue detail
	ScreenSettings               // full-screen overlay: settings
)

type StatusMsg

type StatusMsg struct {
	Text    string
	IsError bool
}

Jump to

Keyboard shortcuts

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