-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Describe the bug
There is an issue with the latest version of @sanity/client (v7.8.2) when used with @sanity/astro (v3.2.10). An issue that I didn't encountered with the v7.8.1. Certain string values such as icon.namecontain an ellipsis (…) at the end in the client response when stega is enabled.
However, when querying the same document directly via the Structure tool in Sanity Studio, the values are complete and unaltered. Additionally, if stega is disabled, the values are returned correctly via the client as well which suggests the issue is related to how stega handles drafts or unpublished changes.
To Reproduce
Steps to reproduce the behavior:
- Use @sanity/client@7.8.2 and @sanity/astro@3.2.10 in your project
- Enable stega to preview content (e.g. with sanityClient.fetch(query, {}, { perspective: "previewDrafts", ... }))
- Query documents with structured fields like
titleoricon.name - Observe that values like
tabler:brand-xare returned astabler:brand-x… - Disable stega
- The same field is returned correctly without ellipsis
Expected behavior
The client should return full string values, identical to what is stored in the dataset and shown in the Studio, regardless of whether stega is enabled.
Screenshots
Client output
Expected value in Structure tool
Which versions of Sanity are you using?
@sanity/client: 7.8.2
@sanity/astro: 3.2.10
What operating system are you using?
MacOS Sequoia 15.4.1
Which versions of Node.js / npm are you running?
Node: v24.4.1
npm: 11.4.2
Additional context
- This appears to be related to how the Sanity client resolves preview/draft content using the stega feature.
- When stega is disabled, everything works as expected.
- The field in question (icon.name) is a short, valid string.
- This could indicate a display formatting issue or draft resolution bug in the client layer.
Security issue?
No, this is not related to any a security issue.