Sanity Studio v5.8.0: Incoming references view, automatic type generation, external studio support + improvements and bugfixes
This release adds views for incoming references, automatic type generation, URL-to-link pasting in Portable Text, external studio registration, improved dialog interactions, and includes performance improvements and bug fixes for document loading and validation.
typegen to dev and build commandsThis feature adds automatic TypeScript type generation during development and build. When enabled, the Sanity CLI generates types on startup and whenever files change, providing real-time type safety for your queries.
To enable this feature, add the enabled flag to your typegen configuration in sanity.cli.ts:
export default defineCliConfig({
// ...
typegen: {
enabled: true,
// Optional: customize paths
schema: 'schema.json',
generates: 'sanity.types.ts',
},
})
typegen generate commandThe sanity typegen generate command now features a watch flag that you can use to start type generation in watch mode. It will listen for changes in the schema JSON file and files in your project.
sanity typegen generate --watch
Adds support for toggle/selected state on custom menu items in document list panes. The selected state checkmark can optionally be hidden if it’s not wanted for .menuItem in document list panes.
S.menuItem()
.title('No checkmark')
.icon(EmptyIcon)
.action(() => console.log('you clicked!'))
.params({hideSelectionIndicator: true}),
You can also read the params to check in an .action() in a .menuItem whether the action is selected or not in document list panes.
S.menuItem()
.title('View Mode: Default')
.icon(DocumentIcon)
.group('view')
.params({value: 'default'})
.action((params) => console.log('default', params?.isSelected, params)),
Users can now register externally-hosted studios with the --external flag:
sanity deploy --external
This registers the studio URL without building or uploading assets, enabling features using the studio manifest for studios hosted on custom infrastructure.
To unregister an external studio:
sanity undeploy
For external studios, this uses “unregister” terminology and does not warn that the hostname will become available (since you control the external URL).
Note: External studio deployment requires a sanity.config.ts.
You can now see which documents reference the active document without creating a custom document view.
When viewing a document:
This opens a side pane with the incoming references by type.

In addition to the incoming references panel, developers can also embed an incoming reference decoration alongside other fields in the document. This involves updating the document schema by using the new renderMembers functionality.
To get started, see the incoming reference field documentation.

pasteLink plugin enabled by defaultPasting a URL in a Portable Text Input now automatically creates a link.
disableNew option for image fieldsNew disableNew option for image and file fields - when enabled, hides the upload UI while preserving the ability to select existing assets from the media library. Useful for centralized asset management workflows where teams want to prevent ad-hoc uploads and enforce selection from a curated library.
When viewing a content release, it’s now possible to filter the list of documents in the release by whether they have validation errors or by release action type (unpublish, add, or change).
Fieldgroup tabs will now show a validation status icon to indicate if any fields in that group needs attention.

path to ConditionalPropertyCallbackContextAdds path to ConditionalPropertyCallbackContext allowing users to hide or disable fields according to the path they are in.
import * as PathUtils from '@sanity/util/paths'
import { defineType} from 'sanity'
export const conditionallyHiddenField = defineType({
name: 'conditionallyHiddenObject',
type: 'object',
title: 'Conditionally Hidden Object',
description: 'Object with a conditionally hidden field',
fields: [
defineField({
name: 'title',
type: 'string',
title: 'Title ',
description: 'Title (hidden if path starts with "hiddenTitles")',
hidden: ({path}) => {
if (PathUtils.startsWith(['hiddenTitles'], path)) {
return true
}
return false
},
}),
defineField({
name: 'description',
type: 'string',
title: 'Description',
}),
],
})
Click outside of an object dialog to close all of the dialogs in a single go.




Fetched April 11, 2026