Skip to content

[AI] Honour the pending transactions setting in Enable Banking sync - #9549

Merged
MatissJanis merged 4 commits into
masterfrom
matiss/enable-banking-pending-and-rate-limit
Nov 22, 2026
Merged

MatissJanis merged 4 commits into
masterfrom
matiss/enable-banking-pending-and-rate-limit

Conversation

@MatissJanis

@MatissJanis MatissJanis commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Description

Some smaller fixes for EB: pending transactions + improved error handling.

Related issue(s)

Relates #7799

Testing

n/a

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I have read every line of this diff and can explain what each change does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 37 15.19 MB → 15.19 MB (-492 B) -0.00%
loot-core 1 5.43 MB → 5.43 MB (+27 B) +0.00%
api 2 4.33 MB → 4.33 MB (+17 B) +0.00%
cli 1 420.19 kB 0%
crdt 1 11.15 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
37 15.19 MB → 15.19 MB (-492 B) -0.00%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller

Asset File Size % Changed
static/js/web.js 1.48 kB → 1 kB (-492 B) -32.37%

Unchanged

Asset File Size % Changed
static/js/index.js 2.94 MB 0%
static/js/AutomaticSyncSettings.js 21.95 kB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/DateSelect.js 2.65 MB 0%
static/js/FormulaEditor.js 771.38 kB 0%
static/js/NotesTagFormatter.js 30.87 kB 0%
static/js/ReportRouter.js 2.01 MB 0%
static/js/TourHost.js 169.78 kB 0%
static/js/TransactionList.js 171.93 kB 0%
static/js/Value.js 1.76 MB 0%
static/js/bootstrapHyperFormula.js 302 B 0%
static/js/build-shims.js 140 B 0%
static/js/ca.js 161.65 kB 0%
static/js/columns.js 686.43 kB 0%
static/js/de.js 179.68 kB 0%
static/js/en-GB.js 13.59 kB 0%
static/js/en.js 292.41 kB 0%
static/js/es.js 181.74 kB 0%
static/js/fr.js 174.48 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 147.08 kB 0%
static/js/months.js 612.47 kB 0%
static/js/narrow.js 316.65 kB 0%
static/js/nb-NO.js 130.84 kB 0%
static/js/nl.js 142.79 kB 0%
static/js/pl.js 140.63 kB 0%
static/js/pt-BR.js 169.06 kB 0%
static/js/rolldown-runtime.js 2.03 kB 0%
static/js/ru.js 197.41 kB 0%
static/js/sv.js 308.36 kB 0%
static/js/theme.js 38.71 kB 0%
static/js/uk.js 237.6 kB 0%
static/js/useLocalPref.js 101.16 kB 0%
static/js/wide.js 304.1 kB 0%
static/js/workbox-window.prod.es5.js 7.21 kB 0%
static/js/zh-Hant.js 127.78 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.43 MB → 5.43 MB (+27 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts 📈 +27 B (+0.10%) 26.62 kB → 26.65 kB
View detailed bundle breakdown

Added

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

Removed

Asset File Size % Changed
kcab.worker.CEUkmV2k.js 5.43 MB → 0 B (-5.43 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
2 4.33 MB → 4.33 MB (+17 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts 📈 +17 B (+0.06%) 26.09 kB → 26.11 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 4.33 MB → 4.33 MB (+17 B) +0.00%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
models.js 0 B 0%

cli

Total

Files count Total bundle size % Changed
1 420.19 kB 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 420.19 kB 0%

crdt

Total

Files count Total bundle size % Changed
1 11.15 kB 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
index.js 11.15 kB 0%

…g sync

Pending transactions were imported even with the setting off, and as
cleared, for banks that do not flag them: everything without the PDNG
status counted as booked. Ask Enable Banking for booked transactions
only when importing pending ones is off, treat only BOOK as booked, and
leave cancelled and rejected transactions out.

A bank's rate limit or timeout could be reported as a lost
authorization, depending on the HTTP status it arrived with, which told
the user to link the bank again. Classify errors by Enable Banking's
error code first.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@netlify

netlify Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 437b2ea
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/6b00b80fb78dbdb9c5a51281
😎 Deploy Preview https://deploy-preview-9549.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

MatissJanis and others added 2 commits November 13, 2026 21:16
…atus

Classifying by error code dropped the message check that used to catch
WRONG_SESSION_STATUS, so that error lost its reauthorize prompt.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Keep the booked-only request and treat holds and scheduled payments as
pending. Leave transactions with other statuses booked as before, stop
dropping cancelled and rejected ones, and go back to the previous error
classification, keeping only two additions: a bank timeout is reported
as a timeout, and a session that no longer exists asks for a new login.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@MatissJanis MatissJanis changed the title [AI] Honour the pending setting and bank rate limits in Enable Banking sync [AI] Honour the pending transactions setting in Enable Banking sync Nov 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

VRT tests ❌ failed. View the test report.

To update the VRT screenshots, comment /update-vrt on this PR. The VRT update operation takes about 10 to 15 minutes.

@MatissJanis

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 437b2ea and 437b2ea.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

Parsing warnings: 1

Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks.docstrings"
Configuration instructions

  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review.

Walkthrough

Enable Banking sync now sends the pending-transaction preference to the server. Transaction status handling recognizes additional statuses. Error handling maps timeout conditions and session-related 404 responses to specific error codes.

Changes: Enable Banking transaction handling

Layer / File(s) Summary
Pending transaction selection
packages/loot-core/src/server/accounts/sync.ts, packages/loot-core/src/server/accounts/sync.test.ts, packages/sync-server/src/app-enablebanking/app-enablebanking.ts, packages/sync-server/src/app-enablebanking/services/enablebanking-service.ts, packages/sync-server/src/app-enablebanking/services/tests/enablebanking-service.spec.ts, packages/sync-server/src/app-enablebanking/tests/transactions.spec.ts, upcoming-release-notes/fix-enable-banking-pending-setting.md
The sync path sends importPending, defaulting a missing account preference to true. The route enables booked-only retrieval only when the value is explicitly false.
Transaction status handling
packages/loot-core/src/types/models/enablebanking.ts, packages/sync-server/src/app-enablebanking/services/enablebanking-service.ts, packages/sync-server/src/app-enablebanking/services/tests/normalization.spec.ts
Transaction status types include additional values. HOLD and SCHD are marked not booked; tests also check OTHR.

Enable Banking error classification

Layer / File(s) Summary
Timeout and session error mapping
packages/sync-server/src/app-enablebanking/utils/errors.ts, packages/sync-server/src/app-enablebanking/utils/tests/errors.spec.ts
Status 408 and ASPSP_TIMEOUT map to TIMED_OUT. Session-related 404 errors map to INVALID_ACCESS_TOKEN; other 404 errors map to NOT_FOUND.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant EnableBankingSync
  participant TransactionsRoute
  participant EnableBankingService
  participant EnableBankingAPI
  EnableBankingSync->>TransactionsRoute: Send importPending
  TransactionsRoute->>EnableBankingService: Set bookedOnly when importPending is false
  EnableBankingService->>EnableBankingAPI: Add transaction_status=BOOK when bookedOnly is true
Loading

Suggested reviewers: aureldemiri, matt-fidd, jfdoming

Merge Risk: Minimal · previous review 5b76b

This change makes Enable Banking sync honour the pending-transactions setting and improves status and error handling. It is backward compatible with older clients, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: Enable Banking sync now respects the pending transactions setting. The changeset adds an importPending flag, a getImportPending helper, and bookedOnly filtering that f…
Description check Passed The description states that the PR fixes pending transactions and improves error handling for Enable Banking. The changeset matches both points: pending-transaction handling in sync and transaction fi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: Enable Banking sync now respects the pending transactions setting. The changeset adds an importPending flag, a getImportPending helper, and bookedOnly filtering that follow this setting. The title also carries an [AI] prefix, which does not affect relevance.

Full details: Description check

Explanation

The description states that the PR fixes pending transactions and improves error handling for Enable Banking. The changeset matches both points: pending-transaction handling in sync and transaction filtering, plus new error mappings for 404, 408, and ASPSP_TIMEOUT. It also links issue #7799 and includes release notes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 435750e and 5b76bfa.

Files selected for processing: 11

  • packages/loot-core/src/server/accounts/sync.test.ts
  • packages/loot-core/src/server/accounts/sync.ts
  • packages/loot-core/src/types/models/enablebanking.ts
  • packages/sync-server/src/app-enablebanking/app-enablebanking.ts
  • packages/sync-server/src/app-enablebanking/services/enablebanking-service.ts
  • packages/sync-server/src/app-enablebanking/services/tests/enablebanking-service.spec.ts
  • packages/sync-server/src/app-enablebanking/services/tests/normalization.spec.ts
  • packages/sync-server/src/app-enablebanking/tests/transactions.spec.ts
  • packages/sync-server/src/app-enablebanking/utils/errors.ts
  • packages/sync-server/src/app-enablebanking/utils/tests/errors.spec.ts
  • upcoming-release-notes/fix-enable-banking-pending-setting.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@MatissJanis
MatissJanis marked this pull request as ready for review November 13, 2026 21:44
@MatissJanis
MatissJanis added this pull request to stack #9621 November 21, 2026 21:04
@MatissJanis
MatissJanis added this pull request to the merge queue Nov 22, 2026
Merged via the queue into master with commit bf1b7bb Nov 22, 2026
75 of 77 checks passed
@MatissJanis
MatissJanis deleted the matiss/enable-banking-pending-and-rate-limit branch November 22, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants