[PR #4601] [CLOSED] [WIP] Support for Investments #39907

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/4601
Author: @alecbakholdin
Created: 3/11/2025
Status: Closed

Base: masterHead: investment-accounts


📝 Commits (10+)

  • 6468bd7 created feature flag and toggle
  • 911cac5 Added ability to create investment accounts when feature flag is enabled
  • 916ada9 Added migration to create holdings table
  • bc82c0a added holding types
  • bb6b0c7 show different ui for investment account
  • b838f65 fixed DbHolding and HoldingEntity types
  • 4b4fce4 added refresh to useQuery
  • e5e2888 added db actions for holdings
  • 4aecdc0 fixed bug for normal account creation
  • 0822bd3 allowed table.tsx to handle undefined current ref

📊 Changes

31 files changed (+1024 additions, -196 deletions)

View changed files

📝 packages/desktop-client/src/components/accounts/Account.tsx (+113 -75)
📝 packages/desktop-client/src/components/accounts/Header.tsx (+51 -6)
packages/desktop-client/src/components/accounts/investments/InvestmentAccount.tsx (+398 -0)
📝 packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx (+19 -0)
📝 packages/desktop-client/src/components/settings/Experimental.tsx (+6 -0)
📝 packages/desktop-client/src/components/table.tsx (+5 -5)
📝 packages/desktop-client/src/hooks/useFeatureFlag.ts (+1 -0)
packages/desktop-client/src/hooks/useHoldingActions.ts (+1 -0)
packages/loot-core/migrations/1741553991000_add_holdings_table.sql (+16 -0)
📝 packages/loot-core/src/client/queries.ts (+11 -0)
📝 packages/loot-core/src/client/queries/queriesSlice.ts (+3 -1)
📝 packages/loot-core/src/client/query-hooks.ts (+4 -1)
📝 packages/loot-core/src/server/accounts/app.ts (+3 -0)
📝 packages/loot-core/src/server/accounts/sync.ts (+79 -19)
📝 packages/loot-core/src/server/aql/schema/index.ts (+13 -0)
📝 packages/loot-core/src/server/db/index.ts (+26 -0)
📝 packages/loot-core/src/server/db/types/index.ts (+16 -0)
packages/loot-core/src/server/holdings/index.ts (+27 -0)
📝 packages/loot-core/src/server/main.ts (+2 -0)
📝 packages/loot-core/src/types/handlers.d.ts (+2 -0)

...and 11 more files

📄 Description

Hello! This pull request is very much a work in progress as I make things more visually appealing and more robust, but I wanted to open to it see if I could get some feedback on the general direction this is going. Here's the status of this work so far:

  1. I've added a feature flag
    image

  2. Right now, that feature flag controls the existence of this dropdown during account creation which allows an account to be set as an investment account.
    image

  3. Once an investment account has been created, there is a new "Holdings" button that shows up in the account header which allows switching to the new view, and a matching "Transactions" button that allows switching back to Transactions
    image
    image

  4. This account can be linked as normal to a simpleFIN account and it will pull from the "holdings" response field to sync data. Right now the sync will always create new rows rather than update existing ones. This is an area that I'm going to keep working on before calling this anything close to complete.
    image

  5. You can also create holdings and edit existing holdings using manually
    image

I'm well aware that there are a number of things that don't work as intended here (e.g. sync issue, account header doesn't interface with the holdings table, no delete option). This is very much a work in progress and I have a lot of small and big UI changes to make before I can call this done. I just wanted to create this PR to get feedback on the general direction of the feature as I personally think this adds a lot of value for people.


🔄 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/4601 **Author:** [@alecbakholdin](https://github.com/alecbakholdin) **Created:** 3/11/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `investment-accounts` --- ### 📝 Commits (10+) - [`6468bd7`](https://github.com/actualbudget/actual/commit/6468bd79b041858f0e1be2854a2ed2b95c41495c) created feature flag and toggle - [`911cac5`](https://github.com/actualbudget/actual/commit/911cac51dcfdb49f22e35eb1fc53423af7b86355) Added ability to create investment accounts when feature flag is enabled - [`916ada9`](https://github.com/actualbudget/actual/commit/916ada94d6109fbdc158c65b1dfb11b4816b900e) Added migration to create holdings table - [`bc82c0a`](https://github.com/actualbudget/actual/commit/bc82c0a994828d3d4a1d1aa00aa1c69a9da91ca4) added holding types - [`bb6b0c7`](https://github.com/actualbudget/actual/commit/bb6b0c7f818bf2ae056bddbc7bbf170d4afbdf17) show different ui for investment account - [`b838f65`](https://github.com/actualbudget/actual/commit/b838f659d4d13ed64038d65c665ccf13762fef40) fixed DbHolding and HoldingEntity types - [`4b4fce4`](https://github.com/actualbudget/actual/commit/4b4fce418ea0cb729ec318b9d344ea84ef707911) added refresh to useQuery - [`e5e2888`](https://github.com/actualbudget/actual/commit/e5e2888fb28c0c26080f292340167d6c4ae1d5f4) added db actions for holdings - [`4aecdc0`](https://github.com/actualbudget/actual/commit/4aecdc0c4ba04f8b299a1d225ca246eeed469308) fixed bug for normal account creation - [`0822bd3`](https://github.com/actualbudget/actual/commit/0822bd35979829021d2f17f7a746c895f1251e27) allowed table.tsx to handle undefined current ref ### 📊 Changes **31 files changed** (+1024 additions, -196 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+113 -75) 📝 `packages/desktop-client/src/components/accounts/Header.tsx` (+51 -6) ➕ `packages/desktop-client/src/components/accounts/investments/InvestmentAccount.tsx` (+398 -0) 📝 `packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx` (+19 -0) 📝 `packages/desktop-client/src/components/settings/Experimental.tsx` (+6 -0) 📝 `packages/desktop-client/src/components/table.tsx` (+5 -5) 📝 `packages/desktop-client/src/hooks/useFeatureFlag.ts` (+1 -0) ➕ `packages/desktop-client/src/hooks/useHoldingActions.ts` (+1 -0) ➕ `packages/loot-core/migrations/1741553991000_add_holdings_table.sql` (+16 -0) 📝 `packages/loot-core/src/client/queries.ts` (+11 -0) 📝 `packages/loot-core/src/client/queries/queriesSlice.ts` (+3 -1) 📝 `packages/loot-core/src/client/query-hooks.ts` (+4 -1) 📝 `packages/loot-core/src/server/accounts/app.ts` (+3 -0) 📝 `packages/loot-core/src/server/accounts/sync.ts` (+79 -19) 📝 `packages/loot-core/src/server/aql/schema/index.ts` (+13 -0) 📝 `packages/loot-core/src/server/db/index.ts` (+26 -0) 📝 `packages/loot-core/src/server/db/types/index.ts` (+16 -0) ➕ `packages/loot-core/src/server/holdings/index.ts` (+27 -0) 📝 `packages/loot-core/src/server/main.ts` (+2 -0) 📝 `packages/loot-core/src/types/handlers.d.ts` (+2 -0) _...and 11 more files_ </details> ### 📄 Description Hello! This pull request is very much a work in progress as I make things more visually appealing and more robust, but I wanted to open to it see if I could get some feedback on the general direction this is going. Here's the status of this work so far: 1. I've added a feature flag <img width="589" alt="image" src="https://github.com/user-attachments/assets/28b4e13e-3f13-4040-8516-a37c70fd58a6" /> 2. Right now, that feature flag controls the existence of this dropdown during account creation which allows an account to be set as an investment account. <img width="566" alt="image" src="https://github.com/user-attachments/assets/99f176c7-b152-4827-af58-0819209aa18f" /> 3. Once an investment account has been created, there is a new "Holdings" button that shows up in the account header which allows switching to the new view, and a matching "Transactions" button that allows switching back to Transactions <img width="555" alt="image" src="https://github.com/user-attachments/assets/cbc0f3ea-63ce-4889-b95f-1ae5474b1741" /> <img width="344" alt="image" src="https://github.com/user-attachments/assets/009a0b9f-2eef-4796-bb16-350c33689992" /> 4. This account can be linked as normal to a simpleFIN account and it will pull from the "holdings" response field to sync data. Right now the sync will always create new rows rather than update existing ones. This is an area that I'm going to keep working on before calling this anything close to complete. <img width="1392" alt="image" src="https://github.com/user-attachments/assets/27c4e921-685d-414d-8e1e-cbe52e873a84" /> 5. You can also create holdings and edit existing holdings using manually <img width="1397" alt="image" src="https://github.com/user-attachments/assets/8b3d8ebc-1e7a-40c6-b731-b40099a5deea" /> I'm well aware that there are a number of things that don't work as intended here (e.g. sync issue, account header doesn't interface with the holdings table, no delete option). This is very much a work in progress and I have a lot of small and big UI changes to make before I can call this done. I just wanted to create this PR to get feedback on the general direction of the feature as I personally think this adds a lot of value for people. --- <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 12:49:20 -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#39907