docs/plans/2026-04-11-slate-v2-rerender-breadth-batch.md
Measure whether slate-react still has broad invalidation in the three issue
families we care about before escalating to islands:
#5131 selection-driven breadth#3656 many-leaf breadth inside one block#4141 ancestor-chain breadth on deep editspnpm bench:react:rerender-breadth:local in
package.jsonThe lane reuses the same render-count ideas already present in
runtime.tsx,
but writes stable JSON to
packages/slate-react/tmp/slate-react-rerender-breadth-benchmark.json.
#5131 selection-driven breadthuseSlate() subscriber rerenders once per selection change:
20 selection changes -> 20 broad rerendersuseSlateSelection() subscriber rerenders once per selection change:
20 selection changes -> 20 selection rerenders00#3656 many-leaf breadth100#4141 deep ancestor breadth100111100.29msThe runtime is mostly green on local invalidation.
The only broad thing still showing up is the broad hook itself:
useSlate() rerenders on selection changes because it is subscribed to the
whole snapshot version.
That means the next honest move is not another generic rerender-breadth cleanup pass. The next honest move is Phase 4:
If useSlate() broadness becomes a product problem later, that is a narrower
hook-contract decision, not evidence that descendant invalidation is still
failing across the runtime.
The overlay family read is broader now too:
Activity resume behavior is explicit