Skip to content

chore: add "user_configs" db table #16564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Mar 5, 2025
Merged

chore: add "user_configs" db table #16564

merged 23 commits into from
Mar 5, 2025

Conversation

aslilac
Copy link
Member

@aslilac aslilac commented Feb 13, 2025

  • Adds a "user_configs" table

  • Moves the data from the "users"."theme_preference" column to this new table as a bit of a proof of concept

The idea is that this table will enable future feature development to have a nice spot to put user specific settings, like storing the state of dismissed notification banners, or other UI personalizations that we may add in the future. It could even be used to remember values from partial form completions, or all manner of other things, (and in a place where they can later be invalidated by the backend, rather than put in localStorage)

@aslilac aslilac requested a review from Emyrk February 18, 2025 17:39
@aslilac aslilac marked this pull request as ready for review February 18, 2025 17:39
@github-actions github-actions bot added the stale This issue is like stale bread. label Feb 26, 2025
@aslilac
Copy link
Member Author

aslilac commented Feb 27, 2025

pls don't close my pr github

@aslilac aslilac removed the stale This issue is like stale bread. label Feb 27, 2025
@aslilac aslilac requested review from johnstcn and removed request for Emyrk March 5, 2025 00:33
@aslilac aslilac merged commit 9041646 into main Mar 5, 2025
35 checks passed
@aslilac aslilac deleted the lilac/user-configs branch March 5, 2025 17:46
@github-actions github-actions bot locked and limited conversation to collaborators Mar 5, 2025
@ethanndickson
Copy link
Member

ethanndickson commented Mar 6, 2025

Since we're no longer sending the theme_preference in api/v2/users responses, should this be labelled as a breaking API change?
Context: coder/coder-desktop-macos#91

@johnstcn
Copy link
Member

johnstcn commented Mar 6, 2025

@ethanndickson would it suffice to re-add the field in the /api/v2/users response but mark it as deprecated?

EDIT: this was already done as part of this PR, the only other change was adding omitempty.

@ethanndickson
Copy link
Member

ethanndickson commented Mar 6, 2025

I think the change is fine honestly, but if it's breaking our own Coder integration (desktop), it's possible it could break someone else's.
..In saying that, I doubt people are actively consuming theme_preference. If it does break something, it's probably just because they expected the field to be present like I did on desktop.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants