docs/plans/2026-04-15-slate-v2-decoration-wave-10-execution.md
Execute Wave 10 from the decoration roadmap: source dirtiness declarations.
SnapshotChange metadata through
Editor.subscribe(...)slate-react overlay stores still recompute too broadlyalwaysselectiontextnodeannotationexternalcustommark had to be included because Wave 9 already publishes it['text', 'node']createSlateProjectionStore(...) stayed source-compatible by adding optional
store options instead of changing the source callback signaturerefreshSource(id) now actually refreshes one decoration source instead of
lying and refreshing the whole source setdocs/shared/agent-tiers.md is missing in this repodocs/solutions/patterns/critical-patterns.md is missing in this repodecoration-sources.tsannotation-store.tswidget-store.tsprojection-store.tsuse-slate-decoration-sources.tsxcreateSlateProjectionStorecreateSlateDecorationSourceStoreuseSlateDecorationSourcescreateSlateAnnotationStorecreateSlateWidgetStorepackages/slate-react/src/projection-store.tspackages/slate-react/src/decoration-sources.tspackages/slate-react/src/annotation-store.tspackages/slate-react/src/widget-store.tspackages/slate-react/src/hooks/use-slate-range-ref-projection-store.tsxpackages/slate-react/src/index.tsdocs/libraries/slate-react/hooks.mddocs/libraries/slate-react/editable.mdpackages/slate-react/test/projections-and-selection-contract.tsxpackages/slate-react/test/annotation-store-contract.tsxpackages/slate-react/test/widget-layer-contract.tsxpnpm installpnpm turbo build --filter=./packages/slate-reactpnpm turbo typecheck --filter=./packages/slate-reactpnpm lint:fixpnpm --filter slate-react test → 95 passed9 passedlsp_diagnostics on all affected slate-react TS/TSX files → 0 errorsprojection-store.ts but were
not re-exported from the package entrypointpackages/slate-react/src/index.tspnpm turbo build --filter=./packages/slate-reactpnpm turbo typecheck --filter=./packages/slate-reactpnpm lint:fixpnpm --filter slate-react test → 95 passedlsp_diagnostics on packages/slate-react/src/index.ts → 0 errorsrefreshSource(id) still refreshed every declared source because
reason: 'refresh' made all dirtiness classes look dirtypackages/slate-react/src/decoration-sources.tspackages/slate-react/test/projections-and-selection-contract.tsx
→ refreshSource only recomputes the targeted decoration sourceAPPROVEDpnpm turbo build --filter=./packages/slate-reactpnpm turbo typecheck --filter=./packages/slate-reactpnpm lint:fixpnpm --filter slate-react test → 95 passedprojection-store.ts
refreshSource(id) still
leaked reason: 'refresh' into every other source and recomputed broadly