Skip to content

feat: link pages with mentions and keep images inside notes - #44

Merged
AmrMsCLL merged 1 commit into
mainfrom
feat/note-links
Oct 5, 2026
Merged

AmrMsCLL merged 1 commit into
mainfrom
feat/note-links

Conversation

@AmrMsCLL

@AmrMsCLL AmrMsCLL commented Oct 5, 2026

Copy link
Copy Markdown
Member

What changed

PR 3f from .claude/.Plans/as2026-10-02-strata-phase-3-technical-design.md. Stacked on #43.

New frontend dependencies: @tiptap/extension-mention, @tiptap/suggestion and @tiptap/extension-image, 3.31.4, all MIT and part of the Tiptap core Amr approved. Installed in the Linux container; the lockfile changes are the new entries, plus optional flags dropped on packages that are now direct dependencies.

  • Mentions:
    • typing @ and two characters searches pages, tasks, events and anything else you can open, through the existing search;
    • arrow keys and Enter pick a result, Escape closes the menu;
    • a mention shows as @Title, and clicking it opens what it points to.
  • Backlinks:
    • on every save, the server turns mentions into item_links of kind mention, removes the ones you deleted, and only links items the writer can read, so a mention can never reveal someone else's page;
    • each page shows "Linked from" for the pages and items that mention it.
  • Images:
    • pasting or dropping an image uploads it to the note's space through the normal upload (shrunk and stripped as usual, 25 MB at most);
    • it shows inline, loaded with your session, because file downloads need it;
    • on save it becomes an attachment link from the note to the file;
    • an image whose file was deleted says so instead of showing a broken picture.
  • The editor chunk grows from 169 kB to 188 kB gzipped, still loaded only when a page opens.

Verification

  • Lint, both builds and tsc --noEmit pass.

  • test/integration/notes.spec.ts adds a case covering:

    • a mention and an image becoming links, while a mention of someone else's private page is ignored;
    • the backlink showing on the target;
    • removing the mention removing its link.

    All five notes cases and records.spec.ts pass against Postgres on the local stack.

  • test/notes.spec.tsx adds a case for "Linked from", which shows mentions only and links each item to its page.

  • On the real local stack: typing "See @pack" in a new page listed the earlier page found by its text; Enter inserted the mention, and item_links got the mention row.

  • Pasting an image wasn't tried in the browser, because it needs a real clipboard. The server side of attachments is covered by the integration test.

@github-actions github-actions Bot added the size/l 201-600 changed lines, excluding lockfiles label Oct 5, 2026
Base automatically changed from feat/note-history to main October 5, 2026 19:04
@AmrMsCLL
AmrMsCLL merged commit 786a9af into main Oct 5, 2026
6 checks passed
@AmrMsCLL
AmrMsCLL deleted the feat/note-links branch October 5, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l 201-600 changed lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant