feat: add file-backed canvas notes

Magic Notes previously supported rich-text records without a paged drawing or
PDF annotation workflow. Add the integrated PeopleLib Fabric and Quill editor
with flowing text, pen/highlighter, object transforms, images, paper templates,
PDF backgrounds with native text extraction, and raster PDF export. Saves are
manual; undo/redo remains scoped to an annotation page or Quill mode.

Analyze drafts, saved canvases and canvas-source todos with page images and
text when the default model supports images, or an explicitly labelled
text-only fallback. Keep successful saves when automatic analysis fails and
prevent MCP plain-text replacement of canvas records.

Move entry bodies and binary assets into local note files with schema 38
migration and verified readback. SQLite retains metadata, indexes, revisions,
todos and comments. Backups must coordinate SQLite and the adjacent notes
directory while writes are paused or the app is closed; no one-click backup
action is included.

Show a continuous record stream with independent collapsible record index and
AI pane, real first-page thumbnails, and scroll-only record navigation. Open a
blank text/canvas composer by default and reset it after creation. Protect
unsaved drafts and establish normalized editor baselines after saving so clean
records do not prompt again when leaving.

Validation: latest recorded focused run passed 149 tests across five files;
typecheck, lint and git diff --check passed. The prior user-reported full run
passed 4,713 tests before later corrections and UI changes; it is not a full
validation of this final snapshot. Tests were not rerun for this commit, as
requested; independent systematic review follows the commit.

Release note: Create paged notes with handwriting, flowing text and PDF
annotations, browse records through thumbnails, and request AI comments with
an explicit text-only fallback. Existing notes migrate to local file storage;
backups now need both the database and notes directory.
This commit is contained in:
mesalogo
2026-09-19 11:54:23 +08:00
parent c7a93803c9
commit 17186b0c11
58 changed files with 8240 additions and 429 deletions
+25 -2
View File
@@ -600,10 +600,15 @@ records are listed separately and do not introduce another feature status.
cancelled states, and expose cited context or safely open its source.
- [x] **Magic Notes**: A local-first notes and todo workbench with scope
management, editing, filtering, and controlled AI comments. Notes open from a
responsive card overview. The separate To-dos tab offers search, status filters,
responsive card overview. Detail displays a continuous stream with independently
collapsible left index and right AI pane. Real first-page thumbnails scroll to
records without replacing editors. Successful saves establish the editor's
normalized baseline; only unsaved changes require confirmation on leaving. Opening
a note shows a blank text/canvas composer above the history, and creation resets it
for the next record. Explicit editing updates a saved record. The separate To-dos view offers search, status filters,
grouped tasks and direct completion, with instructions, source entries and AI
comments in a right detail pane beside a stable task list. Narrow views offer
on-demand detail with an explicit return to the list. Content-sized tabs sit
on-demand detail with an explicit return to the list. A content-sized switch sits
beside New note in the header; status filters follow search. Source-note
navigation returns to the same task context, without
showing the previous item's source after a selection change. Failed reads
@@ -611,6 +616,24 @@ records are listed separately and do not introduce another feature status.
navigation can show the incomplete-todo count, and create, save, and comment
results use application-wide notifications. Agent/MCP note writes automatically
refresh the open workbench while preserving selection and unsaved drafts.
- [x] **Paged canvas notes**: The integrated PeopleLib Fabric + Quill editor
combines flowing body text with pen/highlighter, object selection/transforms,
floating text, images and paper templates. Import PDFs as page backgrounds
with native text extraction, then export a raster PDF of text and annotations;
exported PDFs do not retain a searchable text layer. Manual saves store entry
bodies and binary assets in local note files; SQLite retains metadata, indexes,
revisions, todos and comments. Backups must coordinate SQLite and the notes
directory; there is no one-click backup action. Undo/redo
is per annotation page or Quill mode, not global document history; there is no
infinite canvas or PNG download button. Drafts, saved entries and canvas-source
todos use the default model's image-input capability for page images plus text,
or an explicitly labelled text-only fallback. Purely visual entries/drafts
require an image-capable model. Immediate-comment mode offers manual canvas
analysis; after-save automatic analysis failures do not block or undo saving.
Text-only comments survive unchanged extracted text; visual comments are
invalidated by layout changes and reanalyzed in after-save-auto mode. MCP
rejects plain-text replacement of canvas entries. Implementation is complete;
final validation status is tracked in the [feature progress record](./docs/features/magic-notes/progress.md).
- [ ] **MCP Server Control Plane** (planned): Unified MCP lifecycle, health
checks, reconnection, schema cache, isolation, approval, and audit.
- [ ] **Traceable note excerpts and AI editing** (planned): Collects sourced