Files
headquarter/openspec/changes/user-config-management/design.md
T
Fusion 94254ee3fd 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
2026-05-18 15:58:01 +02:00

947 B

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