microsoft / microsoft/vscode-documentdb

Upgrade Monaco Editor to 0.56.0 when released

Open
#469 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dependencies
Dominant language
TypeScript
Stars
31
Forks
22
Avg merge
2d 20h
Merged PRs (30d)
21

Description

Summary

We've temporarily downgraded Monaco Editor from ~0.54.0 to ~0.52.2 to fix a keyboard paste regression. This issue tracks upgrading to Monaco 0.56.0 once it's released, as it should contain fixes for multiple clipboard-related bugs.

Current Status

  • Installed version: ~0.52.2 (downgraded)
  • Previous version: ~0.54.0 (broken keyboard paste)
  • Target version: ~0.56.0 (once stable)

Why We Downgraded

Users reported that Ctrl+V / Cmd+V keyboard paste stopped working in all Monaco editors (Query Editor, Document View, etc.), while:

  • Copy (Ctrl+C) still worked
  • Context menu paste (right-click → Paste) still worked

This exact symptom was also reported and fixed in vscode-cosmosdb:

The root cause of the keyboard paste regression in 0.53.x/0.54.x hasn't been publicly identified in a specific Monaco issue, but the empirical fix (downgrading to 0.52.x) resolved the problem in both vscode-cosmosdb and our extension.

Why We're Targeting 0.56.0

Monaco 0.55.x has additional issues that make it unsuitable:

1. Context Menu Paste Bug (Fixed in 0.56.0-dev)

Issue: microsoft/monaco-editor#5079 - "Paste not working with right click"

In Monaco 0.54.0+, the context menu "Paste" action fails silently. The root cause was identified:

The PasteAction implementation attempts to retrieve IProductService which is not registered in the Monaco Editor Standalone environment. This causes an "Unknown service" error that halts execution before the actual paste logic runs.

Fix: microsoft/vscode#283590 - Merged December 15, 2025

This fix IS included in 0.56.0-dev builds (builds after Dec 15, 2025)

2. Breaking API Changes in 0.55.0

Monaco 0.55.0 introduced breaking changes that affect our codebase:

  • monaco.languages.json → moved to monaco.json
  • monaco.languages.typescript → moved to monaco.typescript
  • monaco.languages.css → moved to monaco.css
  • monaco.languages.html → moved to monaco.html

Our code uses monaco.languages.json.jsonDefaults.setDiagnosticsOptions() which no longer works in 0.55.x when importing from monaco-editor/esm/vs/editor/editor.api.

Note: When upgrading to 0.56.0, we'll need to:

  1. Update imports to use monaco-editor or monaco-editor/esm/vs/editor/editor.main
  2. Update code to use monaco.json.jsonDefaults instead of monaco.languages.json.jsonDefaults

Timeline of Monaco Clipboard Issues

Version Keyboard Paste Context Menu Paste Notes
0.52.x ✅ Works ✅ Works Our current version
0.53.x ❌ Regression ✅ Works Unknown root cause
0.54.x ❌ Regression ✅ Works Same as 0.53.x
0.55.x ❌ Regression ❌ Bug #5079 Both broken
0.56.0 ❓ Needs testing ✅ Fixed #5079 fix merged

Action Items for 0.56.0 Upgrade

When Monaco 0.56.0 stable is released:

  1. Update package.json: "monaco-editor": "~0.56.0"
  2. Update imports from editor.api to editor.main (if needed)
  3. Update monaco.languages.json.jsonDefaultsmonaco.json.jsonDefaults in:
    • src/webviews/documentdb/collectionView/components/queryEditor/QueryEditor.tsx
  4. Test keyboard paste (Ctrl+V / Cmd+V) in all Monaco editors
  5. Test context menu paste (right-click → Paste)
  6. Test accessibility features (Tab navigation, Escape to exit)
  7. Update src/webviews/REACT_ARCHITECTURE_GUIDELINES.md documentation

Related Links

Our Investigation
  • This tracking issue
Monaco Issues
  • #5079 - Context menu paste bug (fixed Dec 2025)
  • #4402 - Platform detection bug (fixed in 0.48.0)
  • #4855 - Electron 34 paste issue (open)
Fixes
Resources

Dev Versions for Early Testing

If you want to test before 0.56.0 stable:

npm install monaco-editor@0.56.0-dev-20260128

Note: Dev versions are not recommended for production.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

When Monaco 0.56.0 is stable, start with package.json and src/webviews/documentdb/collectionView/components/queryEditor/QueryEditor.tsx, then review the listed Monaco import and API changes. Verify keyboard and context-menu paste, accessibility behavior, and the REACT_ARCHITECTURE_GUIDELINES.md update across the Monaco editors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.