Skip to content

[SETTINGS-001] Persist account settings to durable storage - #74

Merged
chev0004 merged 6 commits into
developfrom
feat/settings-001
Jun 22, 2026
Merged

[SETTINGS-001] Persist account settings to durable storage#74
chev0004 merged 6 commits into
developfrom
feat/settings-001

Conversation

@chev0004

@chev0004 chev0004 commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Outline

Summary

Persists the settings form to a per-user store so account, appearance, notification, and privacy preferences load on open and survive refresh and new sessions.


Changes & Enhancements

  • Type of Change:
    • Feature
    • Bugfix
    • Refactor
    • Chore
  • Changes:
    • (database):
      • Add a user_settings table holding theme, application language, time format, and notification preferences, with migration 0007.
    • (settings):
      • Load email, privacy, theme, language, time format, and notification preferences for the signed-in user.
      • Save every field through a new POST /api/settings endpoint scoped to the current user, with invalid email blocked by inline validation.
      • Show a save error state when persistence fails.

Page / App Changes

Affected Next.js Routes (Local):

  • /[lang]/settings
  • /api/settings
Before (Screenshot)
After (Screenshot)

Account: email loaded from the persisted account record.
Account settings

Appearance: theme, application language, and time format loaded from durable storage.
Appearance settings

Privacy: profile visibility toggles loaded from the user's profile.
Privacy settings

Notifications: each notification preference persisted independently.
Notification settings

Save error state shown when persistence fails.
Settings save error


Component / Storybook Changes

Affected Storybook Components (Local):

Before (Screenshot)
After (Screenshot)

Not Doing

  • Saved theme and application language are stored as preferences only; applying them to the live UI appearance and route locale is left for a follow-up.

Other (Remarks)

Adds database migration 0007; run bun run db:migrate after merge.


Checklists

  • Code is well-documented (comments, JSDoc, etc.).
  • Existing comments were updated as needed.
  • No out-of-scope changes are included.
  • Write TODO comments where future work is required.
  • Removed unnecessary debug code (e.g., console.log, debugger).
  • Self-reviewed and tested locally.

@chev0004 chev0004 self-assigned this Jun 22, 2026
@chev0004
chev0004 merged commit de30c76 into develop Jun 22, 2026
1 check passed
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