Skip to content

fix(settings): make agent model selectors editable and persistent (#431)#474

Open
trsdn wants to merge 2 commits into
mainfrom
sprint/228/issue-431
Open

fix(settings): make agent model selectors editable and persistent (#431)#474
trsdn wants to merge 2 commits into
mainfrom
sprint/228/issue-431

Conversation

@trsdn
Copy link
Copy Markdown
Owner

@trsdn trsdn commented Mar 16, 2026

Summary

Fixes #431 — Settings model selectors are now fully editable with proper persistence to .aiscrum/config.yaml and visual confirmation.

Changes

  • Fixed stale closure bug in saveRole callback by adding roles to dependency array
  • Enhanced toast notification to show old→new model when changed (e.g., "✅ planner model: claude-sonnet-4.5 → claude-opus-4.6")
  • Visual improvement: Added cursor: pointer CSS to select dropdowns for better UX
  • Server-side logging: Log model updates in ws-server when PUT /api/roles receives model change
  • Ceremony logging: Debug logs in execution.ts to verify model propagates to ACP sessions
  • Documentation: Added Dashboard Settings section to docs/OVERVIEW.md

Test Coverage

  • 7 new integration tests in tests/dashboard/settings-model-update.test.ts:
    • Config persistence: model writes to phases.{role}.model in YAML
    • Session config resolution: model flows from config to ACP session
    • End-to-end flow: UI change → config.yaml → session config

Verification

Lint clean: 0 errors (34 pre-existing warnings)
Type clean: tsc --noEmit passed
Tests pass: 823 tests passed (7 new tests added)
Diff size: 270 lines (54 production + 216 test) — within 300 line limit

Definition of Done

  • Code implemented — addresses all acceptance criteria
  • Lint clean — 0 errors
  • Type clean — 0 errors
  • Tests written — 7 integration tests
  • Tests pass — all 823 tests passing
  • Diff size ≤ 300 lines — 270 lines total
  • No unrelated changes — only files relevant to model selector persistence
  • Documentation updated — Dashboard Settings section added

Closes #431

- Fix stale closure bug in saveRole callback by adding 'roles' to deps array
- Add enhanced toast notification showing old→new model on change
- Add cursor:pointer CSS to make select dropdowns visually interactive
- Add server logging when model is updated via PUT /api/roles
- Add debug logging in ceremony execution to track model application
- Add comprehensive integration tests for model persistence flow
- Document model selection in Dashboard Settings section

Closes #431

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Verify model dropdown is enabled (not disabled)
- Test changing model value triggers dirty state
- Verify Save button becomes enabled
- Confirm toast shows 'model:' change notification
- Restore original value after test

Provides evidence that acceptance criteria are met:
✅ Model selectors ARE editable
✅ Changes persist (Save button works)
✅ UI confirmation shown (toast with 'model:')

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Agent model selection in Settings is read-only

1 participant