# Visual Editing fixes

**Version:** v5.28.0

**Published:** May 28, 2026

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 null` when 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@13` users with visual editing enabled. Users on `next-sanity@12` or earlier, integrations built on `@sanity/react-loader` or `@sanity/core-loader`, and `next-sanity@13` setups using the `usePresentationQuery` hook were not affected. Affected users on `next-sanity@13` should also bump to `next-sanity@^13.0.5` or 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 `drafts` perspective 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.

