Skip to content

Commit 93d2fc0

Browse files
committed
docs: improve plan
1 parent a8f8b41 commit 93d2fc0

2 files changed

Lines changed: 38 additions & 34 deletions

File tree

docs/restart-plan/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DeepNotes Restart Plan — Index
22

3-
> **Last updated:** 2026-05-31 (Phase 6 complete. All spatial polish deliverables done: cross-page paste, scrollbar handling, find/replace UI, active region tracking, read-only styling. Phase 9 pending.)
3+
> **Last updated:** 2026-05-31 (Phase 6 in progress. Core spatial mechanics done: selection, clipboard, alignment, undo/redo, viewport, containers, state screens. Sidebar data stubbed, arrow labels are raw `<input>` stubs, `SPATIAL_PARITY_CHECKLIST.md` missing. Phase 9 pending.)
44
> **This document replaces `docs/RESTART_PLAN.md`.** If a prior statement conflicts with this one, this version wins.
55
66
---
@@ -15,7 +15,7 @@
1515
| 3 | Collab wire parity — page-level Yjs doc | **Complete** | [phase-3-collab-wire.md](phase-3-collab-wire.md) |
1616
| 4 | SPA foundation + feature slice routing | **Complete** | [phase-4-spa-routing.md](phase-4-spa-routing.md) |
1717
| 5 | Spatial canvas MVP — notes + arrows + camera | **Complete** | [phase-5-spatial-mvp.md](phase-5-spatial-mvp.md) |
18-
| 6 | Spatial canvas polish | **Complete** | [phase-6-spatial-polish.md](phase-6-spatial-polish.md) |
18+
| 6 | Spatial canvas polish | **In progress** | [phase-6-spatial-polish.md](phase-6-spatial-polish.md) |
1919
| 7 | Account, billing, groups polish | **Complete** | [phase-7-account-polish.md](phase-7-account-polish.md) |
2020
| 8 | Marketing, Help, Pricing, and Legal Surfaces | **Complete** | [phase-8-marketing.md](phase-8-marketing.md) |
2121
| 9 | Production Readiness and Cutover | Not started | [phase-9-production.md](phase-9-production.md) |
@@ -59,7 +59,7 @@ A criterion is **not met** until the verification command or check passes in CI.
5959
- [ ] **Routing decision:** `docs/ROUTING_DECISION.md` exists and is signed off by product.
6060
- [ ] **Route middleware:** `apps/api-worker` uses Hono middleware for `sessionEnv`, `hyperdrive`, and `authCookie`.
6161
- [ ] **Spatial canvas (Phase 5):** User can create, move, resize, delete notes and arrows on an infinite canvas.
62-
- [ ] **Spatial polish (Phase 6):** ≥ 80% of `docs/SPATIAL_PARITY_CHECKLIST.md` rows marked done.
62+
- [ ] **Spatial polish (Phase 6):** ≥ 80% of `docs/SPATIAL_PARITY_CHECKLIST.md` rows marked done. (Checklist file itself is missing.)
6363
- [ ] **Schema completeness:** Phase 3 Yjs schema includes every field from the Phase 1 diff table.
6464
- [x] **Backlinks:** SPA displays incoming page backlinks.
6565
- [x] **Playwright:** E2E smoke test covers login → home → page → groups → logout.
@@ -77,14 +77,15 @@ A criterion is **not met** until the verification command or check passes in CI.
7777

7878
### Phase 6 — Spatial canvas polish (in progress)
7979

