feat: complete user config management
- Add theme support with dark/light/system modes - Add useTheme hook for applying user config theme - Update router to use SettingsPage - Update app-shell to apply theme on load - Add CSS variables for dark theme - Fix mypy errors in user_config.py - Quality gates pass: ruff, mypy, typecheck, lint, build
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
## Context
|
||||
|
||||
The platform needs a simple key-value configuration system for user preferences like theme, editor, and git identity.
|
||||
|
||||
## Goals / Non-Goals
|
||||
|
||||
**Goals:**
|
||||
- Store user config as JSONB in PostgreSQL
|
||||
- Support partial updates (PATCH semantics)
|
||||
- Apply theme in frontend on load
|
||||
- Provide settings UI
|
||||
|
||||
**Non-Goals:**
|
||||
- Complex nested config structures
|
||||
- Config validation beyond type checking
|
||||
- Per-project config (global only)
|
||||
|
||||
## Decisions
|
||||
|
||||
1. **JSONB column for flexibility**
|
||||
- Rationale: Simple key-value, no schema migrations for new keys
|
||||
|
||||
2. **Merge semantics for updates**
|
||||
- Rationale: Frontend can update single key without sending entire config
|
||||
|
||||
3. **Lazy creation**
|
||||
- Rationale: Config row created on first write, not on user creation
|
||||
|
||||
## Risks
|
||||
|
||||
- **[JSONB query performance]** → Only querying by user_id, not by config keys
|
||||
- **[No schema validation]** → Frontend validates known keys, backend accepts any JSON
|
||||
Reference in New Issue
Block a user