Skip to content

feat: add the notes editor with live co-editing - #42

Merged
AmrMsCLL merged 1 commit into
mainfrom
feat/notes-editor
Oct 5, 2026
Merged

AmrMsCLL merged 1 commit into
mainfrom
feat/notes-editor

Conversation

@AmrMsCLL

@AmrMsCLL AmrMsCLL commented Oct 5, 2026

Copy link
Copy Markdown
Member

What changed

PR 3d from .claude/.Plans/as2026-10-02-strata-phase-3-technical-design.md. Amr approved decision 3, the Tiptap core. Stacked on #41.

New frontend dependencies, all MIT and from the free Tiptap core, never its paid cloud: @tiptap/core, react, starter-kit, pm, extension-collaboration, extension-collaboration-caret, extension-list (checklists) and extensions (placeholder), all 3.31.4; plus yjs 13.6.33 and @hocuspocus/provider 4.7.0. They were installed in the Linux container so the lockfile keeps its libc fields.

  • A Notes tab in every space:
    • pages are listed as an indented tree, and "New page" opens a fresh page;
    • pages whose parent is gone show at the top level rather than disappearing.
  • /notes/:id:
    • a breadcrumb back through the space and parent pages;
    • a title you edit in place, saved when you leave the field or press Enter;
    • the editor;
    • "Pages inside", with "Add a page inside".
  • The editor:
    • Tiptap with bold, italic, two heading levels, bulleted, numbered and check lists, quotes and code blocks, and Markdown shortcuts as you type;
    • edits sync live through the real-time server from feat: add notes and a real-time editing server #41;
    • other people's cursors show with their names in a colour of their own, and their avatars appear under "Also here";
    • a status reads Connecting, Saving, Saved, Offline, or View only;
    • viewers get a read-only editor and title;
    • a note over the 5 MB limit shows an error toast;
    • the editor is loaded only when a page opens: 169 kB gzipped in its own chunk.
  • Behind the scenes:
    • the connection sends the current access token and keeps working across the 13-minute renewal, without reconnecting;
    • search results and item lists now link to the page they belong to (notes, events, tasks, lists, subscriptions) through one itemHref helper;
    • the local Vite proxy now forwards WebSockets (ws: true).

Verification

  • Lint, tsc -b and vite build pass.
  • The new test/notes.spec.tsx replaces the editor with a stub. It covers:
    • tree order and depth;
    • listing and creating pages;
    • the breadcrumb, renaming on blur and adding a page inside;
    • a viewer's read-only page;
    • "Page not found".
  • routes, spaces and files pass. In search, a note now opens /notes/:id instead of its space, so that one expectation changed.
  • On the real local stack (Postgres, Redis and the real-time server):
    • creating a page from the Notes tab;
    • typing and seeing "Saved";
    • the text stored in note_documents and searchable;
    • reloading in a second tab, which brings the text back;
    • a live cursor from the other tab, and "Also here: Tester" in the first.

@github-actions github-actions Bot added the size/xl Over 600 changed lines, excluding lockfiles label Oct 5, 2026
@AmrMsCLL
AmrMsCLL force-pushed the feat/realtime-server branch from e2ad95c to 7ca6efc Compare October 5, 2026 19:03
Base automatically changed from feat/realtime-server to main October 5, 2026 19:03
@AmrMsCLL
AmrMsCLL merged commit f157524 into main Oct 5, 2026
6 checks passed
@AmrMsCLL
AmrMsCLL deleted the feat/notes-editor 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/xl Over 600 changed lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant