Skip to content

Add backlinks for document mentions - #379

Merged
priethor merged 5 commits into
mainfrom
priethor/add/mention-backlinks
Jun 26, 2026
Merged

Add backlinks for document mentions#379
priethor merged 5 commits into
mainfrom
priethor/add/mention-backlinks

Conversation

@priethor

@priethor priethor commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

What

Follow-up to #376, closes #160.

Adds backlinks for document mentions. When a document mentions the document you are viewing, Cortext shows that source and lets you jump back to it.

In the document inspector, backlinks appear as a collapsible panel. In the side detail view, they sit behind a small toolbar button so they do not take over the editor body. Open backlink views also refresh after content is saved, and the side popover checks again when opened.

How

  • Keeping a private mention index updated when documents are saved or deleted.
  • Counting repeated mentions from the same source, while still showing that source only once.
  • Adding a backfill command for existing content.
  • Hiding backlink sources that the current viewer cannot read.

Testing Instructions

  1. Open a document that is mentioned by another document.
  2. Confirm backlinks appear on the mentioned document.
  3. Click a backlink and confirm that Cortext opens the source document.
  4. Mention the same target twice from one source, save, and confirm the count updates without duplicating the source.
  5. Remove the mention, save, and confirm the backlink disappears.
  6. Open the side detail backlink popover and confirm it shows the current count.
  7. Run the backfill command on existing content and confirm backlinks still appear.

Screenshots

image image

@priethor
priethor marked this pull request as ready for review June 26, 2026 15:35
@priethor priethor added type: enhancement Improvement to existing behavior. area: canvas Block editor canvas, blocks, inspector, covers, icons, and document chrome. labels Jun 26, 2026
@priethor
priethor merged commit c927588 into main Jun 26, 2026
14 of 16 checks passed
@priethor
priethor deleted the priethor/add/mention-backlinks branch June 26, 2026 15:53
@github-actions github-actions Bot added this to the 0.2.0 milestone Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: canvas Block editor canvas, blocks, inspector, covers, icons, and document chrome. type: enhancement Improvement to existing behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add mentions and backlinks for pages and rows

1 participant