Add notebook.json containers with multi-member pages, fix PDF text
editing (size/bold/drag/double-tap), index SidecarText in search, and
share keyboard page shortcuts plus a PDF scrubber.
Co-authored-by: Cursor <cursoragent@cursor.com>
Phase 4. Standalone notes move off SQLite into the vault, like the
PDF annotations.
- "Create notebook" makes a vault folder with a notebook.badnote.json
(BadnoteSidecar docType 'notebook' + a title field), opened via
SidecarRepository.
- PenNoteScreen loads/saves its strokes (page 0) + title to that
sidecar instead of the SQLite Note model.
- note_provider lists notes from a vault scan (VaultService.scanNotes
= folders with notebook.badnote.json and no source file); the doc
scan still excludes them. Delete removes the folder.
PDF/slide editors unchanged; pre-existing SQLite notes migrate in
Phase 5. analyze clean, tests green.
Phase 3. Import becomes a single top-level action beside "Create
notebook" and the library is vault-backed.
- VaultService.createNotebook copies a picked file into a fresh
(de-duplicated) notebook folder under the vault; its sidecar lives
beside it, so annotations travel with the file.
- Home screen: one "Import file" action with a multi-extension picker
(pdf / docx / pptx); routes to the editor by extension.
- The document list is now a vault scan (folders with a source file),
not the SQLite documents table — no cache, always correct.
- PPTX soffice detection fix; DOCX convert-on-import is best-effort
and fails gracefully when LibreOffice is unavailable.
analyze clean, tests green.
Phase 0 of the file-based storage plan (docs/plans/
2026-06-24-file-based-storage.md). Foundation only — no editor or
DB change yet.
- VaultService (SharedPreferences): stores the vault root path,
vaultRootValid() = path set AND directory exists.
- VaultSetupScreen: first-run folder picker (file_picker, Windows).
- main.dart gates HomeScreen behind a valid vault, re-prompting if
the saved folder is gone.
- Settings: a Vault section to change the folder.
Editors still use SQLite; later phases move annotations into
per-file sidecars under the vault. analyze clean, tests green.