refactor(workbench): move dev-server registration into workbench-cli#1337
Closed
gu-stav wants to merge 1 commit into
Closed
refactor(workbench): move dev-server registration into workbench-cli#1337gu-stav wants to merge 1 commit into
gu-stav wants to merge 1 commit into
Conversation
Contributor
📦 Bundle Stats —
|
| Metric | Value | vs refactor/workbench-move-interfaces (cd231d6) |
|---|---|---|
| Internal (raw) | 2.7 KB | - |
| Internal (gzip) | 1.0 KB | - |
| Bundled (raw) | 11.16 MB | - |
| Bundled (gzip) | 2.10 MB | - |
| Import time | 680ms | -3ms, -0.4% |
bin:sanity
| Metric | Value | vs refactor/workbench-move-interfaces (cd231d6) |
|---|---|---|
| Internal (raw) | 782 B | - |
| Internal (gzip) | 423 B | - |
| Bundled (raw) | 9.87 MB | - |
| Bundled (gzip) | 1.78 MB | - |
| Import time | 703ms | -20ms, -2.8% |
🗺️ 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 refactor/workbench-move-interfaces (cd231d6d)
| Metric | Value | vs refactor/workbench-move-interfaces (cd231d6) |
|---|---|---|
| Internal (raw) | 106.7 KB | - |
| Internal (gzip) | 26.7 KB | - |
| Bundled (raw) | 21.72 MB | - |
| Bundled (gzip) | 3.46 MB | - |
| Import time | 597ms | -7ms, -1.1% |
🗺️ 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 refactor/workbench-move-interfaces (cd231d6d)
| Metric | Value | vs refactor/workbench-move-interfaces (cd231d6) |
|---|---|---|
| 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.
Contributor
Coverage Delta
Comparing 7 changed files against main @ Overall Coverage
|
Registration drives the registry, so it belongs beside it; the CLI now injects only what it owns — the resolved app id and the manifest extractor — keeping workbench-cli free of CLI config/manifest conventions.
e702336 to
cd231d6
Compare
ae71654 to
bf3050c
Compare
joshuaellis
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Registration drives the registry, so it belongs beside it; the CLI now injects only what it owns — the resolved app id and the manifest extractor — keeping workbench-cli free of CLI config/manifest conventions.
What to review
The injected
appId/extractManifestseam onstartDevServerRegistration, and the deprecated-id check moving up to the caller.Testing
Registration + manifest-watcher unit tests moved with the code; the deprecation tests are relocated to the devAction suite.
Note
Medium Risk
Touches workbench dev registration and manifest watching on the critical
sanity devpath; behavior should be equivalent but wiring and test placement changed.Overview
Moves
startDevServerRegistrationfrom@sanity/cliinto@sanity/workbench-cliand re-exports it on@sanity/workbench-cli/dev, next to the dev-server registry.devActionnow calls that export and injects CLI-owned concerns:checkForDeprecatedAppIdandgetAppIdrun before registration, and anextractManifestcallback picks studio vs core-app extraction (extractStudioManifest/extractCoreAppManifest). Workbench-cli no longer imports CLI manifest helpers orappIdutilities.Registration tests live in workbench-cli with a slimmer
extractManifest/appIdAPI; deprecatedapp.idvsdeployment.appIdcoverage moves to thedevActionunit suite.extractStudioManifestimport paths are corrected underactions/manifest, and the manifest watcher uses local dev modules plussubdebugfrom cli-core instead of a CLIdevDebughelper.Reviewed by Cursor Bugbot for commit bf3050c. Bugbot is set up for automated code reviews on this repo. Configure here.