feat(tui): add status bar, help overlay, tag filter, and entity actions

Status bar with entity count and context-sensitive key hints. Help
overlay via ? key. Tag filter via # with cursor-navigable tag list.
Todo toggle (x), pin (!), promote (p), demote (D), copy (c), edit (e)
via $EDITOR. Delete confirmation with 3s timeout. Date-grouped list
with completed todo and pinned indicators. Esc clears active tag filter.

Adds CompletedAt/ClearCompleted to EntityUpdate for todo toggling.
This commit is contained in:
2026-05-17 20:33:34 -04:00
parent 36999cd825
commit c2ea63dd16
10 changed files with 804 additions and 77 deletions
+23
View File
@@ -0,0 +1,23 @@
package tui
import (
"fmt"
"time"
tea "github.com/charmbracelet/bubbletea"
"github.com/lerko/nib/internal/display"
)
type confirmTimeoutMsg struct{}
func confirmTimeout() tea.Cmd {
return tea.Tick(3*time.Second, func(time.Time) tea.Msg {
return confirmTimeoutMsg{}
})
}
func renderConfirm(entityID string) string {
short := display.FormatID(entityID)
return errorStyle.Render(fmt.Sprintf("delete %s? y to confirm, any key to cancel", short))
}