[PR #6629] [MERGED] Update the Create Linked Account workflow to prompt for Starting Date and Balance #55943

Closed
opened 2026-05-01 03:22:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6629
Author: @StephenBrown2
Created: 1/12/2026
Status: Merged
Merged: 2/6/2026
Merged by: @matt-fidd

Base: masterHead: sync-starting-date-txn


📝 Commits (8)

  • 10f9aac feat: Add optional starting date and balance for bank sync accounts
  • 162ae9a refactor: Extract shared types and components for starting balance inputs
  • d466101 allow explicit zero values
  • 03b4314 refactor: add type guard for BankSyncError to remove oxlint-disable
  • 89a1c59 refactor: address code review nitpicks for SelectLinkedAccountsModal
  • 2bfd568 Add placeholder date/balance for already linked accounts
  • 371c104 [autofix.ci] apply automated fixes
  • 7b450d7 Use StartingBalanceInfo only, and add mobile view

📊 Changes

5 files changed (+497 additions, -64 deletions)

View changed files

📝 packages/desktop-client/src/accounts/accountsSlice.ts (+39 -12)
📝 packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (+379 -24)
📝 packages/loot-core/src/server/accounts/app.ts (+44 -17)
📝 packages/loot-core/src/server/accounts/sync.ts (+29 -11)
upcoming-release-notes/6629.md (+6 -0)

📄 Description

Summary

Adds the ability to specify a custom starting date and balance when linking new bank sync accounts in the Select Linked Accounts modal.

This addresses a recurring problem where new users set up linked accounts but the balance doesn't match because they never entered a starting balance. The "Link Bank Account" flow was originally designed for adding sync to existing accounts and never prompted for a starting balance when creating new accounts.

Changes

Frontend (SelectLinkedAccountsModal.tsx)

  • Added inline date and amount input fields in the account linking table for new accounts
  • Created shared CustomStartingSettings type to replace repeated inline type definitions
  • Extracted reusable StartingOptionsFields component supporting both 'inline' (desktop table) and 'stacked' (mobile card) layouts
  • Mobile-responsive with separate AccountCard layout using the stacked variant

Redux (accountsSlice.ts)

  • Extended link account actions (linkAccount, linkAccountSimpleFin, linkAccountPluggyAi) to accept startingDate and startingBalance parameters
  • Created shared LinkAccountBasePayload type to consolidate common fields across all three payload types

Backend (app.ts)

  • Updated account linking handlers to accept and forward custom values to sync logic
  • Created shared LinkAccountBaseParams type for the three link account functions

Sync (sync.ts)

  • Modified syncAccount to accept customStartingDate and customStartingBalance parameters
  • Modified processBankSyncDownload to use custom starting date/balance for initial sync transactions

Features

  • Only displays starting options when creating new accounts (not when linking existing accounts)
  • AmountInput with smart sign detection based on account balance (negative for credit cards/loans)
  • Sensible defaults: 90 days ago for date, 0 for balance
  • Works across all sync providers: GoCardless, SimpleFIN, and Pluggy.ai

How it works

The custom starting balance is used directly for the starting balance transaction, and the custom starting date determines both:

  1. The sync start date (how far back to fetch transactions)
  2. The transaction date for the starting balance entry

AI Disclaimer

This change was written with assistance from Claude.

Discord discussion: https://discord.com/channels/937901803608096828/1402270361625563186


Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 28 14.55 MB → 14.58 MB (+23.19 kB) +0.16%
loot-core 1 5.86 MB → 5.86 MB (+891 B) +0.01%
api 1 4.39 MB → 4.39 MB (+775 B) +0.02%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
28 14.55 MB → 14.58 MB (+23.19 kB) +0.16%
Changeset
File Δ Size
src/components/modals/SelectLinkedAccountsModal.tsx 📈 +14.92 kB (+53.89%) 27.68 kB → 42.6 kB
locale/pt-BR.json 📈 +8.06 kB (+5.50%) 146.51 kB → 154.57 kB
src/accounts/accountsSlice.ts 📈 +222 B (+1.98%) 10.96 kB → 11.17 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.31 MB → 9.32 MB (+15.13 kB) +0.16%
static/js/pt-BR.js 146.51 kB → 154.57 kB (+8.06 kB) +5.50%

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/da.js 106.62 kB 0%
static/js/de.js 178.39 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 164.16 kB 0%
static/js/es.js 173.83 kB 0%
static/js/fr.js 179.62 kB 0%
static/js/it.js 171.44 kB 0%
static/js/nb-NO.js 157.23 kB 0%
static/js/nl.js 106.65 kB 0%
static/js/pl.js 88.64 kB 0%
static/js/ru.js 106.97 kB 0%
static/js/sv.js 78.2 kB 0%
static/js/th.js 182.35 kB 0%
static/js/uk.js 215.11 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/ReportRouter.js 1.11 MB 0%
static/js/narrow.js 640.46 kB 0%
static/js/TransactionList.js 105.97 kB 0%
static/js/wide.js 160.07 kB 0%
static/js/AppliedFilters.js 9.71 kB 0%
static/js/usePayeeRuleCounts.js 11.79 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.86 MB → 5.86 MB (+891 B) +0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts 📈 +518 B (+2.06%) 24.58 kB → 25.09 kB
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts 📈 +373 B (+1.40%) 25.98 kB → 26.34 kB
View detailed bundle breakdown

Added

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

Removed

Asset File Size % Changed
kcab.worker.CiaHZEop.js 5.86 MB → 0 B (-5.86 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.39 MB → 4.39 MB (+775 B) +0.02%
Changeset
File Δ Size
src/server/accounts/sync.ts 📈 +458 B (+2.04%) 21.94 kB → 22.39 kB
src/server/accounts/app.ts 📈 +317 B (+1.40%) 22.16 kB → 22.47 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
bundle.api.js 4.39 MB → 4.39 MB (+775 B) +0.02%

Smaller
No assets were smaller

Unchanged
No assets were unchanged


🔄 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/6629 **Author:** [@StephenBrown2](https://github.com/StephenBrown2) **Created:** 1/12/2026 **Status:** ✅ Merged **Merged:** 2/6/2026 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `sync-starting-date-txn` --- ### 📝 Commits (8) - [`10f9aac`](https://github.com/actualbudget/actual/commit/10f9aac19fc398d3feea983c6c36adf5211f890b) feat: Add optional starting date and balance for bank sync accounts - [`162ae9a`](https://github.com/actualbudget/actual/commit/162ae9ae62595fda9e5ca1d510c0e527017e7b8c) refactor: Extract shared types and components for starting balance inputs - [`d466101`](https://github.com/actualbudget/actual/commit/d4661011b260d973c36f9ab5cac6a09660d8742b) allow explicit zero values - [`03b4314`](https://github.com/actualbudget/actual/commit/03b4314a212587d076c9ad42e7660d4fd80543ae) refactor: add type guard for BankSyncError to remove oxlint-disable - [`89a1c59`](https://github.com/actualbudget/actual/commit/89a1c5926ece1f158a1db9c746f7dd7a1ee340a6) refactor: address code review nitpicks for SelectLinkedAccountsModal - [`2bfd568`](https://github.com/actualbudget/actual/commit/2bfd56853b9c74b485044635dd8eb0178a5b6e58) Add placeholder date/balance for already linked accounts - [`371c104`](https://github.com/actualbudget/actual/commit/371c10471d9ae59fbdaf5bff30029ebf3bdf8d8a) [autofix.ci] apply automated fixes - [`7b450d7`](https://github.com/actualbudget/actual/commit/7b450d7d874dddd0aa129fc4b169f61a138f052c) Use StartingBalanceInfo only, and add mobile view ### 📊 Changes **5 files changed** (+497 additions, -64 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/accounts/accountsSlice.ts` (+39 -12) 📝 `packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx` (+379 -24) 📝 `packages/loot-core/src/server/accounts/app.ts` (+44 -17) 📝 `packages/loot-core/src/server/accounts/sync.ts` (+29 -11) ➕ `upcoming-release-notes/6629.md` (+6 -0) </details> ### 📄 Description ## Summary Adds the ability to specify a custom starting date and balance when linking new bank sync accounts in the Select Linked Accounts modal. This addresses a recurring problem where new users set up linked accounts but the balance doesn't match because they never entered a starting balance. The "Link Bank Account" flow was originally designed for adding sync to existing accounts and never prompted for a starting balance when creating new accounts. ## Changes ### Frontend ([SelectLinkedAccountsModal.tsx](packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx)) - Added inline date and amount input fields in the account linking table for new accounts - Created shared `CustomStartingSettings` type to replace repeated inline type definitions - Extracted reusable `StartingOptionsFields` component supporting both `'inline'` (desktop table) and `'stacked'` (mobile card) layouts - Mobile-responsive with separate `AccountCard` layout using the stacked variant ### Redux ([accountsSlice.ts](packages/desktop-client/src/accounts/accountsSlice.ts)) - Extended link account actions (`linkAccount`, `linkAccountSimpleFin`, `linkAccountPluggyAi`) to accept `startingDate` and `startingBalance` parameters - Created shared `LinkAccountBasePayload` type to consolidate common fields across all three payload types ### Backend ([app.ts](packages/loot-core/src/server/accounts/app.ts)) - Updated account linking handlers to accept and forward custom values to sync logic - Created shared `LinkAccountBaseParams` type for the three link account functions ### Sync ([sync.ts](packages/loot-core/src/server/accounts/sync.ts)) - Modified `syncAccount` to accept `customStartingDate` and `customStartingBalance` parameters - Modified `processBankSyncDownload` to use custom starting date/balance for initial sync transactions ## Features - Only displays starting options when creating **new** accounts (not when linking existing accounts) - `AmountInput` with smart sign detection based on account balance (negative for credit cards/loans) - Sensible defaults: 90 days ago for date, 0 for balance - Works across all sync providers: GoCardless, SimpleFIN, and Pluggy.ai ## How it works The custom starting balance is used directly for the starting balance transaction, and the custom starting date determines both: 1. The sync start date (how far back to fetch transactions) 2. The transaction date for the starting balance entry ## AI Disclaimer This change was written with assistance from Claude. ## Related Discord discussion: https://discord.com/channels/937901803608096828/1402270361625563186 <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 28 | 14.55 MB → 14.58 MB (+23.19 kB) | +0.16% loot-core | 1 | 5.86 MB → 5.86 MB (+891 B) | +0.01% api | 1 | 4.39 MB → 4.39 MB (+775 B) | +0.02% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 28 | 14.55 MB → 14.58 MB (+23.19 kB) | +0.16% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/modals/SelectLinkedAccountsModal.tsx` | 📈 +14.92 kB (+53.89%) | 27.68 kB → 42.6 kB `locale/pt-BR.json` | 📈 +8.06 kB (+5.50%) | 146.51 kB → 154.57 kB `src/accounts/accountsSlice.ts` | 📈 +222 B (+1.98%) | 10.96 kB → 11.17 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.31 MB → 9.32 MB (+15.13 kB) | +0.16% static/js/pt-BR.js | 146.51 kB → 154.57 kB (+8.06 kB) | +5.50% **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/da.js | 106.62 kB | 0% static/js/de.js | 178.39 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 164.16 kB | 0% static/js/es.js | 173.83 kB | 0% static/js/fr.js | 179.62 kB | 0% static/js/it.js | 171.44 kB | 0% static/js/nb-NO.js | 157.23 kB | 0% static/js/nl.js | 106.65 kB | 0% static/js/pl.js | 88.64 kB | 0% static/js/ru.js | 106.97 kB | 0% static/js/sv.js | 78.2 kB | 0% static/js/th.js | 182.35 kB | 0% static/js/uk.js | 215.11 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/ReportRouter.js | 1.11 MB | 0% static/js/narrow.js | 640.46 kB | 0% static/js/TransactionList.js | 105.97 kB | 0% static/js/wide.js | 160.07 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/usePayeeRuleCounts.js | 11.79 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.86 MB → 5.86 MB (+891 B) | +0.01% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts` | 📈 +518 B (+2.06%) | 24.58 kB → 25.09 kB `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts` | 📈 +373 B (+1.40%) | 25.98 kB → 26.34 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CahdYISk.js | 0 B → 5.86 MB (+5.86 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CiaHZEop.js | 5.86 MB → 0 B (-5.86 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.39 MB → 4.39 MB (+775 B) | +0.02% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/server/accounts/sync.ts` | 📈 +458 B (+2.04%) | 21.94 kB → 22.39 kB `src/server/accounts/app.ts` | 📈 +317 B (+1.40%) | 22.16 kB → 22.47 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.39 MB → 4.39 MB (+775 B) | +0.02% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </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-05-01 03:22:17 -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#55943