6b938b61cb
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
1.8 KiB
1.8 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 03-settings-toggle-ui | Settings toggle UI | done | 3 |
|
plan.md | ../../specs/agents/profile-disable.md |
Task 03: Settings toggle UI
- Acceptance: The profile settings page header (
/settings/agents/<agent>/profiles/<id>) renders an EnabledSwitchreflectingsavedProfile.enabled; flipping it marks the page dirty and the save PATCH includesenabled; after save the header matches the persisted value. - Acceptance: The
/settings/agents"Manage existing profiles by agent" list renders an EnabledSwitchper profile row; flipping it saves immediately viaupdateAgentProfileAction(profile.id, { enabled }), updates the store (settingsAgents+agentProfiles), does not navigate the row link, and reflects the new state without reload. - Acceptance: Component tests cover the header toggle dirty/save payload and the list-row toggle action + store sync.
- Verification:
cd apps && pnpm --filter @kandev/web test -- agent-profile-page app/settings/agents - Files likely touched:
apps/web/components/settings/agent-profile-page.tsxapps/web/app/settings/agents/page.tsxapps/web/components/settings/agent-profile-page.test.tsxapps/web/app/settings/agents/page.test.tsx(or a newProfileListItemcomponent test)
- Dependencies: Task 02 (types carry
enabled; store options carry it). - Parallelism: sequential.
- Inputs: spec "What" bullets 2–3 and the list-toggle + header-toggle scenarios; plan "Frontend — Settings UI" section. Reuse the
useSyncAgentsToStorepattern fromagent-profile-page.tsxfor the list-row store sync. - Output contract: Report red/green test evidence, changed files, targeted test results, risks, and task/plan status update.