chore(workbench): rebase onto main#1137
Merged
Merged
Conversation
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
Rebase
feat/workbenchonto latestmain(currently 2 commits ahead: #1128 CI cache scoping by RUNNER_OS, #1084 page-builder template).Used
git rebase --rebase-merges origin/mainto preserve the prior merge structure;rerereauto-resolved the previous conflict resolutions onextractManifest.tsandcommands/manifest/extract.ts(both now importSchemaExtractionErrorfrom@sanity/cli-build/_internalper #1120).Once merged,
feat/workbenchshould have no outstanding conflicts withmain.Note
High Risk
Large, cross-cutting changes to
sanity dev/build, filesystem locks, and Windows process detection; misbehavior could break local development or leave stale locks, though coverage is extensive.Overview
This branch lands experimental federation + workbench support across the Sanity CLI, rebased onto current
main(CI cache + page-builder template changesets included).CLI config & paths:
@sanity/cli-coreadds optionalfederation.enabled,getCliConfigUncachedfor dev-time reloads ofsanity.cli, and sharedgetSanityConfigDir/getSanityDataDir(staging-aware) for user config vs runtime state.Build: When federation is on, builds use
@sanity/federationvia VitecreateBuilder, merge userviteconfig withoutfinalizeViteConfig, skip the usual.sanity/runtimeclient bundle, and skip auto-update import maps. Vite gains federation/typegen plugin wiring,strictPort: false, and optionalreactRefreshHost.Dev:
devActionorchestrates a singleton workbench Vite server (lock +~/.sanity/dev-serversregistry with PID-reuse checks, including Windows PowerShell), bumps the studio/app to the next port, registers local apps with inlined manifests, and drops the old dashboard URL fetch (getDashboardAppURLremoved). Init/e2e tests use--no-federationwhere needed.Supporting:
@sanity/federationdependency,federated-studiofixture, manifest extraction split (extractCoreAppManifest), many unit tests, snapshot workflow temporarily targetingfeat/workbench/workbenchdist-tag, and a large set of changeset entries documenting prior workbench PRs.Reviewed by Cursor Bugbot for commit 78420aa. Bugbot is set up for automated code reviews on this repo. Configure here.