feat: unlinked references in the backlinks panel (slice 3a) #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/unlinked-references"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Slice 3a of the connect roadmap (read-only half of "unlinked references + linkify"). When the backlinks panel (
b) opens, peekseq now also lists unlinked references — bare-text mentions of the page elsewhere inpages/+journals/that aren't yet[[linked]]— in a second section beneath the linked backlinks.enteron an unlinked row jumps to that page. Read-only; no files are written.How it works
search.Mentions(graphPath, name)runsrg -w -F --ignore-case(whole-word, literal, case-insensitive) for the page name.graph.FilterUnlinked(pure, unit-tested) drops hits that are inside an existing[[…]], inside a fenced code block, or in the page's own file.App.unlinkedRefsruns detection on panel-open and injects the result (view stays display-only).graphimportssearch(verified no cycle); detection is by page name (no alias tracking exists).Conscious deviations / notes
Span-based emphasis of the matched text, but the existing linked backlink rows don't highlight either — emphasising only unlinked rows would make the two sections inconsistent. TheMatchspan is still computed (it drives the inside-[[…]]filter and anchors the future linkify slice). Deferred for consistency.b-press —rgon one name over two dirs is fast; spec-sanctioned, with an async escape hatch noted if it ever drags.Scope
Out (future slice 3b → v1.4.0): one-key linkify (the first writer to files other than the current page). Also out: alias matching, namespaced-leaf matching, frequency/length caps.
Test plan
go vet ./... && go test ./...greensearch.Mentionswhole-word;FilterUnlinked(own-file / fenced / inside-[[]]/ unreadable-file); AppunlinkedRefson a temp graphbon a page with bare mentions; confirm the unlinked section +enternavigation