Skip to content

[AI] Fix scheduled split transfer previews - #8699

Merged
matt-fidd merged 2 commits into
actualbudget:masterfrom
JerryNee:agent/fix-scheduled-split-transfer-previews
Aug 11, 2026
Merged

matt-fidd merged 2 commits into
actualbudget:masterfrom
JerryNee:agent/fix-scheduled-split-transfer-previews

Conversation

@JerryNee

@JerryNee JerryNee commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR fixes scheduled split transfers not appearing as upcoming transactions in their destination accounts.

Account-scoped schedule queries previously considered only the schedule’s source account and direct transfer payee. Because split transfer destinations are stored in rule actions, those schedules were excluded before their preview transactions were generated.

This change:

  • Adds a queryable flag for identifying schedules with split actions.
  • Loads split schedules as candidates for concrete account views.
  • Filters candidates against the actual split transfer destination.
  • Projects the matching transfer child as a standalone deposit in the destination account.
  • Preserves the preview status and recalculates the running balance correctly.
  • Adds unit, database integration, and Playwright coverage for the complete workflow.

AI disclosure: OpenAI Codex assisted with the implementation and test development for this PR. The resulting change was verified with local unit, integration, and Playwright tests, as well as the full GitHub CI suite.

Related issue(s)

Fixes #7822

