Repository navigation
Closed
Labels
Milestone
Description
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,diskAnchoredguard 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
ConfigPickerModalfrom inside the editor. - Wiring:
ConfigEditorModalgains anonLoadConfig?: () => voidprop;App.tsxopensshowConfigPickerwhile the editor stays mounted. When the picker finishes (onLoaded), the editor must refresh its content — e.g. areloadKey: numberprop 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
onLoadConfigprop; update every call site. The StatusBar "Config" button stays and opens the editor.
Consistency cleanup (small, ride-along)
ActionBar'sonOpenConfig(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 injectedonLoadConfigspy; content refresh after picking.App.configEditor.test.tsx: picker opens above the editor; editor reloads after pick.- StatusBar tests: "Load config…" removed,
onLoadConfigprop gone.
Activity
Merge pull request #109 from falbany/fix/editor-header-and-problems-p…
fix(web): config picker opens Load mode from explicit entry points (#192