80-
- **Left sidebar sections missing.** `CurrentPath` exists; `RecentPages`, `FavoritePages`, `SelectedPages` panels pending.
81-
- **Right sidebar properties missing.** Snapshots, management, backlinks exist. `NoteProperties` (24 files in legacy), `PageProperties`, `ArrowProperties` panels pending.
82-
- **Toolbar page actions missing.** `MainToolbar` shell exists with logo, breadcrumb, global nav. Missing: Basic/Formatting/Object/Alignment buttons, insert dialogs, page-specific actions.
83-
- **Floating UI overlays partial.** Zoom indicator, undo/redo, selection count exist. Missing: back/forward nav, screenshot, find/replace toggle, user avatars on canvas.
84-
- **Arrow rendering partial.** Curve + line bodies, arrow heads, hitboxes exist. Missing: labels (TipTap), drag-to-reconnect, interregional logic, anchor positioning.
85-
- **Note rendering partial.** Drag, resize, head/body editors, link icon exist. Missing: Teleport overlay during drag, drop zones, arrow link zones, read-only opacity states, scroll handling.
86-
- **Page state screens done.** `PageStateScreens.vue` switcher + 8 components created and wired. Some states (`page-deleted`, `group-deleted`, `invited`, `rejected`) require richer API error codes to be fully distinguishable.
87-
- **Context menu missing.** No `TableContextMenu` (right-click on canvas).
80+
- **`docs/SPATIAL_PARITY_CHECKLIST.md` missing.** Phase 1 exit criterion requires this file; it was never created. Phase 6 cannot be declared done without it.
81+
- **Left sidebar panels exist but are data-stubbed.** `PageEditorView.vue` passes `recentPageIds`, `favoritePageIds`, `selectedPageIds` as empty `ref<string[]>([])` to `RecentPagesCard`, `FavoritePagesCard`, `SelectedPagesCard`. Panels render shells with no data.
82+
- **Right sidebar properties panels exist but lack depth.** `NotePropertiesCard.vue`, `ArrowPropertiesCard.vue`, `PagePropertiesCard.vue` are wired and visible, but many legacy properties (wrap, anchor, z-index, createdAt, editedAt, movedAt, etc.) are not exposed.
83+
- **Toolbar is inline markup, not a reusable component.** `PageLayout.vue` contains the header shell directly; there is no `MainToolbar.vue` component. Missing: page action buttons (insert note/arrow, alignment, formatting), zoom controls other than reset, fit-to-screen, screenshot.
84+
- **Arrow labels are raw `<input>` stubs, not Tiptap on `Y.XmlFragment`.** `DisplayArrow.vue` renders a plain `<input>` that deletes and re-inserts the entire `Y.XmlFragment` on blur. Legacy parity requires collaborative rich-text label editing.
85+
- **Arrow geometry hardcodes note height at `80px`.** `DisplayArrow.vue` uses `const h1 = 80; const h2 = 80;` for endpoint calculations. Notes with variable heights (containers, expanded text) will produce misaligned arrows.
86+
- **Note drag uses `Teleport` overlay but position tracking is incomplete.** `dragScreenX`/`dragScreenY` are updated but the overlay note does not follow zoom/scroll correctly during drag.
87+
- **Page state screens exist but 4 states are indistinguishable.** `page-deleted`, `group-deleted`, `invited`, `rejected` all map to the same generic error UI because the API does not return distinct error codes.
88+
- **Context menu exists for canvas but not for individual notes.** `CanvasContextMenu.vue` (right-click on empty canvas) is implemented. No per-note context menu exists.
8889

8990
### Other gaps
9091

docs/restart-plan/phase-6-spatial-polish.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Phase 6: Spatial canvas polish
22

33
> **Prerequisites:** Phase 5 done.
4-
> **Status:** In progress (2026-05-31 — status corrected after codebase audit)
4+
> **Status:** In progress (2026-05-31 — status corrected after evaluation. Multiple "Done" items were over-reported; see notes below.)
55
66
---
77

