Skip to content

Restore copymonaco script lost during 26.4 main-merge (v26.4.6/26.4.7 ship without Monaco) #7324

@yomybaby

Description

@yomybaby

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.js and the rest of resources/monaco/vs/ are absent, so any UI that uses Monaco (VFolder file editor, Theme JSON config modal) fails to load.

Root cause

PR #6959 (FR-2697, commit 547b702f1, 2026-04-24) added a root copymonaco npm script and wired it into the root build chain so the Monaco AMD tree is copied from react/node_modules/monaco-editor/min/vs into build/web/resources/monaco/vs/ during the production build. CI bundles build/web/ directly into the release zip via Makefile:201 bundle (called from .github/workflows/package.yml build_web job), so the copymonaco step is what makes Monaco end up in the release artifact.

The merge commit e5ea9500f ("Merge branch 'main' into 26.4", 2026-04-24) brought 547b702f1 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 build were silently dropped from root package.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 547b702f1 resolves to 64b9edbcb; at the merge base the build line did not contain copymonaco, only 547b702f1 (one parent of the merge) added it, and 26.4 never modified it — so a clean 3-way merge should have brought it through. The deletion was a manual resolution mistake.

main is unaffected. Local builds done from main produce the Monaco tree correctly, which is why the regression was not caught before release.

Impact

Air-gapped/offline customers and any deployment that consumes the release zip — Monaco-backed editors are broken on v26.4.6 and v26.4.7. Workaround given to users: extract Monaco from node_modules/monaco-editor/min/vs/ and drop into resources/monaco/vs/ of the deployed webui.

Fix

Restore the two lines in root package.json on the 26.4 branch (effectively cherry-picking only the package.json hunk of 547b702f1):

  1. In scripts.build, re-insert && pnpm run copymonaco between copyconfig and tsc.
  2. Re-add "copymonaco": "mkdir -p build/web/resources/monaco/vs && cp -R react/node_modules/monaco-editor/min/vs/. build/web/resources/monaco/vs/" under scripts.

Then cut a v26.4.8 patch release.

Verification after fix

  • git show <new-26.4-tip>:package.json | grep monaco shows both lines.
  • After make bundle on 26.4, the produced zip contains resources/monaco/vs/loader.js and the language sub-trees.
  • VFolder file editor and Theme JSON config modal load with no 404 on /resources/monaco/vs/*.

Follow-up

Consider adding a CI guard in the build_web job that fails the build if build/web/resources/monaco/vs/loader.js is absent — the failure mode here was silent (build succeeded, only the runtime broke), and a one-line existence check would have caught it.

Captured while working on branch: worktree-wise-scribbling-goose

JIRA Issue: FR-2853

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions