Skip to content

feat: save user theme preference - #1220

Draft
calebmcquaid wants to merge 1 commit into
mainfrom
caleb/365-theme-server
Draft

calebmcquaid wants to merge 1 commit into
mainfrom
caleb/365-theme-server

Conversation

@calebmcquaid

@calebmcquaid calebmcquaid commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Context & Requests for Reviewers

This is the backend piece for the dark mode issue (#365). This allows a user to store a personal preference of light/dark mode. This adds a new column in the DB, a GQL enum, and persistence in the userManagementService.

Tests

Unit tests added, lints and builds clean.

(Optional) Rollout Plan

This is a stacked PR and should land with the others in the stack.

Checklist

Only check items that apply to this PR; leave the rest unchecked.

  • If you changed anything user-facing (i.e. user interface or APIs):
    Did you update related docs?

  • If the change is notable (refer to Keep a Changelog conventions):
    Did you update CHANGELOG.md?

  • If you changed db/src/scripts/** and used CREATE TABLE, ADD COLUMN, or ALTER COLUMN:
    Are as many columns marked NOT NULL as possible? If some columns can sometimes be null depending on other columns, are there CHECK constraints capturing those relationships, and are these also reflected using unions in the associated Kysely types?

  • If you added a new signal in server/services/signalsService/signals/**:
    Did you classify every error case as a permanent error (SignalPermanentError, no retry) or a normal error (retryable)? Any case where the signal can't determine a score should be a SignalPermanentError.


Summary by cubic

Saves per-user color scheme preferences so the client can persist theme choices instead of resetting on reload.

Users can now set a theme preference (SYSTEM, LIGHT, or DARK) via the new setThemePreference mutation. The value is stored in user_interface_settings and exposed as themePreference on user interface settings; null means unset, and the client falls back to light.

Migration

  • Adds a nullable theme_preference column with a CHECK constraint; existing users default to null.

Written for commit 9ef3930. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@calebmcquaid
calebmcquaid added this pull request to stack #1244 September 17, 2026 03:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant