Skip to content

Conversation

@rui-typelets
Copy link
Collaborator

Summary

Adds bi-directional note linking with [[note]] syntax and backlinks panel to the editor.

Problem

Users couldn't connect notes together to build a knowledge graph. Unlike tools like Obsidian or Roam, there was no way to:

  • Link from one note to another
  • See which notes reference the current note
  • Navigate between connected notes

Solution

Note Linking

  • [[ trigger - Type [[ to open note search popup
  • NoteLink TipTap extension - Custom node for rendering styled note links
  • NoteLinkSuggestion extension - Handles [[ trigger with unique plugin key to avoid conflicts with slash commands
  • Full note search - Shows all notes (not just filtered view) excluding current, deleted, hidden, and archived
  • Click navigation - Clicking a note link navigates to that note

Backlinks Panel

  • Incoming links - "X notes link here" section showing notes that reference current note
  • Outgoing links - Shows notes the current note links to
  • Collapsible sections - Expand/collapse each section independently
  • Quick navigation - Click any backlink to jump to that note

UI Integration

  • Toolbar dropdown - Links menu with "External Link" and "Link to Note" options
  • Slash command - /Link to Note inserts [[ to trigger search
  • Styled chips - Note links display as blue chips with 📝 icon

Technical Details

  • NoteLink.ts: TipTap Node extension with data-type="noteLink" and data-note-id attributes
  • NoteLinkSuggestion.ts: Extension with custom PluginKey to coexist with SlashCommands
  • noteLinkUtils.ts: Separated helper function to satisfy ESLint fast-refresh rule
  • useBacklinks.ts: Parses HTML content to extract note IDs via regex, computes incoming/outgoing links
  • BacklinksPanel.tsx: Collapsible panel with navigation buttons
  • useNotes.ts: Added allNotes export for unfiltered note access
  • layout.ts: Extended EditorProps with notes and onSelectNote

Testing

  • Type [[ triggers note search popup
  • Search filters notes as you type
  • Selecting note inserts styled link
  • Clicking link navigates to note
  • Backlinks panel shows incoming links
  • Outgoing links section shows links in current note
  • Works across folders (not limited to current view)
  • Toolbar dropdown works
  • Slash command /Link to Note works
  • Lint and type-check pass

  - Add [[note]] syntax to link between notes
  - Create NoteLink TipTap extension for rendering linked notes
  - Add NoteLinkSuggestion extension with search popup on [[
  - Show all notes (not just filtered) in link suggestions
  - Add BacklinksPanel showing notes that link to current note
  - Add useBacklinks hook to compute incoming/outgoing links
  - Add "Link to Note" option in toolbar dropdown and slash commands
  - Click on note links to navigate to linked note
@rui-typelets rui-typelets self-assigned this Nov 22, 2025
@rui-typelets rui-typelets merged commit 2ea5547 into main Nov 22, 2025
3 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.40.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants