[PR #7093] Add enable-banking importer #6935

Open
opened 2026-02-28 21:34:35 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/7093

State: open
Merged: No


Description

This pull request introduces Enable Banking as a new bank synchronization provider for Actual Budget. This acts as an alternative to SimpleFIN and GoCardless, giving users in supported European regions another option for linking their financial institutions seamlessly.

Please be aware that this is a duplicate of https://github.com/actualbudget/actual/pull/5570, but as the other PR is open for quite a while and the proposed changes are not ready for a merge and kind of a mess, I decided to try how far I get with Github copilot when starting from fresh.

I am totally fine if you decide to to work further on the other PR. I just wanted to start using actual and wanted to use the bank sync so badly :)

Key Features & Changes

Core Integration: Added the app-enablebanking service into the sync server to handle communication with the Enable Banking API (fetching banks, sessions, balances, and transactions).

UI & Modals:

Updated CreateAccountModal to include Enable Banking as an option.
Added EnableBankingInitialiseModal and EnableBankingExternalMsgModal to handle bank selection and authorization instructions.
Extracted external API errors into scrollable, user-selectable text boxes making it easier for users to report or troubleshoot routing issues.

OAuth Callback Flow:

Implemented EnableBankingCallbackPage using a popup window and postMessage architecture to cleanly return the authorization code back to the main app without navigating away from Actual.

Transaction & Sync Mapping:

Properly mapped API responses into Actual's format: fetching ISO20022 specific balance types (XPCD, CLBD, CLAV, ITAV), capturing creditor/debtor names precisely, filtering out pending (PDNG) transactions, and correctly negating debit (DBIT) transactions.

Localization:

Wrapped static UI strings inside components following the project's i18n requirements.

Testing:

Added extensive unit tests (enablebanking-service.spec.ts) to validate the new service, as well as a GitHub Action workflow routine (docker-test-build.yml) for the test docker build.

https://github.com/actualbudget/actual/pull/5570
https://github.com/actualbudget/actual/issues/5505

Testing

I did test the complete flow with two german banks including importing new transactions from them.
If wanted I could also add a short documentation.

Checklist

  • [ X] Release notes added (see link above)
  • [X ] No obvious regressions in affected areas
  • [ X] Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 14.85 MB → 14.87 MB (+26.6 kB) +0.17%
loot-core 1 5.82 MB → 5.83 MB (+6.27 kB) +0.11%
api 1 4.43 MB → 4.44 MB (+5.4 kB) +0.12%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 14.85 MB → 14.87 MB (+26.6 kB) +0.17%
Changeset
File Δ Size
src/components/modals/EnableBankingExternalMsgModal.tsx 🆕 +10.15 kB 0 B → 10.15 kB
src/components/modals/EnableBankingInitialiseModal.tsx 🆕 +5.21 kB 0 B → 5.21 kB
src/components/EnableBankingCallbackPage.tsx 🆕 +3.1 kB 0 B → 3.1 kB
src/hooks/useEnableBankingStatus.ts 🆕 +1.02 kB 0 B → 1.02 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts 📈 +148 B (+37.19%) 398 B → 546 B
src/components/modals/CreateAccountModal.tsx 📈 +3.63 kB (+22.72%) 15.98 kB → 19.61 kB
src/components/App.tsx 📈 +608 B (+6.28%) 9.46 kB → 10.05 kB
src/accounts/mutations.ts 📈 +1.29 kB (+5.89%) 21.94 kB → 23.23 kB
src/components/Modals.tsx 📈 +414 B (+2.86%) 14.13 kB → 14.54 kB
src/components/modals/SelectLinkedAccountsModal.tsx 📈 +986 B (+2.23%) 43.25 kB → 44.21 kB
src/components/banksync/index.tsx 📈 +39 B (+0.70%) 5.41 kB → 5.44 kB
src/components/mobile/banksync/MobileBankSyncPage.tsx 📈 +39 B (+0.62%) 6.16 kB → 6.2 kB
src/components/util/localeToCountry.ts 📈 +12 B (+0.56%) 2.09 kB → 2.1 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 9.54 MB → 9.56 MB (+26.52 kB) +0.27%
static/js/narrow.js 637.77 kB → 637.81 kB (+39 B) +0.01%
static/js/wide.js 164.15 kB → 164.19 kB (+39 B) +0.02%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/ca.js 188.15 kB 0%
static/js/da.js 106.35 kB 0%
static/js/de.js 180.07 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 170.37 kB 0%
static/js/es.js 174.55 kB 0%
static/js/fr.js 179.6 kB 0%
static/js/it.js 171.16 kB 0%
static/js/nb-NO.js 156.96 kB 0%
static/js/nl.js 106.37 kB 0%
static/js/pl.js 88.37 kB 0%
static/js/pt-BR.js 154.22 kB 0%
static/js/th.js 181.87 kB 0%
static/js/uk.js 214.74 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/ReportRouter.js 1.16 MB 0%
static/js/TransactionList.js 106.22 kB 0%
static/js/AppliedFilters.js 9.71 kB 0%
static/js/usePayeeRuleCounts.js 10.04 kB 0%
static/js/useTransactionBatchActions.js 13.23 kB 0%
static/js/FormulaEditor.js 1.04 MB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.82 MB → 5.83 MB (+6.27 kB) +0.11%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts 📈 +160 B (+47.76%) 335 B → 495 B
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts 📈 +4.7 kB (+17.24%) 27.28 kB → 31.98 kB
home/runner/work/actual/actual/packages/loot-core/src/server/server-config.ts 📈 +66 B (+5.98%) 1.08 kB → 1.14 kB
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts 📈 +1.35 kB (+5.20%) 25.88 kB → 27.23 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.R7FV11im.js 0 B → 5.83 MB (+5.83 MB) -

