super-productivity/packages/plugin-dev/document-mode
Johannes Millan a37ae1e150 fix(document-mode): backfill missing subtasks into previously-saved docs
setActiveContext loads the per-context doc from storage and only fell
back to buildSeedDoc when no doc existed. Docs saved before subtask
support didn't contain subTaskRef blocks, so reopening such a context
showed parents with no children even though task.subTaskIds was
populated in the host.

Add ensureSubtasksInJSON: walks the loaded top-level content and, for
each taskRef, inserts any subTaskRefs from the host that aren't yet
present right after the parent's existing subtask group. Idempotent;
preserves existing order and never removes subtasks that have been
removed in the host (left to a future "sync remove" pass).
2026-05-21 18:41:42 +02:00
..
scripts feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00
src fix(document-mode): backfill missing subtasks into previously-saved docs 2026-05-21 18:41:42 +02:00
.gitignore feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00
package-lock.json feat(document-mode): Notion-style UX (gutter, bubble menu, block menu) 2026-05-21 17:34:13 +02:00
package.json feat(document-mode): Notion-style UX (gutter, bubble menu, block menu) 2026-05-21 17:34:13 +02:00
tsconfig.json feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00