feat(settings): schema-driven settings engine (T-448)
The core of the settings panel (epic T-444). Subsystems describe a category as data — a SettingsCategory of carded SettingsSections of SettingsFields (toggle / select / text / number / opens-external-file), each bound to a SettingsStore key with help text, a default, and reset-to-default. Registration is declarative: a new SettingsCategoryContribution carries the category; the extension manager routes it into a new kernel SettingsRegistry (exposed on KernelServices), which the panel reads via ClideKernel. Adding a category is now pure data + a contribution — no widget code. SettingsCategoryView renders a category into carded sections per ui-design surface.md: panelHeader card fill, dividerColor border, inputs receding to panelBackground; select reuses the anchored-overlay menu, text/number commit on Enter or blur (numeric clamps to bounds). The modal panel now shows the selected/first registered category, falling back to the empty state. Tests: registry (sort / dedup / notify), contribution routing on activation, renderer (render + toggle/select write-through + reset), modal-with-category. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,14 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
|
||||
category rail and scrolling carded panel that later work fills in; closes on
|
||||
✕, Esc, or a barrier tap. (T-445)
|
||||
|
||||
- **Schema-driven settings engine.** Subsystems register a `SettingsCategory`
|
||||
(a `SettingsCategoryContribution` routed into the kernel `SettingsRegistry`);
|
||||
the panel renders it as carded sections of field rows — toggle, select,
|
||||
text, number, and an "opens external file" button — each bound to a
|
||||
`SettingsStore` key with help text and reset-to-default. Inputs recede to
|
||||
`panelBackground` inside the elevated `panelHeader` cards (ui-design
|
||||
surface.md). Categories are data; registering one surfaces a new tab. (T-448)
|
||||
|
||||
### Changed
|
||||
|
||||
- **Theme picker relabelled "Theme…".** The ⌘K theme picker's command title
|
||||
|
||||
Reference in New Issue
Block a user