Sanity Studio v5.18.0: Fixes Next.js session management and multiple bugfixes and improvements

This release fixes critical issues with authentication persistence in Next.js, session management errors, and the @mention dropdown functionality, while also improving performance by reducing unnecessary API requests.

🐛 Notable bugfixes and improvements

Adds a workaround for a bug where session was not persisted across reloads in studios embedded in Next.js, and would result in an error message Session with sid (…) not found.

Reduces number of requests with tag sanity.studio.history-revision after editing documents.

Restores the behavior where asset sources receive the current asset in selectedAssets when opened via the browse flow, even when the field already has a value.

Fixes an issue causing authentication to not persist between page reloads in Next.js.

Fixes an issue where the @mention dropdown in comments might show “No users found” when any system.group document had members: null.

Fixes virtualization issues using the dialog and renderDefault.

CLI bugfixes and improvements

The debug command has an improved output format and can now be run outside a project.

init has improve flags.

Many commands now has plural names, with aliases for the singular versions.

Deprecated start command. Use preview instead.

Adds support for non-interactive mode for app templates.

Load all env vars for schema extract.

Prevent duplicate deprecation warnings during sanity deploy.

Schema extract path always appends schema.json.

Fixes an issue where import command required --token flag.