Sanity Studio v6.6.0: Portable Text table editing, smarter content releases, and more reliable Studio and CLI behavior

This release adds table editing to Portable Text and lets you update existing drafts when publishing a release. It also fixes field navigation from external links so collapsed sections expand properly, and resolves several editor glitches, including cursor jumping during typing and menu clipping. The CLI gains unattended mode support and better error handling.

Built-in table editing for Portable Text inputs

The Portable Text input can now edit tables. Enable the opt-in table plugin and editors get table editing inside block content: row and column controls, rectangle selection, a table menu with a header row toggle, and cells that hold regular Portable Text. Tables inserted from the toolbar start as a 3×3 grid with a header row.

Enable it with plugins: {table: {enabled: true}} on components.portableText, globally or per field, and declare the table schema, including the required headerRowsfield.

If your dataset already has a table-shaped type, you can bind the plugin to your own type and field names through the plugin's containers option.

See the table editing section of Configure the Portable Text Editor for setup.

Update existing drafts when publishing a release

Publishing a release can now also update existing drafts. The run-release confirmation dialog shows an "Update existing drafts" checkbox when documents in the release have draft versions.

When checked, those drafts are discarded after the release is published, so the documents match the newly published content instead of keeping outdated draft changes.

Leaving it unchecked preserves the current behavior of keeping existing drafts untouched. Documents set to be unpublished by the release are not affected, and their drafts are always kept.

Invisible stega metadata stripped from pasted text

Pasting text copied from a preview with visual editing enabled (stega) into Studio fields no longer stores invisible stega metadata characters in your documents. Portable Text fields already stripped these, and now plain text fields (string, text, email, url, slug, number, tags, and other arrays of primitive values) do too. Only pastes containing stega sequences are affected, so normal paste behavior is unchanged.

To detect existing stega contamination in your dataset, add a custom validation rule using stegaClean from @sanity/client/stega, and clean it up in bulk with a content migration. See stega docs for ready-made examples.

🐛 Notable bugfixes and improvements

Fixes an issue where opening a document from a Visual Editing "Open in Studio" link (or any edit intent link with a path parameter) would not reveal the targeted field when it was nested inside a collapsed collapsible object, collapsed fieldset, or a non-default field group. The Studio now expands the ancestors of the linked field and focuses it once the document form is ready.

Fixes an issue where the Studio could briefly flash the login screen when opening or reloading it, even with a valid session.

Disables Portable Text Editor toolbar actions when the cursor is inside a container whose schema doesn't allow them, for example a table cell with a restricted block configuration. Previously they appeared enabled but did nothing when pressed.

Scrolls the Presentation Tool preview to focused text inside nested Portable Text structures, such as table cells, matching the behavior of top-level text.

Fixes an issue where typing in a Portable Text Editor on a newly created document could be interrupted: the cursor jumped to the beginning of the text block after the first auto-save, scrambling the typed text. This was most noticeable on documents with validation rules on other fields.

Fixes "Default sort" and "Default view" in document lists to return that list to its own configured default instead of overriding other lists of the same type. A list configured with menuItems([]) no longer shows injected menu items.

Hides the document header share button when the current perspective points to a document that does not exist, such as one outside a pinned release or an uncreated variant.

Fixes comment and task mention lists showing no users when a project member has an attribute-based role grant.

Fixes a regression introduced in 5.22.0 where the insert menu for arrays of objects appeared clipped inside edit dialogs, showing only a small portion of the available item types. The insert menu now overflows the dialog again, while other popovers (such as reference search results) remain contained within dialogs.

Fixes annotation inputs in deeply nested Portable Text fields losing their visible caret and text selection.

CLI

Supports unattended mode for media library commands, adds flags for aspect names and titles, accepts media library IDs without prompting, requires confirmation for destructive actions, and sets default export destinations.

Supports unattended mode for GraphQL and schema commands.

Requires --force or --yes for confirmation-gated operations, keeps schema JSON machine-readable, and distinguishes usage errors from cancellations.

Renames the sanity tokens add command to sanity tokens create, while preserving the old alias for backward compatibility.

Requires --yes instead of treating non-interactive or JSON output as consent, distinguishes usage errors from cancellations, and keeps JSON errors machine-readable.

Requires file input instead of opening an editor, skips validation confirmations, and distinguishes usage errors from cancellations.

Returns usage errors instead of prompting for missing alias, dataset, confirmation, or embeddings values, while allowing unlinked aliases without a target dataset.

Adds deterministic defaults and required flags for CORS, token, and user commands that previously prompted.

Shows token, provider, and SSO login commands when authentication is required, and lists accepted provider IDs in sanity login --help.

Uses deterministic export and backup paths, and returns usage errors instead of prompting for missing input or overwrite confirmation.

Validates output path, project selection, and organization prerequisites together so unattended sanity init runs report every applicable usage error in one pass.

Adds commands for listing, creating, updating, and deleting organizations.

Chooses login providers and package managers deterministically when possible, and returns usage errors when a choice is required.

Requires organization flags when selection is ambiguous, validates dataset names as usage errors, and keeps dataset creation JSON machine-readable.

Prints webhook creation URLs instead of opening a browser, and requires names when deletion or log selection would otherwise prompt.

Fixes CLI commands (schemas deploy/extract/validate/list/delete, graphql deploy, manifest extract, deploy) aborting silently with exit 134 under Vite 8. Studio config errors now surface instead of being lost.

Allows a boolean value for the reactCompiler Studio config option.