Skip to content

Unexpected ellipsis appended to strings by @sanity/client with stega enabled #1127

@Lornz-

Description

@Lornz-

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:

  1. Use @sanity/client@7.8.2 and @sanity/astro@3.2.10 in your project
  2. Enable stega to preview content (e.g. with sanityClient.fetch(query, {}, { perspective: "previewDrafts", ... }))
  3. Query documents with structured fields like title or icon.name
  4. Observe that values like tabler:brand-x are returned as tabler:brand-x…
  5. Disable stega
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions