Skip to content

Fix drawing font loading after Monaco initializes - #148

Merged
sarthakagrawal927 merged 2 commits into
mainfrom
agent/swe-canvas-font-20261022
Oct 22, 2026
Merged

sarthakagrawal927 merged 2 commits into
mainfrom
agent/swe-canvas-font-20261022

Conversation

@sarthakagrawal927

@sarthakagrawal927 sarthakagrawal927 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Opening Draw after Monaco loads can crash Excalidraw font loading with TypeError: Ii.default is not a constructor. The bundled es6-promise-pool UMD wrapper chooses Monaco’s global AMD loader before its own CommonJS export. Pin a small package patch that prefers the CommonJS module when present, while retaining standalone AMD and browser-global fallbacks. No dependency version or application layout changes.

The regression executes the installed dependency source with both loaders: it fails on the original package and passes with the patch, including actual queued work and both fallback cases. Frozen install, typecheck and compiled390/768/1440 checks pass: Monaco AMD remains active, Excalifont loads, drawing text persists in isolated browser storage, and the drawing reopens without page errors or document overflow. Screenshots reviewed; no production data or inference calls. Normal CI remains required.

Release prerequisite: constrain existing DOMPurify instances to3.4.17, the upstream fix for GHSA-cg2g-xh64-v4q7 and GHSA-mrv2-3pqr-j5jr. The affected lockfile paths are PostHog, Excalidraw/Mermaid and Monaco. No new dependency, audit exception or policy threshold change. This qualifies the installed/bundled dependency graph; it does not certify separately CDN-hosted third-party bundles.

@sarthakagrawal927
sarthakagrawal927 merged commit 5e0c57e into main Oct 22, 2026
1 check passed
@sarthakagrawal927
sarthakagrawal927 deleted the agent/swe-canvas-font-20261022 branch October 25, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant