2.3 KiB
2.3 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| task-05-picker-gone-support | Model pickers support disabled (gone) models | done | 3 | docs/plans/no-silent-model-fallback/plan.md | docs/specs/agents/requirements/no-silent-model-fallback.md |
Task 5 — Model pickers: grey out gone models
Change
apps/web/components/model-config-selector.tsx:
ModelSelectorOptiongainsdisabled?: booleananddisabledReason?: string.ModelRowrenders disabled options greyed (opacity-40,cursor-not-allowed) with the reason in a tooltip;onSelectguarded by!option.disabled. Follow the existing disabled pattern inapps/web/components/combobox.tsx(visual treatment + tooltip).
apps/web/lib/ws/handlers/session-models.ts:
clearStaleActiveModelno longer clears the active model when it disappears from the ACP list. Keep it; the picker marks it gone.
apps/web/components/task/model-selector.tsx:
buildModelOptions/resolveAvailableModelsmark the configured-but- absent models (active model, profile model) asdisabledwith reason "model no longer available — select a new model". The current model display still shows the (gone) model name so the user sees what was active.
i18n: new copy via t() (settings: namespace) — the ratchet judges added
lines.
Acceptance
- Unit test (
model-config-selector): a disabled option is not selectable and renders the greyed class; tooltip carries the reason. - Unit test (
session-modelshandler): when the ACP models list drops the active model, the active model is kept (not cleared). - Unit test (
model-selector): a configured model absent from the list is included in options asdisabledwith a reason. pnpm run typecheck+ targeted vitest pass.
Verification
cd apps/web && pnpm vitest run components/model-config-selector.test.tsx lib/ws/handlers/session-models.test.ts components/task/model-selector.test.tsx
cd apps/web && pnpm run typecheck
cd apps/web && pnpm run i18n:ratchet
Risks
- The session picker's option-building has several sources (ACP models, static model config, config options) — the disabled marking must apply to the merged option list without breaking the config-option path.
- Keep
clearStaleContextWindowbehavior unchanged (that one is about context-window reset on a legit model change, unrelated).