Skip to content

web/elements: replace CodeMirror with Monaco in the code editor - #27407

Open
GirlBossRush wants to merge 1 commit into
mainfrom
web/code-editor-monaco
Open

GirlBossRush wants to merge 1 commit into
mainfrom
web/code-editor-monaco

Conversation

@GirlBossRush

@GirlBossRush GirlBossRush commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Details

This PR replaces CodeMirror with Monaco, allowing for some advanced editor features such as language servers, IntelliSense, and inline JSON and YAML schema validation. Like the original CodeMirror engine, modules are not loaded until the <ak-code-editor> element is connected to the DOM.

  • Fixed an issue where readonly was not applied to CodeMirror.
  • Add multicursor, clipboard, context menu, go to line and occurrence highlights.

See #27408 for CSS support.

@GirlBossRush
GirlBossRush added this pull request to stack #27412 November 2, 2026 03:21
@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 182252a
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6aeb65f2e7d1d5ea89863ffb
😎 Deploy Preview https://deploy-preview-27407--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 182252a
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6aeb65f23e70b1d48208ae8f
😎 Deploy Preview https://deploy-preview-27407--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.99%. Comparing base (7961cc5) to head (e1669e3).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27407      +/-   ##
==========================================
+ Coverage   92.53%   92.99%   +0.46%     
==========================================
  Files        1227     1227              
  Lines       85319    85319              
  Branches     4894     4894              
==========================================
+ Hits        78948    79341     +393     
+ Misses       6284     5891     -393     
  Partials       87       87              
Flag Coverage Δ
conformance 30.55% <ø> (+0.12%) ⬆️
e2e 35.28% <ø> (?)
integration 28.02% <ø> (+<0.01%) ⬆️
rust 51.12% <ø> (ø)
unit 94.52% <ø> (ø)
unit-migrate 94.53% <ø> (+6.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Playwright e2e

Download this run's HTML report and traces, then open the report:

gh run download 41881006972 -D playwright-artifacts
npx playwright show-report playwright-artifacts/playwright-report

Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-e1669e36856e186b94f32bbb5fab08fda6d966f5
# Distroless image: AUTHENTIK_TAG=gh-e1669e36856e186b94f32bbb5fab08fda6d966f5-distroless
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-e1669e36856e186b94f32bbb5fab08fda6d966f5
        # Distroless image: tag: gh-e1669e36856e186b94f32bbb5fab08fda6d966f5-distroless

Afterwards, run the upgrade commands from the latest release notes.

@GirlBossRush GirlBossRush self-assigned this Nov 2, 2026
@GirlBossRush GirlBossRush added the area:frontend Features or issues related to the browser, TypeScript, Node.js, etc label Nov 2, 2026
@GirlBossRush
GirlBossRush marked this pull request as ready for review November 2, 2026 03:39
@GirlBossRush
GirlBossRush requested a review from a team as a code owner November 2, 2026 03:39
@GirlBossRush
GirlBossRush force-pushed the web/code-editor-monaco branch from 78ca212 to 65e7894 Compare November 2, 2026 04:02
@GirlBossRush
GirlBossRush force-pushed the web/code-editor-monaco branch from 65e7894 to 182252a Compare November 4, 2026 17:05
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Dependency Review

The following issues were found:
  • ❌ 1 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses.
See the Details below.

Vulnerabilities

web/pnpm-lock.yaml

NameVersionVulnerabilitySeverity
dompurify3.4.15DOMPurify SAFE_FOR_TEMPLATES bypass: split template expressions survive in attached shadow root content on DOM output modescritical
DOMPurify IN_PLACE: hook that removes a parent or sibling leaves the detached subtree's event handlers armed (incomplete fix for GHSA-p98j-92pf-mc4p)high
Only included vulnerabilities with severity high or higher.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/dompurify 3.4.15 🟢 9.8
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Dependency-Update-Tool🟢 10update tool detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 10all dependencies are pinned
CII-Best-Practices🟢 7badge detected: Silver
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 10SAST tool is run on all commits
Signed-Releases🟢 105 out of the last 5 releases have a total of 10 signed artifacts.
License🟢 10license file detected
Fuzzing🟢 10project is fuzzed
Branch-Protection🟢 8branch protection is not maximal on development and all release branches
CI-Tests🟢 1030 out of 30 merged PRs checked by a CI test -- score normalized to 10
Contributors🟢 10project has 42 contributing companies or organizations
npm/marked 14.0.0 🟢 7.4
Details
CheckScoreReason
Code-Review🟢 7Found 18/25 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Security-Policy🟢 10security policy file detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 9license file detected
Fuzzing⚠️ 0project is not fuzzed
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Packaging🟢 10packaging workflow detected
npm/monaco-editor 0.57.0 🟢 7.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) out of 30 and 1 issue activity out of 30 found in the last 90 days -- score normalized to 10
Code-Review🟢 10all last 30 commits are reviewed through GitHub
CII-Best-Practices⚠️ 0no badge detected
Vulnerabilities🟢 10no vulnerabilities detected
Signed-Releases⚠️ -1no releases found
Branch-Protection🟢 8branch protection is not maximal on development and all release branches
Security-Policy🟢 10security policy file detected
License🟢 10license file detected
Packaging⚠️ -1no published package detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0non read-only tokens detected in GitHub workflows
Binary-Artifacts🟢 10no binaries found in the repo
Fuzzing⚠️ 0project is not fuzzed
Dependency-Update-Tool🟢 10update tool detected
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7

Scanned Files

  • web/pnpm-lock.yaml

Base automatically changed from web/code-editor-rename to main November 4, 2026 17:50
- Replace CodeMirror with Monaco, imported once the editor is shown
- Pick Monaco's editing features instead of loading all of them
- Add the One Dark theme, vendored from azemoh/vscode-onedark (MIT)
- Hold the field's height until the editor loads
- Follow changes to `mode`, `readonly` and `disabled`
- Honor `readonly`, which the CodeMirror element ignored

Co-authored-by: Dominic R <[email protected]>
@GirlBossRush
GirlBossRush force-pushed the web/code-editor-monaco branch from 182252a to e1669e3 Compare November 4, 2026 17:50
@GirlBossRush GirlBossRush added this to the Release 2027.2.0 milestone Nov 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Features or issues related to the browser, TypeScript, Node.js, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant