feat(db): add wiki-link extraction, resolution, and backlinks
CI / test (pull_request) Successful in 2m27s

[[wiki-links]] in entry bodies are extracted at save time, resolved
to entity IDs (title match first, body substring fallback), and
stored in entity_links junction table. Backlinks surface in TUI
detail view showing entries that link to the current entry.

Schema migration v5 adds entity_links with CASCADE/SET NULL
semantics. Links sync on Create, Update, and Absorb.
This commit is contained in:
2026-05-21 13:34:56 -04:00
parent d24df8432f
commit 1e58433936
10 changed files with 454 additions and 8 deletions
+2
View File
@@ -43,6 +43,7 @@ var (
stumbleAgeStyle lipgloss.Style
acSelectedStyle lipgloss.Style
acItemStyle lipgloss.Style
backlinkStyle lipgloss.Style
)
func init() {
@@ -100,4 +101,5 @@ func applyTheme() {
stumbleAgeStyle = lipgloss.NewStyle().Foreground(remind)
acSelectedStyle = lipgloss.NewStyle().Foreground(accent).Bold(true)
acItemStyle = lipgloss.NewStyle().Foreground(muted)
backlinkStyle = lipgloss.NewStyle().Foreground(muted)
}