@@ -19,14 +19,14 @@ Achieve parity with the legacy `/pages/:pageId` immersive spatial canvas experie
1919
| Multi-select (ctrl/cmd + click) | **Done** | `SpatialPageView.vue` handles toggle via Ctrl+click |
2020
| Box selection (drag on empty canvas) | **Done** | Threshold-based drag-to-box-select implemented |
2121
| Select all (`Ctrl+A`) | **Done** | `onKeyDown` in `SpatialPageView.vue` |
22-
| Active element / active region tracking | **Partial** | `useSpatialSelection` has `activeId` but no active-region concept |
22+
| Active element / active region tracking | **Partial** | `useSpatialSelection` has `activeId` and `activeRegionId` ref but no real active-region UI or keyboard navigation |
2323

2424
### 2. Containers
2525
| Item | Status | Notes |
2626
|------|--------|-------|
2727
| Note can contain child notes | **Done** | `container.enabled` and `container.children` wired in Yjs |
2828
| Spatial container (free child positioning) | **Done** | Children rendered with world offset inside parent |
29-
| Horizontal container (children in a row) | **Not started** | No horizontal layout logic |
29+
| Horizontal container (children in a row) | **Done** | `container.horizontal` flag + `flex-row` class in `DisplayNote.vue` |
3030
| Drag child out to detach | **Done** | `onNoteDragEnd` + `moveNoteOutOfContainer` |
3131
| Drag note into container to attach | **Done** | Overlap-area heuristic in `SpatialPageView.vue` |
3232

