Skip to content

chore(test-studio): enable beta.reactActivityMode on sanity@next - #2033

Merged
stipsan merged 4 commits into
mainfrom
cody/test-studio-react-activity-mode-13c7
Sep 28, 2026
Merged

stipsan merged 4 commits into
mainfrom
cody/test-studio-react-activity-mode-13c7

Conversation

@stipsan

@stipsan stipsan commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Description

Turns on the new beta.reactActivityMode flag from sanity-io/sanity#14901 for every workspace in dev/test-studio, so the plugins in this monorepo get dogfooded with recently used tools kept mounted behind React's <Activity> (effects torn down while hidden, re-created on reveal) instead of being unmounted on tool switch.

The flag's typings ship in sanity@6.17.0-next.106, published by Release @next run 36426787139 from the PR's merge commit (f5821c33bf). The lockfile was still on 6.13.3-next.7, where the config fails type-checking with TS2353: 'reactActivityMode' does not exist in type 'BetaFeatures', so this also re-resolves the next overrides.

Changes

  • dev/test-studio/sanity.config.ts: a shared beta constant applied by createWorkspace (placed before ...config, so a workspace that defines its own beta still opts out) and on the standalone cross-dataset-duplicator-target workspace, which also registers a tool.
  • pnpm-lock.yaml: sanity, @sanity/vision, @sanity/types, @sanity/util, @sanity/schema, @sanity/mutator and groq move in lockstep from 6.13.3-next.7 to 6.17.0-next.106 (one copy of each). Regenerated with pnpm dedupe, the same command the "Dedupe lockfile" workflow runs, repeated until pnpm dedupe --check passes, so no follow-up bot PR is needed. That also collapses duplicates the bump would otherwise leave behind, which is why a few direct deps shift to in-range versions already in the graph: @codemirror/state 6.7.6 / @codemirror/view 6.43.13 / @uiw/react-codemirror 4.25.12 (code-input), xstate 5.33.2 (dashboard-widget-vercel), @mux/mux-player(-react) 3.13.4 (mux-input), @tanstack/react-virtual 3.14.13 (workflow), uuid 14.0.2 (graph-view), axios 1.20.0 (shopify-assets). Catalogs and package.json specifiers are unchanged.
  • pnpm-workspace.yaml: sanity@6.17.0-next.106 needs @sanity/sdk and @sanity/sdk-react ^3.5.0, which sanity-svc.npm published from sanity-io/sdk without provenance (since 3.4.0), tripping trustPolicy: no-downgrade. 3.5.0 of both is added to trustPolicyExclude next to the existing @sanity/sdk@2.1.2 || 3.0.0-rc.1 entry. Without this, pnpm dedupe on main (and so the Dedupe lockfile workflow) currently fails with ERR_PNPM_TRUST_DOWNGRADE.

The bump also pulls in vite@8.3.1, whose bundled-dev client needs the vite@8.3.1>rolldown: 1.2.9 pin; without it every lazy chunk in pnpm dev fails with factory.fn is not a function. That pin landed on main in #2034 (this branch had added the identical override before it merged), and the merge keeps this branch's deduped lockfile, which already resolves vite@8.3.1 → rolldown@1.2.9.

No changeset: only the private test studio and workspace tooling change; published package ranges are untouched.

Testing

  • pnpm format, pnpm lint (type-aware), pnpm knip, pnpm build (52 tasks) and pnpm test run (224 files, 1391 tests) all pass locally.
  • pnpm oxlint dev/test-studio/sanity.config.ts fails with TS2353 on 6.13.3-next.7 and passes on 6.17.0-next.106.
  • After merging main: pnpm install --frozen-lockfile and pnpm dedupe --check both pass, and CI is green on the merge commit.
  • Manual, pnpm dev on the Home workspace, switching tools only through the navbar (no reloads): Structure with "Size chart demo" open → Vision (ran *[_type == "tableTest"]{_id, title}) → Structure → Vision → Media → Structure → Vision.
    • While Vision was active, the Structure navbar link pointed at /home/structure/input-plugins;tableTest;fe661a85-…, and Structure came back with the document open and no loading state both times.
    • Vision came back with its query and results on screen both times, with no errors or loading overlays anywhere.
    • Its timing footer changed on each return (13 ms → 3 ms → 10 ms) without Fetch being clicked, so @sanity/vision re-runs the current query when revealed. The results don't flash; this is upstream Vision behaviour under <Activity>, not something this PR changes.

test_studio_react_activity_mode_structure_vision_media_keep_state.mp4

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Re-resolves the `next` overrides for sanity, @sanity/vision, @sanity/types,
@sanity/util, @sanity/schema, @sanity/mutator and groq to 6.17.0-next.106
(built from sanity-io/sanity@f5821c33bf), regenerated with `pnpm dedupe`
until `pnpm dedupe --check` passes.

sanity@6.17.0-next.106 depends on @sanity/sdk and @sanity/sdk-react ^3.5.0,
which sanity-svc.npm published without provenance attestations, so they are
added to trustPolicyExclude alongside the existing @sanity/sdk entries.
Opts every test studio workspace into the new `beta.reactActivityMode` flag
from sanity-io/sanity#14901, so plugin tools are exercised while kept mounted
behind React's <Activity> when switching between tools.
@changeset-bot

changeset-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4fa8af8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
plugins-studio Ready Ready Preview Sep 28, 2026 2:05pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
plugins-e2e-test-studio Ignored Ignored Sep 28, 2026 2:05pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

✅ E2E Tests

🟢 44 passed • view full report • view run

Studio: https://plugins-e2e-test-studio-21j5cniiq.sanity.dev

Datasets: pr-2033-chromium-36433321318, pr-2033-firefox-36433321318

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 33.34% 5810 / 17426
🔵 Statements 33.11% 6142 / 18545
🔵 Functions 29.43% 1535 / 5214
🔵 Branches 24.55% 3014 / 12272
File CoverageNo changed files found.
Generated in workflow #10113 for commit 4fa8af8 by the Vitest Coverage Report Action

The sanity@next bump brings in vite@8.3.1, whose bundled-dev client inlines
rolldown 1.2.9's runtime while its `rolldown: ~1.2.9` range resolves 1.2.11.
rolldown 1.2.10 dropped the `kind` argument from registerFactory
(rolldown/rolldown#10915), so every lazy import in the test studio's
`sanity dev` failed with `factory.fn is not a function`.

Same override as #2034.
Resolves the pnpm-lock.yaml conflict with #2034 by keeping this branch's
lockfile: it already has vite@8.3.1 with the identical `vite@8.3.1>rolldown`
pin that #2034 added, on top of the sanity@next bump, and passes
`pnpm install --frozen-lockfile` and `pnpm dedupe --check` against the
merged manifests.
@stipsan
stipsan marked this pull request as ready for review September 28, 2026 14:09
@stipsan
stipsan requested a review from a team as a code owner September 28, 2026 14:09
@stipsan
stipsan requested review from bjoerge and a balanced review from Copilot and removed request for a team and Copilot September 28, 2026 14:09
@stipsan
stipsan merged commit 3799908 into main Sep 28, 2026
25 checks passed
@stipsan
stipsan deleted the cody/test-studio-react-activity-mode-13c7 branch September 28, 2026 14:11

This branch was successfully deployed

1 active deployment
Preview – plugins-studio — 4fa8af82 Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants