feat: Add global settings modal and simplify agent controls

Adds a settings system for global configuration with YOLO mode toggle and
model selection. Simplifies the agent control UI by removing redundant
status indicator and pause functionality.

## Settings System
- New SettingsModal with YOLO mode toggle and model selection
- Settings persisted in SQLite (registry.db) - shared across all projects
- Models fetched from API endpoint (/api/settings/models)
- Single source of truth for models in registry.py - easy to add new models
- Optimistic UI updates with rollback on error

## Agent Control Simplification
- Removed StatusIndicator ("STOPPED"/"RUNNING" label) - redundant
- Removed Pause/Resume buttons - just Start/Stop toggle now
- Start button shows flame icon with fiery gradient when YOLO mode enabled

## Code Review Fixes
- Added focus trap to SettingsModal for accessibility
- Fixed YOLO button color contrast (WCAG AA compliance)
- Added model validation to AgentStartRequest schema
- Added model to AgentStatus response
- Added aria-labels to all icon-only buttons
- Added role="radiogroup" to model selection
- Added loading indicator during settings save
- Added SQLite timeout (30s) and retry logic with exponential backoff
- Added thread-safe database engine initialization
- Added orphaned lock file cleanup on server startup

## Files Changed
- registry.py: Model config, Settings CRUD, SQLite improvements
- server/routers/settings.py: New settings API
- server/schemas.py: Settings schemas with validation
- server/services/process_manager.py: Model param, orphan cleanup
- ui/src/components/SettingsModal.tsx: New modal component
- ui/src/components/AgentControl.tsx: Simplified to Start/Stop only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Auto
2026-01-07 12:29:07 +02:00
parent 122f03dc21
commit 45ba266f71
16 changed files with 825 additions and 173 deletions

View File

@@ -163,6 +163,23 @@
transform: none;
}
/* YOLO Mode Button - Fiery gradient for when YOLO mode is enabled */
/* Uses darker orange colors for better contrast with white text (WCAG AA) */
.neo-btn-yolo {
background: linear-gradient(135deg, #d64500, #e65c00);
color: #ffffff;
box-shadow:
4px 4px 0 var(--color-neo-border),
0 0 12px rgba(255, 84, 0, 0.4);
}
.neo-btn-yolo:hover {
background: linear-gradient(135deg, #ff5400, #ff6a00);
box-shadow:
6px 6px 0 var(--color-neo-border),
0 0 16px rgba(255, 84, 0, 0.5);
}
/* Inputs */
.neo-input {
width: 100%;