docs/solutions/logic-errors/2026-04-04-v2-explicit-mixed-inline-insert-rebasing-should-use-block-text-offsets-and-admit-range-ref-limits.md
Once mixed-inline fragment insert itself was green, the next lie was explicit
insertFragment(..., { at }) rebasing.
The old logic still only understood the flat text-block proof subset.
That meant mixed-inline inserts could preserve the document shape while leaving:
For editor selection rebasing, the durable fix was:
That is enough for the current proved shape because each direct child still has one clear text extent.
For range refs, the honest fix was narrower:
Within the current mixed-inline proof shape, child paths are not stable enough to do arithmetic on directly.
Text offsets are.
Once the insert math is done in block-relative text space, the renderer shape can change and the final caret can still be mapped back to the correct child.
Range refs are harder.
For same-block mixed-inline refs, the current insert_fragment operation does
not carry enough metadata about the target child split to rebase every ref
perfectly after the fact.
Pretending otherwise would be fake precision.
For explicit mixed-inline inserts:
If same-block mixed-inline range refs need exact rebasing, the next step is richer insert metadata, not more guesswork.