[PR #7345] Integrate Enable Banking as a bank sync provider #21460

Open
opened 2026-04-14 22:05:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7345
Author: @AurelDemiri
Created: 3/31/2026
Status: 🔄 Open

Base: masterHead: feature/enable-banking


📝 Commits (10+)

  • d8863a8 Integrate Enable Banking as bank sync provider
  • 33619df [AI] Address code review feedback for Enable Banking integration
  • 1cbe1ef [AI] Fix missing patterns in Enable Banking integration
  • dc62a6a Forward PSU headers to Enable Banking API
  • b13d04c Fix Enable Banking re-auth dispatch
  • cc54422 Respect ASPSP maximum_consent_validity when starting Enable Banking auth
  • 8658b88 Fix missing types for module jws
  • 5661ab7 Add upcoming release notes
  • 9403f57 Fix format
  • e4b9d9c Merge branch 'master' into feature/enable-banking

📊 Changes

43 files changed (+4216 additions, -14 deletions)

View changed files

📝 packages/desktop-client/package.json (+1 -0)
📝 packages/desktop-client/src/accounts/mutations.ts (+43 -0)
packages/desktop-client/src/components/EnableBankingCallback.tsx (+121 -0)
📝 packages/desktop-client/src/components/FinancesApp.tsx (+6 -0)
📝 packages/desktop-client/src/components/Modals.tsx (+17 -0)
📝 packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx (+7 -2)
📝 packages/desktop-client/src/components/banksync/index.tsx (+1 -0)
📝 packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsList.tsx (+5 -2)
📝 packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx (+1 -0)
📝 packages/desktop-client/src/components/modals/CreateAccountModal.tsx (+154 -1)
packages/desktop-client/src/components/modals/EnableBankingExternalMsgModal.tsx (+375 -0)
packages/desktop-client/src/components/modals/EnableBankingInitialiseModal.tsx (+223 -0)
📝 packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (+34 -2)
📝 packages/desktop-client/src/components/settings/Experimental.tsx (+3 -0)
packages/desktop-client/src/enablebanking.ts (+124 -0)
packages/desktop-client/src/hooks/useEnableBankingStatus.ts (+38 -0)
📝 packages/desktop-client/src/hooks/useFeatureFlag.ts (+1 -0)
📝 packages/desktop-client/src/modals/modalsSlice.ts (+25 -0)
📝 packages/desktop-client/vite.config.ts (+1 -0)
📝 packages/loot-core/src/server/accounts/app.ts (+269 -0)

...and 23 more files

📄 Description

Description

Alternative implementation of Enable Banking as a bank sync provider (EU banks), replacing the approach in #5570 with a leaner architecture and fewer dependencies. This implementation tries its best to copy the patterns and behavior from the existing bank sync integrations.

Improvements over PR #5570 are:

  • Server-side long-polling instead of client-side busy polling
  • PSU header forwarding so we are not limited to 4 req/day under PSD2
  • Consent validity: respects ASPSP maximum_consent_validity, capped at 90-day default. PR 5570 hardcodes to 180 days
  • Proper request timeouts
  • More test cases

My React knowledge is fairly limited. I’m more comfortable with Vue or Angular, so I’d appreciate any comments.

Fixes #5445, Fixes #5505

Supersedes PR #5570

Testing

  • Tested end-to-end against Enable Banking sandbox and production environments using Belfius as ASPSP
  • yarn typecheck passes
  • yarn lint passes
  • yarn test passes (17 Enable Banking normalization specs, plus service, poll-auth, error, and JWT test suites)

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • 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 28 12.9 MB → 12.93 MB (+27.2 kB) +0.21%
loot-core 1 4.84 MB → 4.85 MB (+6.25 kB) +0.13%
api 1 3.88 MB → 3.88 MB (+6.11 kB) +0.15%
cli 1 7.89 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
28 12.9 MB → 12.93 MB (+27.2 kB) +0.21%
Changeset
File Δ Size
src/components/modals/EnableBankingExternalMsgModal.tsx 🆕 +9.67 kB 0 B → 9.67 kB
src/components/modals/EnableBankingInitialiseModal.tsx 🆕 +5.47 kB 0 B → 5.47 kB
src/components/EnableBankingCallback.tsx 🆕 +2.89 kB 0 B → 2.89 kB
src/enablebanking.ts 🆕 +1.91 kB 0 B → 1.91 kB
src/hooks/useEnableBankingStatus.ts 🆕 +741 B 0 B → 741 B
src/components/modals/CreateAccountModal.tsx 📈 +3.78 kB (+25.17%) 15.01 kB → 18.78 kB
src/hooks/useEffectAfterMount.ts 📈 +67 B (+23.43%) 286 B → 353 B
src/accounts/mutations.ts 📈 +779 B (+6.04%) 12.6 kB → 13.36 kB
src/hooks/useFeatureFlag.ts 📈 +23 B (+4.23%) 544 B → 567 B
src/components/Modals.tsx 📈 +413 B (+3.21%) 12.56 kB → 12.97 kB
src/components/modals/SelectLinkedAccountsModal.tsx 📈 +835 B (+2.02%) 40.28 kB → 41.09 kB
src/components/settings/Experimental.tsx 📈 +215 B (+1.90%) 11.07 kB → 11.28 kB
src/components/FinancesApp.tsx 📈 +305 B (+1.71%) 17.44 kB → 17.74 kB
src/components/accounts/AccountSyncCheck.tsx 📈 +142 B (+1.62%) 8.54 kB → 8.68 kB
src/components/banksync/index.tsx 📈 +36 B (+0.73%) 4.84 kB → 4.87 kB
src/components/mobile/banksync/MobileBankSyncPage.tsx 📈 +36 B (+0.63%) 5.6 kB → 5.63 kB
package.json 📈 +45 B (+0.54%) 8.19 kB → 8.23 kB
src/components/alerts.tsx 📉 -67 B (-1.80%) 3.64 kB → 3.57 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 3.32 MB → 3.35 MB (+26.84 kB) +0.79%
static/js/extends.js 485.17 kB → 485.95 kB (+802 B) +0.16%

Smaller

Asset File Size % Changed
static/js/narrow.js 363.02 kB → 362.59 kB (-433 B) -0.12%

Unchanged

Asset File Size % Changed
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 852.77 kB 0%
static/js/ReportRouter.js 1.17 MB 0%
static/js/TransactionList.js 82.49 kB 0%
static/js/Value.js 4.33 MB 0%
static/js/ca.js 191.98 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 174.38 kB 0%
static/js/en-GB.js 8.2 kB 0%
static/js/en.js 175.89 kB 0%
static/js/es.js 181.8 kB 0%
static/js/fr.js 177.08 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 165.95 kB 0%
static/js/nb-NO.js 151.85 kB 0%
static/js/nl.js 108.93 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 177.44 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 179.3 kB 0%
static/js/theme.js 30.79 kB 0%
static/js/uk.js 212.6 kB 0%
static/js/wide.js 295 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 110.19 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.84 MB → 4.85 MB (+6.25 kB) +0.13%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts 📈 +4.8 kB (+22.11%) 21.73 kB → 26.53 kB
home/runner/work/actual/actual/packages/loot-core/src/server/post.ts 📈 +481 B (+11.95%) 3.93 kB → 4.4 kB
home/runner/work/actual/actual/packages/loot-core/src/server/server-config.ts 📈 +58 B (+6.48%) 895 B → 953 B
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts 📈 +936 B (+4.12%) 22.17 kB → 23.08 kB
View detailed bundle breakdown

Added

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

Removed

Asset File Size % Changed
kcab.worker.DZcmk4OR.js 4.84 MB → 0 B (-4.84 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 3.88 MB → 3.88 MB (+6.11 kB) +0.15%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts 📈 +4.69 kB (+21.94%) 21.4 kB → 26.09 kB
home/runner/work/actual/actual/packages/loot-core/src/server/post.ts 📈 +475 B (+12.23%) 3.79 kB → 4.26 kB
home/runner/work/actual/actual/packages/loot-core/src/server/server-config.ts 📈 +57 B (+6.54%) 872 B → 929 B
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts 📈 +919 B (+4.13%) 21.73 kB → 22.63 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.88 MB → 3.88 MB (+6.11 kB) +0.15%

Smaller
No assets were smaller

Unchanged
No assets were unchanged


cli

Total

Files count Total bundle size % Changed
1 7.89 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
cli.js 7.89 MB 0%

🔄 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/7345 **Author:** [@AurelDemiri](https://github.com/AurelDemiri) **Created:** 3/31/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `feature/enable-banking` --- ### 📝 Commits (10+) - [`d8863a8`](https://github.com/actualbudget/actual/commit/d8863a8d16ba8494649990867c993e4deabaaad5) Integrate Enable Banking as bank sync provider - [`33619df`](https://github.com/actualbudget/actual/commit/33619dfc1d3bcc6f67a2e1c416267f8767f63d5a) [AI] Address code review feedback for Enable Banking integration - [`1cbe1ef`](https://github.com/actualbudget/actual/commit/1cbe1efbf4defeb6ca0645e28ee61008d19fb6bc) [AI] Fix missing patterns in Enable Banking integration - [`dc62a6a`](https://github.com/actualbudget/actual/commit/dc62a6aff7901bd24b35c50d9ef5d7a6992a9250) Forward PSU headers to Enable Banking API - [`b13d04c`](https://github.com/actualbudget/actual/commit/b13d04cc4ae96334f9b3461b09bf8bb0861b9401) Fix Enable Banking re-auth dispatch - [`cc54422`](https://github.com/actualbudget/actual/commit/cc544222da4552d3dcfa85879f4f664f7f9b15e5) Respect ASPSP maximum_consent_validity when starting Enable Banking auth - [`8658b88`](https://github.com/actualbudget/actual/commit/8658b889ecb78f498c92692949ab85ab412ab3a3) Fix missing types for module jws - [`5661ab7`](https://github.com/actualbudget/actual/commit/5661ab7a6f92d29ef8e6fa885e84a4d5568e1ba4) Add upcoming release notes - [`9403f57`](https://github.com/actualbudget/actual/commit/9403f57e6f890d12eefa4533ee381415e7f7c9ae) Fix format - [`e4b9d9c`](https://github.com/actualbudget/actual/commit/e4b9d9c94e6fbf99527c9979ed5500c3278dd807) Merge branch 'master' into feature/enable-banking ### 📊 Changes **43 files changed** (+4216 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/package.json` (+1 -0) 📝 `packages/desktop-client/src/accounts/mutations.ts` (+43 -0) ➕ `packages/desktop-client/src/components/EnableBankingCallback.tsx` (+121 -0) 📝 `packages/desktop-client/src/components/FinancesApp.tsx` (+6 -0) 📝 `packages/desktop-client/src/components/Modals.tsx` (+17 -0) 📝 `packages/desktop-client/src/components/accounts/AccountSyncCheck.tsx` (+7 -2) 📝 `packages/desktop-client/src/components/banksync/index.tsx` (+1 -0) 📝 `packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsList.tsx` (+5 -2) 📝 `packages/desktop-client/src/components/mobile/banksync/MobileBankSyncPage.tsx` (+1 -0) 📝 `packages/desktop-client/src/components/modals/CreateAccountModal.tsx` (+154 -1) ➕ `packages/desktop-client/src/components/modals/EnableBankingExternalMsgModal.tsx` (+375 -0) ➕ `packages/desktop-client/src/components/modals/EnableBankingInitialiseModal.tsx` (+223 -0) 📝 `packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx` (+34 -2) 📝 `packages/desktop-client/src/components/settings/Experimental.tsx` (+3 -0) ➕ `packages/desktop-client/src/enablebanking.ts` (+124 -0) ➕ `packages/desktop-client/src/hooks/useEnableBankingStatus.ts` (+38 -0) 📝 `packages/desktop-client/src/hooks/useFeatureFlag.ts` (+1 -0) 📝 `packages/desktop-client/src/modals/modalsSlice.ts` (+25 -0) 📝 `packages/desktop-client/vite.config.ts` (+1 -0) 📝 `packages/loot-core/src/server/accounts/app.ts` (+269 -0) _...and 23 more files_ </details> ### 📄 Description ## Description Alternative implementation of Enable Banking as a bank sync provider (EU banks), replacing the approach in #5570 with a leaner architecture and fewer dependencies. This implementation tries its best to copy the patterns and behavior from the existing bank sync integrations. Improvements over PR #5570 are: - Server-side long-polling instead of client-side busy polling - PSU header forwarding so we are not limited to 4 req/day under PSD2 - Consent validity: respects ASPSP maximum_consent_validity, capped at 90-day default. PR 5570 hardcodes to 180 days - Proper request timeouts - More test cases My React knowledge is fairly limited. I’m more comfortable with Vue or Angular, so I’d appreciate any comments. ## Related issue(s) Fixes #5445, Fixes #5505 Supersedes PR #5570 ## Testing - Tested end-to-end against Enable Banking sandbox and production environments using Belfius as ASPSP - yarn typecheck passes - yarn lint passes - yarn test passes (17 Enable Banking normalization specs, plus service, poll-auth, error, and JWT test suites) ## 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 | 28 | 12.9 MB → 12.93 MB (+27.2 kB) | +0.21% loot-core | 1 | 4.84 MB → 4.85 MB (+6.25 kB) | +0.13% api | 1 | 3.88 MB → 3.88 MB (+6.11 kB) | +0.15% cli | 1 | 7.89 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 28 | 12.9 MB → 12.93 MB (+27.2 kB) | +0.21% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/modals/EnableBankingExternalMsgModal.tsx` | 🆕 +9.67 kB | 0 B → 9.67 kB `src/components/modals/EnableBankingInitialiseModal.tsx` | 🆕 +5.47 kB | 0 B → 5.47 kB `src/components/EnableBankingCallback.tsx` | 🆕 +2.89 kB | 0 B → 2.89 kB `src/enablebanking.ts` | 🆕 +1.91 kB | 0 B → 1.91 kB `src/hooks/useEnableBankingStatus.ts` | 🆕 +741 B | 0 B → 741 B `src/components/modals/CreateAccountModal.tsx` | 📈 +3.78 kB (+25.17%) | 15.01 kB → 18.78 kB `src/hooks/useEffectAfterMount.ts` | 📈 +67 B (+23.43%) | 286 B → 353 B `src/accounts/mutations.ts` | 📈 +779 B (+6.04%) | 12.6 kB → 13.36 kB `src/hooks/useFeatureFlag.ts` | 📈 +23 B (+4.23%) | 544 B → 567 B `src/components/Modals.tsx` | 📈 +413 B (+3.21%) | 12.56 kB → 12.97 kB `src/components/modals/SelectLinkedAccountsModal.tsx` | 📈 +835 B (+2.02%) | 40.28 kB → 41.09 kB `src/components/settings/Experimental.tsx` | 📈 +215 B (+1.90%) | 11.07 kB → 11.28 kB `src/components/FinancesApp.tsx` | 📈 +305 B (+1.71%) | 17.44 kB → 17.74 kB `src/components/accounts/AccountSyncCheck.tsx` | 📈 +142 B (+1.62%) | 8.54 kB → 8.68 kB `src/components/banksync/index.tsx` | 📈 +36 B (+0.73%) | 4.84 kB → 4.87 kB `src/components/mobile/banksync/MobileBankSyncPage.tsx` | 📈 +36 B (+0.63%) | 5.6 kB → 5.63 kB `package.json` | 📈 +45 B (+0.54%) | 8.19 kB → 8.23 kB `src/components/alerts.tsx` | 📉 -67 B (-1.80%) | 3.64 kB → 3.57 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 | 3.32 MB → 3.35 MB (+26.84 kB) | +0.79% static/js/extends.js | 485.17 kB → 485.95 kB (+802 B) | +0.16% **Smaller** Asset | File Size | % Changed ----- | --------- | --------- static/js/narrow.js | 363.02 kB → 362.59 kB (-433 B) | -0.12% **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 852.77 kB | 0% static/js/ReportRouter.js | 1.17 MB | 0% static/js/TransactionList.js | 82.49 kB | 0% static/js/Value.js | 4.33 MB | 0% static/js/ca.js | 191.98 kB | 0% static/js/da.js | 104.66 kB | 0% static/js/de.js | 174.38 kB | 0% static/js/en-GB.js | 8.2 kB | 0% static/js/en.js | 175.89 kB | 0% static/js/es.js | 181.8 kB | 0% static/js/fr.js | 177.08 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 165.95 kB | 0% static/js/nb-NO.js | 151.85 kB | 0% static/js/nl.js | 108.93 kB | 0% static/js/pl.js | 88.34 kB | 0% static/js/pt-BR.js | 177.44 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 179.3 kB | 0% static/js/theme.js | 30.79 kB | 0% static/js/uk.js | 212.6 kB | 0% static/js/wide.js | 295 B | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 110.19 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.84 MB → 4.85 MB (+6.25 kB) | +0.13% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts` | 📈 +4.8 kB (+22.11%) | 21.73 kB → 26.53 kB `home/runner/work/actual/actual/packages/loot-core/src/server/post.ts` | 📈 +481 B (+11.95%) | 3.93 kB → 4.4 kB `home/runner/work/actual/actual/packages/loot-core/src/server/server-config.ts` | 📈 +58 B (+6.48%) | 895 B → 953 B `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts` | 📈 +936 B (+4.12%) | 22.17 kB → 23.08 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CVK5HLbD.js | 0 B → 4.85 MB (+4.85 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.DZcmk4OR.js | 4.84 MB → 0 B (-4.84 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 | 3.88 MB → 3.88 MB (+6.11 kB) | +0.15% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts` | 📈 +4.69 kB (+21.94%) | 21.4 kB → 26.09 kB `home/runner/work/actual/actual/packages/loot-core/src/server/post.ts` | 📈 +475 B (+12.23%) | 3.79 kB → 4.26 kB `home/runner/work/actual/actual/packages/loot-core/src/server/server-config.ts` | 📈 +57 B (+6.54%) | 872 B → 929 B `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts` | 📈 +919 B (+4.13%) | 21.73 kB → 22.63 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 ----- | --------- | --------- index.js | 3.88 MB → 3.88 MB (+6.11 kB) | +0.15% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.89 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- cli.js | 7.89 MB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <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-14 22:05:24 -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#21460