Skip to content

feat: Replace Settings code editor textarea with CodeMirror #905

@Aureliolo

Description

@Aureliolo

Context

Issue #784 specified CodeMirror as the code editor for the Settings page JSON/YAML view. The initial implementation in PR #902 used a plain <textarea> as a pragmatic starting point. This follow-up replaces it with CodeMirror for a proper editing experience.

Scope

  • Install CodeMirror 6 (@codemirror/view, @codemirror/state, @codemirror/lang-json, @codemirror/lang-yaml)
  • Replace the <textarea> in web/src/pages/settings/CodeEditorPanel.tsx with a CodeMirror editor
  • Add syntax highlighting for JSON and YAML
  • Add line numbers, bracket matching, and error highlighting
  • Ensure the editor respects the existing design tokens (colors, fonts, spacing)
  • Update Storybook story for CodeEditorPanel

Not in scope

  • Code folding, minimap, or other IDE-like features (keep it simple)

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowNice to have, can deferscope:smallLess than 1 day of worktype:featureNew feature implementationv0.5Minor version v0.5v0.5.0Patch release v0.5.0

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions