npm / sanity
sanity
What changed in sanity 4 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
6 breaking2 security3 deprecations48 new APIs and options2 performance41 behavior and defaults1 tooling99 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsanity 6197 changes
Breaking changes 5
Variant creation is gated on the content variants feature.
Validation now checks reference target types.
Removes trimming from nested text.
Adds configuration of variant conditions under types; empty variant conditions are treated as an error.
Users are redirected to login after claiming a project.
Security 2
Auth secrets are kept out of the URL when the studio fails to boot.
Deleting a variant definition is gated on permission, and server refusals are explained.
Deprecations 3
The deprecated tag was added to createAuthStore, indicating that developers should avoid using this API.
Versions 6.9.2 through 6.14.0 are deprecated because they contain a data-loss bug.
The release entry says
releaseis deprecated forpublishedEvents.
New APIs and options 46
Version creation steps are unified, and creating a version from the inventory allows specifying the base version.
Document group inventory now includes served version status.
Document list rows now show a compact versions popover.
Validation now supports workspace internationalization configurations.
Adds document panel navigation with a variants menu.
Adds a dropdown to the scheduled drafts form.
A document group inventory inspector is available in the document inspector.
Document inspector resolvers can access the resolved beta config.
A version management action is available in the document panel header.
Document validation completeness is exposed for consumers that need to determine whether validation is complete.
An imperative API for DocumentGroupInventory is available to control it programmatically.
Release forms support configurable metadata fields.
The schema can be downloaded from the diagnostics dialog.
Batch validation is available through validateDocuments.
Adds a federated Media Library asset source from workbench-brokered views.
Exports ServiceBus from sanity/dashboard for use by developers.
Adds an immediate validation option; a validation subscriber can switch a document's shared validation to immediate.
Adds an opt-in redesigned Vision experience behind beta.redesign.
Adds studio.components.provider and preloads lazy default plugin components.
Canvas can now open inside Workbench.
Studio can tell dashboard hosts and Workbench hosts apart.
Document favorites are now supported in Workbench.
Document history can now be recorded through the SDK.
Adds an option to keep recent tools mounted.
Adds a first-class API for configuring singleton documents in Sanity Studio.
Adds support for list pane widths.
Adds opt-in live document count badges to document type list items.
Adds a badge for singleton documents.
Adds the ability to pause editing for scheduled drafts.
An opt-in comments API plugin is added.
Query result types are registered on a global SanityQueries interface.
Validation gains cancellation support.
The CLI now exposes the asset source view definition.
The translate component now supports
componentProps.A package for headless document validation was added.
The CLI now exposes typed view and web worker helpers.
A workspace compatibility overload was added for validation.
Structure panes support custom component widths.
Sanity Studio adds a diagnostics panel.
The path argument is optional when using useFormValue.
Adds a renderAction slot to access-ui.
Provides SDKStudioContext to enable zero-config SDK usage.
Adds a note in the access-ui submit callback.
Adds an export for embedded form rendering.
Exports AssetSource types from sanity/workbench for use by developers.
Adds unclaimed project claim intake and a nudge.
Performance 2
Document validation performance was improved, reducing the cost of validating documents.
Document actions no longer trigger re-render fan-out on every keystroke.
Behavior and default changes 41
Shared access cards now render advisory states for access requests.
ID matching now expands to segments in path-like query strings.
Changed state is exposed to Portable Text Editor previews and annotations.
Media library previews now show video thumbnails.
Vision sends oversized queries in a POST body and can load pasted curl commands.
Studio warns when an asset does not match its field's accept option.
Schema descriptors are uploaded in encoded form.
The studio is named as the parent of federated asset sources.
Opens the document right away while intent links resolve.
Accepts intent links without parameters.
Custom first actions are promoted as the primary action for live-edit documents.
Renders relative-only URL fields as text inputs.
Release documents can reference documents in the same release.
Release dropdown menu items include a link to release details.
Opens intent links without resolving the whole structure.
Searches the structure without waiting for the document type.
The variants menu supports creating from the menu.
Selecting the document title focuses the title field.
The document inspector includes a document group inventory layout.
The federated Media Library asset source view is now used by default.
Vision's JSON editor prefills query parameters from referenced $names.
Workspaces can be switched without reloading the page, and workspace switches are synced with the dashboard.
A stable attribute is available for hiding the document toolbar.
The open document is now reported to Workbench.
Page performance metrics are skipped in Workbench.
Schema error messages now include workspace and source context.
Studio navigation is synchronized with Workbench.
Studio now follows the Workbench color scheme.
Workbench now owns sign-in.
Long arrays can be collapsed behind a show all items toggle.
Schema-less Portable Text values receive a visible affordance.
Document variants are read from _system.variants, with a legacy fallback.
The document color-scheme is pinned to the resolved Studio appearance.
Task comments are opted into the Comments API.
Custom spinners are stabilized in Safari.
Validation results now account for capabilities.
Variants gain support for live edit.
SAML enforcement is surfaced before the request form.
Validation markers now have stable codes.
The document inventory button is renamed to “manage versions.”
Documents in the selected variant are queried alongside the perspective stack.
Tooling 1
Migrates profiling minify options from esbuild to Vite.
Fixes and other changes 97
The auth store whose session was rejected is now logged out.
The schema no longer lists date as a future reserved type.
Release descriptions rendered as Portable Text no longer appear blank.
Releases with descriptions that are not strings now render.
Refines the document group inventory and fixes overflow when it has a scrolling ancestor.
Presence stops reconnecting after an authorization rejection.
Cancels abandoned reference batches.
Applies the workspace release limit wherever a release can be created and while releases load or a dialog is submitted.
Leftover drafts of live-edit document types can now be published.
Studio search now respects fields excluded by partial indexes.
Review changes are cleared after discarding a draft.
Built-in validators are preserved when schemas are serialized.
Favoriting in the workbench has been restored.
Prevents autocommit from cancelling a pending publish.
Store now emits initial value updates when document existence changes.
Clicking publish now triggers immediate validation.
Adds currentUser to ValidationContext so validation code can access the current user.
Preserves weak references in releases.
Aligns list pane items whether or not the list scrolls.
Manifest validation during compilation now accounts for built-in parent types.
Removes the global context registry so two versions of sanity can render on one page.
Keeps location links targeting presentation after opening in structure.
Prevents the studio layout from remounting when feature checks settle.
Prevents the studio layout from remounting when scheduled publishing checks settle.
Derives the upload target card tone from the current read-only state.
Exports VideoDefinition, the definition accepted by defineVideoField.
Shows the draft indicator for draft-only documents.
Navbar tools collapse into the overflow menu when the Studio is narrower than the viewport.
Keeps pane widths when releasing a resize divider.
Keeps a grown portable text editor from scrolling to the top when focused.
Allows a container block config to add portable text toolbar actions.
Enables preview mode when opening a preview.
Detects scheduled draft edits when deleting a schedule.
Reads every selected variant from the perspective.
Sticky perspective is reset for archived releases.
Stored comments with unparseable field paths are tolerated.
Persisted inline comment ranges are rematched after edits.
The field presence avatar stays in place when field actions appear on hover.
Presence is displayed inline and in the Portable Text field.
Portable Text values whose types have left the schema are rendered.
Validation now accepts allowed object array selections.
Removing a Portable Text block no longer rewrites the change as an unset of the whole field, preventing unintended data loss.
Only shows the annotation toolbar popover for collapsed selections.
Fixes the choose-document-destination banner incorrectly superseding deleted-document banners.
Keeps popovers inside the pane when they are opened from dialogs.
Uses an intent link for the variants duplicate message.
This version has a potential data-loss bug when working with Portable Text fields; the issue is resolved in 6.14.1.
Fixes an unexpected blink in reference input autocomplete.
The auto-update bundle CSS preserves light-dark.
Custom slug uniqueness is honored on type aliases.
The form field gutter tolerates a missing path.
Inherited rules and runtime context are kept consistent during validation.
Every document's revert target is resolved before a release is reverted.
The document listener now terminates on a 401 response.
Memo caches that capture clients are now keyed by credential.
Styled-component style props are transient so they do not leak to the DOM.
The workspace menu project name now renders without a layout shift.
Creating from a nested pane now keeps panes.
Creating a draft variant now falls back to the published document.
Patch paths that cannot apply to the local document are now dropped.
Validation now honors concurrency options.
Document action filters are honored in version and release menus.
Portable Text styles and lists accept i18nTitleKey, and defaults are exported.
useClient is deprecated only when called without options.
The correct package version is now baked into CDN module bundles.
Client v8 timeout errors are classified in the request-error channel.
Duplicate variant documents are now copied into the same variant.
The published badge is shown for live edit documents.
Manage versions remains available when a document has no actions.
Connection errors are surfaced when the preview iframe never finishes loading.
Paste events outside Vision are no longer swallowed.
The claimed project banner is retained across refreshes.
The click-outside handler is enabled when a comment popover is open.
Delete dialog copy now accounts for the number of items being deleted.
The preview now works for documents unpublished by a published release.
Hidden workspace URLs now redirect to the first visible workspace.
The mention menu stays sized appropriately in oneLine Portable Text fields.
An open object dialog stays open when focus lands on the item itself.
This version has a potential data-loss bug when working with Portable Text fields; the issue is resolved in 6.14.1.
The popover can now flip above its button.
The intended publish date is retained when scheduling a release.
Resolves context-aware validation rules in inputs.
Clears the blur guard when the mouse is pressed inside the editor.
Drops the teardown mutation of a reset editor instance.
Opts hotspot preview images out of the global img reset.
Uses the project API host for media library video asset queries.
Fixes copying variants to different releases from the context menu.
Allows creating draft variants from a published variant sibling.
Prevents incoming references from referring to themselves.
Keeps inspector crashes inside the inspector panel.
Stops permission loading-flag churn on every document change.
Preserves supplied schema helper properties in types.
Downloading an asset opens it in a new browsing context.
Copying to drafts uses a transaction, preparing the operation for variants.
Variant documents can be created without a base document.
Variant publishing now wires the published variant revision ID.
The clear button is enabled when the perspective is not the default one.
sanity 45 changes
Breaking changes 1
Node 18 is removed and the base Node version is changed to 20.
New APIs and options 2
Adds a CLI command for reading documentation.
Adds a CLI command for searching documentation.
Fixes and other changes 2
Task form operations no longer leak into the main workspace store.
Ensures global document reference preview configuration is present for serialized sanity.video schema types.