Skip to content

ui(editor): all actions in the header + move "Load config…" from the StatusBar into the editor #101

Closed

Description

@falbany

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

Problem

All content actions (New, Test, Revert, Save, Save As, Apply) sit in a separate toolbar row below the header — a second chrome band. Additionally, the only "Load a different .profiles file" entry point lives on the StatusBar; it belongs in the configuration editor, which is about configs.

Proposed solution

Header consolidation

  • Remove the toolbar row; render New / Test / Revert / Save / Save As / Apply (primary) plus the existing Open in OS and ✕ all in the header bar.
  • Keep the same enable/disable logic (toolbarDisabled, diskAnchored guard for Save/Open in OS, session-trial fallback for Ctrl/Cmd+S).
  • The "Unsaved changes" indicator moves to the status bar (separate issue); until that lands, keep it beside the header buttons.

Load config inside the editor

  • Add a "Load config file…" button in the editor header that raises the existing ConfigPickerModal from inside the editor.
  • Wiring: ConfigEditorModal gains an onLoadConfig?: () => void prop; App.tsx opens showConfigPicker while the editor stays mounted. When the picker finishes (onLoaded), the editor must refresh its content — e.g. a reloadKey: number prop that re-runs the load-on-open fetch, or reuse the Revert fetch path after the picker closes.
  • StatusBar: remove the "Load config…" button and the onLoadConfig prop; update every call site. The StatusBar "Config" button stays and opens the editor.

Consistency cleanup (small, ride-along)

  • ActionBar's onOpenConfig (src/profiles/web/src/App.tsx:1503) opens the config picker, while the StatusBar "Config" (App.tsx:1560) opens the editor — two buttons with the same label opening different targets. Align the targets or rename for clarity.

Acceptance criteria

  • Header carries every action; no standalone toolbar row remains.
  • Loading another config from inside the editor swaps the editor content (no stale text).
  • StatusBar no longer offers config loading; "Config" still opens the editor.
  • Keyboard shortcut Ctrl/Cmd+S still maps to Save / Apply-fallback after the refactor.

Tests

  • ConfigEditorModal.test.tsx: action buttons present in the header; "Load config file…" triggers the injected onLoadConfig spy; content refresh after picking.
  • App.configEditor.test.tsx: picker opens above the editor; editor reloads after pick.
  • StatusBar tests: "Load config…" removed, onLoadConfig prop gone.

Activity

  1. added
    enhancement
    frontend
    on Nov 4, 2026
  2. added this to the v1.0.0 milestone on Nov 4, 2026
  3. added a commit that references this issue on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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