fix(FR-2853): restore copymonaco script lost during 26.4 main-merge#7326
Merged
Conversation
Resolves #FR-2853 The merge commit e5ea950 ("Merge branch 'main' into 26.4", 2026-04-24) brought PR #6959 (FR-2697, self-host Monaco) into the 26.4 release branch but, while resolving conflicts in package.json/electron-app/package.json/ index.html, both the `copymonaco` script definition and its invocation in the `build` chain were silently dropped from root package.json. As a result v26.4.6 and v26.4.7 ship a release zip with no `resources/monaco/vs/` tree, and any UI that uses Monaco (VFolder file editor, Theme JSON config modal) fails to load `/resources/monaco/vs/loader.js` in deployed environments. main is unaffected, which is why local builds reproduced fine and the regression went unnoticed through two releases. Restore the two lost lines in root package.json: 1. Re-insert `&& pnpm run copymonaco` between `copyconfig` and `tsc` in the `build` script. 2. Re-add the `copymonaco` script definition. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Restores the previously-introduced root build step that copies the self-hosted Monaco Editor AMD bundle into the build/web/ artifact, fixing missing /resources/monaco/vs/loader.js in release zips for the 26.4 branch.
Changes:
- Re-add
pnpm run copymonacointo the rootbuildscript chain. - Re-introduce the root
copymonacoscript to copyreact/node_modules/monaco-editor/min/vsintobuild/web/resources/monaco/vs/.
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.
Resolves FR-2853
Problem
Releases v26.4.6 and v26.4.7 ship a release zip that is missing the Monaco editor bundle. After unpacking,
resources/monaco/vs/loader.jsand the rest ofresources/monaco/vs/are absent, so any UI that uses Monaco (VFolder file editor, Theme JSON config modal) fails to load with a 404 on/resources/monaco/vs/loader.jsin deployed environments.Root cause
PR #6959 (FR-2697, commit
547b702f1, 2026-04-24) added a rootcopymonaconpm script and wired it into the rootbuildchain so the Monaco AMD tree is copied fromreact/node_modules/monaco-editor/min/vsintobuild/web/resources/monaco/vs/during the production build. CI bundlesbuild/web/directly into the release zip viaMakefile:201 bundle(called from.github/workflows/package.ymlbuild_webjob), so thecopymonacostep is what makes Monaco end up in the release artifact.The merge commit
e5ea9500f("Merge branch 'main' into 26.4", 2026-04-24) brought547b702f1into the26.4release branch but, while resolving conflicts inpackage.json/electron-app/package.json/index.html, both thecopymonacoscript definition and its invocation inbuildwere silently dropped from rootpackage.json.Verification:
git show v26.4.7:package.json | grep monaco→ empty.git show v26.4.6:package.json | grep monaco→ empty.git show origin/main:package.json | grep monaco→ both lines present (correct).git merge-base v26.4.5 547b702f1resolves to64b9edbcb; at the merge base thebuildline did not containcopymonaco. Only547b702f1(one parent of the merge) added it, and26.4never modified it — a clean 3-way merge would have brought it through. The deletion was a manual resolution mistake in the merge commit.mainis unaffected, which is why local builds done frommainreproduce Monaco correctly and the regression was not caught before two releases.Fix
Restore the two lines in root
package.json(effectively cherry-picking only thepackage.jsonhunk of547b702f1):scripts.build, re-insert&& pnpm run copymonacobetweencopyconfigandtsc."copymonaco": "mkdir -p build/web/resources/monaco/vs && cp -R react/node_modules/monaco-editor/min/vs/. build/web/resources/monaco/vs/"underscripts.Test plan
pnpm run buildproducesbuild/web/resources/monaco/vs/loader.js(and the rest of the Monaco tree).make bundleproduced zip containsresources/monaco/vs/loader.jsand the language sub-trees.build/web/— both load with no 404 on/resources/monaco/vs/*.Follow-up (separate issue, not in this PR)
Add a CI guard in the
build_webjob that fails the build ifbuild/web/resources/monaco/vs/loader.jsis absent — the failure mode here was silent (build succeeded, only the runtime broke), and a one-line existence check would have caught it.