super-productivity/packages/plugin-dev/document-mode
Johannes Millan 0df783a669 refactor(plugins): apply doc-mode no-op-save review findings (#7815)
Multi-review follow-ups for #7815:

- Tighten serializeContextDoc determinism test: previously asserted
  equality between a doc and its `{...doc}` spread, which preserves V8
  insertion order — the test would pass even against a future encoder
  that randomised iteration over Map-backed nodes (the real failure
  mode for the byte-compare). Now asserts repeated-call determinism on
  the same input directly, plus type+non-empty shape so a future return-
  type change (e.g. Uint8Array) breaks here, not in the editor.

- Document the sync/async stamp asymmetry in flushSaveSync: it stamps
  lastSeenDocBytes BEFORE the void dispatch, whereas flushSave stamps
  AFTER `await`. Both are correct (the sync path is fire-and-forget and
  the iframe can be torn down mid-call, so a post-dispatch stamp would
  silently drop on teardown) but the divergence wasn't called out in
  the inline comments.
2026-05-27 15:52:30 +02:00
..
scripts feat(document-mode): add TipTap-based document-mode plugin 2026-05-22 17:33:22 +02:00
src refactor(plugins): apply doc-mode no-op-save review findings (#7815) 2026-05-27 15:52:30 +02:00
.gitignore feat(document-mode): add TipTap-based document-mode plugin 2026-05-22 17:33:22 +02:00
package-lock.json feat(document-mode): add TipTap-based document-mode plugin 2026-05-22 17:33:22 +02:00
package.json feat(document-mode): add TipTap-based document-mode plugin 2026-05-22 17:33:22 +02:00
tsconfig.json feat(document-mode): add TipTap-based document-mode plugin 2026-05-22 17:33:22 +02:00