# Bug fixes and refinements

**Version:** v5.26.0

**Published:** May 19, 2026

This release improves studio navigation and user experience by automatically routing to the first visible workspace, enabling proper upload field restrictions, resolving validation error visibility for date fields, correcting preview data handling for arrays, and fixing authentication issues with image cropping in private datasets.

## 🐛 Notable bugfixes and improvements

- Studio now routes to the first workspace the user can see, fixing the case where the configured default is hidden from them.
- Fixes an issue where you could still upload to fields where the schema type has had upload disabled with `options.disableNew`.
- Fixes “useDocumentDivergences must be used within a DocumentDivergencesContext” error in third-party code that renders the `FormBuilder` component.
- Custom validation rules on `date`/`datetime` fields no longer hide behind “Required” when the user’s input doesn’t match `dateFormat`. The field-level tooltip and the global validation panel now surface the parser error directly (e.g., `Invalid date. Must be on the format "YYYY-MM-DD"`), making the format requirement actionable without any schema changes.
- Document / list previews that use preview.select with arrays of primitives and dotted paths (e.g., names.0, names.length) now receive the correct values instead of dropping the first element or misshaping the array.
- The crop dialog now authenticates private-dataset image requests directly, fixing a 403 that surfaced in Firefox and on deployed studios.
- CLI: The CLI now supports login with the `--with-token` flag. Use it to pass standard input to the command to bypass the interactive login. For example: `npx sanity login --with-token < token.txt`.

