docs/research/systems/slate-v2-overlay-architecture.md
This is the research-layer architecture map for the Slate v2 overlay system.
It is not the rollout plan. It is the stable architecture read behind the plan.
Three lanes:
Decoration
transient, overlap-friendly, mapped or externally indexedAnnotation
durable, id-bearing, bookmark-backedWidget
anchored UI, geometry-derived, narrower public surfaceslate
logical ranges, bookmarks, lower-level live-ref machinery, runtime identityslate-react
overlay kernel, projection indexing, subscriptions, annotation mirrors,
widget placement/runtimeslate-dom
DOM mapping, selection fidelity, clipboard/browser boundaryBookmark is the durable public anchor nounRangeRef is lower-level runtime machineryReact 19.2 strengthens this architecture where it actually matters:
useSyncExternalStore makes selector/store subscriptions first-classstartTransition and useDeferredValue make non-urgent derived UI first-classActivity makes hidden panes a real preserved-state laneThat makes Slate v2 a credible React-native perf architecture.
It does not, by itself, make the system universally better than ProseMirror, Lexical, or VS Code.
Legacy Slate treated decorate like the center of the overlay world.
That made one callback pretend it could own:
Slate v2 is better because it stopped doing that.
It now has:
Decoration, Annotation, and Widget lanesBookmark as the durable public anchor storyRangeRef demoted to lower-level runtime machineryIf this lane wants the strongest possible perf-architecture claim, the next reshape should target invalidation below the React layer:
React 19.2 is already good enough for the UI side. The remaining gap, if any, is deeper than React.