Conversation
Class-based dark theme (Light / Auto / Dark) stored in localStorage, with AUTO following the OS preference. Toggle via a sidebar slider on desktop and a cycling icon in the mobile header. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🚀 Frontend preview ↗ · commit |
Cover the theme.ts store (mode resolution, persistence, dark-class application, OS-preference following, useThemeMode) and the ThemeSlider / ThemeIconToggle components. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
paulwiese
approved these changes
Jun 18, 2026
# Conflicts: # web-client/src/pages/ProfilePage.tsx
Theme preference (LIGHT/DARK/AUTO) is now persisted server-side in UserPreferences and synced across devices. Toggling theme on any device saves to the profile; loading the app applies the saved theme from the last device that changed it. Backend: Profile PUT merges incoming preferences so a theme-only update (or language/diet/allergy edits that omit theme) preserves other fields. Frontend: theme.ts inlines persist logic; applyTheme applies a loaded mode without echoing to server; setThemeMode calls applyTheme then persistTheme. useUserPreferences replaces useUserLanguage and loads both language and theme. Tests: 3 backend merge tests, 6 frontend persist/apply/load tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
As discussed, I now stored the theme selection on the server instead of localStorage only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Class-based dark theme (Light / Auto / Dark) for the web client, stored in the profile. AUTO follows the OS preference (falling back to light). Toggle via a Light/Auto/Dark slider at the bottom of the desktop sidebar, or a cycling icon in the mobile header.
Type of change
API changes
api/openapi.yamlupdated andapi/scripts/gen-all.shre-runDefinition of Done
🤖 Generated with Claude Code