Skip to content

style(editor): solid VSCode-style CodeMirror theme (no transparent/modal background) #98

Closed

Description

@falbany

Follow-up to the YAML config editor (#95), identified in the post-implementation review (brainstorm 2026-11-04).

Problem

The CodeMirror theme (configEditorTheme in src/profiles/web/src/components/ConfigEditorModal.tsx) sets backgroundColor: "transparent", so the editor surface is the modal's frosted-glass background. The visual result is not modern: no solid editor canvas, selection color is barely visible (--app-hover), active line too subtle (--app-elevated), and the whole area does not match VSCode-style editor standards the user expects.

Proposed solution

  • Add dedicated CSS tokens to src/profiles/web/src/index.css, defined per data-theme (light and dark), following VSCode dark conventions as the reference:
    • --app-editor-bg — solid editor canvas (dark ≈ #1e1e1e, light ≈ near-white)
    • --app-editor-gutter-bg — slightly offset from the canvas
    • --app-editor-active-line — visible current-line highlight
    • --app-editor-selection — selection fill (indigo at low alpha, clearly visible)
    • --app-editor-border — card/inner borders used by issue Feat/configurable columns refactor #3's card and the gutter separator
  • Rebuild configEditorTheme with those tokens:
    • solid background (no transparent anywhere in the editor theme),
    • opaque gutter with subtle separators (left/right 1px --app-editor-border),
    • visible selection + selection-matching styles,
    • clear active-line highlight,
    • matching-bracket colors (basicSetup already ships bracketMatching(), give it readable colors),
    • keep the indigo caret and JetBrains Mono stack; keep automatic light/dark following via tokens only (zero prefers-color-scheme code).

Acceptance criteria

  • Editor background is solid and visually distinct from the modal chrome and from the gutter.
  • The editor follows the light/dark switch automatically, like every other surface.
  • Gutter line numbers meet WCAG contrast against their background.
  • No transparent surface remains in the theme object.
  • Font/spacing unchanged unless needed for readability.

Tests

  • Vitest smoke test in ConfigEditorModal.test.tsx: the mounted view exposes .cm-editor / .cm-gutters and their computed background is token-backed (not transparent).
  • Visual check on both themes (screenshot-based review sufficient).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrontend

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions