Skip to content

Page mentions: a page named in a line, with its icon and title as they are now - #215

Merged
LoopyDev merged 1 commit into
mainfrom
feat/page-mentions
Nov 14, 2026
Merged

LoopyDev merged 1 commit into
mainfrom
feat/page-mentions

Conversation

@LoopyDev

Copy link
Copy Markdown
Owner

The second half of inline links to pages, after the link editor (214).

Making one

  • Type @ or [[ and a page search opens under the cursor. Pick a page with the arrow keys and Enter or Tab, or the mouse.
    • The search closes once nothing matches, so "meet @ 5pm in the hall" doesn't keep a list open.
    • After Escape, Enter starts a new line again.
    • It doesn't open in code.
  • [[Exact title]] typed out becomes a mention, if exactly one page has that title.
  • The link editor: picking a page shows Show as a mention (the page's icon and title, kept up to date).
    • It's ticked unless there are words to link, chosen or typed in the Text box, decided when you save.
    • ⌘K beside a mention edits it: unticking makes it words linked to the page (its title), and Remove mention leaves the title as plain words.

What it is

  • A pageMention node holding only { pageId }, in both schemas, the editor's and the server's live documents.
  • Its title is looked up for whoever reads it:
    • In the editor, from the workspace's pages (PageMentionView.vue), so a rename shows live.
    • On the server, with requirePageAccess, the same rules as opening the page.
  • Someone else's private page reads as Private page and a page in the Bin as Deleted page, so a private page's title never reaches someone who can't open it.
  • It shows as a chip with the page's icon and title, in the text's own colour. A click opens the page in place, and ⌘-click in a new tab.
  • The arrow keys go past it. Copied, it's a link with its title, and pasted back it's a mention again: the parse rule has priority over the link mark's.

Markdown and exports

  • In Markdown it's [@Title](/doc/<id>), with the title as it is now for the reader. The server reads that back as a mention, so MCP and Markdown edits keep mentions. A bold mention, or two side by side, stays a mention.
  • A page with mentions can be rewritten whole: the check against losing formatting dropped them, and wrongly refused.
  • Markdown exports point a mention at the page's file (wikid-page:). The HTML export shows the page's icon and title if the page is in the export, and "a page not in this export" otherwise.
  • Templates leave mentions out, counted with the page links.

Not covered yet

  • Mentions of pages in other workspaces you're a member of show "Private page" in the editor, because only the open workspace's pages are loaded.
  • The AI's page context leaves mentions out.
  • Straight after picking a mention, the first ← doesn't move the cursor. It moves once anything's typed.

Tests

  • Browser (e2e/page-mentions.spec.ts, 7 tests):
    • @ with a live rename, a reload and a click;
    • [[ search and [[Exact title]];
    • the link editor's mention or link choice;
    • someone else's private page;
    • paste;
    • @ in a sentence, and Escape;
    • ⌘K beside a mention and converting it.
  • API: the Markdown form with current titles, Markdown write-back keeping the mention, and a private page's title hidden from others.
  • Unit: the Markdown reader and writer.

🤖 Generated with Claude Code

…y are now

Typed with @ or [[ (a page search), [[Exact title]], or chosen in the link editor ("Show as a
mention": ticked unless there are words to link). A mention holds only the page's id: its title
is looked up for whoever reads it, so renames show and someone else's private page reads as a
private page. As Markdown, [@title](/doc/<id>), read back as a mention (MCP edits keep them).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LoopyDev
LoopyDev merged commit 7c08657 into main Nov 14, 2026
7 checks passed
@LoopyDev
LoopyDev deleted the feat/page-mentions branch November 14, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant