Skip to content

feat(ui): migrate the code editors from CodeMirror 5 to CodeMirror 6 - #32069

Merged
harsh-vador merged 25 commits into
mainfrom
feat/codemirror-v6
Sep 22, 2026
Merged

harsh-vador merged 25 commits into
mainfrom
feat/codemirror-v6

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #27953

What

Replaces CodeMirror 5 / react-codemirror2 with CodeMirror 6 (@uiw/react-codemirror) in the two components that actually construct an editor — SchemaEditor and CodeEditor.

SchemaEditorProps is deliberately unchanged, so none of the ~55 call sites are touched. The CodeMirror 5 option bag they already pass is translated into v6 extensions by a new adapter. That is the whole regression-control story here: a revert is a dependency revert, not a 55-file revert.

Commits

  1. feat(ui): add CodeMirror 6 deps and a v5-option adapter — deps, resolutions pin, getCodeMirrorLanguage / getCodeMirrorExtensions, unit tests. Nothing consumes it, so behaviour is unchanged.
  2. feat(ui): move the editors to CodeMirror 6 — the switch, CSS, Playwright, and removal of the v5 deps.

Notable pieces

  • resolutions pin on @codemirror/state and @codemirror/view. A second copy of either makes every extension value from the other copy unrecognized at runtime.
  • useCodeMirrorEditor holds the buffer, the extension set, and the rules for when an incoming value may replace what the user is looking at; both editors are now thin.
  • New extensions prop so a call site can pass completion sources and update listeners instead of reaching into the DOM for the editor instance.
  • CSMode.YAML gets highlighting for the first time — the v5 yaml mode was never imported, so YAML has been rendering as plain text.
  • CSMode.CLIKE is only ever Java (Language.Java), so it uses the legacy stream parser.
  • Default height restored. v5 shipped height: 300px in its own stylesheet; v6 grows with its content, so without this every editor lacking an explicit height would be unbounded. The existing per-call-site overrides still win as they always did.
  • v6's dotted focus outline is recoloured, not removed. The editor is what keyboard users land on.
  • playwright/utils/codeEditor.ts centralises the class names; 12 suites now go through it. Worth knowing for future tests: v6 renders only the visible lines, so counting lines is safe only on short documents.

Behaviour changes (both deliberate)

  1. The buffer is no longer reformatted while typing. That reformat is what moved the caret after an auto-closed bracket. onChange still reports the formatted value, so parents see exactly what they saw before. The uncontrolled prop that existed to work around this is now redundant — kept and ignored.
  2. The readOnly prop is now honoured. It was accepted but silently dropped under v5. The call sites that pass it — CodeWidget, markdown code blocks, and a disabled ManifestJsonWidget — all mean it.

refreshEditor is likewise kept and ignored: v6 measures itself when its container becomes visible or changes size.

dark-all light-all app-light-sparql-playground app-dark-sparql-playground app-light-add-metric app-dark-add-metric app-light-queries app-dark-queries app-light-add-query app-dark-add-query dark-9-height-rule-via-classname-metricexpres app-dark-sparql-playground-editor app-dark-sparql-playground-selected app-light-sparql-playground-selected app-light-sparql-playground-editor dark-10-height-rule-via-editorclass-storedproc light-9-height-rule-via-classname-metricexpres light-10-height-rule-via-editorclass-storedproc dark-7-read-only-via-options-readonly-nocurso light-7-read-only-via-options-readonly-nocurso dark-1-sql-line-numbers-fold-gutter-active-li dark-11-codeeditor-no-line-numbers-gutters-hid dark-selection light-11-codeeditor-no-line-numbers-gutters-hid dark-3-yaml-highlighted-for-the-first-time-v5 light-selection light-1-sql-line-numbers-fold-gutter-active-li light-3-yaml-highlighted-for-the-first-time-v5 dark-2-json-javascript-mode-with-json-true-au dark-6-sparql-legacy-stream-parser light-2-json-javascript-mode-with-json-true-au light-6-sparql-legacy-stream-parser dark-4-python light-4-python dark-5-clike-java-legacy-stream-parser light-5-clike-java-legacy-stream-parser dark-8-placeholder-on-an-empty-buffer-manifes light-8-placeholder-on-an-empty-buffer-manifes app-light-queries-editor app-light-queries-selected app-dark-queries-editor app-dark-queries-selected app-light-add-query-selected Screenshot 2026-09-21 at 5 11 02 PM Screenshot 2026-09-21 at 5 12 13 PM Screenshot 2026-09-21 at 5 14 17 PM Screenshot 2026-09-21 at 5 14 26 PM

Verification

  • jest: 1225 suites / 14523 tests pass (2 suites skipped, pre-existing).
  • tsc and eslint clean on every file touched.
  • Playwright suites were migrated but not executed here — they need a running stack.

Follow-up

The Collate side (SQL Studio autocomplete rebuilt on @codemirror/autocomplete via the new extensions prop, its stylesheets, and its Playwright selectors) lands separately and depends on this merging first.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no outstanding correctness, security, or repository-rule violations were identified.

Findings

  1. P1 External reset stays stale ▶
Summary

Migrates the shared schema and code editors from CodeMirror 5 to CodeMirror 6 while preserving the existing component API.

  • Adds an adapter that translates legacy editor options into CodeMirror 6 extensions and language support.
  • Centralizes controlled-buffer synchronization, deferred external updates, read-only handling, and formatting behavior in useCodeMirrorEditor.
  • Updates editor styling and Playwright utilities/selectors for CodeMirror 6’s DOM structure.
  • Removes CodeMirror 5 dependencies and pins shared CodeMirror state/view packages to avoid incompatible duplicate instances.
  • The previously reported synchronization defects are fixed in the current hook implementation.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  P[SchemaEditor / CodeEditor props] --> H[useCodeMirrorEditor]
  H --> A[Legacy option adapter]
  A --> E[CodeMirror 6 extensions]
  H --> B[Internal editor buffer]
  B --> C[CodeMirror 6 editor]
  C -->|user edit| F[Optional formatting]
  F --> O[Parent onChange]
  P -->|external value| S{Focused and editable?}
  S -->|No| B
  S -->|Yes| D[Defer until blur]
  D --> B
Loading

Reviews (15) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

harsh-vador and others added 2 commits August 25, 2026 23:45
Groundwork for replacing CodeMirror 5 / react-codemirror2. Nothing consumes
this yet, so behaviour is unchanged.

- Add the @codemirror/* v6 packages and @uiw/react-codemirror. CodeMirror 5
  stays installed until SchemaEditor and CodeEditor are switched over.
- Pin @codemirror/state and @codemirror/view in resolutions: a second copy of
  either makes every extension value from the other copy unrecognized at
  runtime.
- getCodeMirrorLanguage maps the existing `mode` prop to a v6 language.
  CSMode.CLIKE is only ever Java (Language.Java), so it uses the legacy stream
  parser. CSMode.YAML gets highlighting for the first time — the v5 yaml mode
  was never imported.
- getCodeMirrorExtensions translates the v5 option bag the ~55 call sites
  already pass, so none of them need to change. `gutters` and `theme` have no
  v6 equivalent and are ignored.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Replaces CodeMirror 5 / react-codemirror2 with @uiw/react-codemirror in
SchemaEditor and CodeEditor. SchemaEditorProps is unchanged, so the ~55 call
sites are untouched; the v5 option bag they pass is translated to v6 extensions
by getCodeMirrorExtensions.

- Extract the shared buffer/extension/value-sync logic into useCodeMirrorEditor
  so both editors stay thin.
- Add an `extensions` prop so a call site can supply completion sources and
  update listeners instead of reaching into the DOM for the editor instance.
- Rename `.CodeMirror*` to the v6 `.cm-*` classes across 12 stylesheets, and
  restore the 300px default height v5 shipped in its own stylesheet (v6 grows
  with its content, so every editor without an explicit height would otherwise
  be unbounded). v6's dotted focus outline is recoloured, not removed — the
  editor is what keyboard users land on.
- Add playwright/utils/codeEditor.ts and route the 12 suites that used
  `.CodeMirror` selectors through it. Note that v6 only renders visible lines,
  so line counting is only safe on short documents.
- Drop the codemirror, react-codemirror2 and @types/codemirror dependencies.

Two behaviour changes, both deliberate:

- The buffer is no longer reformatted while typing, which is what moved the
  caret after an auto-closed bracket. onChange still reports the formatted
  value, so parents see what they always did, and the `uncontrolled` prop that
  existed to work around this is now redundant (kept, ignored).
- The `readOnly` prop was accepted but never applied under v5. It is honoured
  now: CodeWidget, markdown code blocks and a disabled ManifestJsonWidget all
  pass it meaning it.

`refreshEditor` is likewise kept and ignored — v6 measures itself when its
container becomes visible or resizes.

Verified: 1225 jest suites / 14523 tests pass; tsc and eslint clean on every
file touched.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@harsh-vador harsh-vador added safe to test Add this label to run secure Github workflows on PRs and removed UI UI specific issues labels Aug 25, 2026
@harsh-vador harsh-vador self-assigned this Aug 25, 2026
Several read-only viewers pass `readOnly: 'nocursor'`, v5's spelling for
read-only *and* not focusable. Typing the option as a boolean made those call
sites a type error, and treating the string as a plain truthy readOnly left the
caret in an editor that never had one.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions github-actions Bot added the UI UI specific issues label Aug 25, 2026
harsh-vador and others added 3 commits August 26, 2026 00:17
An external value that arrived while the editor was focused was stashed and
applied on blur, but a subsequent keystroke did not clear it: the parent echoing
that keystroke back hit the early return, so blur restored the older value and
silently dropped everything typed after it. A fresh edit now discards the
pending value.

Read-only editors also no longer wait for blur. They stay focusable under
CodeMirror 6 (EditorState.readOnly rather than editable: false), and having no
edit to protect they would otherwise show stale content until focus left.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
jsx-a11y/control-has-associated-label on the mock's bare input.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 72%
72.44% (103463/142817) 57.55% (63022/109498) 58.6% (20621/35189)

harsh-vador and others added 6 commits August 26, 2026 19:49
A focused editor with no local edit that saw A, then B, then A again kept B
queued: the second A matched the synced value and returned early without
clearing it, so blur applied the obsolete B and left the editor showing
something the parent no longer held. Returning to the synced value now discards
the pending update.

The added case fails without this change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Conflicts were the three spec files where main's new fixtures import landed
beside this branch's codeEditor helper import — both sides kept.

main also added two CodeMirror 5 consumers while this branch was open, migrated
here to keep the removal of the v5 packages honest:

- The SPARQL consoles (Ontology Studio and the standalone console) imported the
  v5 addons, stylesheet and sparql mode directly. CSMode.SPARQL now maps to the
  legacy stream parser, like CSMode.CLIKE does for Java, and the side-effect
  imports are gone.
- OntologyStudioQueryConsole.css targeted the v5 DOM; renamed to the v6 classes.
  The purple PREFIX tint moves from `.CodeMirror-code > div` to
  `.cm-content > .cm-line`.
- OntologyQueryRdf.spec.ts reached through the DOM for the editor instance
  (`element.CodeMirror.setValue`), which v6 does not expose. It now goes through
  the shared fillCodeEditor helper.

Verified: 1412 jest suites / 16159 tests pass; tsc and eslint clean on the app
and playwright projects for every file touched.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Two om-playwright/no-positional-locator errors, both introduced by this branch:

- The shared helper resolved `.cm-content` with `.first()`. CodeMirror 6 renders
  one contenteditable per editor, so a scope holding a single editor resolves
  without picking by position; call sites showing more than one editor pass a
  narrower scope.
- Permission.spec added a `.first()` that the CodeMirror 5 line selector it
  replaced never had.

Also prunes the suppression baseline. Replacing the v5 selectors fixed four
entries' worth of positional locators (MetricCustomUnitFlow, CustomProperties,
customProperty, metric), and leaving them listed fails the guardrail as stale.

Verified: yarn lint:playwright reports 0 errors and no stale suppressions, the
generated rule table is current, and the eslint rule unit tests pass.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@uiw/react-codemirror renders a wrapper div around the editor, so the editor is
a direct child of the element carrying `editorClass` but a grandchild of the one
carrying `className`. The container height rules were left as `> .cm-editor`,
which only covers the first case — CodeMirror 5 needed two selectors for this
and I dropped the second (`> .react-codemirror2 > .CodeMirror`) as dead.

Consequence: any call site passing the class through `className` lost its
height. MetricExpression passes `full-screen-editor-height` that way, so the
metric expression editor fell back to the 300px default.

Descendant selectors cover both paths with one rule. Verified in a browser: the
className and editorClass paths now both resolve to calc(100vh - 250px), and
editors without a height rule keep the 300px default.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
harsh-vador and others added 4 commits September 7, 2026 18:17
Ant Design injects a global `::selection { color: #fff }`. CodeMirror 5 never
felt it: its visible text is display-only, with the real selection living in an
offscreen textarea. CodeMirror 6 selects the content element itself, so that
white text landed on v6's pale drawn selection band and the selected line became
unreadable.

Scoped to `.cm-editor`, so the app's selection colour is untouched everywhere
else. `inherit` does not work here — browsers chain ::selection inheritance
through the ancestors' ::selection colour, which is the white being overridden —
so the text colour is pinned to the editor's own token.

Also drops `codemirror` from optimizeDeps.include: it is no longer a direct
dependency, so vite was force-pre-bundling the v6 meta-package alongside the
antlr4 entries, which is how a dev server ends up throwing
`require_Utils is not a function` from an unrelated module.

Verified in a browser against the SPARQL console: selection is dark text on the
pale band, and `body` selection is still white on brand blue.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The corpus test pins the suppression totals exactly, and replacing the
CodeMirror 5 selectors took six no-positional-locator suppressions with them
(MetricCustomUnitFlow, CustomProperties, customProperty, metric). The baseline
was pruned in an earlier commit but this recorded count was not lowered to
match, so the test failed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Conflicts, and the two that were not mechanical:

- corpus.test.mjs — main's recorded suppression totals, with
  no-positional-locator lowered 1202 -> 1196 for the six this PR removes.
- code-mirror.less / CodeMirror.utils.ts — main added a CodeMirror 5 dark
  theme while this PR was open. Its chrome rules port to the v6 class names,
  but v6 generates its own class names for highlighted tokens, so restyling
  `.cm-keyword` & co. from a `.dark-mode` block cannot work. The hues move into
  CSS variables consumed by a HighlightStyle, which keeps main's dark-mode
  colours and serves both themes from one style.

Also: main's new OntologyExplorerPage integration test mocked react-codemirror2,
which this PR removes — repointed at the v6 wrapper. And the
@codemirror/state / view resolutions move from exact pins to `^6`: main's tree
now wants 6.7.5, and pinning 6.7.1 split the install into two copies, which is
the duplicate-instance failure the pin exists to prevent.

Verified: 1574 jest suites / 18171 tests pass, the guardrail rule tests and
rule table are current, and eslint reports no errors under playwright/.

Co-Authored-By: Claude Opus 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 796 → 797
- 1 added, 0 removed, 0 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/playwright/utils/codeEditor.ts

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 9 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 9 warning(s) across 1 changed file(s).

Count Rule
9 react-hooks/exhaustive-deps
All findings
Location Rule Message
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:135:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:152:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:399:5 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'onVisibilityChange', 't', and 'tableId'. Either include them or remove the dependency array. If 'onVisibilityC
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:406:6 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'onVisibilityChange' and 'updateInitialConfig'. Either include them or remove the dependency array. If 'onVisib
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:413:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'handleStateChange'. Either include it or remove the dependency array.
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:421:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'handleStateChange'. Either include it or remove the dependency array.
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:428:6 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'handleStateChange'. Either include it or remove the dependency array.
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:453:5 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'form' and 'handleStateChange'. Either include them or remove the dependency array.
🟡 src/components/Database/Profiler/TableProfiler/ProfilerSettingsModal/ProfilerSettingsModal.tsx:473:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'fetchProfileConfig'. Either include it or remove the dependency array.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

harsh-vador and others added 4 commits September 21, 2026 15:12
`@lezer/highlight` belongs after the `@codemirror/*` group, and the named
members of the language import sort differently once HighlightStyle joins them.
eslint and prettier were both happy; this is the organise-imports step.

Co-Authored-By: Claude Opus 5 <[email protected]>
Two faults, both found by measuring the running app rather than the harness:

- The syntax hues referenced `--color-purple-300` and friends, which are not
  defined on the document in the app that mounts these editors. An undefined
  var makes the whole custom property invalid, so every token lost its colour
  and dark mode rendered flat grey text. The hues are literals now, with the
  token as a fallback where one resolves.
- The selection band stayed CodeMirror's light lavender. Its own rule is
  `.<generated>.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground`,
  which tied on specificity with the shorter selector and won on order, since
  that stylesheet is injected at runtime. Matching its depth takes the tie.
  White selected text on the light band was unreadable; the band is dark now.

Verified in the browser on both themes: keyword resolves #708 light /
#bdb4fe dark, and the selection band is rgb(215,212,240) light /
rgb(62,68,86) dark with matching text colours.

Co-Authored-By: Claude Opus 5 <[email protected]>
# Conflicts:
#	openmetadata-ui/src/main/resources/ui/playwright/eslint-rules/tests/corpus.test.mjs
@gitar-bot

gitar-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 4 closed / 4 findings

🟡 Medium risk · Shared editor runtime and dependency migration changes behavior across many UI call sites.

Migrates code editors from CodeMirror 5 to CodeMirror 6 while preserving the existing SchemaEditor and CodeEditor API — none of the ~55 call sites require changes. The v5 option bag is adapted to v6 extensions by useCodeMirrorEditor, which centralizes buffer synchronization, focus handling, and external value updates. Adds YAML syntax highlighting for the first time, restores default editor height, and now honours the readOnly prop. Resolved controlled-value synchronization issues including blur discards of user edits and external value reflection in focused read-only editors. No issues remain.

✅ 4 closed
✅ Bug: Blur discards user edits typed after a mid-edit external value

📄 openmetadata-ui/src/main/resources/ui/src/hooks/useCodeMirrorEditor.ts:83-97 📄 openmetadata-ui/src/main/resources/ui/src/hooks/useCodeMirrorEditor.ts:103-117
When an external value arrives while the editor is focused it is stashed in pendingExternalRef and applied on blur. But handleChange (user typing) never clears pendingExternalRef, and the parent echoing the user's own edit back hits the nextValue === lastEmittedRef.current early-return, so the stale pending value survives. Sequence: user focuses and edits, an async external value lands (pending set), user keeps typing, then blurs — handleBlur overwrites the buffer with the old external value, silently throwing away everything the user typed afterward. Clear the pending update as soon as the user edits so their input wins.

✅ Edge Case: Focused read-only editor won't reflect external value until blur

📄 openmetadata-ui/src/main/resources/ui/src/hooks/useCodeMirrorEditor.ts:103-117
The external-value sync effect defers any update while view.hasFocus is true, applying it only on blur. CodeMirror 6 read-only editors remain focusable/in the tab order (the adapter intentionally uses EditorState.readOnly rather than editable.of(false)), so a read-only viewer that a user has clicked into will display stale content when its value prop changes until focus leaves. Consider applying updates immediately when the editor is read-only, since deferral only exists to protect an in-progress edit.

✅ Quality: Duplicate import from './codeEditor'

📄 openmetadata-ui/src/main/resources/ui/playwright/utils/customProperty.ts:39-40
Two separate import ... from './codeEditor' statements were added adjacently (lines 39-40); the new typeInCodeEditor import should be merged into the existing line. Beyond the redundancy, this can trip eslint's no-duplicate-imports/import/no-duplicates rule. Combine into one statement: import { CODE_EDITOR, CODE_EDITOR_CONTENT, typeInCodeEditor } from './codeEditor';.

✅ Quality: Entire styles tree accidentally duplicated into nested wrong path

📄 openmetadata-ui/src/main/resources/ui/src/openmetadata-ui/src/styles/index.ts:1-15 📄 openmetadata-ui/src/main/resources/ui/src/openmetadata-ui/src/styles/tokens.css:1 📄 openmetadata-ui/src/main/resources/ui/src/openmetadata-ui/src/styles/app.less:1
This commit's only intended change is the ::selection block added to src/styles/components/code-mirror.less. It also committed a full copy of the styles directory (48 files: app.less, tokens.css, temp.css, variables.less, index.ts, tailwind.css, fonts, components/*, etc.) under a wrong nested path src/main/resources/ui/src/openmetadata-ui/src/styles/. I verified nothing imports this path (grep for openmetadata-ui/src/styles returns no references), so these are dead, unreferenced duplicates that bloat the repo, duplicate :root token/@font-face declarations, and will confuse future maintenance. Delete the entire src/openmetadata-ui/ subtree and keep only the one-line code-mirror.less edit at the canonical src/styles/ location.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codemirror version migration

3 participants