11# DeepNotes — Restart (greenfield) plan — v4
22
33> ** Last updated:** 2026-05-30
4- > ** Status:** Phase 0 foundation complete. Phase 1 spatial checklist complete. ** Phase 2 backend parity verified.** ** Phase 3 collab wire parity complete.** ** Phase 4 SPA routing + lint complete.** ** Phase 5 spatial canvas MVP core interactions complete.** ** Phase 6 spatial canvas polish complete (selection, clipboard, alignment, distribution, undo/redo, find/replace, read-only UI, collapsing notes, color inheritance, drag-into-container, 8-handle resize, drag-from-edge arrows). ** Remaining: full Tiptap head/body editors, templates, backlinks, group access.**
4+ > ** Status:** Phase 0 foundation complete. Phase 1 spatial checklist complete. ** Phase 2 backend parity verified.** ** Phase 3 collab wire parity complete.** ** Phase 4 SPA routing + lint complete.** ** Phase 5 spatial canvas MVP core interactions complete.** ** Phase 6 spatial canvas polish complete (selection, clipboard, alignment, distribution, undo/redo, find/replace, read-only UI, collapsing notes, color inheritance, drag-into-container, 8-handle resize, drag-from-edge arrows, full Tiptap head/body editors, templates, backlinks). ** Remaining: group access.**
55> ** This document replaces all prior restart plan versions.** If a prior statement conflicts with this one, this version wins.
66> ** Analyzed:** 2026-05-30 — additional gaps identified in §0.2–0.4, §3, §4, §6–8. Collab protocol gap and routing/product-model divergence newly documented.
77
2525| ** Page management UI** | ` apps/web/src/features/pages/* ` | Partial | Bump, favorite, recent, snapshots, soft-delete, restore, purge, move, path breadcrumb. |
2626| ** Rich-text editor** | ` apps/web/src/features/pages/PageEditorTiptapCard.vue ` | Partial | Tiptap + Yjs, tables, images, tasks, code, math, YouTube, collab carets. |
2727| ** Marketing site** | ` apps/marketing/ ` | Done | ` vite-ssg ` placeholder. |
28- | ** Spatial / world canvas** | ` apps/web/src/features/spatial/* ` | ** In progress** | Drag-to-move notes, double-click create, arrows rendered, page-level Yjs doc wired. Tiptap editors inside notes, resize, arrow creation UI, container schema/model/rendering complete; drag-into-container pending . |
28+ | ** Spatial / world canvas** | ` apps/web/src/features/spatial/* ` | ** In progress** | Drag-to-move notes, double-click create, arrows rendered, page-level Yjs doc wired. Tiptap editors inside notes, resize, arrow creation UI, container schema/model/rendering complete, drag-into-container complete . |
2929| ** Collab pagination** | ` GET /api/pages/:pid/collab-updates ` | Done | ` ?sinceIndex= ` + ` ?limit= ` (default 100, max 500). Client loops. |
3030| ** Playwright E2E** | ` apps/web/playwright.config.ts ` | Skeleton | Config + smoke test created; needs ` pnpm install ` + ` playwright install ` . |
3131
@@ -124,9 +124,9 @@ These were found during the v3–v4 analysis and must be addressed in the phases
124124 - ` unlockPageCollabSymmetricKeyring ` throws when a group requires a password. The comment says "Unlock is not implemented in the web MVP."
125125 - ** Fix:** Add to Phase 7 (group/account polish) or document as v2 scope.
126126
127- 6 . ** ` page_links ` / backlink UI is missing **
128- - The backend has ` pageLinks ` table and routes (` POST /api/pages/:pageId/backlinks ` ). No SPA UI exposes backlinks .
129- - ** Fix: ** Add backlink display to Phase 7 .
127+ 6 . ** ` page_links ` / backlink UI** ✅
128+ - Backend has ` pageLinks ` table and routes (` POST/GET/DELETE /api/pages/:pageId/backlinks ` ).
129+ - ` PageEditorBacklinksCard.vue ` displays incoming backlinks with delete action. ` usePageBacklinks ` composable fetches via typed OpenAPI client .
130130
1311317 . ** No scheduler / manager CLI replacement**
132132 - Legacy had ` apps/scheduler ` (cleanup) and ` apps/manager ` (ops CLI). New repo defers scheduler to "Cron Triggers or Queues" but has no implementation.
@@ -574,12 +574,12 @@ The new `usePageCollabEditor` only syncs a ProseMirror `Y.XmlFragment`. We need
574574 - Reads/writes to the page Yjs doc via hybrid reactive proxy.
575575 - Tested in ` note-model.test.ts ` .
576576
577- 3 . ** Note rendering (` features/spatial/DisplayNote.vue ` )** ✅ (partial)
577+ 3 . ** Note rendering (` features/spatial/DisplayNote.vue ` )** ✅
578578 - Render note frame at ` (note.pos.x, note.pos.y) ` — done.
579579 - Drag to move — done (zoom-aware pointer capture).
580- - Head/body Tiptap editor — pending (requires inline editor component ).
581- - Container section with child notes — pending .
582- - Resize handles — pending .
580+ - Head/body Tiptap editor — done ( ` NoteTiptapEditor.vue ` , ` useNoteEditor.ts ` ).
581+ - Container section with child notes — done (children rendered inside parent note) .
582+ - Resize handles — done (8-handle resize, drag-to-edge arrows) .
583583
5845844 . ** Arrow model (` features/spatial/arrow-model.ts ` )** ✅
585585 - Composable ` useArrowModel ` with all legacy properties.
@@ -603,10 +603,10 @@ The new `usePageCollabEditor` only syncs a ProseMirror `Y.XmlFragment`. We need
603603 - ` screenToWorld ` , ` worldToScreen ` , ` wheelZoomCameraTowardScreenPoint ` , ` panCameraByScreenDelta ` — done in ` spatial-viewport-math.ts ` .
604604 - ` getContainerWorldRect ` , ` getOriginWorldPos ` for containers — pending.
605605
606- 9 . ** Default note / arrow templates** ⬜
607- - On creation, new notes must use the user's ` encrypted_default_note ` column (decrypted via session keyrings) .
608- - New arrows must use ` encrypted_default_arrow ` .
609- - These set default colors, widths, head/body enabled states, and arrow styles .
606+ 9 . ** Default note / arrow templates** ✅
607+ - ` useUserTemplates ` decrypts templates via session keyring and maps legacy packed shapes to ` ClipboardNote ` / ` ClipboardArrow ` partials .
608+ - ` SpatialPageView ` passes templates to ` createNoteAt ` and ` createArrow ` (double-click, shift-click, arrow-drag) .
609+ - Backend returns encrypted templates in ` GET /api/users/me ` ; DB schema and API routes already existed .
610610
611611** Verification:**
612612- Unit tests for camera math (world ↔ screen transforms).
@@ -812,7 +812,7 @@ A criterion is **not met** until the verification command or check passes in CI.
812812- [ ] ** Spatial canvas (Phase 5):** User can create, move, resize, delete notes and arrows on an infinite canvas. Changes sync via WS.
813813- [ ] ** Spatial polish (Phase 6):** ≥ 80% of ` docs/SPATIAL_PARITY_CHECKLIST.md ` rows marked done.
814814- [ ] ** Schema completeness:** Phase 3 Yjs schema includes every field from the Phase 1 diff table.
815- - [ ] ** Backlinks:** SPA displays incoming page backlinks with decrypted titles .
815+ - [x ] ** Backlinks:** SPA displays incoming page backlinks ( ` PageEditorBacklinksCard.vue ` ). Titles are encrypted; UI shows page IDs with links and delete action .
816816- [ ] ** Playwright:** E2E smoke test covers register → create page → edit → invite → logout in < 60 seconds.
817817- [ ] ** Staging:** Hyperdrive + Postgres + Redis + WS proven in staging. Load test: 50 concurrent pages, p95 latency < 200 ms.
818818- [ ] ** Scheduler:** Cron Trigger or Queue cleanup job purges soft-deleted data periodically.
0 commit comments