feat(tui): include backlinks in link picker
CI / test (pull_request) Successful in 2m25s

Link picker now shows both outgoing [[links]] and backlinks in
a unified list with section headers. Backlinks follow by entity
ID directly, outgoing links resolve by text. Navigating into a
backlink works the same as following an outgoing link — pushes
to nav stack, esc pops back.
This commit is contained in:
2026-05-21 14:12:28 -04:00
parent 2684eb1d24
commit 4517b2e37c
3 changed files with 73 additions and 17 deletions
+10
View File
@@ -222,6 +222,16 @@ func followLink(store *db.Store, linkText string) tea.Cmd {
}
}
func followLinkByID(store *db.Store, entityID string) tea.Cmd {
return func() tea.Msg {
entity, err := store.Get(context.Background(), entityID)
if err != nil {
return errMsg{err}
}
return linkFollowedMsg{entity}
}
}
func loadRailTags(store *db.Store) tea.Cmd {
return func() tea.Msg {
tags, err := store.ListTags(context.Background(), false)