feat(dashboard): model switch UI per instance #157
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/156"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
claude-opus-4-7,claude-opus-4-7[1m],claude-sonnet-4-6,claude-sonnet-4-6[1m],claude-haiku-4-5-20251001, "Use type default"✎) already renders in the agents table whenmodel_overrideis set — verified workingPATCH /agents/:namewith{ model }andreconcileOnecall already correct — no container recreation (model is per-dispatch)main-agents.test.tstest: PATCH model → GET /agents returns correct resolved model and flagsmodel_overridedashboard-browser.test.tstests: dropdown has all canonical options; edit modal PATCH submission sends correct model valueCloses #156
Review: feat(dashboard): model switch UI per instance
CI: ✅ Green (run #1745, 3m13s)
Acceptance criteria check
dashboard.htmllines 1374–1380✎) shows whenmodel_overrideis setrenderAgentsTableline 2542PATCH /agents/:nameaccepts `{ model: stringnullclears the override back to type defaultmain-agents.test.tsreconcileOnedoes not recreatemain-agents.test.ts— PATCH model → GET reflects resolved model + override flagdashboard-browser.test.ts— dropdown has all canonical optionsdashboard-browser.test.ts— edit form PATCH sends correct modelCode review
openEditModalcorrectly pre-selects the override (or\x27\x27for "Use type default"):submitAgentModalconverts empty string →nullbefore sending:This is the right semantics —
nullin the PATCH body clears the override server-side.The
agentModelHintshowingType default: claude-sonnet-4-6is a nice operator UX touch.Minor nit (non-blocking)
src/dashboard-browser.test.ts—SAMPLE_AGENT.model_overrideis set tofalse:The real API returns
nullfor no override (verified inmain-agents.test.ts:expect(entry.model_override).toBeNull()). Bothnullandfalseare falsy so this does not break anything, but the fixture should match the actual API shape to avoid confusion in future tests.Review: feat(dashboard): model switch UI per instance
CI: ✅ Green (run #1745, 3m13s)
Acceptance criteria check
dashboard.htmllines 1374–1380✎) shows whenmodel_overrideis setrenderAgentsTableline 2542PATCH /agents/:nameaccepts `{ model: stringnullclears the override back to type defaultmain-agents.test.tsreconcileOnedoes not recreatemain-agents.test.ts— PATCH model → GET reflects resolved model + override flagdashboard-browser.test.ts— dropdown has all canonical optionsdashboard-browser.test.ts— edit form PATCH sends correct modelCode review
openEditModalcorrectly pre-selects the override (or''for "Use type default"):submitAgentModalconverts empty string →nullbefore sending:This is the right semantics —
nullin the PATCH body clears the override server-side.The
agentModelHintshowingType default: claude-sonnet-4-6is a nice operator UX touch.Minor nit (non-blocking)
src/dashboard-browser.test.ts—SAMPLE_AGENT.model_overrideis set tofalse:The real API returns
nullfor no override (verified inmain-agents.test.ts:expect(entry.model_override).toBeNull()). Bothnullandfalseare falsy so this does not break anything, but the fixture should match the actual API shape to avoid confusion in future tests.