UI: Use local Monaco editor module instead of CDN#66647
Open
parkhojeong wants to merge 8 commits into
Open
Conversation
2 tasks
potiuk
approved these changes
May 10, 2026
Member
potiuk
left a comment
There was a problem hiding this comment.
This code is now vendored in? If so -> information about it should be placed in approproate NOTICE File - detailing the verion and licence see Chakra and hue example in there.
Contributor
Author
Thanks for catching this! I added it to |
2 tasks
Contributor
Author
bbovenzi
approved these changes
May 13, 2026
Member
|
@potiuk Could you review this again? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Environments without internet access could not load monaco
Repro
See a UI with Monaco, such as the Code tab in Dag details, without internet access.
Chrome: 2 options
https://cdn.jsdelivr.netdocument: https://developer.chrome.com/docs/devtools/request-conditions
Root Cause
monaco was already present in the dependency tree through @monaco-editor/react, but Airflow did not
import or configure it directly. As a result, the Monaco loader fell back to its default CDN path at runtime.
Fix
This change wires the existing Monaco package into the UI bundle explicitly and declares it as a direct
dependency because the Airflow UI now imports it directly.
Lazy loading was also applied to Monaco package.
The existing Monaco runtime is loaded from CDN at version 0.52.2, so this PR keeps the bundled dependency aligned with that version. Any Monaco version upgrade should be handled in a separate PR.
Test code Fixed(Minor)
The selector for line number elements in the Dag code page test was too broad. This updates it to target the actual Monaco line numbers. In Firefox E2E,
.monaco-editor .line-numbersalso matches a hiddentextAreaCoverelement before the visible line numbers.You can use
console.log(await this.page.locator(".monaco-editor").evaluate((el) => el.outerHTML));afterawait this.waitForCodeReady();browser monaco dom structure
firefox e2e dom structure
Was generative AI tooling used to co-author this PR?