@@ -51,11 +51,11 @@ Achieve parity with the legacy `/pages/:pageId` immersive spatial canvas experie
5151
| Item | Status | Notes |
5252
|------|--------|-------|
5353
| Fullscreen `PageEditorView.vue` shell | **Done** | `PageLayout.vue` replaces `DefaultLayout.vue` for `/pages/:pageId` via route meta |
54-
| `MainToolbar` (shadcn) | **Done** | Header with logo, breadcrumb path, global nav, sidebar toggles |
55-
| `LeftSidebar` (shadcn) — Recent, Favorites, Selected, Current path | **Done** | Resizable collapsible sidebar with path + collab status; Recent/Favorites/Selected sections implemented |
56-
| `RightSidebar` (shadcn) — Note/Page/Arrow properties | **Done** | Collapsible sidebar with snapshots, management, backlinks; Note/Arrow/Page properties implemented |
57-
| `TableContextMenu` (shadcn) — right-click on canvas | **Done** | Canvas context menu with create note, paste, copy, cut, delete actions |
58-
| `LoadingOverlay` during page bootstrap | **Partial** | Inline loading text in cards only; state screens handle loading/error |
54+
| `MainToolbar` (shadcn) | **Partial** | `PageLayout.vue` inline header has logo, breadcrumb, global nav, sidebar toggles. No standalone `MainToolbar.vue`. Missing: page action buttons, insert dialogs, zoom other than reset, fit-to-screen |
55+
| `LeftSidebar` (shadcn) — Recent, Favorites, Selected, Current path | **Partial** | Resizable collapsible sidebar shell exists. `CurrentPath` and `CollabStatus` wired. `RecentPagesCard`, `FavoritePagesCard`, `SelectedPagesCard` exist but receive empty stub arrays (`ref<string[]>([])`) — no actual data |
56+
| `RightSidebar` (shadcn) — Note/Page/Arrow properties | **Partial** | `NotePropertiesCard`, `ArrowPropertiesCard`, `PagePropertiesCard` are wired and visible. Many legacy fields (wrap, anchor, z-index, timestamps) not exposed. Snapshots, management, backlinks exist |
57+
| `TableContextMenu` (shadcn) — right-click on canvas | **Partial** | `CanvasContextMenu.vue` exists for canvas background. No per-note context menu |
58+
| `LoadingOverlay` during page bootstrap | **Partial** | `PageStateScreens.vue` handles loading/error. No dedicated `LoadingOverlay` component over the canvas |
5959
| Global CSS for spatial routes (`user-select: none`, `overflow: hidden`, `touch-action: none`) | **Done** | `PageLayout.vue` applies `select-none overflow-hidden` on the shell |
6060
| Remove `PageEditorTiptapCard.vue` from page route | **Done** | File deleted; no longer imported or rendered |
6161
| Dedicated fullscreen state screens (8 total) | **Done** | `PageStateScreens.vue` switcher + 8 components in `features/pages/screens/`. Detectable states: `loading`, `error`, `page-nonexistent`, `unauthorized`, `password`. `page-deleted`, `group-deleted`, `invited`, `rejected` require richer API error codes to distinguish. |
@@ -67,13 +67,13 @@ Achieve parity with the legacy `/pages/:pageId` immersive spatial canvas experie
6767
| Selection ring | **Partial** | `ring-2 ring-primary` exists, but not legacy blue `#2196f3` |
6868
| Drag opacity (`0.7`) | **Done** | `isDragging` ref toggles `opacity-70` during drag/resize |
6969
| `Teleport` to global overlay during drag/resize | **Done** | Teleport overlay during drag to avoid z-index clipping |
70-
| `NoteDropZones` | **Done** | Visual feedback when dragging over container |
71-
| `NoteArrowHandles` — 4 directional arrow handles | **Partial** | 4 small dots exist, but not full arrow-creation flow |
72-
| `ArrowLinkZones` | **Done** | Connection zones at arrow endpoints for reconnection |
70+
| `NoteDropZones` | **Partial** | `isDropTarget` prop + `ring-accent` feedback exists. No dedicated `NoteDropZones` component |
71+
| `NoteArrowHandles` — 4 directional arrow handles | **Partial** | 4 small dots exist and emit `arrowDragStart`. Drag-to-create-arrow flow is wired in `SpatialPageView.vue` |
72+
| `ArrowLinkZones` | **Partial** | Connection zones (SVG circles) at endpoints exist. "Link zones" proper (hover-to-preview-link) not implemented |
7373
| `NoteLinkIcon` (external link indicator) | **Done** | `ExternalLink` icon shown in header when `link.value` set |
7474
| `NoteResizeHandles` — 8 handles | **Done** | NW, N, NE, E, SE, S, SW, W with correct cursors |
75-
| Scrollbar handling in `NoteContent` | **Done** | `overscroll-behavior: contain` added to prevent pull-to-refresh |
76-
| Note frame `border-radius`, shadow, min-width | **Partial** | `rounded-md border shadow-sm` used; exact pixel parity untested |
75+
| Scrollbar handling in `NoteContent` | **Partial** | `overscroll-behavior: contain` added. No custom scrollbar styling or legacy scroll behaviors |
76+
| Note frame `border-radius`, shadow, min-width | **Partial** | `rounded-md border shadow-sm` used. Exact pixel parity with legacy not tested |
7777
| Container section — spatial layout | **Done** | Free child positioning inside parent |
7878
| Container section — horizontal layout | **Done** | Container children can render horizontally or vertically |
7979

@@ -83,15 +83,15 @@ Achieve parity with the legacy `/pages/:pageId` immersive spatial canvas experie
8383
| Curve body (`CurveArrow.vue`) | **Done** | Quadratic bezier with perpendicular offset; `bodyType === 'curve'` |
8484
| Line body (`LineArrow.vue`) | **Done** | Straight line when `bodyType === 'line'` |
8585
| Arrow heads (`OpenHead.vue`) | **Done** | SVG `<marker>` chevron heads; `sourceHead`/`targetHead` supported |
86-
| Arrow label (editable `Y.XmlFragment`) | **Done** | Editable label at arrow midpoint using Y.XmlFragment |
86+
| Arrow label (editable `Y.XmlFragment`) | **Stub** | Plain `<input>` at midpoint. On blur, deletes entire `Y.XmlFragment` and inserts a single `Y.XmlText`. Not Tiptap. Not collaborative rich-text |
8787
| Hitbox (thick invisible stroke) | **Done** | `stroke="transparent" stroke-width="20"` pointer-events-auto hitbox |
88-
| Drag-to-reconnect | **Done** | Connection zones at arrow endpoints for reconnection |
89-
| Color matching note color logic | **Done** | Arrow color mapped via same 10-color map as notes |
88+
| Drag-to-reconnect | **Done** | Connection zones + `onReconnectPointerMove/Up` in `SpatialPageView.vue` wired |
89+
| Color matching note color logic | **Partial** | Same hardcoded 10-color map used, but `inherit` logic may not cascade correctly for arrows |
9090

