feat(tui): always-visible capture bar with focus cycling

Replace drawer-based input with permanent capture bar at bottom.
Focus defaults to capture on startup — open nib, start typing.

- Remove stateInput; route via focusCapture/focusList/focusDetail
- Tab cycles: capture → list → detail (split) → capture
- Esc cascades: clear search → clear filter → focus capture
- Capture bar shows blinking cursor when focused, dims when not
- Intent cycling moved from tab to i (tab now cycles focus)
- Parse preview shown inline in status bar while typing
- Content area constant height (no layout thrash from drawer)
This commit is contained in:
2026-05-20 14:11:46 -04:00
parent 3daa5a2e11
commit a2dac64d1f
5 changed files with 141 additions and 132 deletions
+5 -3
View File
@@ -7,7 +7,7 @@ type keyMap struct {
Down key.Binding
Enter key.Binding
Back key.Binding
Add key.Binding
Capture key.Binding
Delete key.Binding
Quit key.Binding
Help key.Binding
@@ -31,6 +31,7 @@ type keyMap struct {
Fill key.Binding
FocusLeft key.Binding
FocusRight key.Binding
Tab key.Binding
}
var keys = keyMap{
@@ -38,7 +39,7 @@ var keys = keyMap{
Down: key.NewBinding(key.WithKeys("down", "j"), key.WithHelp("↓/j", "down")),
Enter: key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "view")),
Back: key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "back")),
Add: key.NewBinding(key.WithKeys("a"), key.WithHelp("a", "add")),
Capture: key.NewBinding(key.WithKeys("a"), key.WithHelp("a", "capture")),
Delete: key.NewBinding(key.WithKeys("d"), key.WithHelp("d", "delete")),
Quit: key.NewBinding(key.WithKeys("q", "ctrl+c"), key.WithHelp("q", "quit")),
Help: key.NewBinding(key.WithKeys("?"), key.WithHelp("?", "help")),
@@ -56,10 +57,11 @@ var keys = keyMap{
Stream: key.NewBinding(key.WithKeys("1"), key.WithHelp("1", "stream")),
Cards: key.NewBinding(key.WithKeys("2"), key.WithHelp("2", "cards")),
Sort: key.NewBinding(key.WithKeys("s"), key.WithHelp("s", "sort")),
Intent: key.NewBinding(key.WithKeys("tab"), key.WithHelp("tab", "intent")),
Intent: key.NewBinding(key.WithKeys("i"), key.WithHelp("i", "intent")),
Absorb: key.NewBinding(key.WithKeys("m"), key.WithHelp("m", "absorb")),
Run: key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "run checklist")),
Fill: key.NewBinding(key.WithKeys("f"), key.WithHelp("f", "fill template")),
FocusLeft: key.NewBinding(key.WithKeys("h"), key.WithHelp("h", "focus list")),
FocusRight: key.NewBinding(key.WithKeys("l"), key.WithHelp("l", "focus detail")),
Tab: key.NewBinding(key.WithKeys("tab"), key.WithHelp("tab", "focus cycle")),
}