Testing

  • Added unit tests for split schedule filtering and destination-account projection.
  • Added an AQL integration test for detecting split actions.
  • Added a Playwright test verifying a $50 scheduled deposit in the destination account.
  • Ran yarn typecheck and yarn lint:fix locally.
  • All GitHub CI checks passed.

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 36 13.1 MB → 13.11 MB (+5.38 kB) +0.04%
loot-core 1 4.63 MB → 4.63 MB (+216 B) +0.00%
api 2 3.84 MB → 3.84 MB (+214 B) +0.01%
cli 1 8.02 MB 0%
crdt 1 11.16 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
36 13.1 MB → 13.11 MB (+5.38 kB) +0.04%
Changeset
File Δ Size
src/hooks/useAccountPreviewTransactions.ts 📈 +1.07 kB (+30.04%) 3.55 kB → 4.62 kB
src/hooks/useSchedules.ts 📈 +182 B (+5.62%) 3.16 kB → 3.34 kB
locale/de.json 📈 +4.14 kB (+2.31%) 179.29 kB → 183.43 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/de.js 179.29 kB → 183.43 kB (+4.14 kB) +2.31%
static/js/PayeeRuleCountLabel.js 11.74 kB → 12.81 kB (+1.07 kB) +9.08%
static/js/Value.js 2.03 MB → 2.03 MB (+182 B) +0.01%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 1.57 MB 0%
static/js/AppliedFilters.js 35.51 kB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 762.13 kB 0%
static/js/ManageRules.js 71.66 kB 0%
static/js/ReportRouter.js 1.4 MB 0%
static/js/ScheduleEditForm.js 76.54 kB 0%
static/js/SchedulesTable.js 171.15 kB 0%
static/js/TransactionEdit.js 219.94 kB 0%
static/js/TransactionList.js 79.22 kB 0%
static/js/bootstrapHyperFormula.js 302 B 0%
static/js/ca.js 171.68 kB 0%
static/js/chart-theme.js 670.28 kB 0%
static/js/client.js 452.05 kB 0%
static/js/en-GB.js 11.1 kB 0%
static/js/en.js 236.63 kB 0%
static/js/es.js 165.11 kB 0%
static/js/fr.js 171.84 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 152.57 kB 0%
static/js/narrow.js 287.24 kB 0%
static/js/nb-NO.js 136.51 kB 0%
static/js/nl.js 152.45 kB 0%
static/js/pl.js 137.04 kB 0%
static/js/pt-BR.js 179.66 kB 0%
static/js/theme.js 31.1 kB 0%
static/js/uk.js 200.72 kB 0%
static/js/useDateFormat.js 2.93 MB 0%
static/js/useFormatList.js 10.22 kB 0%
static/js/useTransactionBatchActions.js 11.03 kB 0%
static/js/wide.js 274.04 kB 0%
static/js/workbox-window.prod.es5.js 7.21 kB 0%
static/js/zh-Hans.js 107.54 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.63 MB → 4.63 MB (+216 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts 📈 +216 B (+2.14%) 9.87 kB → 10.08 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.88PhXbQ3.js 0 B → 4.63 MB (+4.63 MB) -

Removed

Asset File Size % Changed
kcab.worker.7rV9_5dh.js 4.63 MB → 0 B (-4.63 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 3.84 MB → 3.84 MB (+214 B) +0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts 📈 +214 B (+2.18%) 9.58 kB → 9.79 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.84 MB → 3.84 MB (+214 B) +0.01%

Smaller
No assets were smaller

Unchanged

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

cli

Total

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

crdt

Total

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

@netlify

netlify Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 99eb7fb
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/6a79fedc4687f90009b4a485
😎 Deploy Preview https://deploy-preview-8699.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.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hello contributor!

We would love to review your PR! Before we can do that, please make sure:

  • ✅ All CI checks pass
  • ✅ The PR is moved from draft to open (if applicable)
  • ✅ The "[WIP]" prefix is removed from the PR title
  • ✅ The PR description follows the provided template, with all checklist boxes filled in
  • ✅ All CodeRabbit code review comments are resolved (if you disagree with anything - reply to the bot with your reasoning so we can read through it). The bot will eventually approve the PR.
  • ✅ Any AI usage is disclosed (see our AI Usage Policy)

A quick note on volume: please get one PR reviewed and merged before opening several more. A stack of simultaneous, similar PRs from one author is reviewed slowly, and low-effort, untested, or undisclosed-AI PRs may be closed without a detailed review.

We do this to reduce the TOIL the core contributor team has to go through for each PR and to allow for speedy reviews and merges.

For more information, please see our Contributing Guide.

@JerryNee
JerryNee marked this pull request as ready for review August 11, 2026 05:04
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 54cd8e72-742c-4e0c-b1ec-2f2354d15605

📥 Commits

Reviewing files that changed from the base of the PR and between a0d10a5 and 99eb7fb.

📒 Files selected for processing (10)
  • packages/desktop-client/e2e/schedules.test.ts
  • packages/desktop-client/src/hooks/useAccountPreviewTransactions.test.ts
  • packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts
  • packages/desktop-client/src/hooks/useSchedules.test.ts
  • packages/desktop-client/src/hooks/useSchedules.ts
  • packages/loot-core/src/server/aql/schema/index.ts
  • packages/loot-core/src/server/db/types/index.ts
  • packages/loot-core/src/server/schedules/app.test.ts
  • packages/loot-core/src/types/models/schedule.ts
  • upcoming-release-notes/fix-scheduled-split-transfer-previews.md

📝 Walkthrough

Walkthrough

The change detects schedules with split actions, includes them in account-specific schedule queries, and projects matching split transfer children into destination-account previews. Tests cover query filtering, inversion behavior, balances, and an end-to-end credit preview.

Changes

Scheduled split transfer previews

Layer / File(s) Summary
Split schedule metadata and query filtering
packages/loot-core/src/server/aql/schema/index.ts, packages/loot-core/src/server/db/types/index.ts, packages/loot-core/src/types/models/schedule.ts, packages/desktop-client/src/hooks/useSchedules.ts, packages/loot-core/src/server/schedules/app.test.ts, packages/desktop-client/src/hooks/useSchedules.test.ts
Schedules expose _has_splits, derive it from split actions, and include split schedules in concrete account queries.
Destination-account preview projection
packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts, packages/desktop-client/src/hooks/useAccountPreviewTransactions.test.ts
Preview filtering resolves split relevance and inverts matching transfer children for destination accounts while preserving source splits and balances.
Scheduled split transfer validation
packages/desktop-client/e2e/schedules.test.ts, upcoming-release-notes/fix-scheduled-split-transfer-previews.md
End-to-end coverage verifies a destination-account credit, and the release note describes the correction.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested reviewers: matissjanis, youngcw, matt-fidd

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary fix for scheduled split transfer previews.
Description check ✅ Passed The description directly explains the bug, implementation, testing, and expected destination-account behavior.
Linked Issues check ✅ Passed The changes satisfy issue #7822 by displaying split transfer previews and balance increases in destination accounts.
Out of Scope Changes check ✅ Passed The implementation, tests, schema updates, and release notes are directly related to the scheduled split transfer preview fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@matt-fidd matt-fidd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to work well, thanks for this

@matt-fidd
matt-fidd added this pull request to the merge queue Aug 11, 2026
Merged via the queue into actualbudget:master with commit 435f2d5 Aug 11, 2026
47 checks passed
RafaelEspino pushed a commit to RafaelEspino/actual that referenced this pull request Oct 28, 2026
* [AI] Fix scheduled split transfer previews

* [AI] Preserve split preview status
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.

[Bug]: Scheduled split transfers do not show as upcoming transactions on destination accounts

2 participants