docs/plans/2026-05-23-slate-v2-async-decoration-caret-cluster-proof.md
Process Cluster 10 from the Slate issue ledger:
#5987 caret jumps when decorate changes from an async state update#6033 fixes the same failure by keeping decoration restructuring and Editable selection restoration in syncThis is some text here about. there, then typing there, then a delayed highlight appears and the caret jumps backward between about. and there.Improves #5987 because current proof covers projection-source stability but not the exact async Editable.decorate repro.Editable.decorate; exact proof should target that adapter, not only first-class decorationSources.Promote to Fixes #5987 only if a browser integration test proves all of:
Editable receives a decorate prop whose function identity changes after an async state update.If any part is missing, keep the issue as Improves #5987.
decorations-async example that mirrors the upstream issue path.slate-react only if the new row fails.No changeset is required if this pass only adds a site example, tests, and ledger updates. If package runtime code changes under .tmp/slate-v2/packages, decide changeset necessity before closeout.
Package runtime code changed under .tmp/slate-v2/packages/slate-react, so the
Slate v2 checkout includes .changeset/async-decorate-caret.md. No Plate
changeset is required.
Claim: Fixes #5987.
The new browser row reproduced the exact failure before the runtime fix:
41.35, where the old decorated text ended.The fix asks the editable repair runtime to force a repair render after external
Editable.decorate refreshes. Decoration-only DOM changes do not create an
editor commit, so this gives selection export a render pass after the projected
text DOM has been restructured.
bun lint:fixbun --filter slate-react typecheckPLAYWRIGHT_RETRIES=0 bun playwright playwright/integration/examples/decorations-async.test.ts --project=chromium