Add docs/history-diff-perf-plan.md: deep-dive into the page-history
inline diff performance problem and a phased redesign.
- Root causes: O(K·D) recreateTransform (rfc6902 full-doc rebuild per op),
full recompute on the "Highlight changes" toggle, a second full TipTap
instance, all synchronous on the main thread.
- Fix: drop recreateTransform; diff directly via prosemirror-changeset
(getReplaceStep + ChangeSet.addSteps/computeDiff), keeping the existing
decoration contract for visual parity.
- Split the diff useEffect so the toggle no longer re-diffs.
- Phased plan (P0 core, P1 large-doc guard + error handling, P2 worker),
testing/parity strategy, risks and rollback.