[PR #6596] [MERGED] Rename serverPrefs state slice property to server #36820

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6596
Author: @Copilot
Created: 1/7/2026
Status: Merged
Merged: 1/7/2026
Merged by: @MatissJanis

Base: feat/global-synced-flagsHead: copilot/sub-pr-6234


📝 Commits (4)

  • 36bffcb Initial plan
  • dcce579 Add release notes for PR #6596
  • 8ddf9fe Delete upcoming-release-notes/6596.md
  • 56a2943 Rename serverPrefs state slice property to server

📊 Changes

2 files changed (+7 additions, -7 deletions)

View changed files

📝 packages/desktop-client/src/hooks/useServerPref.ts (+1 -1)
📝 packages/desktop-client/src/prefs/prefsSlice.ts (+6 -6)

📄 Description

Addresses feedback from #6234 to rename the serverPrefs property in the PrefsState to server for consistency with other preference properties (local, global, synced).

Changes

  • PrefsState type: serverPrefs: ServerPrefsserver: ServerPrefs
  • Reducers: Updated mergeServerPrefs, resetApp, and getUserData.fulfilled to reference state.server
  • useServerPref hook: Selector changed from state.prefs.serverPrefs[prefName] to state.prefs.server[prefName]
// Before
type PrefsState = {
  local: MetadataPrefs;
  global: GlobalPrefs;
  synced: SyncedPrefs;
  serverPrefs: ServerPrefs;  // ❌ Inconsistent naming
};

// After
type PrefsState = {
  local: MetadataPrefs;
  global: GlobalPrefs;
  synced: SyncedPrefs;
  server: ServerPrefs;  // ✅ Follows existing pattern
};

Backend API continues to use serverPrefs as the variable name when extracting from response payloads, maintaining compatibility with the server contract.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


🔄 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/6596 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 1/7/2026 **Status:** ✅ Merged **Merged:** 1/7/2026 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `feat/global-synced-flags` ← **Head:** `copilot/sub-pr-6234` --- ### 📝 Commits (4) - [`36bffcb`](https://github.com/actualbudget/actual/commit/36bffcb47782b97cfba85c8475e009a351cc7f91) Initial plan - [`dcce579`](https://github.com/actualbudget/actual/commit/dcce579ac489acb77468da531262ea1f7c74b0d5) Add release notes for PR #6596 - [`8ddf9fe`](https://github.com/actualbudget/actual/commit/8ddf9feb248c4bf64e4ca898b9693b64d0e30dc1) Delete upcoming-release-notes/6596.md - [`56a2943`](https://github.com/actualbudget/actual/commit/56a2943a8f08b7919a1faaded5cd6ff923af7481) Rename serverPrefs state slice property to server ### 📊 Changes **2 files changed** (+7 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/hooks/useServerPref.ts` (+1 -1) 📝 `packages/desktop-client/src/prefs/prefsSlice.ts` (+6 -6) </details> ### 📄 Description Addresses feedback from #6234 to rename the `serverPrefs` property in the PrefsState to `server` for consistency with other preference properties (`local`, `global`, `synced`). ## Changes - **PrefsState type**: `serverPrefs: ServerPrefs` → `server: ServerPrefs` - **Reducers**: Updated `mergeServerPrefs`, `resetApp`, and `getUserData.fulfilled` to reference `state.server` - **useServerPref hook**: Selector changed from `state.prefs.serverPrefs[prefName]` to `state.prefs.server[prefName]` ```typescript // Before type PrefsState = { local: MetadataPrefs; global: GlobalPrefs; synced: SyncedPrefs; serverPrefs: ServerPrefs; // ❌ Inconsistent naming }; // After type PrefsState = { local: MetadataPrefs; global: GlobalPrefs; synced: SyncedPrefs; server: ServerPrefs; // ✅ Follows existing pattern }; ``` Backend API continues to use `serverPrefs` as the variable name when extracting from response payloads, maintaining compatibility with the server contract. <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey). --- <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-20 23:38:37 -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#36820