Summary
Add a dashboard Settings component for configuring the persistent scoped-model list used for model cycling. It should provide browser parity with the saved configuration from the TUI's /scoped-models selector while making ordering, persistence, and "all models" behavior explicit.
Current Behavior
The TUI /scoped-models selector lets users enable, disable, and reorder models, then persist the result as enabledModels in settings.
The dashboard currently:
- Shows the active runtime's
scopedModels in the session model picker.
- Provides Settings controls for the default model and per-agent model fallbacks.
- Cannot display or edit persistent
enabledModels.
- Cannot persist scoped models because
get_settings and set_settings do not expose that field.
Users must edit settings.json or return to the TUI to configure model cycling.
Proposed Behavior
Add a Scoped models editor to dashboard Settings that:
- Loads all available models and the effective persisted
enabledModels scope.
- Groups models by provider and supports search.
- Enables or disables individual models and whole providers.
- Shows enabled models in their model-cycling order.
- Allows enabled models to be reordered.
- Uses staged changes with an explicit save action.
- Persists canonical
provider/model references through the settings RPC.
- Treats all models selected as an unfiltered scope and removes the persisted filter.
- Prevents saving an ambiguous zero-model scope and displays an explicit validation message.
- Explains that the setting applies to newly created sessions and does not mutate running sessions.
- Surfaces validation, persistence, and project-shadowing warnings verbatim.
Acceptance Criteria
Context
Scoped-model UI was deliberately sequenced after the dashboard foundation work:
The TUI already provides the reference behavior through /scoped-models.
Technical Notes
Relevant implementation areas include:
packages/coding-agent/src/core/settings-manager.ts
- Existing
getEnabledModels() and setEnabledModels() methods.
packages/coding-agent/src/core/model-resolver.ts
- Reuse
resolveModelScope() for existing patterns and ordering.
packages/coding-agent/src/modes/rpc/rpc-types.ts
- Add
enabledModels to settings snapshot/update types.
- Define an explicit clear representation, such as
null in updates.
packages/coding-agent/src/modes/rpc/rpc-mode.ts
- Add snapshot mapping, atomic validation, persistence, and shadow warnings.
packages/dashboard/src/shared/protocol.ts
- Extend dashboard settings DTOs.
packages/dashboard/src/client/screens/settings.tsx
- Add the scoped-model editor, likely reusing the existing model-picker primitives.
packages/dashboard/test/client/screens.test.tsx
- Cover interaction and error behavior.
Documentation should remain synchronized across:
README.md
packages/coding-agent/README.md
packages/coding-agent/docs/settings.md
packages/coding-agent/docs/rpc.md
packages/coding-agent/docs/dashboard.md
packages/dashboard/README.md
Summary
Add a dashboard Settings component for configuring the persistent scoped-model list used for model cycling. It should provide browser parity with the saved configuration from the TUI's
/scoped-modelsselector while making ordering, persistence, and "all models" behavior explicit.Current Behavior
The TUI
/scoped-modelsselector lets users enable, disable, and reorder models, then persist the result asenabledModelsin settings.The dashboard currently:
scopedModelsin the session model picker.enabledModels.get_settingsandset_settingsdo not expose that field.Users must edit
settings.jsonor return to the TUI to configure model cycling.Proposed Behavior
Add a Scoped models editor to dashboard Settings that:
enabledModelsscope.provider/modelreferences through the settings RPC.Acceptance Criteria
provider/modelentries asenabledModels.enabledModelsfilter rather than freezing the current model inventory.enabledModelssettings are resolved using the core model resolver rather than reimplementing pattern matching in the browser.enabledModels; it does not rely on serializingundefined.enabledModelsoverride that shadows a global dashboard write produces a visible warning.Context
Scoped-model UI was deliberately sequenced after the dashboard foundation work:
The TUI already provides the reference behavior through
/scoped-models.Technical Notes
Relevant implementation areas include:
packages/coding-agent/src/core/settings-manager.tsgetEnabledModels()andsetEnabledModels()methods.packages/coding-agent/src/core/model-resolver.tsresolveModelScope()for existing patterns and ordering.packages/coding-agent/src/modes/rpc/rpc-types.tsenabledModelsto settings snapshot/update types.nullin updates.packages/coding-agent/src/modes/rpc/rpc-mode.tspackages/dashboard/src/shared/protocol.tspackages/dashboard/src/client/screens/settings.tsxpackages/dashboard/test/client/screens.test.tsxDocumentation should remain synchronized across:
README.mdpackages/coding-agent/README.mdpackages/coding-agent/docs/settings.mdpackages/coding-agent/docs/rpc.mdpackages/coding-agent/docs/dashboard.mdpackages/dashboard/README.md