feat(tui): collapsible tag rail with ambient tag awareness
Persistent left panel showing tags with counts. Provides ambient awareness of tag landscape without requiring a modal. - New tagRailModel in tagrail.go: tag list with cursor, scroll, counts - Rail visible at >=100 cols width, 18% width (min 16 chars) - ctrl+b toggles rail visibility - focusTagRail added to focus cycle: capture → tags → list → detail - j/k navigates, enter filters/unfilters by tag - Active filter tag highlighted bold in rail - Tags refresh after entity create/delete/absorb - Rail auto-hides on narrow terminals, # modal still works as fallback - Width allocation accounts for rail in split and non-split layouts
This commit is contained in:
@@ -58,6 +58,10 @@ type tagsLoadedMsg struct {
|
||||
tags []db.TagCount
|
||||
}
|
||||
|
||||
type railTagsLoadedMsg struct {
|
||||
tags []db.TagCount
|
||||
}
|
||||
|
||||
type statusClearMsg struct{ seq int }
|
||||
|
||||
type editorFinishedMsg struct {
|
||||
@@ -181,6 +185,16 @@ func loadTags(store *db.Store) tea.Cmd {
|
||||
}
|
||||
}
|
||||
|
||||
func loadRailTags(store *db.Store) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
tags, err := store.ListTags(false)
|
||||
if err != nil {
|
||||
return errMsg{err}
|
||||
}
|
||||
return railTagsLoadedMsg{tags}
|
||||
}
|
||||
}
|
||||
|
||||
func editInEditor(store *db.Store, e *db.Entity) tea.Cmd {
|
||||
editorEnv := os.Getenv("EDITOR")
|
||||
if editorEnv == "" {
|
||||
|
||||
Reference in New Issue
Block a user