3.0 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-selector-loading-state | Show selector loading state | done | 1 | plan.md | ../../specs/agents/requirements/dynamic-provider-options.md |
Task 01: Show Selector Loading State
Acceptance conditions
- A model-aware profile selector stays open after a model selection starts option resolution.
- The area below the model list shows a localized spinner and hides stale option controls while resolution is pending.
- The selected model row replaces its check icon with a spinner while resolution is pending and restores the check icon afterward.
- Resolved controls replace the spinner without changing the existing status, error, or retry state below the profile field.
Verification
cd apps && pnpm install --frozen-lockfile && pnpm --filter @kandev/web exec vitest run components/model-config-selector.test.tsx components/settings/profile-form-fields.test.tsx --reporter=dot && cd web && pnpm run typecheck && pnpm run i18n:check && pnpm run i18n:ratchet
Files likely touched
apps/web/components/model-config-selector.tsxapps/web/components/model-config-selector.test.tsxapps/web/components/settings/profile-model-fields.tsxapps/web/components/settings/profile-form-fields.tsxapps/web/components/settings/profile-form-fields.test.tsx
Dependencies
None.
Parallelism
Sequential. This task changes the shared selector contract and the profile caller that uses it.
Inputs
- The
What,Agent profile shows model-option progress, andMobile settingssections in the feature spec. - The
FrontendandTestssections inplan.md. ModelConfigResolutionStatusfor the existing loading copy and status behavior.useProfileModelCapabilitiesfor the authoritativeconfigIsLoadingstate.
Output contract
Report the selector props, loading-row behavior, changed files, tests, risks,
and blockers. Update this task and plan.md with the exact results.
Risks
- The selector must decide to stay open in the same event that changes the model. It cannot wait for the next loading-state render.
- The loading row must not expose controls from the prior model snapshot.
Results
Implemented the shared selector loading row and profile-form wiring. The selector now stays open for dynamic profile models, hides stale dependent controls during resolution, shows a spinner in the selected model row, and restores both the check icon and resolved controls afterward. Existing callers retain their previous close behavior by default.
The exact verification command passed:
- Focused Vitest: 2 files, 32 tests passed.
pnpm run typecheckpassed.pnpm run i18n:checkpassed. The command reported only existing orphan catalog entries.pnpm run i18n:ratchetpassed with no new violations.
Review fixup added regression coverage for the self-contained loading close guard, the single accessible status announcement, and stale-option clearing after rejected or failed resolution responses. The targeted suite now passes 46 tests.