diff --git a/CHUNK#3_PROGRESS.md b/CHUNK#3_PROGRESS.md index feb7bff..5ca98fd 100644 --- a/CHUNK#3_PROGRESS.md +++ b/CHUNK#3_PROGRESS.md @@ -2,6 +2,9 @@ **Status:** In progress. Steps 1–3 committed. Step 4 (polish) in progress. +## Bug fixes +- [x] **UI disappears when navigating to Write** — WritingView passed `chapter.doc.content` (a bare ProseMirror node array) as editor `content`, so `EditorState.create` built a doc node with an undefined type and threw `Cannot read properties of undefined (reading 'schema')`, unmounting the write view. Fixed by passing the full doc object (`{ type: 'doc', content }`) on init and on `setContent` sync. Verified in a headless browser: editor renders the seeded chapter ("The Glass Harbor") with no console errors. Regression tests in `packages/editor/src/use-editor-doc.test.ts`. + ## Progress - [x] Step 1: Editor package (TipTap 3 schema, wrapper, markdown, key bindings) — committed - [x] Step 2: Writing view in apps/web wired to storage adapter diff --git a/PLAN.md b/PLAN.md index 93fb61b..c51ed0f 100644 --- a/PLAN.md +++ b/PLAN.md @@ -269,7 +269,7 @@ Each chunk is a 1–3 day work order in `CHUNK#n.md`, written so a human *or* a |---|---|---|---|---| | 1 | **Scaffold & Foundations** | 1 | ✅ Done | Monorepo, strict TS, tooling, app shell, theme system, CI, settings store | | 2 | **Data Model, Storage & Auth** | 3 | ⬜ Not started | Full domain types, StorageAdapter, Local + Server adapters, Fastify auth/multi-tenant, autosave, contract tests | -| 3 | **Writing Surface** | 3 | 🟡 In progress | TipTap editor ✅, document tree ✅, focus mode ✅, Markdown I/O ✅, autosave ✅, fonts/logo polish 🟡 | +| 3 | **Writing Surface** | 3 | 🟡 In progress | TipTap editor ✅, document tree ✅, focus mode ✅, Markdown I/O ✅, autosave ✅, writing view wired to storage adapter ✅ (UI-disappears crash fixed), fonts/logo polish 🟡 | | 4 | **Characters & World-Building** | 2 | ⬜ Not started | Entity schema, character sheets, world items, search, mentions, backlinks | | 5 | **Plot & Whiteboard** | 3 | ⬜ Not started | Beat board + templates, timeline, React Flow whiteboard (200-node perf) | | 6 | **Export Pipeline** | 3 | ⬜ Not started | MD/HTML/EPUB/DOCX/ODT + PDF, export dialog, CI validation |