Files
2026-05-18 16:08:52 +02:00

43 lines
1.2 KiB
Markdown

## ADDED Requirements
### Requirement: User Config Storage
The system SHALL store user configuration as JSONB key-value pairs linked to the user.
#### Scenario: Create config on first write
- GIVEN an authenticated user with no config
- WHEN they update settings
- THEN a UserConfig row is created with their user_id
### Requirement: Config Keys
The system SHALL support these configuration keys:
- `default_editor`: string
- `theme`: "light" | "dark" | "system"
- `git_user_name`: string
- `git_user_email`: string
#### Scenario: Update theme
- GIVEN an authenticated user
- WHEN they PATCH /users/me/config with {"theme": "dark"}
- THEN only the theme key is updated
- AND other keys remain unchanged
### Requirement: Config Retrieval
The system SHALL return user configuration on request.
#### Scenario: Get config
- GIVEN an authenticated user with config
- WHEN they GET /users/me/config
- THEN their full configuration is returned
### Requirement: Frontend Theme Application
The system SHALL apply the user's theme preference on application load.
#### Scenario: Load with dark theme
- GIVEN a user with theme="dark"
- WHEN the app loads
- THEN the dark CSS class is applied to the document