Visual Editing fixes
Published: May 28, 2026
v5.28.0
This release fixes critical bugs in Visual Editing including null reference errors when resolving paths, unnecessary page reloads when switching perspectives in the Presentation tool, and incorrect preview content when using agent bundles.
🐛 Notable bugfixes and improvements
- Fixes a regression in the Visual Editing schema union-type resolver that could throw
TypeError: Cannot read properties of nullwhen resolving paths on documents that don’t exist on the active perspective. - Fixes a regression where switching the perspective in the Presentation tool caused the preview iframe to do a full page reload. Mainly visible to
next-sanity@13users with visual editing enabled. Users onnext-sanity@12or earlier, integrations built on@sanity/react-loaderor@sanity/core-loader, andnext-sanity@13setups using theusePresentationQueryhook were not affected. Affected users onnext-sanity@13should also bump tonext-sanity@^13.0.5or later to pick up the matching client-side fix. - Fixes Presentation previews when an agent bundle (e.g., Content Agent’s “Proposed changes”) is selected. Previously the preview iframe always received the
draftsperspective regardless of the active agent bundle, so iframes rendered draft content instead of the bundle’s content. Iframes now receive the agent bundle’s full perspective stack, and combining an agent bundle with a scheduled draft chip continues to work as before. No API or behavior change for non-agent perspectives.