super-productivity/packages/plugin-dev/document-mode
Johannes Millan 8966a1df00 chore(plugins): polish bundle — JSDoc, busy-poll cap, hooks dedup
Small follow-ups from the multi-agent review:

- WORK_CONTEXT_CHANGE / ActiveWorkContext JSDoc spells out that
  taskIds is a snapshot at emit time; plugins should re-read via
  getActiveWorkContext or getTasks if they need the current value.
  (#15)

- waitForPluginAPI is now bounded — 250 attempts at 20 ms each, so
  if the host never injects PluginAPI the iframe logs and bails
  instead of busy-polling forever. (#23)

- Iframe-side Hooks enum is generated from the real PluginHooks
  source via JSON.stringify({...PluginHooks}). The previous
  hand-mirrored copy was an easy drift hazard when adding a new
  hook. (#24)

- Named pipeline: prepareStoredDoc wraps
  ensureSubtasksInJSON(migrateStoredDoc(...)) so the order
  invariant (migrate first, then backfill) is explicit at the
  callsite. (#20)
2026-05-21 21:39:46 +02:00
..
scripts feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00
src chore(plugins): polish bundle — JSDoc, busy-poll cap, hooks dedup 2026-05-21 21:39:46 +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