refactor(workbench): drop reactRefreshHost plumbing#1109
Conversation
📦 Bundle Stats —
|
| Metric | Value | vs feat/workbench (e6795c3) |
|---|---|---|
| Internal (raw) | 2.1 KB | - |
| Internal (gzip) | 799 B | - |
| Bundled (raw) | 10.97 MB | - |
| Bundled (gzip) | 2.06 MB | - |
| Import time | 831ms | -12ms, -1.4% |
bin:sanity
| Metric | Value | vs feat/workbench (e6795c3) |
|---|---|---|
| Internal (raw) | 1023 B | - |
| Internal (gzip) | 486 B | - |
| Bundled (raw) | 9.84 MB | - |
| Bundled (gzip) | 1.77 MB | - |
| Import time | 1.97s | +8ms, +0.4% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against feat/workbench (e6795c31)
| Metric | Value | vs feat/workbench (e6795c3) |
|---|---|---|
| Internal (raw) | 98.8 KB | - |
| Internal (gzip) | 23.3 KB | - |
| Bundled (raw) | 21.64 MB | - |
| Bundled (gzip) | 3.43 MB | - |
| Import time | 797ms | +5ms, +0.7% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against feat/workbench (e6795c31)
| Metric | Value | vs feat/workbench (e6795c3) |
|---|---|---|
| Internal (raw) | 908 B | - |
| Internal (gzip) | 483 B | - |
| Bundled (raw) | 931 B | - |
| Bundled (gzip) | 491 B | - |
| Import time | ❌ ChildProcess denied: node | - |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
reactRefreshHost plumbing
|
Claude finished @gu-stav's task in 2m 33s —— View job PR Review
The diff is a clean removal: The three Cursor Bugbot comments on earlier commits look stale after the latest commits:
Issues / nitpicks
ChangesetThe deletion of CaveatPer the PR description, this depends on |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 05b0145. Configure here.
Coverage Delta
Comparing 42 changed files against main @ Overall Coverage
|
…on owns HMR With `dev.remoteHmr: true` landing in `@module-federation/vite` (via workbench PR sanity-io/workbench#208), the federation plugin wires Fast Refresh through the host automatically. The workbench port no longer needs to leak from `devAction` down through `start{Studio,App}DevServer` → `startDevServer` → `getViteConfig` into `@vitejs/plugin-react`. Removing that field exposed `workbenchAvailable` as the last piece of workbench-derived state on `DevActionOptions`, used only to suppress a URL log suffix in the leaf starters. Hoisted that output into `devAction`, which already owns the "Workbench dev server started at …" line — all dev-server output formatting now lives in one place. Net: the build pipeline has zero awareness of whether a workbench host exists. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The federation pipeline no longer creates `.__mf__temp` directories, so the gitignore entry (and the test asserting it gets scaffolded) are obsolete. Removes the entry from the template gitignore, the federated fixture, and the bootstrap test, and drops the changeset that introduced the entry since the change is no longer shipping.
The reactRefreshHost cleanup also dropped the "App dev server started on port X"
and "...ms and running at http://..." lines from the leaf starters and replaced
them with a single "${label} dev server started at ${appUrl}" line in devAction.
That changed user-visible text and broke dev.test.ts on every shard.
Restore the original log lines (and the workbenchAvailable plumbing they depend
on for the no-workbench branch). The reactRefreshHost removal stays untouched —
build pipeline still has zero awareness of workbench hosts.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|

Description
With
dev.remoteHmr: truelanding in@module-federation/vite(via workbench PR sanity-io/workbench#208), the federation plugin wires Fast Refresh through the host automatically. The workbench port no longer needs to leak fromdevActiondown throughstart{Studio,App}DevServer→startDevServer→getViteConfiginto@vitejs/plugin-react.Also drops the
.__mf__tempignore entries from templates and fixtures — federation no longer writes that directory at build time, so the entries are stale.Net: the build pipeline has zero awareness of whether a workbench host exists.
Depends on a
@sanity/federationrelease containing sanity-io/workbench#208 before merging.Note
Medium Risk
Touches federated dev HMR wiring and bumps @sanity/federation; behavior depends on the new federation release being present before merge.
Overview
Removes
reactRefreshHostfrom the dev/build Vite path (devAction→startStudioDevServer/startAppDevServer→startDevServer→getViteConfig), so@vitejs/plugin-reactis no longer pointed at the workbench URL for federated HMR—that behavior is expected from@sanity/federation0.1.0-alpha.8and@module-federation/vite@1.16.0(dev.remoteHmr).Cleans up stale module-federation ignores: drops
.__mf__temp/from shared gitignore templates, the federated fixture, and related init/bootstrap tests; removes the old changeset that only documented that ignore.Tests / lockfile: deletes
reactRefreshHostassertions; federated build test setsMFE_VITE_NO_TEST_ENV_CHECKso federation plugins still run under Vitest;pnpm-lock.yamland workspace catalog pin the new federation stack.Reviewed by Cursor Bugbot for commit ebe7fb5. Bugbot is set up for automated code reviews on this repo. Configure here.