[PR #2188] [MERGED] SimpleFin #4168

Closed
opened 2026-02-28 20:52:30 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/2188
Author: @zachwhelchel
Created: 1/7/2024
Status: Merged
Merged: 1/20/2024
Merged by: @joel-jeremy

Base: masterHead: zach/simplefin


📝 Commits (10+)

  • 000c92d Some initial UI work for adding SimpleFin.
  • e3161b8 Merge pull request #6 from zachwhelchel/master
  • 52a25d1 SimpleFin proof of concept working.
  • b1d59e3 Adds linking & unlinking to existing accounts through the account menu UI.
  • db12f67 Added loading and lint fixes.
  • 4c8df96 Merge branch 'master' into zach/simplefin
  • 28d8e55 Lint changes.
  • 78c232e Added release notes.
  • 80e6c68 Typecheck cleanup.
  • 25509b4 Import, lint, typecheck cleanups.

📊 Changes

25 files changed (+538 additions, -72 deletions)

View changed files

📝 packages/desktop-client/src/components/Modals.tsx (+11 -0)
📝 packages/desktop-client/src/components/accounts/Account.jsx (+3 -2)
📝 packages/desktop-client/src/components/modals/CreateAccount.tsx (+145 -37)
📝 packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx (+4 -2)
📝 packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx (+17 -7)
packages/desktop-client/src/components/modals/SimpleFinInitialise.tsx (+88 -0)
📝 packages/desktop-client/src/components/settings/Experimental.tsx (+1 -0)
📝 packages/desktop-client/src/gocardless.ts (+1 -0)
📝 packages/desktop-client/src/hooks/useFeatureFlag.ts (+1 -0)
📝 packages/desktop-client/src/hooks/useGoCardlessStatus.ts (+5 -3)
packages/desktop-client/src/hooks/useSimpleFinStatus.ts (+33 -0)
packages/loot-core/migrations/1704572023730_add_account_sync_source.sql (+11 -0)
📝 packages/loot-core/src/client/actions/account.ts (+11 -0)
📝 packages/loot-core/src/client/state-types/modals.d.ts (+5 -0)
📝 packages/loot-core/src/server/accounts/link.ts (+1 -1)
📝 packages/loot-core/src/server/accounts/sync.ts (+63 -17)
📝 packages/loot-core/src/server/aql/schema/index.ts (+1 -0)
📝 packages/loot-core/src/server/main.ts (+103 -2)
📝 packages/loot-core/src/server/server-config.ts (+2 -0)
📝 packages/loot-core/src/shared/transactions.test.ts (+1 -0)

...and 5 more files

📄 Description

SimpleFin can now be configured in the UI and sync transactions, somewhat adjacent to this issue.

There is also a server PR for these changes: https://github.com/actualbudget/actual-server/pull/296

For testing:

  • Run both the server PR and this PR locally.
  • Use this SimpleFIN token for testing: aHR0cHM6Ly9iZXRhLWJyaWRnZS5zaW1wbGVmaW4ub3JnL3NpbXBsZWZpbi9jbGFpbS9ERU1P

For discussion:

  • Should the syncing logic be in the app? Or on the server? GoCardless has the transactions returned from the server and all the merging/adding/etc happens in the app. I followed the same strategy. But you could make a case this could happen on the server? Then you could use a cron job to do this nightly. I didn't go that route because I assumed the logic in the app for GoCardless was more "prod ready" compared to the script that uses the actual-api for import. I also struggled with how I would adapt that code to work on the server. Here is the script that uses the api (and informed a lot this PR's changes as well): https://github.com/duplaja/actual-simplefin-sync/