9191
### 9. Find and replace
9292
| Item | Status | Notes |
9393
|------|--------|-------|
94-
| Search across note head/body | **Done** | `FindReplaceDialog.vue` with search UI |
94+
| Search across note head/body | **Partial** | `FindReplaceDialog.vue` searches `Y.XmlFragment.toString()`. No rich-text-aware search (e.g., ignoring formatting marks) |
9595
| Replace text | **Done** | Replace current and replace all implemented |
9696

9797
### 10. Visual polish
@@ -107,18 +107,21 @@ Achieve parity with the legacy `/pages/:pageId` immersive spatial canvas experie
107107

108108
## Verification
109109

110-
- [ ] Each deliverable has a test (unit, component, or integration).
111-
- [ ] Phase 1 checklist is >80% marked done.
110+
- [ ] Each deliverable has a test (unit, component, or integration). (Missing: `DisplayNote.vue`, `DisplayArrow.vue`, `SpatialPageView.vue`, sidebar/toolbar integration tests.)
111+
- [ ] Phase 1 checklist is >80% marked done. (Blocked: `docs/SPATIAL_PARITY_CHECKLIST.md` does not exist.)
112112

113113
---
114114

115115
## Exit criteria
116116

117+
- [ ] `docs/SPATIAL_PARITY_CHECKLIST.md` exists and is reviewed for completeness.
117118
- [ ] Phase 1 checklist ≥ 80% complete.
118119
- [ ] No "P1" checklist item remains open.
119120
- [ ] `PageEditorView.vue` renders as a full-screen immersive shell (no scrolling card page).
120-
- [ ] All 8 dedicated page-state screens exist and are reachable (error, nonexistent, deleted, group-deleted, invited, rejected, unauthorized, password).
121-
- [ ] `DisplayNote.vue` matches legacy note visuals: colors, borders, selection ring, drag opacity, Teleport overlay, drop zones, arrow handles, link icon, 8 resize handles.
122-
- [ ] `DisplayArrow.vue` supports curve + line bodies, arrow heads, labels, hitboxes, and drag-to-reconnect.
123-
- [ ] `MainToolbar`, `LeftSidebar`, `RightSidebar`, and `TableContextMenu` are implemented with shadcn and visible on `/pages/:pageId`.
121+
- [ ] All 8 dedicated page-state screens exist and are reachable. (`page-deleted`/`group-deleted`/`invited`/`rejected` are indistinguishable without richer API error codes.)
122+
- [ ] `DisplayNote.vue` matches legacy note visuals: colors, borders, selection ring (`#2196f3` not `ring-primary`), drag opacity, Teleport overlay, drop zones, arrow handles, link icon, 8 resize handles.
123+
- [ ] `DisplayArrow.vue` supports curve + line bodies, arrow heads, labels (**Tiptap on `Y.XmlFragment`**, not raw `<input>`), hitboxes, and drag-to-reconnect.
124+
- [ ] `MainToolbar`, `LeftSidebar`, `RightSidebar`, and `TableContextMenu` are implemented as standalone shadcn components and visible on `/pages/:pageId`.
125+
- [ ] Sidebar panels (`RecentPages`, `FavoritePages`, `SelectedPages`) display real data from API.
126+
- [ ] Arrow geometry reads actual note heights instead of hardcoding `80px`.
124127
- [ ] Manual QA session with 3+ users finds no blocking usability issues.

0 commit comments

Comments
 (0)