[PR #4000] [MERGED] [Redux Toolkit Migration] Use new Redux Toolkit configureStore API #5145

Closed
opened 2026-02-28 21:06:42 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4000
Author: @joel-jeremy
Created: 12/17/2024
Status: Merged
Merged: 1/8/2025
Merged by: @joel-jeremy

Base: masterHead: redux-toolkit


📝 Commits (10+)

  • e886f31 Initial upgrade to redux toolkit, more fixes needed e.g. removing non-serializable values from the state
  • ddb9e3d Fix typecheck and lint
  • cd61a9f Fix lint and typecheck errors
  • 5927d07 Fix lint and typecheck errors
  • 4d680c1 Fix typecheck error
  • 8518d44 Cleanup
  • b2f97ab Remove useAppStore
  • 076dcee Cleanup
  • 27f8702 Undo renames
  • 2443314 Code review feedback

📊 Changes

136 files changed (+451 additions, -478 deletions)

View changed files

📝 packages/desktop-client/package.json (+1 -4)
📝 packages/desktop-client/src/auth/AuthProvider.tsx (+2 -4)
📝 packages/desktop-client/src/auth/ProtectedRoute.tsx (+1 -1)
📝 packages/desktop-client/src/components/App.tsx (+2 -3)
📝 packages/desktop-client/src/components/AppBackground.tsx (+1 -1)
📝 packages/desktop-client/src/components/BankSyncStatus.tsx (+2 -6)
📝 packages/desktop-client/src/components/FinancesApp.tsx (+2 -5)
📝 packages/desktop-client/src/components/HelpMenu.tsx (+1 -1)
📝 packages/desktop-client/src/components/LoggedInUser.tsx (+3 -4)
📝 packages/desktop-client/src/components/ManageRules.tsx (+1 -1)
📝 packages/desktop-client/src/components/Modals.tsx (+1 -1)
📝 packages/desktop-client/src/components/Notifications.tsx (+3 -8)
📝 packages/desktop-client/src/components/Titlebar.tsx (+1 -1)
📝 packages/desktop-client/src/components/UpdateNotification.tsx (+3 -4)
📝 packages/desktop-client/src/components/accounts/Account.tsx (+6 -8)
📝 packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx (+3 -2)
📝 packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.test.tsx (+1 -1)
📝 packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx (+1 -1)
📝 packages/desktop-client/src/components/budget/index.tsx (+1 -1)
📝 packages/desktop-client/src/components/manager/BudgetList.tsx (+1 -1)

...and 80 more files

📄 Description

Initial migration to redux-toolkit. This PR focuses on retrofitting the existing reducers to the newer redux toolkit APIs. We can work on converting them to redux slices in a future PR.

Aside from converting to the usage of typed useAppDispatcher and useAppSelector, I had to do some changes to the SET_LAST_UNDO_STATE and SET_LAST_SPLIT_STATE to prevent mutating the state in their reducers because redux toolkit now check for that.

There are still some redux validation errors due to non-serializable values being on the the state e.g. modal callback functions. But I have disabled those checks temporarily until we can address them in a future PR.

  • Use redux toolkit's configureStore API
  • Address Redux Immutability Middleware errors in reducers (SET_LAST_UNDO_STATE, SET_LAST_SPLIT_STATE)
  • Address Redux Serializability Middleware errors in reducers (e.g. modal callback functions)
  • Update reducers to use new redux toolkit createSlice API
  • Update actions to use new redux toolkit createAsyncThunk API

🔄 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/4000 **Author:** [@joel-jeremy](https://github.com/joel-jeremy) **Created:** 12/17/2024 **Status:** ✅ Merged **Merged:** 1/8/2025 **Merged by:** [@joel-jeremy](https://github.com/joel-jeremy) **Base:** `master` ← **Head:** `redux-toolkit` --- ### 📝 Commits (10+) - [`e886f31`](https://github.com/actualbudget/actual/commit/e886f311639628b571ad28a933fb0f774c0d5dec) Initial upgrade to redux toolkit, more fixes needed e.g. removing non-serializable values from the state - [`ddb9e3d`](https://github.com/actualbudget/actual/commit/ddb9e3d5fafb65d2fdaeae277ec24ed8676d79e8) Fix typecheck and lint - [`cd61a9f`](https://github.com/actualbudget/actual/commit/cd61a9fcef808fab358a4c5b83dff9bf5261121a) Fix lint and typecheck errors - [`5927d07`](https://github.com/actualbudget/actual/commit/5927d077092702d9858e8b00940d54f76bc74b54) Fix lint and typecheck errors - [`4d680c1`](https://github.com/actualbudget/actual/commit/4d680c196de693821a9e425d72399d63f2539b68) Fix typecheck error - [`8518d44`](https://github.com/actualbudget/actual/commit/8518d446728eef9e805f3019185fd6d34e665b37) Cleanup - [`b2f97ab`](https://github.com/actualbudget/actual/commit/b2f97aba1e1d426f2f131086efd41871b46f0cc9) Remove useAppStore - [`076dcee`](https://github.com/actualbudget/actual/commit/076dcee8829b36bc0f390703b869fabc39f88f97) Cleanup - [`27f8702`](https://github.com/actualbudget/actual/commit/27f8702b0de64bfe19e8eb8937754b71e2fbed06) Undo renames - [`2443314`](https://github.com/actualbudget/actual/commit/24433141535965f6af4f6ff6921302d470621e47) Code review feedback ### 📊 Changes **136 files changed** (+451 additions, -478 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/package.json` (+1 -4) 📝 `packages/desktop-client/src/auth/AuthProvider.tsx` (+2 -4) 📝 `packages/desktop-client/src/auth/ProtectedRoute.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/App.tsx` (+2 -3) 📝 `packages/desktop-client/src/components/AppBackground.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/BankSyncStatus.tsx` (+2 -6) 📝 `packages/desktop-client/src/components/FinancesApp.tsx` (+2 -5) 📝 `packages/desktop-client/src/components/HelpMenu.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/LoggedInUser.tsx` (+3 -4) 📝 `packages/desktop-client/src/components/ManageRules.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/Modals.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/Notifications.tsx` (+3 -8) 📝 `packages/desktop-client/src/components/Titlebar.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/UpdateNotification.tsx` (+3 -4) 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+6 -8) 📝 `packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx` (+3 -2) 📝 `packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.test.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/budget/index.tsx` (+1 -1) 📝 `packages/desktop-client/src/components/manager/BudgetList.tsx` (+1 -1) _...and 80 more files_ </details> ### 📄 Description <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes --> Initial migration to redux-toolkit. This PR focuses on retrofitting the existing reducers to the newer redux toolkit APIs. We can work on converting them to redux slices in a future PR. Aside from converting to the usage of typed `useAppDispatcher` and `useAppSelector`, I had to do some changes to the `SET_LAST_UNDO_STATE` and `SET_LAST_SPLIT_STATE` to prevent mutating the state in their reducers because redux toolkit now check for that. There are still some redux validation errors due to non-serializable values being on the the state e.g. modal callback functions. But I have disabled those checks temporarily until we can address them in a future PR. - [x] Use redux toolkit's `configureStore` API - [x] Address Redux [Immutability Middleware](https://redux-toolkit.js.org/api/immutabilityMiddleware) errors in reducers (`SET_LAST_UNDO_STATE`, `SET_LAST_SPLIT_STATE`) - [ ] Address Redux [Serializability Middleware](https://redux-toolkit.js.org/api/serializabilityMiddleware) errors in reducers (e.g. modal callback functions) - [ ] Update reducers to use new redux toolkit `createSlice` API - [ ] Update actions to use new redux toolkit `createAsyncThunk` API --- <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-02-28 21:06:42 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5145