Skip to content

fix: rollback appearance mutation cache updates - #25182

Merged
jaaydenh merged 17 commits into
mainfrom
pr25077/04-appearance-mutation-rollback
May 15, 2026
Merged

jaaydenh merged 17 commits into
mainfrom
pr25077/04-appearance-mutation-rollback

Conversation

@jaaydenh

Copy link
Copy Markdown
Contributor

Summary

  • Add appearance mutation context so optimistic cache updates can be rolled back on failure.
  • Restore previous appearance settings, or remove the optimistic cache entry when no previous data exists.
  • Merge successful server responses back into the appearance cache while preserving request fields when responses are partial.

Dependencies

Validation

  • pnpm -C site exec vitest run --project=unit src/api/queries/users.test.ts
  • pnpm -C site lint:types
  • Pre-commit hook passed on the branch commit.

jaaydenh and others added 12 commits May 8, 2026 10:23
Adds three new UserAppearanceSettings fields (theme_mode, theme_light,
theme_dark) on top of the existing theme_preference and terminal_font.
Replaces GetUserThemePreference and GetUserTerminalFont with a single
GetUserAppearanceSettings aggregate query. The PUT handler is wrapped
in db.InTx so sync-mode's mode + slot writes can never half-apply.
Base automatically changed from feat/theme-mode-api to main May 14, 2026 04:44
@jaaydenh
jaaydenh force-pushed the pr25077/04-appearance-mutation-rollback branch from 9a691bb to 5674e9d Compare May 14, 2026 13:41
This reverts commit 5674e9d.
@jaaydenh jaaydenh changed the title fix(site/src/api): rollback appearance mutation cache updates fix: rollback appearance mutation cache updates May 14, 2026
@jaaydenh
jaaydenh requested a review from DanielleMaywood May 15, 2026 08:51

@DanielleMaywood DanielleMaywood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the agent re-added some comments we removed earlier but other than that, lgtm.

Comment thread coderd/users.go Outdated
Comment thread codersdk/users.go Outdated
Comment thread codersdk/users.go Outdated
Comment thread codersdk/users.go Outdated
Comment thread site/src/api/queries/users.test.ts Outdated
@jaaydenh
jaaydenh merged commit 8650a2e into main May 15, 2026
27 checks passed
@jaaydenh
jaaydenh deleted the pr25077/04-appearance-mutation-rollback branch May 15, 2026 09:50
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
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.

2 participants