From ffcabad30e4b8ba4c2e30321a2a3dde438b9f5b9 Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Sat, 21 Mar 2026 23:26:30 +0100 Subject: [PATCH] docs: add nested checklists to features and architecture docs Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/ARCHITECTURE.md | 15 +++++++++++++++ docs/FEATURES.md | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index c4eaf01..28ef2c7 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -103,6 +103,21 @@ Key tables: - `shared_notes` - Public share links (noteId → token, 1:1 with cascade delete) - `sync_log` - Sync operation history +### Nested Checklist Serialization + +Checklist items are stored as plain text in the note `content` field, one item per line. Child items use a 2-space indent prefix: + +``` +- [ ] Parent item + - [ ] Child item + - [x] Checked child item +- [x] Another parent +``` + +- A line starting with ` - [ ]` or ` - [x]` (2 spaces) is parsed as a child of the preceding top-level item. +- The `parentId` field on `ChecklistItem` is **runtime-only** — it is derived from position during parsing and never stored explicitly. +- This format is fully backward compatible: flat checklists (no indented lines) parse identically to before. + ### Collaboration Access Control Notes support sharing with other users on the same instance: diff --git a/docs/FEATURES.md b/docs/FEATURES.md index c1bc3bd..85a2551 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -37,6 +37,11 @@ - Check/uncheck items with checkboxes - Checked items get strikethrough styling - Enter key adds new item, Backspace removes empty items +- **Nested checklists**: single-level nesting for sub-tasks + - Tab / Shift+Tab to indent or outdent an item (keyboard) + - Drag handle horizontal swipe for mobile indentation + - Checking a parent item checks all its children + - Done section groups checked children under their parent label ### Image Attachments - Upload images via file picker or drag-and-drop