Phase 4b. DocumentEditor.svelte replaces LiveWriter.svelte and the Monaco
EditorHost.svelte. Each open document has one CodeMirror state. Write and
Source are two compartment configurations of it, so they share the undo
history. editorStates.ts keeps the state while the tab stays open. The
Monaco model, the diff bridge, its timers, and sessions.ts are gone.
- Source: syntax colors from the theme tokens, lazy language packages,
line numbers, folding, and the current line in IDE, wrapped lines in
Writing, several carets, and bracket matching and closing.
- Lists (card 088e778b): Tab nests a list item and Shift+Tab moves it
up, in Write and Source. Both renumber the list. The source keeps
"1.". Write and Read show numbers, letters, then Roman numerals.
- Indent (card 696c30ce): a fixed 4 spaces in Write and Source.
- The code menu uses CodeMirror commands. The command palette item and
the Monaco styles, search, theme, and workers are removed.
- @codemirror/legacy-modes is pinned to 6.5.4. Version 6.5.5 uses
parser types that do not match @codemirror/language 6.12.
- 26 smoke tests use CodeMirror instead of Monaco. New tests:
editor/listNesting and the markdownLists unit tests.
- Docs: development, UI design, plugin host, user guide, and UI-040.
pnpm check, pnpm test (341 of 341), and pnpm build pass. The full smoke
suite passes, except one template test that passed on retry.
Phase 4a. The ProseMirror focus handler starts a 20 ms timer that writes
the ProseMirror selection back to the DOM. Under load, the timer ran
after a native arrow move and before ProseMirror read the
selectionchange event, so one move was lost. The cell editor now moves
the DOM selection with Selection.modify and reads the result in the
same key event. This covers plain and Shift arrows and word moves.
Other shortcuts stay with the browser.
- Workbench.svelte no longer filters access events. Rust already drops
them.
- Delete the unused TipTap Writer: WriterHost.svelte, writerMenu.ts,
writerMarks.ts, headingMarks.ts, and their two unit tests.
- Remove the 8 TipTap packages that only the Writer used, and its entry
in docs/menu-surfaces.json.
With a 4x CPU slowdown, 11 of 60 runs failed before the fix and 0 of
120 after it. pnpm check, pnpm test, and the smoke suite pass.
Unit tests go to tests/unit/<area>/, browser smoke tests to
tests/smoke/<area>/, and tests against a running desktop app to
tests/native/. Files named after dates, work passes, or Kanban cards get
feature names, for example editorOctober12 -> editor/footnotes.
scripts/ keeps the build, release, and package tools. Plugin repositories
import scripts/packagePlugin.mjs, and the Terminal smoke test imports
scripts/pluginMocks.mjs, which now re-exports the harness copy.
The unit tests get their own type check (tests/tsconfig.json) with Node
types. pnpm check runs it after the app check. Add @types/node and fix
the three test mocks that it reported.