Skip to content

Support Monaco Editor 0.56 public exports - #70937

Merged
bbovenzi merged 2 commits into
apache:mainfrom
szzhoujiarui:260802-fix-monaco-public-imports
Aug 6, 2026
Merged

Support Monaco Editor 0.56 public exports#70937
bbovenzi merged 2 commits into
apache:mainfrom
szzhoujiarui:260802-fix-monaco-public-imports

Conversation

@szzhoujiarui

Copy link
Copy Markdown
Contributor

Upgrade Monaco Editor to 0.56 and replace private esm/vs imports with the package's public exports.

Register folding, find, codicon, and JSON features through public entry points. Retain Airflow's explicit registration of its patched Python grammar so f-string tokenization remains intact.

This keeps Monaco workers and language features compatible with 0.56 and avoids private module paths that no longer resolve in Vite.

closes: #70929

Testing

  • CI=true corepack pnpm@10.25.0 install --frozen-lockfile
  • corepack pnpm@10.25.0 test — 102 files and 777 tests passed
  • corepack pnpm@10.25.0 exec vitest run src/components/MonacoEditor/pythonFStrings.test.ts — 12 tests passed
  • corepack pnpm@10.25.0 lint
  • corepack pnpm@10.25.0 build
  • Pre-commit hooks for all changed files
  • breeze ci selective-check --commit-ref 421c0c9
  • breeze testing ui-e2e-tests --test-pattern "dag-code-tab.spec.ts" --workers 1 — blocked during environment checks because Docker is unavailable in the current environment

Was generative AI tooling used to co-author this PR?
  • Yes — MonkeyCode (GPT-5.6 Sol)

Generated-by: MonkeyCode (GPT-5.6 Sol) following the guidelines


Drafted-by: MonkeyCode (GPT-5.6 Sol); reviewed by @szzhoujiarui before posting

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Aug 2, 2026
@boring-cyborg

boring-cyborg Bot commented Aug 2, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

Monaco 0.56 enforces its package exports, so private deep imports prevent the UI from linting and building after the dependency upgrade.
@szzhoujiarui
szzhoujiarui force-pushed the 260802-fix-monaco-public-imports branch from 3dd2332 to 7ca4d2a Compare August 5, 2026 03:46

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's please give this some manual testing to make sure we are importing everything correctly.

  • what does it look like when the Monaco Editor is loading?
  • does error highlighting show up when adding invalid json to the trigger dag -> advanced form?
  • Does python code in the dag code tab render correctly?

@szzhoujiarui

Copy link
Copy Markdown
Contributor Author

Verified the follow-up in commit 408cbd8 on WSL2:

  • Registered the public Monaco feature entry points for code actions, code lenses, drop/paste, inlay hints, and suggestions.
  • Confirmed the JSON editor loads and remains interactive (find and folding work).
  • Confirmed invalid JSON ({"enabled": tru}) shows a red diagnostic, displays the validation error, and disables the Trigger button.
  • Confirmed the DAG Code page correctly highlights a Python triple-quoted f-string and its {name} interpolation.
  • Confirmed the browser console shows none of the five previous Unknown service errors (ICodeLensCache, IInlayHintsCache, treeViewsDndService, ISuggestMemories, actionWidgetService).
  • Monaco Python f-string tests pass: 12/12.
  • Three adjacent UI test files pass: 33/33.
  • pnpm lint, the production build, and git diff --check pass.

The full UI suite consistently reaches 103-104 passing test files before a Vitest worker exits with a Node 22/libuv uv__stream_destroy assertion while unmocked MSW requests to 127.0.0.1:3000 fail with ECONNREFUSED. The targeted tests, adjacent tests, lint, build, and browser verification all pass.

@bbovenzi bbovenzi added this to the Airflow 3.3.2 milestone Aug 6, 2026
@bbovenzi bbovenzi added the backport-to-v3-3-test Backport to v3-3-test label Aug 6, 2026
@bbovenzi
bbovenzi merged commit b6e7c20 into apache:main Aug 6, 2026
5 checks passed
@boring-cyborg

boring-cyborg Bot commented Aug 6, 2026

Copy link
Copy Markdown

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

dabla pushed a commit to dabla/airflow that referenced this pull request Aug 14, 2026
* UI: Support Monaco Editor 0.56

Monaco 0.56 enforces its package exports, so private deep imports prevent the UI from linting and building after the dependency upgrade.

* UI: Register Monaco editor feature services

---------

Co-authored-by: szzhoujiarui <311234381+szzhoujiarui@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-3-test Backport to v3-3-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate UI's deep monaco-editor imports so it can move past 0.55.1

2 participants