Wikilink node with autocomplete #46
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#46
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Context
Obsidian-style
[[page links]]were confirmed in kickoff as in-scope and fit the vision's relation-tree idea.Scope
Add the reserved
wikilinkinline node to the shared schema (attrs: targetSlug, displayText): typing[[opens an autocomplete popup querying pages of the current pond (title match, create-new-page hint for misses), Enter inserts the node; rendering resolves slug → current title live (phantom targets render dashed with tooltip); click navigates (read mode) / opens edit affordance (edit mode); markdown mapping[[slug|text]]indocToMarkdown/markdownToDoc.Acceptance criteria
Technical notes
page_links— indexing is #47).Dependencies
Depends on #24, #25.
Size: ~1.5 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Implemented in
7244b89(Claude Opus 4.8). Pipeline green (CI incl. the new wikilink browser e2e pack; CD deploy Test → smoke → promote Int).Verified end to end in a real browser (locally against an isolated full stack, and in CI against deploy-identical code): type
[[, the autocomplete filters the pond's pages as you type, Enter inserts awikilinknode that renders the target's current title and is not phantom, and the link survives a reload (persisted through the collab server). Markdown round-trip ([[slug]]/[[slug|text]]) and slug parsing are unit-tested in@dorfteich/shared.Acceptance criteria
displayText ?? resolvedTitle ?? slug, resolving live from the pond's pages (WikilinkContext); the autocomplete inserts withdisplayText: nullso matches auto-resolve.Notes
wikilinkinline atom added to the shared editor schema (attrstargetSlug, optionaldisplayText); markdown via a markdown-it inline rule + serializer node; plain-text/HTML derivation include the shown text.[[autocomplete is dependency-free (no@tiptap/suggestion): a React popup positioned viaview.coordsAtPos, with ↑/↓/Enter/Esc intercepted in the capture phase so ProseMirror does not act on them while open. Create-new-page hint inserts a phantom link.Next M4 issue: #47 (wikilink index, backlinks API, phantom resolution).