Removed

Asset File Size % Changed
kcab.worker.BwrdDDMW.js 5.82 MB → 0 B (-5.82 MB) -100%

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged
No assets were unchanged


api

Total

Files count Total bundle size % Changed
1 4.43 MB → 4.44 MB (+5.4 kB) +0.12%
Changeset
File Δ Size
src/shared/platform.ts 📈 +152 B (+48.87%) 311 B → 463 B
src/server/accounts/app.ts 📈 +3.99 kB (+17.12%) 23.3 kB → 27.29 kB
src/server/server-config.ts 📈 +62 B (+6.65%) 933 B → 995 B
src/server/accounts/sync.ts 📈 +1.2 kB (+5.20%) 23.1 kB → 24.3 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
bundle.api.js 4.43 MB → 4.44 MB (+5.4 kB) +0.12%

Smaller
No assets were smaller

Unchanged
No assets were unchanged

**Original Pull Request:** https://github.com/actualbudget/actual/pull/7093 **State:** open **Merged:** No --- ## Description This pull request introduces Enable Banking as a new bank synchronization provider for Actual Budget. This acts as an alternative to SimpleFIN and GoCardless, giving users in supported European regions another option for linking their financial institutions seamlessly. Please be aware that this is a duplicate of https://github.com/actualbudget/actual/pull/5570, but as the other PR is open for quite a while and the proposed changes are not ready for a merge and kind of a mess, I decided to try how far I get with Github copilot when starting from fresh. I am totally fine if you decide to to work further on the other PR. I just wanted to start using actual and wanted to use the bank sync so badly :) ### Key Features & Changes Core Integration: Added the app-enablebanking service into the sync server to handle communication with the Enable Banking API (fetching banks, sessions, balances, and transactions). ### UI & Modals: Updated CreateAccountModal to include Enable Banking as an option. Added EnableBankingInitialiseModal and EnableBankingExternalMsgModal to handle bank selection and authorization instructions. Extracted external API errors into scrollable, user-selectable text boxes making it easier for users to report or troubleshoot routing issues. ### OAuth Callback Flow: Implemented EnableBankingCallbackPage using a popup window and postMessage architecture to cleanly return the authorization code back to the main app without navigating away from Actual. ### Transaction & Sync Mapping: Properly mapped API responses into Actual's format: fetching ISO20022 specific balance types (XPCD, CLBD, CLAV, ITAV), capturing creditor/debtor names precisely, filtering out pending (PDNG) transactions, and correctly negating debit (DBIT) transactions. ### Localization: Wrapped static UI strings inside <Trans> components following the project's i18n requirements. ### Testing: Added extensive unit tests (enablebanking-service.spec.ts) to validate the new service, as well as a GitHub Action workflow routine (docker-test-build.yml) for the test docker build. ## Related issue(s) https://github.com/actualbudget/actual/pull/5570 https://github.com/actualbudget/actual/issues/5505 ## Testing I did test the complete flow with two german banks including importing new transactions from them. If wanted I could also add a short documentation. ## Checklist - [ X] Release notes added (see link above) - [X ] No obvious regressions in affected areas - [ X] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 14.85 MB → 14.87 MB (+26.6 kB) | +0.17% loot-core | 1 | 5.82 MB → 5.83 MB (+6.27 kB) | +0.11% api | 1 | 4.43 MB → 4.44 MB (+5.4 kB) | +0.12% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 14.85 MB → 14.87 MB (+26.6 kB) | +0.17% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/modals/EnableBankingExternalMsgModal.tsx` | 🆕 +10.15 kB | 0 B → 10.15 kB `src/components/modals/EnableBankingInitialiseModal.tsx` | 🆕 +5.21 kB | 0 B → 5.21 kB `src/components/EnableBankingCallbackPage.tsx` | 🆕 +3.1 kB | 0 B → 3.1 kB `src/hooks/useEnableBankingStatus.ts` | 🆕 +1.02 kB | 0 B → 1.02 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts` | 📈 +148 B (+37.19%) | 398 B → 546 B `src/components/modals/CreateAccountModal.tsx` | 📈 +3.63 kB (+22.72%) | 15.98 kB → 19.61 kB `src/components/App.tsx` | 📈 +608 B (+6.28%) | 9.46 kB → 10.05 kB `src/accounts/mutations.ts` | 📈 +1.29 kB (+5.89%) | 21.94 kB → 23.23 kB `src/components/Modals.tsx` | 📈 +414 B (+2.86%) | 14.13 kB → 14.54 kB `src/components/modals/SelectLinkedAccountsModal.tsx` | 📈 +986 B (+2.23%) | 43.25 kB → 44.21 kB `src/components/banksync/index.tsx` | 📈 +39 B (+0.70%) | 5.41 kB → 5.44 kB `src/components/mobile/banksync/MobileBankSyncPage.tsx` | 📈 +39 B (+0.62%) | 6.16 kB → 6.2 kB `src/components/util/localeToCountry.ts` | 📈 +12 B (+0.56%) | 2.09 kB → 2.1 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 9.54 MB → 9.56 MB (+26.52 kB) | +0.27% static/js/narrow.js | 637.77 kB → 637.81 kB (+39 B) | +0.01% static/js/wide.js | 164.15 kB → 164.19 kB (+39 B) | +0.02% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/indexeddb-main-thread-worker-e59fee74.js | 12.94 kB | 0% static/js/workbox-window.prod.es5.js | 5.64 kB | 0% static/js/ca.js | 188.15 kB | 0% static/js/da.js | 106.35 kB | 0% static/js/de.js | 180.07 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 170.37 kB | 0% static/js/es.js | 174.55 kB | 0% static/js/fr.js | 179.6 kB | 0% static/js/it.js | 171.16 kB | 0% static/js/nb-NO.js | 156.96 kB | 0% static/js/nl.js | 106.37 kB | 0% static/js/pl.js | 88.37 kB | 0% static/js/pt-BR.js | 154.22 kB | 0% static/js/th.js | 181.87 kB | 0% static/js/uk.js | 214.74 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/ReportRouter.js | 1.16 MB | 0% static/js/TransactionList.js | 106.22 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/usePayeeRuleCounts.js | 10.04 kB | 0% static/js/useTransactionBatchActions.js | 13.23 kB | 0% static/js/FormulaEditor.js | 1.04 MB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.82 MB → 5.83 MB (+6.27 kB) | +0.11% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/platform.ts` | 📈 +160 B (+47.76%) | 335 B → 495 B `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts` | 📈 +4.7 kB (+17.24%) | 27.28 kB → 31.98 kB `home/runner/work/actual/actual/packages/loot-core/src/server/server-config.ts` | 📈 +66 B (+5.98%) | 1.08 kB → 1.14 kB `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts` | 📈 +1.35 kB (+5.20%) | 25.88 kB → 27.23 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.R7FV11im.js | 0 B → 5.83 MB (+5.83 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.BwrdDDMW.js | 5.82 MB → 0 B (-5.82 MB) | -100% **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.43 MB → 4.44 MB (+5.4 kB) | +0.12% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/shared/platform.ts` | 📈 +152 B (+48.87%) | 311 B → 463 B `src/server/accounts/app.ts` | 📈 +3.99 kB (+17.12%) | 23.3 kB → 27.29 kB `src/server/server-config.ts` | 📈 +62 B (+6.65%) | 933 B → 995 B `src/server/accounts/sync.ts` | 📈 +1.2 kB (+5.20%) | 23.1 kB → 24.3 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- bundle.api.js | 4.43 MB → 4.44 MB (+5.4 kB) | +0.12% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> </details> <!--- bundlestats-action-comment key:combined end --->
GiteaMirror added the pull-request label 2026-02-28 21:34:35 -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#6935