Still to be addressed:

  • Unlinking and relinking accounts not yet supported (only new accounts work currently).
  • Unlinking needs to remove the account_sync_source.
  • GoCardless needs to set the account_sync_source as well.
  • The UI for adding the SimpleFin token doesn't advance correctly, exit the flow and restart it for now.
  • Mask & Official Name might not be supported like they are in GoCardless, decide how to handle this (Look for //TODO: Do we have this?).
  • When you go to link an account with SimpleFin after the token has been set the loading is slow and has no indicator. Also, could we speed up the call by looking for less transactions (since they aren't needed at this point).
  • Need to add release notes. Make sure to credit those who worked on the SimpleFin script I incorporated also.

Here are some screenshots of the UI currently:
Screenshot 2024-01-06 at 8 02 53 PM
Screenshot 2024-01-05 at 8 03 21 PM
Screenshot 2024-01-06 at 12 26 16 PM


🔄 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/2188 **Author:** [@zachwhelchel](https://github.com/zachwhelchel) **Created:** 1/7/2024 **Status:** ✅ Merged **Merged:** 1/20/2024 **Merged by:** [@joel-jeremy](https://github.com/joel-jeremy) **Base:** `master` ← **Head:** `zach/simplefin` --- ### 📝 Commits (10+) - [`000c92d`](https://github.com/actualbudget/actual/commit/000c92d0ba9ab47f28420d0eef96eebcd26bd4b8) Some initial UI work for adding SimpleFin. - [`e3161b8`](https://github.com/actualbudget/actual/commit/e3161b8448ba6142ea7fc94c88b2f644a1fc0fdb) Merge pull request #6 from zachwhelchel/master - [`52a25d1`](https://github.com/actualbudget/actual/commit/52a25d182bb282c942674e4c3d18c22afd097a6a) SimpleFin proof of concept working. - [`b1d59e3`](https://github.com/actualbudget/actual/commit/b1d59e378c3b6f2d7f2d909923252443902045f3) Adds linking & unlinking to existing accounts through the account menu UI. - [`db12f67`](https://github.com/actualbudget/actual/commit/db12f67d23b26a8cbeac26ad29941c03127200df) Added loading and lint fixes. - [`4c8df96`](https://github.com/actualbudget/actual/commit/4c8df9641ac27ecb4b56958ccd8903be59d688f2) Merge branch 'master' into zach/simplefin - [`28d8e55`](https://github.com/actualbudget/actual/commit/28d8e5590833630d01a317cd1672e39968c82559) Lint changes. - [`78c232e`](https://github.com/actualbudget/actual/commit/78c232e84052a838cf0f1cdc4b60d59bcb916dc9) Added release notes. - [`80e6c68`](https://github.com/actualbudget/actual/commit/80e6c68c4dceea3e3217d6361dd3900770295257) Typecheck cleanup. - [`25509b4`](https://github.com/actualbudget/actual/commit/25509b4f5311a878a599c888e56a2a82a9437626) Import, lint, typecheck cleanups. ### 📊 Changes **25 files changed** (+538 additions, -72 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/Modals.tsx` (+11 -0) 📝 `packages/desktop-client/src/components/accounts/Account.jsx` (+3 -2) 📝 `packages/desktop-client/src/components/modals/CreateAccount.tsx` (+145 -37) 📝 `packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx` (+4 -2) 📝 `packages/desktop-client/src/components/modals/SelectLinkedAccounts.jsx` (+17 -7) ➕ `packages/desktop-client/src/components/modals/SimpleFinInitialise.tsx` (+88 -0) 📝 `packages/desktop-client/src/components/settings/Experimental.tsx` (+1 -0) 📝 `packages/desktop-client/src/gocardless.ts` (+1 -0) 📝 `packages/desktop-client/src/hooks/useFeatureFlag.ts` (+1 -0) 📝 `packages/desktop-client/src/hooks/useGoCardlessStatus.ts` (+5 -3) ➕ `packages/desktop-client/src/hooks/useSimpleFinStatus.ts` (+33 -0) ➕ `packages/loot-core/migrations/1704572023730_add_account_sync_source.sql` (+11 -0) 📝 `packages/loot-core/src/client/actions/account.ts` (+11 -0) 📝 `packages/loot-core/src/client/state-types/modals.d.ts` (+5 -0) 📝 `packages/loot-core/src/server/accounts/link.ts` (+1 -1) 📝 `packages/loot-core/src/server/accounts/sync.ts` (+63 -17) 📝 `packages/loot-core/src/server/aql/schema/index.ts` (+1 -0) 📝 `packages/loot-core/src/server/main.ts` (+103 -2) 📝 `packages/loot-core/src/server/server-config.ts` (+2 -0) 📝 `packages/loot-core/src/shared/transactions.test.ts` (+1 -0) _...and 5 more files_ </details> ### 📄 Description SimpleFin can now be configured in the UI and sync transactions, somewhat adjacent to this [issue](https://github.com/actualbudget/actual/issues/898). There is also a server PR for these changes: https://github.com/actualbudget/actual-server/pull/296 For testing: - Run both the server PR and this PR locally. - Use this SimpleFIN token for testing: aHR0cHM6Ly9iZXRhLWJyaWRnZS5zaW1wbGVmaW4ub3JnL3NpbXBsZWZpbi9jbGFpbS9ERU1P For discussion: - Should the syncing logic be in the app? Or on the server? GoCardless has the transactions returned from the server and all the merging/adding/etc happens in the app. I followed the same strategy. But you could make a case this could happen on the server? Then you could use a cron job to do this nightly. I didn't go that route because I assumed the logic in the app for GoCardless was more "prod ready" compared to the script that uses the actual-api for import. I also struggled with how I would adapt that code to work on the server. Here is the script that uses the api (and informed a lot this PR's changes as well): https://github.com/duplaja/actual-simplefin-sync/ Still to be addressed: - [x] Unlinking and relinking accounts not yet supported (only new accounts work currently). - [x] Unlinking needs to remove the `account_sync_source`. - [x] GoCardless needs to set the `account_sync_source` as well. - [x] The UI for adding the SimpleFin token doesn't advance correctly, exit the flow and restart it for now. - [x] Mask & Official Name might not be supported like they are in GoCardless, decide how to handle this (Look for `//TODO: Do we have this?`). - [x] When you go to link an account with SimpleFin after the token has been set the loading is slow and has no indicator. Also, could we speed up the call by looking for less transactions (since they aren't needed at this point). - [x] Need to add release notes. Make sure to credit those who worked on the SimpleFin script I incorporated also. Here are some screenshots of the UI currently: <img width="701" alt="Screenshot 2024-01-06 at 8 02 53 PM" src="https://github.com/actualbudget/actual/assets/869446/af0c01c0-8193-4a93-b328-7106f0744a90"> <img width="818" alt="Screenshot 2024-01-05 at 8 03 21 PM" src="https://github.com/actualbudget/actual/assets/869446/da65b0d5-82e3-4714-ad47-560b9ebac419"> <img width="1609" alt="Screenshot 2024-01-06 at 12 26 16 PM" src="https://github.com/actualbudget/actual/assets/869446/29f74960-e91b-4ae0-a1f8-082ebf4519c9"> --- <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 20:52:30 -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#4168