Skip to content

fix: simplify monaco initialization#11

Merged
exKAZUu merged 1 commit intomainfrom
simplify-react-use-init
Apr 19, 2026
Merged

fix: simplify monaco initialization#11
exKAZUu merged 1 commit intomainfrom
simplify-react-use-init

Conversation

@exKAZUu
Copy link
Copy Markdown
Member

@exKAZUu exKAZUu commented Apr 19, 2026

Summary

  • Replace manual Monaco loader state/effect setup with a cached initialization promise consumed through React 19 use().
  • Keep Editor and DiffEditor loading behavior by wrapping their mounted implementations in Suspense fallbacks.
  • Make useMonaco hydration-safe for Next.js SSR and update the e2e probe and README guidance.

Why

  • React 19 is already the supported peer version, so the loader bridge can be simplified around use() instead of duplicating useState, useEffect, cancellation, and mounting flags.
  • The implementation keeps browser-only Monaco initialization out of server rendering to avoid document access during Next static generation.

Testing

  • yarn check-for-ai
  • yarn typecheck
  • yarn test:unit
  • yarn test:e2e:next

Co-authored-by: WillBooster (Codex CLI) <agent@willbooster.com>
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@exKAZUu exKAZUu changed the title refactor: simplify monaco initialization fix: simplify monaco initialization Apr 19, 2026
@exKAZUu exKAZUu enabled auto-merge (squash) April 19, 2026 01:24
@exKAZUu exKAZUu merged commit a9c985c into main Apr 19, 2026
9 checks passed
@exKAZUu exKAZUu deleted the simplify-react-use-init branch April 19, 2026 01:24
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