[PR #6234] [MERGED] Added Global Synced Prefs #40831

Closed
opened 2026-04-23 13:38:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6234
Author: @lelemm
Created: 11/23/2025
Status: Merged
Merged: 1/9/2026
Merged by: @MatissJanis

Base: masterHead: feat/global-synced-flags


📝 Commits (10+)

  • 6aa5360 Added Global Synced Prefs
  • 7a2c6da [autofix.ci] apply automated fixes
  • 2d53ea7 Add release notes for PR #6234
  • 5b9a115 typecheck
  • cb4b1e0 lint fix
  • d4ce69c Merge branch 'master' into feat/global-synced-flags
  • c38b7ff Refactor global synced preferences to server preferences
  • 3965e85 Implement server preferences for feature flags and enhance admin permissions
  • 3f404bd Enhance error handling in saveServerPrefs thunk
  • b5c11fe Merge branch 'master' into feat/global-synced-flags

📊 Changes

12 files changed (+442 additions, -18 deletions)

View changed files

📝 packages/desktop-client/src/components/settings/Experimental.tsx (+46 -13)
📝 packages/desktop-client/src/hooks/useFeatureFlag.ts (+0 -1)
packages/desktop-client/src/hooks/useServerPref.ts (+31 -0)
📝 packages/desktop-client/src/prefs/prefsSlice.ts (+52 -2)
📝 packages/loot-core/src/server/auth/app.ts (+2 -0)
📝 packages/loot-core/src/server/preferences/app.ts (+31 -0)
📝 packages/loot-core/src/types/prefs.ts (+4 -2)
packages/sync-server/migrations/1763873568237-server-global-prefs.js (+19 -0)
📝 packages/sync-server/src/account-db.js (+27 -0)
📝 packages/sync-server/src/app-account.js (+29 -0)
packages/sync-server/src/app-account.test.js (+195 -0)
upcoming-release-notes/6234.md (+6 -0)

📄 Description

rebuilding the global synced prefs using sync-server this time


Note

Adds a server-backed preferences system and integrates it into the client UI and state.

  • New server_prefs table with migration; APIs to read/write prefs: GET /validate now includes prefs, and POST /server-prefs (admin-only) saves prefs with upsert; covered by tests
  • Desktop: new serverPrefs Redux slice with saveServerPrefs thunk and useServerPref hook; wired into store and test mock
  • Experimental settings: introduce ServerFeatureToggle gated by server status, login method, and permissions; use it to surface flags.plugins (disabled toggle for now)
  • Update auth app to proxy save-server-prefs and return serverPrefs on subscribe-get-user
  • Remove plugins from FeatureFlag defaults; feature flag hook reads flags.<name> from synced prefs
  • Add release note entry

Written by Cursor Bugbot for commit 3f404bdf00. This will update automatically on new commits. Configure here.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/6234 **Author:** [@lelemm](https://github.com/lelemm) **Created:** 11/23/2025 **Status:** ✅ Merged **Merged:** 1/9/2026 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `feat/global-synced-flags` --- ### 📝 Commits (10+) - [`6aa5360`](https://github.com/actualbudget/actual/commit/6aa53608a138033bf6523824337897a0f8e3563d) Added Global Synced Prefs - [`7a2c6da`](https://github.com/actualbudget/actual/commit/7a2c6da6598e29f1bf7f0467b52946a7584f245a) [autofix.ci] apply automated fixes - [`2d53ea7`](https://github.com/actualbudget/actual/commit/2d53ea7482dee548b55df920cae4a52e45ed7bd1) Add release notes for PR #6234 - [`5b9a115`](https://github.com/actualbudget/actual/commit/5b9a1154dd24d2e17d171a0a77f705bc3cf2520e) typecheck - [`cb4b1e0`](https://github.com/actualbudget/actual/commit/cb4b1e00db0a721b16b0031801b2e7e8c7c2b2fe) lint fix - [`d4ce69c`](https://github.com/actualbudget/actual/commit/d4ce69cc137496b9ba7bc23fb1f2a2b47dfcdcd9) Merge branch 'master' into feat/global-synced-flags - [`c38b7ff`](https://github.com/actualbudget/actual/commit/c38b7ff8e6f7b2ee556301e6b7d3faf95b9c964f) Refactor global synced preferences to server preferences - [`3965e85`](https://github.com/actualbudget/actual/commit/3965e858bcae3b3fe2a3369aa97e0026ac5fb926) Implement server preferences for feature flags and enhance admin permissions - [`3f404bd`](https://github.com/actualbudget/actual/commit/3f404bdf00c8309d87fcaa65b4436605d577d936) Enhance error handling in saveServerPrefs thunk - [`b5c11fe`](https://github.com/actualbudget/actual/commit/b5c11fe437fc9f93fc2d446f616bc880c4620051) Merge branch 'master' into feat/global-synced-flags ### 📊 Changes **12 files changed** (+442 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/settings/Experimental.tsx` (+46 -13) 📝 `packages/desktop-client/src/hooks/useFeatureFlag.ts` (+0 -1) ➕ `packages/desktop-client/src/hooks/useServerPref.ts` (+31 -0) 📝 `packages/desktop-client/src/prefs/prefsSlice.ts` (+52 -2) 📝 `packages/loot-core/src/server/auth/app.ts` (+2 -0) 📝 `packages/loot-core/src/server/preferences/app.ts` (+31 -0) 📝 `packages/loot-core/src/types/prefs.ts` (+4 -2) ➕ `packages/sync-server/migrations/1763873568237-server-global-prefs.js` (+19 -0) 📝 `packages/sync-server/src/account-db.js` (+27 -0) 📝 `packages/sync-server/src/app-account.js` (+29 -0) ➕ `packages/sync-server/src/app-account.test.js` (+195 -0) ➕ `upcoming-release-notes/6234.md` (+6 -0) </details> ### 📄 Description rebuilding the global synced prefs using sync-server this time <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds a server-backed preferences system and integrates it into the client UI and state. > > - New `server_prefs` table with migration; APIs to read/write prefs: `GET /validate` now includes `prefs`, and `POST /server-prefs` (admin-only) saves prefs with upsert; covered by tests > - Desktop: new `serverPrefs` Redux slice with `saveServerPrefs` thunk and `useServerPref` hook; wired into store and test mock > - `Experimental` settings: introduce `ServerFeatureToggle` gated by server status, login method, and permissions; use it to surface `flags.plugins` (disabled toggle for now) > - Update auth app to proxy `save-server-prefs` and return `serverPrefs` on `subscribe-get-user` > - Remove `plugins` from `FeatureFlag` defaults; feature flag hook reads `flags.<name>` from synced prefs > - Add release note entry > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 3f404bdf00c8309d87fcaa65b4436605d577d936. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 13:38:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#40831