Summary
Replace the fully hardcoded SettingsPanel.tsx with a schema-driven settings system backed by a user-editable settings.json file — modelled on VS Code's settings architecture.
Motivation
- The current
SettingsPanel.tsx is ~1500 lines of hardcoded React. Extensions can never add their own settings without modifying core.
- Power users have no way to directly edit settings as text (copy/paste, version control, scripting).
- A schema-driven approach means the UI is generated from a definition, making it trivially extensible.
Proposed architecture
Storage
electron-store already writes JSON to userData/openconduit/. No backend change required — just expose the file path and add a "Open settings.json" command.
Schema
Each settings section is defined as a JSON Schema fragment:
interface SettingsContribution {
title: string;
order?: number; // controls section ordering in the UI
properties: Record<string, JSONSchemaProperty>;
}
Core registers its own contributions (providers, MCP, routing, etc.). Extensions will register theirs via the Extension Platform (#TBD).
Settings UI (revamped SettingsPanel)
- Schema-driven form renderer — inputs, toggles, arrays, and key-value pairs generated from schema
type + description
- Search — filter settings by keyword across all sections
- Section navigation — left-side TOC (like VS Code)
- "Open settings.json" button → opens the raw file in the default editor (or an in-app JSON editor pane)
- Reset to default per-property button
Raw JSON editor
- In-app JSON editor pane (CodeMirror or Monaco) with schema validation
- Errors highlighted inline
- Changes saved on blur / explicit save
Migration plan
- Add
settings:open-file IPC + ⌘K command — expose the existing JSON file immediately (low risk, high value)
- Introduce
SettingsContribution type and register core sections against it
- Rewrite
SettingsPanel as a schema-driven renderer, section by section
- Remove hardcoded JSX as each section is migrated
Acceptance criteria
Related
Summary
Replace the fully hardcoded
SettingsPanel.tsxwith a schema-driven settings system backed by a user-editablesettings.jsonfile — modelled on VS Code's settings architecture.Motivation
SettingsPanel.tsxis ~1500 lines of hardcoded React. Extensions can never add their own settings without modifying core.Proposed architecture
Storage
electron-storealready writes JSON touserData/openconduit/. No backend change required — just expose the file path and add a "Open settings.json" command.Schema
Each settings section is defined as a JSON Schema fragment:
Core registers its own contributions (providers, MCP, routing, etc.). Extensions will register theirs via the Extension Platform (#TBD).
Settings UI (revamped SettingsPanel)
type+descriptionRaw JSON editor
Migration plan
settings:open-fileIPC + ⌘K command — expose the existing JSON file immediately (low risk, high value)SettingsContributiontype and register core sections against itSettingsPanelas a schema-driven renderer, section by sectionAcceptance criteria
settings.jsonis openable via ⌘K command and a button in the Settings panelSettingsContributiontype defined; core registers all existing sectionsSettingsContribution(see Extension Platform issue)Related