Skip to content

Update the Create Linked Account workflow to prompt for Starting Date and Balance - #6629

Merged
matt-fidd merged 8 commits into
actualbudget:masterfrom
StephenBrown2:sync-starting-date-txn
Feb 6, 2026
Merged

matt-fidd merged 8 commits into
actualbudget:masterfrom
StephenBrown2:sync-starting-date-txn

Conversation

@StephenBrown2

@StephenBrown2 StephenBrown2 commented Jan 12, 2026 •

Copy link
Copy Markdown
Contributor

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.

Related

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

@actual-github-bot actual-github-bot Bot changed the title Update the Create Linked Account workflow to prompt for Starting Date and Balance [WIP] Update the Create Linked Account workflow to prompt for Starting Date and Balance Jan 12, 2026
@netlify

netlify Bot commented Jan 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 7b450d7
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/69860b570572710008cd86dc
😎 Deploy Preview https://deploy-preview-6629.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@netlify

netlify Bot commented Jan 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for actualbudget-website ready!

Name Link
🔨 Latest commit c7b299c
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget-website/deploys/698606f13fd1f50008365616
😎 Deploy Preview https://deploy-preview-6629.www.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@coderabbitai

coderabbitai Bot commented Jan 12, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds support for specifying a custom starting date and starting balance when linking new bank-sync accounts. Frontend types, UI, and thunks propagate new fields; backend handlers and sync logic accept and forward them to bankSync.syncAccount and processBankSyncDownload to influence the initial sync transaction.

Changes

Cohort / File(s) Summary
Frontend payload consolidation
packages/desktop-client/src/accounts/accountsSlice.ts
Introduces LinkAccountBasePayload (upgradingId, offBudget, startingDate, startingBalance); refactors LinkAccountPayload, LinkAccountSimpleFinPayload, LinkAccountPluggyAiPayload to extend it; thunks forward startingDate and startingBalance to backend sends.
Frontend UI and per-account state
packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
Adds CustomStartingSettings type, per-account customStartingDates state, StartingOptionsFields component, new table columns for Starting Date/Balance, and threads selected startingDate/startingBalance into link dispatches for all providers.
Backend account linking handlers
packages/loot-core/src/server/accounts/app.ts
Adds LinkAccountBaseParams and updates linkGoCardlessAccount, linkSimpleFinAccount, linkPluggyAiAccount signatures to accept startingDate/startingBalance and forward them to bankSync.syncAccount. Adds isBankSyncError guard and refactors handleSyncError.
Backend sync logic
packages/loot-core/src/server/accounts/sync.ts
Extends processBankSyncDownload and syncAccount signatures with customStartingBalance/customStartingDate; uses them to override computed starting balance/date for initial balance transaction and propagates through sync call sites.
Release notes
upcoming-release-notes/6629.md
Adds release note describing ability to specify custom starting date and balance when linking bank-sync accounts.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Modal as SelectLinkedAccountsModal
    participant Store as Redux Thunk
    participant Backend as Server Link Handler
    participant Sync as BankSync

    User->>Modal: Select account + enter starting date & balance
    Modal->>Modal: save per-account customStartingDates
    User->>Modal: Confirm link
    Modal->>Store: dispatch link thunk (startingDate, startingBalance)
    Store->>Backend: call link*Account handler with startingDate/startingBalance
    Backend->>Sync: bankSync.syncAccount(..., customStartingDate, customStartingBalance)
    Sync->>Sync: processBankSyncDownload uses provided starting date/balance for initial tx
    Sync-->>Backend: return synced account result
    Backend-->>Store: thunk resolves with response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I twitched my nose and chose the day,
A tidy balance tucked away,
From modal hop to sync's bright start,
Each ledger line receives its art,
Hooray — accounts begin their way!

🚥 Pre-merge checks | ✅ 5 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Settings ✅ Passed PR adds temporary, workflow-specific input fields within SelectLinkedAccountsModal for custom starting date and balance during account linking, not persistent settings that clutter the settings screen.
Linting ✅ Passed No oxlint-disable comments found in modified files; codebase adheres to no-oxlint-disable policy.
Typecheck ✅ Passed @ts-strict-ignore is a pre-existing file-level directive in sync.ts, not added in this PR. Git diff confirms it does not appear in the new changes.
Title check ✅ Passed The title accurately describes the main change: adding functionality to specify a custom starting date and balance when linking new bank sync accounts, which is the primary objective across all modified files.
Description check ✅ Passed The pull request description accurately describes the changeset, covering frontend, Redux, backend, and sync layer modifications to enable custom starting date and balance inputs when linking new bank accounts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@github-actions

github-actions Bot commented Jan 12, 2026 •

Copy link
Copy Markdown
Contributor

Bundle Stats

desktop-client

Total

Files count Total bundle size % Changed
28 14.33 MB → 14.34 MB (+10.87 kB) +0.07%
Changeset
File Δ Size
src/components/modals/SelectLinkedAccountsModal.tsx 📈 +10.65 kB (+38.91%) 27.38 kB → 38.03 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.11 MB → 9.12 MB (+10.87 kB) +0.12%

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 107.03 kB 0%
static/js/de.js 173.52 kB 0%
static/js/en-GB.js 7.24 kB 0%
static/js/en.js 158.4 kB 0%
static/js/es.js 174.34 kB 0%
static/js/fr.js 177.63 kB 0%
static/js/it.js 174.68 kB 0%
static/js/nb-NO.js 160.03 kB 0%
static/js/nl.js 103.57 kB 0%
static/js/pl.js 88.78 kB 0%
static/js/pt-BR.js 147.86 kB 0%
static/js/ru.js 108.05 kB 0%
static/js/sv.js 79.01 kB 0%
static/js/th.js 182.7 kB 0%
static/js/uk.js 219.26 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.48 kB 0%
static/js/ReportRouter.js 1.1 MB 0%
static/js/narrow.js 635.89 kB 0%
static/js/TransactionList.js 101.33 kB 0%
static/js/wide.js 158.95 kB 0%
static/js/AppliedFilters.js 9.62 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.79 MB → 5.79 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.57 kB → 25.08 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.COnLg06X.js 0 B → 5.79 MB (+5.79 MB) -

Removed

Asset File Size % Changed
kcab.worker.DkeVR93i.js 5.79 MB → 0 B (-5.79 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.34 MB → 4.34 MB (+775 B) +0.02%
Changeset
File Δ Size
src/server/accounts/sync.ts 📈 +458 B (+2.04%) 21.93 kB → 22.37 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.34 MB → 4.34 MB (+775 B) +0.02%

Smaller
No assets were smaller

Unchanged
No assets were unchanged

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:
- Around line 164-172: The startingBalance logic incorrectly treats an explicit
0 as absent; in SelectLinkedAccountsModal.tsx, update the startingBalance
assignment (which reads customSettings, startingBalance, customStartingDates,
chosenExternalAccountId) to treat 0 as a valid value by checking for
undefined/null rather than !== 0 (e.g., use a check like customSettings?.balance
!== undefined or != null to decide whether to use customSettings.balance,
otherwise set undefined); keep the rest of the surrounding logic unchanged so
explicit zeroes are passed through to the backend.
🧹 Nitpick comments (1)
packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (1)

277-288: Consider using existing date utilities for consistency.

The codebase uses monthUtils (which wraps date-fns) for date manipulation. Consider using monthUtils.subDays(monthUtils.currentDay(), 90) for consistency with the rest of the codebase.

Proposed refactor
   const getCustomStartingDate = (accountId: string) => {
     if (customStartingDates[accountId]) {
       return customStartingDates[accountId];
     }
     // Default to 90 days ago (matches server default)
-    const ninetyDaysAgo = new Date();
-    ninetyDaysAgo.setDate(ninetyDaysAgo.getDate() - 90);
     return {
-      date: ninetyDaysAgo.toISOString().split('T')[0],
+      date: monthUtils.subDays(monthUtils.currentDay(), 90),
       balance: 0,
     };
   };

This would require importing monthUtils from loot-core/shared/months.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 843e957 and 699537f.

📒 Files selected for processing (5)
  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
  • upcoming-release-notes/6629.md
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Use TypeScript for all code
Use descriptive variable names with auxiliary verbs (e.g., 'isLoaded', 'hasError')
Use named exports for components and utilities; avoid default exports except in specific cases
Use functional and declarative programming patterns - avoid classes
Use the 'function' keyword for pure functions
Structure files with: exported component/page, helpers, static content, types
Organize imports in the following order: React imports, built-in Node.js modules, external packages, Actual packages, parent imports, sibling imports, index imports, with newlines between groups
Never use 'console.*' - use logger instead (enforced by ESLint rule 'actual/prefer-logger-over-console')
Never import from 'uuid' without destructuring - use 'import { v4 as uuidv4 } from 'uuid''

Files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Prefer 'type' over 'interface' for defining types in TypeScript
Avoid 'enum' - use objects or maps instead
Avoid 'any' or 'unknown' unless absolutely necessary
Avoid type assertions ('as', '!') - prefer 'satisfies' for type narrowing
Use inline type imports: 'import { type MyType } from '...''
Look for existing type definitions in 'packages/loot-core/src/types/' before creating new types

Do not allow creating new components or utilities with the @ts-strict-ignore comment

Files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

Do not allow any oxlint-disable lines

Files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
packages/loot-core/src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/loot-core/src/**/*.{ts,tsx,js,jsx}: Never import '@actual-app/web/*' in 'loot-core' package
Don't directly reference platform-specific imports (.api, .web, .electron) - use conditional exports in loot-core for platform-specific code

Files:

  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{tsx,jsx}: Create new components in their own files
Don't use 'React.FunctionComponent' or 'React.FC' - type props directly
Don't use 'React.*' patterns - use named imports instead
Use '' instead of '' tags in React components
Avoid unstable nested components
Use 'satisfies' for type narrowing in React components
Use declarative JSX that is minimal and readable; avoid unnecessary curly braces in conditionals
Prefer explicit expressions ('condition && ') in JSX
Never import colors directly - use theme instead
Use 'Trans' component instead of 't()' function when possible for internationalization
All user-facing strings must be translated using i18n

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
packages/desktop-client/src/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/desktop-client/src/**/*.{tsx,jsx}: Use custom hooks from 'src/hooks' instead of react-router directly (e.g., 'useNavigate()' from 'src/hooks')
Use 'useDispatch()', 'useSelector()', 'useStore()' from 'src/redux' instead of react-redux

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
🧠 Learnings (30)
📓 Common learnings
Learnt from: joel-jeremy
Repo: actualbudget/actual PR: 3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-10-24T17:05:41.415Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 4253
File: packages/sync-server/src/app-gocardless/banks/nationwide_naiagb21.js:41-44
Timestamp: 2025-02-11T17:25:39.615Z
Learning: In bank sync providers, core fields like transactionId and amount should be mutated directly on the transaction object as they aren't covered by the fallback normalization logic and shouldn't be exposed for user mapping. Display-related fields should use editedTrans.
📚 Learning: 2024-10-24T17:05:41.415Z
Learnt from: joel-jeremy
Repo: actualbudget/actual PR: 3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-10-24T17:05:41.415Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.

Applied to files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-21T02:24:38.823Z
Learnt from: jfdoming
Repo: actualbudget/actual PR: 3699
File: packages/loot-core/src/client/actions/app.ts:56-74
Timestamp: 2024-10-21T02:24:38.823Z
Learning: The team has decided to handle the `/accounts` route in the default case within the `getPageDocs` function in `packages/loot-core/src/client/actions/app.ts`, as discussed in a previous PR.

Applied to files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/loot-core/src/server/accounts/app.ts
📚 Learning: 2024-11-04T00:34:13.035Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 3581
File: packages/loot-core/src/client/actions/account.ts:180-194
Timestamp: 2024-11-04T00:34:13.035Z
Learning: In `packages/loot-core/src/client/actions/account.ts`, within the `syncAccounts` function, the batch sync request for SimpleFin accounts handles errors by returning error objects instead of throwing exceptions. Therefore, wrapping this block in a try-catch is unnecessary.

Applied to files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
📚 Learning: 2024-11-04T14:14:10.698Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 3581
File: packages/loot-core/src/types/models/bank-sync.d.ts:11-21
Timestamp: 2024-11-04T14:14:10.698Z
Learning: In `packages/loot-core/src/types/models/bank-sync.d.ts`, when defining TypeScript types for data received from the server, maintain the field names as they are in the server response, even if they don't follow TypeScript naming conventions.

Applied to files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
📚 Learning: 2025-11-04T00:47:00.968Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 6065
File: packages/desktop-client/src/components/transactions/TransactionList.tsx:197-205
Timestamp: 2025-11-04T00:47:00.968Z
Learning: In packages/desktop-client/src/components/transactions/TransactionList.tsx and similar schedule creation code, when using schedule/create with conditions and then updating the rule's actions, it's correct to filter rule.actions to keep only 'link-schedule' and append custom actions. Transactions created by schedules are defined by a mix of conditions (which create the base transaction with date, amount, payee, account) and actions (which apply additional modifications like category, notes, splits). The filtering pattern replaces any auto-generated actions with the desired custom actions.

Applied to files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-16T21:27:47.818Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6428
File: eslint.config.mjs:249-278
Timestamp: 2025-12-16T21:27:47.818Z
Learning: Enforce the specified import order for all TypeScript/JavaScript files under packages/desktop-client: React imports, then built-in Node.js modules, then external packages, then loot-core packages, then parent imports, then sibling imports, then index imports, and finally desktop-client imports (desktop-client imports come after relative imports, not before). Apply this rule to all relevant files in that directory (extensions: .ts, .tsx, .js, .mjs).

Applied to files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-19T20:22:15.654Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6450
File: packages/crdt/src/crdt/merkle.ts:10-10
Timestamp: 2025-12-19T20:22:15.654Z
Learning: In TypeScript reviews, differentiate between type-only imports and runtime identifiers. If an import is only used in type annotations, type positions (parameters, return types, type aliases) should verify it's truly type-only and not causing runtime imports. Do not conflate a type name (e.g., Timestamp) with a nearby lowercased variable (e.g., timestamp) that is used at runtime. This distinction should be checked across .ts files (e.g., packages/**/src/**/*.ts) to ensure type-only imports do not introduce runtime dependencies or ambiguity.

Applied to files:

  • packages/desktop-client/src/accounts/accountsSlice.ts
  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
📚 Learning: 2024-10-12T19:13:25.005Z
Learnt from: jfdoming
Repo: actualbudget/actual PR: 3641
File: packages/loot-core/src/server/accounts/rules.test.ts:524-536
Timestamp: 2024-10-12T19:13:25.005Z
Learning: In `packages/loot-core/src/server/accounts/rules.test.ts`, prefer explicit action definitions over refactoring similar actions into loops or helper functions, even when actions are similar.

Applied to files:

  • packages/loot-core/src/server/accounts/app.ts
📚 Learning: 2024-10-12T19:11:05.790Z
Learnt from: jfdoming
Repo: actualbudget/actual PR: 3641
File: packages/loot-core/src/server/accounts/rules.ts:687-693
Timestamp: 2024-10-12T19:11:05.790Z
Learning: In `packages/loot-core/src/server/accounts/rules.ts`, within the `execSplitActions` function, the zeroth index of `newTransactions` is reserved for actions that apply to all splits, so split transactions start from index 1.

Applied to files:

  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
📚 Learning: 2025-10-12T04:07:06.002Z
Learnt from: lelemm
Repo: actualbudget/actual PR: 5786
File: packages/api/tsconfig.dist.json:14-14
Timestamp: 2025-10-12T04:07:06.002Z
Learning: In the Actual Budget codebase, when rootDir is removed from packages/loot-core/tsconfig.api.json to allow referencing files outside the loot-core directory, the declaration output structure changes. The path alias for loot-core in packages/api/tsconfig.dist.json must be updated from "./types/loot-core/src/*" to "./types/loot-core/loot-core/src/*" to match the new emitted declaration paths, as TypeScript preserves the full directory structure from the project root when rootDir is not specified.

Applied to files:

  • packages/loot-core/src/server/accounts/app.ts
📚 Learning: 2024-10-08T15:46:15.739Z
Learnt from: UnderKoen
Repo: actualbudget/actual PR: 3365
File: packages/loot-core/src/types/models/rule.d.ts:4-4
Timestamp: 2024-10-08T15:46:15.739Z
Learning: In `packages/loot-core/src/server/accounts/transaction-rules.ts`, the `stage` property can have legacy values `'cleanup'` and `'modify'`, which are converted to `'pre'`. The type remains `string` to accommodate these values and ensure correct usage.

Applied to files:

  • packages/loot-core/src/server/accounts/app.ts
  • packages/loot-core/src/server/accounts/sync.ts
📚 Learning: 2025-01-29T19:44:02.950Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 4253
File: packages/desktop-client/src/components/banksync/EditSyncAccount.tsx:154-160
Timestamp: 2025-01-29T19:44:02.950Z
Learning: In EditSyncAccount.tsx, mappings state is initialized with defaultMappings (containing both 'payment' and 'deposit' directions) if no saved mappings exist, so direction maps are guaranteed to exist.

Applied to files:

  • packages/loot-core/src/server/accounts/app.ts
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-06-21T04:15:23.727Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 5207
File: packages/desktop-client/src/components/transactions/TransactionsTable.tsx:2194-2201
Timestamp: 2025-06-21T04:15:23.727Z
Learning: In TransactionsTable.tsx, the balance calculation using find() to locate the first non-scheduled transaction is acceptable for performance because: 1) the component only renders when adding transactions (limited usage), 2) find() short-circuits on first match, and 3) scheduled transactions are typically sparse in the transaction list.

Applied to files:

  • packages/loot-core/src/server/accounts/sync.ts
📚 Learning: 2024-09-28T17:03:43.286Z
Learnt from: qedi-r
Repo: actualbudget/actual PR: 3527
File: packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx:47-47
Timestamp: 2024-09-28T17:03:43.286Z
Learning: Validating balance is outside the scope in `CreateLocalAccountModal.tsx`.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-11-09T20:18:28.468Z
Learnt from: csenel
Repo: actualbudget/actual PR: 3810
File: packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx:150-161
Timestamp: 2024-11-09T20:18:28.468Z
Learning: In `packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx`, prefer to keep the implementation of checks consistent with similar patterns elsewhere in the codebase, even if alternative implementations are more concise.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-25T04:49:31.861Z
Learnt from: tlesicka
Repo: actualbudget/actual PR: 3689
File: packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx:144-156
Timestamp: 2024-10-25T04:49:31.861Z
Learning: In `packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx`, styles for buttons may differ for each button in the future, so avoid suggesting extraction of common styles in this file.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-05T10:58:55.008Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 3570
File: packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts:16-24
Timestamp: 2024-10-05T10:58:55.008Z
Learning: In `packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts`, the `parseDate` function's `str` parameter should maintain its current type `string | number | null | Array<unknown> | object`, as narrowing it to `string | null` is not suitable.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-08T15:46:15.739Z
Learnt from: qedi-r
Repo: actualbudget/actual PR: 3527
File: packages/desktop-client/src/components/accounts/Header.jsx:0-0
Timestamp: 2024-10-08T15:46:15.739Z
Learning: In the Actual Budget project, importing `t` directly from 'i18next' is best avoided, and we should almost always prefer using the useTranslation hook if possible.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Use 'Trans' component instead of 't()' function when possible for internationalization

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-01-17T12:11:23.669Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 3840
File: packages/loot-core/src/server/budget/template-notes.ts:12-12
Timestamp: 2025-01-17T12:11:23.669Z
Learning: In server-side code or non-React contexts where React hooks cannot be used, prefer using `import { t } from 'i18next'` and directly using `t(string)` for translations, instead of using react-i18next hooks or other approaches.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to packages/desktop-client/src/**/*.{tsx,jsx} : Use 'useDispatch()', 'useSelector()', 'useStore()' from 'src/redux' instead of react-redux

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Don't use 'React.*' patterns - use named imports instead

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to packages/desktop-client/src/**/*.{tsx,jsx} : Use custom hooks from 'src/hooks' instead of react-router directly (e.g., 'useNavigate()' from 'src/hooks')

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-10-22T16:22:17.482Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 5978
File: packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx:58-67
Timestamp: 2025-10-22T16:22:17.482Z
Learning: In react-i18next, the Trans component supports interpolation using the syntax `<Trans>Text {{ variable: value }}</Trans>` where the double curly braces are special syntax recognized by react-i18next for variable substitution. This is valid and should not be flagged as incorrect.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-06-21T04:04:01.231Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 5206
File: packages/desktop-client/src/components/Titlebar.tsx:63-63
Timestamp: 2025-06-21T04:04:01.231Z
Learning: In react-i18next Trans components, double curly braces `{{ }}` are the correct syntax for interpolation placeholders, not JSX object literals. For example: `<Trans count={value}>{{ value }} items</Trans>` is the proper way to interpolate values within translation strings.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Don't use 'React.FunctionComponent' or 'React.FC' - type props directly

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-02-11T18:44:28.613Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 0
File: :0-0
Timestamp: 2025-02-11T18:44:28.613Z
Learning: The Button2 component is deprecated. Use actual-app/components/button instead.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-09-26T19:32:57.858Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 3507
File: packages/desktop-client/src/components/table.tsx:1220-1220
Timestamp: 2024-09-26T19:32:57.858Z
Learning: The `TableNavigator` type in `packages/desktop-client/src/components/table.tsx` is not used outside of this file and can safely be made private by removing the `export` keyword.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-08-16T16:42:08.306Z
Learnt from: sjones512
Repo: actualbudget/actual PR: 5554
File: packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:7-8
Timestamp: 2025-08-16T16:42:08.306Z
Learning: In the Actual Budget codebase, it's the established pattern and acceptable to import useSpreadsheet as a type-only import and then use ReturnType<typeof useSpreadsheet> in type annotations. This pattern is used consistently across all spreadsheet files including custom-spreadsheet.ts, grouped-spreadsheet.ts, spending-spreadsheet.ts, net-worth-spreadsheet.ts, cash-flow-spreadsheet.tsx, calendar-spreadsheet.ts, summary-spreadsheet.ts, and crossover-spreadsheet.ts.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
🧬 Code graph analysis (3)
packages/loot-core/src/server/accounts/app.ts (3)
packages/loot-core/src/types/models/account.ts (1)
  • AccountEntity (1-9)
packages/sync-server/src/app-pluggyai/app-pluggyai.js (1)
  • startingBalance (75-77)
packages/sync-server/src/app-gocardless/services/gocardless-service.js (1)
  • startingBalance (223-226)
packages/loot-core/src/server/accounts/sync.ts (2)
packages/sync-server/src/app-gocardless/banks/abnamro_abnanl2a.js (1)
  • oldestTransaction (40-41)
packages/sync-server/src/app-gocardless/banks/ing_pl_ingbplpw.js (1)
  • oldestTransaction (29-30)
packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (4)
packages/component-library/src/Input.tsx (1)
  • Input (52-91)
packages/desktop-client/src/components/util/AmountInput.tsx (1)
  • AmountInput (48-241)
packages/component-library/src/View.tsx (1)
  • View (14-33)
packages/component-library/src/Text.tsx (1)
  • Text (19-28)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: test
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (ubuntu-22.04)
  • GitHub Check: build (windows-latest)
  • GitHub Check: Functional (shard 1/5)
  • GitHub Check: Functional Desktop App
  • GitHub Check: Functional (shard 5/5)
  • GitHub Check: Visual regression (shard 3/5)
  • GitHub Check: Visual regression (shard 4/5)
  • GitHub Check: Visual regression (shard 1/5)
  • GitHub Check: Functional (shard 3/5)
  • GitHub Check: Visual regression (shard 2/5)
  • GitHub Check: Visual regression (shard 5/5)
  • GitHub Check: Functional (shard 4/5)
  • GitHub Check: Functional (shard 2/5)
🔇 Additional comments (19)
packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (6)

1-1: LGTM!

Good cleanup removing unused React import and following the coding guidelines to use named imports instead of React.* patterns.


132-134: LGTM!

State initialization for per-account starting settings is clean and properly typed.


466-469: LGTM!

Clean type definition for the starting settings. Appropriately scoped to the file.


499-601: LGTM!

Good implementation of conditional rendering for starting options. The empty <Field> elements properly maintain table column alignment when options aren't shown.


653-752: LGTM!

Well-structured component with good layout flexibility. The zeroSign logic correctly handles negative balance defaults for credit cards/loans, and i18n is properly implemented with <Trans> components.


754-890: LGTM!

Consistent implementation with the desktop TableRow. Good use of the stacked layout for mobile responsiveness.

packages/loot-core/src/server/accounts/app.ts (4)

41-47: LGTM!

Clean shared base type definition. Following the DRY principle by consolidating common parameters across all link handlers.


126-183: LGTM!

GoCardless handler properly extended with the new starting parameters. The intersection type pattern cleanly separates base params from provider-specific fields.


193-255: LGTM!

SimpleFin handler consistently updated with the same pattern as GoCardless.


265-327: LGTM!

PluggyAi handler consistently updated. All three providers now have uniform support for custom starting options.

packages/desktop-client/src/accounts/accountsSlice.ts (3)

248-254: LGTM!

Good type definition mirroring the backend's LinkAccountBaseParams. This maintains consistency across the frontend-backend boundary.


256-285: LGTM!

Thunk properly extended to accept and forward the new starting options to the backend.


287-341: LGTM!

Both SimpleFin and PluggyAi thunks consistently updated with the same pattern.

packages/loot-core/src/server/accounts/sync.ts (5)

881-887: LGTM!

Function signature cleanly extended with optional parameters. Good use of optional parameters with ? to maintain backward compatibility.


906-927: LGTM!

Good implementation with proper precedence. The customStartingBalance !== undefined check correctly allows users to explicitly set a $0 balance (unlike the frontend which filters out zeros).


929-952: LGTM!

Clean fallback logic for determining the starting balance date. All three cases (custom date, oldest transaction, current day) are properly handled.


988-1031: LGTM!

syncAccount properly propagates the custom starting options through to processBankSyncDownload. The customStartingDate ?? (await getAccountSyncStartDate(id)) pattern correctly prioritizes user-provided values.


1034-1077: LGTM!

Batch sync correctly doesn't use custom starting options - these are only relevant during initial account linking, which goes through the individual linkAccount* handlers rather than this batch sync path.

upcoming-release-notes/6629.md (1)

1-6: LGTM!

Clear and concise release note that accurately describes the new feature.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (3)

279-284: Minor timezone consideration in default date calculation.

Using toISOString().split('T')[0] returns the UTC date, which may differ from the user's local date depending on their timezone (e.g., early morning in UTC+12 would show "yesterday"). Consider using a locale-aware approach if local date consistency is important.

Suggested fix
     // Default to 90 days ago (matches server default)
     const ninetyDaysAgo = new Date();
     ninetyDaysAgo.setDate(ninetyDaysAgo.getDate() - 90);
+    const year = ninetyDaysAgo.getFullYear();
+    const month = String(ninetyDaysAgo.getMonth() + 1).padStart(2, '0');
+    const day = String(ninetyDaysAgo.getDate()).padStart(2, '0');
     return {
-      date: ninetyDaysAgo.toISOString().split('T')[0],
+      date: `${year}-${month}-${day}`,
       balance: 0,
     };

781-786: Consider extracting duplicate logic.

The isNewAccount / shouldShowStartingOptions logic is duplicated between TableRow (lines 398-402) and AccountCard. Consider extracting this to a shared helper function for maintainability.

Example helper
function isNewAccountOption(
  chosenAccountId: string | undefined,
  addOnBudgetOptionId: string,
  addOffBudgetOptionId: string,
): boolean {
  return (
    chosenAccountId === addOnBudgetOptionId ||
    chosenAccountId === addOffBudgetOptionId
  );
}

752-767: Consider aligning type definition pattern with TableRowProps.

AccountCardProps is defined but immediately extended inline in the component signature. For consistency with TableRowProps (lines 497-504), consider extending the type properly:

Suggested refactor
-type AccountCardProps = SharedAccountRowProps;
+type AccountCardProps = SharedAccountRowProps & {
+  customStartingDate: CustomStartingSettings;
+  onSetCustomStartingDate: (
+    accountId: string,
+    settings: CustomStartingSettings,
+  ) => void;
+};

 function AccountCard({
   externalAccount,
   chosenAccount,
   unlinkedAccounts,
   onSetLinkedAccount,
   customStartingDate,
   onSetCustomStartingDate,
-}: AccountCardProps & {
-  customStartingDate: CustomStartingSettings;
-  onSetCustomStartingDate: (
-    accountId: string,
-    settings: CustomStartingSettings,
-  ) => void;
-}) {
+}: AccountCardProps) {
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 699537f and 6a6d90f.

📒 Files selected for processing (1)
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Use TypeScript for all code
Use descriptive variable names with auxiliary verbs (e.g., 'isLoaded', 'hasError')
Use named exports for components and utilities; avoid default exports except in specific cases
Use functional and declarative programming patterns - avoid classes
Use the 'function' keyword for pure functions
Structure files with: exported component/page, helpers, static content, types
Organize imports in the following order: React imports, built-in Node.js modules, external packages, Actual packages, parent imports, sibling imports, index imports, with newlines between groups
Never use 'console.*' - use logger instead (enforced by ESLint rule 'actual/prefer-logger-over-console')
Never import from 'uuid' without destructuring - use 'import { v4 as uuidv4 } from 'uuid''

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Prefer 'type' over 'interface' for defining types in TypeScript
Avoid 'enum' - use objects or maps instead
Avoid 'any' or 'unknown' unless absolutely necessary
Avoid type assertions ('as', '!') - prefer 'satisfies' for type narrowing
Use inline type imports: 'import { type MyType } from '...''
Look for existing type definitions in 'packages/loot-core/src/types/' before creating new types

Do not allow creating new components or utilities with the @ts-strict-ignore comment

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{tsx,jsx}: Create new components in their own files
Don't use 'React.FunctionComponent' or 'React.FC' - type props directly
Don't use 'React.*' patterns - use named imports instead
Use '' instead of '' tags in React components
Avoid unstable nested components
Use 'satisfies' for type narrowing in React components
Use declarative JSX that is minimal and readable; avoid unnecessary curly braces in conditionals
Prefer explicit expressions ('condition && ') in JSX
Never import colors directly - use theme instead
Use 'Trans' component instead of 't()' function when possible for internationalization
All user-facing strings must be translated using i18n

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
packages/desktop-client/src/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/desktop-client/src/**/*.{tsx,jsx}: Use custom hooks from 'src/hooks' instead of react-router directly (e.g., 'useNavigate()' from 'src/hooks')
Use 'useDispatch()', 'useSelector()', 'useStore()' from 'src/redux' instead of react-redux

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

Do not allow any oxlint-disable lines

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
🧠 Learnings (28)
📓 Common learnings
Learnt from: joel-jeremy
Repo: actualbudget/actual PR: 3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-10-24T17:05:41.415Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 4253
File: packages/sync-server/src/app-gocardless/banks/nationwide_naiagb21.js:41-44
Timestamp: 2025-02-11T17:25:39.615Z
Learning: In bank sync providers, core fields like transactionId and amount should be mutated directly on the transaction object as they aren't covered by the fallback normalization logic and shouldn't be exposed for user mapping. Display-related fields should use editedTrans.
Learnt from: karimkodera
Repo: actualbudget/actual PR: 5584
File: packages/loot-core/src/server/api.ts:809-816
Timestamp: 2025-08-22T10:26:17.562Z
Learning: In schedule updates, payee and account conditions can be missing and should be upserted when updating, while date and amount conditions are auto-created during schedule creation and should always be present - if they're missing during update, it indicates a bug and should throw an error rather than create duplicates.
📚 Learning: 2024-10-24T17:05:41.415Z
Learnt from: joel-jeremy
Repo: actualbudget/actual PR: 3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-10-24T17:05:41.415Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-11-04T00:47:00.968Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 6065
File: packages/desktop-client/src/components/transactions/TransactionList.tsx:197-205
Timestamp: 2025-11-04T00:47:00.968Z
Learning: In packages/desktop-client/src/components/transactions/TransactionList.tsx and similar schedule creation code, when using schedule/create with conditions and then updating the rule's actions, it's correct to filter rule.actions to keep only 'link-schedule' and append custom actions. Transactions created by schedules are defined by a mix of conditions (which create the base transaction with date, amount, payee, account) and actions (which apply additional modifications like category, notes, splits). The filtering pattern replaces any auto-generated actions with the desired custom actions.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-09-28T17:03:43.286Z
Learnt from: qedi-r
Repo: actualbudget/actual PR: 3527
File: packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx:47-47
Timestamp: 2024-09-28T17:03:43.286Z
Learning: Validating balance is outside the scope in `CreateLocalAccountModal.tsx`.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-11-09T20:18:28.468Z
Learnt from: csenel
Repo: actualbudget/actual PR: 3810
File: packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx:150-161
Timestamp: 2024-11-09T20:18:28.468Z
Learning: In `packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx`, prefer to keep the implementation of checks consistent with similar patterns elsewhere in the codebase, even if alternative implementations are more concise.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-11-26T23:01:06.627Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6259
File: packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts:320-326
Timestamp: 2025-11-26T23:01:06.627Z
Learning: In packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts around lines 320-326 in the downloadBudget function, there's a potential TypeError when error.meta is null. The check `typeof error.meta === 'object'` passes for null (since typeof null === 'object' in JavaScript), but then `'isMissingKey' in error.meta` throws a TypeError. The safe fix is to add `error.meta != null &&` before the typeof check to handle both null and undefined cases. Remind about this when logic changes are made to this error handling code.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-24T18:57:16.406Z
Learnt from: lelemm
Repo: actualbudget/actual PR: 3732
File: packages/desktop-client/src/components/util/AmountInput.tsx:102-108
Timestamp: 2024-10-24T18:57:16.406Z
Learning: In `packages/desktop-client/src/components/util/AmountInput.tsx`, zero amounts are handled in the `onSwitch` function, so zero amounts are intentionally ignored in the `fireUpdate` function.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-11-22T17:03:41.876Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6158
File: packages/desktop-client/src/hooks/useScheduleEdit.ts:163-172
Timestamp: 2025-11-22T17:03:41.876Z
Learning: In packages/desktop-client/src/hooks/useScheduleEdit.ts around lines 163-172, the 'set-transactions' case uses a single-argument sort comparator (`transactions.sort(a => { return action.transactionId === a.id ? -1 : 1; })`), which is not symmetric and can produce unstable ordering. The correct approach is to use a two-argument comparator that returns -1/0/1 based on whether a or b matches action.transactionId. MatissJanis prefers to fix this in a future PR when this code is modified again.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-06-16T17:45:40.807Z
Learnt from: misu-dev
Repo: actualbudget/actual PR: 5167
File: packages/desktop-client/src/components/spreadsheet/useFormat.ts:64-72
Timestamp: 2025-06-16T17:45:40.807Z
Learning: The user misu-dev prefers strict type checking for financial format types in useFormat.ts as a long-term goal, but acknowledges that creating follow-up issues for cleanup should wait until after the current PR is merged, not during the development phase.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-09-28T08:34:21.188Z
Learnt from: misu-dev
Repo: actualbudget/actual PR: 5639
File: packages/desktop-client/src/components/util/GenericInput.jsx:68-73
Timestamp: 2025-09-28T08:34:21.188Z
Learning: In packages/desktop-client/src/components/util/GenericInput.jsx, for amount filtering with inflow/outflow options, the sign prop should always be '+' (for both inflow and outflow) because the UI layer keeps all amounts positive, while the server-side transaction rules engine handles the actual sign conversion and negation logic when querying the database.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-12-18T20:24:07.779Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 3958
File: packages/loot-core/src/shared/schedules.ts:279-280
Timestamp: 2024-12-18T20:24:07.779Z
Learning: User states the `amount` is not intended to be null or undefined, and the current type signature should remain unchanged, as the null checks are just a stop-gap measure to prevent crashes.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-16T03:51:04.683Z
Learnt from: tlesicka
Repo: actualbudget/actual PR: 3593
File: packages/desktop-client/src/components/sidebar/BudgetName.tsx:114-136
Timestamp: 2024-10-16T03:51:04.683Z
Learning: In 'packages/desktop-client/src/components/sidebar/BudgetName.tsx', empty budget names are handled elsewhere, so additional error handling within the 'EditableBudgetName' component is unnecessary.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-05T10:58:55.008Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 3570
File: packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts:16-24
Timestamp: 2024-10-05T10:58:55.008Z
Learning: In `packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts`, the `parseDate` function's `str` parameter should maintain its current type `string | number | null | Array<unknown> | object`, as narrowing it to `string | null` is not suitable.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-07T11:45:10.127Z
Learnt from: tlesicka
Repo: actualbudget/actual PR: 3593
File: packages/desktop-client/src/components/sidebar/BudgetName.tsx:64-64
Timestamp: 2024-10-07T11:45:10.127Z
Learning: In `packages/desktop-client/src/components/sidebar/BudgetName.tsx`, when `useMetadataPref('budgetName')` returns `undefined`, the code handles it appropriately without the need to assign a default value to `budgetName`.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-08T15:46:15.739Z
Learnt from: qedi-r
Repo: actualbudget/actual PR: 3527
File: packages/desktop-client/src/components/accounts/Header.jsx:0-0
Timestamp: 2024-10-08T15:46:15.739Z
Learning: In the Actual Budget project, importing `t` directly from 'i18next' is best avoided, and we should almost always prefer using the useTranslation hook if possible.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Use 'Trans' component instead of 't()' function when possible for internationalization

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-01-17T12:11:23.669Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 3840
File: packages/loot-core/src/server/budget/template-notes.ts:12-12
Timestamp: 2025-01-17T12:11:23.669Z
Learning: In server-side code or non-React contexts where React hooks cannot be used, prefer using `import { t } from 'i18next'` and directly using `t(string)` for translations, instead of using react-i18next hooks or other approaches.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to packages/desktop-client/src/**/*.{tsx,jsx} : Use 'useDispatch()', 'useSelector()', 'useStore()' from 'src/redux' instead of react-redux

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Don't use 'React.*' patterns - use named imports instead

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to packages/desktop-client/src/**/*.{tsx,jsx} : Use custom hooks from 'src/hooks' instead of react-router directly (e.g., 'useNavigate()' from 'src/hooks')

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-10-22T16:22:17.482Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 5978
File: packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx:58-67
Timestamp: 2025-10-22T16:22:17.482Z
Learning: In react-i18next, the Trans component supports interpolation using the syntax `<Trans>Text {{ variable: value }}</Trans>` where the double curly braces are special syntax recognized by react-i18next for variable substitution. This is valid and should not be flagged as incorrect.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-06-21T04:04:01.231Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 5206
File: packages/desktop-client/src/components/Titlebar.tsx:63-63
Timestamp: 2025-06-21T04:04:01.231Z
Learning: In react-i18next Trans components, double curly braces `{{ }}` are the correct syntax for interpolation placeholders, not JSX object literals. For example: `<Trans count={value}>{{ value }} items</Trans>` is the proper way to interpolate values within translation strings.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Don't use 'React.FunctionComponent' or 'React.FC' - type props directly

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-02-11T18:44:28.613Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 0
File: :0-0
Timestamp: 2025-02-11T18:44:28.613Z
Learning: The Button2 component is deprecated. Use actual-app/components/button instead.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-09-26T19:32:57.858Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 3507
File: packages/desktop-client/src/components/table.tsx:1220-1220
Timestamp: 2024-09-26T19:32:57.858Z
Learning: The `TableNavigator` type in `packages/desktop-client/src/components/table.tsx` is not used outside of this file and can safely be made private by removing the `export` keyword.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-08-16T16:42:08.306Z
Learnt from: sjones512
Repo: actualbudget/actual PR: 5554
File: packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:7-8
Timestamp: 2025-08-16T16:42:08.306Z
Learning: In the Actual Budget codebase, it's the established pattern and acceptable to import useSpreadsheet as a type-only import and then use ReturnType<typeof useSpreadsheet> in type annotations. This pattern is used consistently across all spreadsheet files including custom-spreadsheet.ts, grouped-spreadsheet.ts, spending-spreadsheet.ts, net-worth-spreadsheet.ts, cash-flow-spreadsheet.tsx, calendar-spreadsheet.ts, summary-spreadsheet.ts, and crossover-spreadsheet.ts.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-01-29T19:44:02.950Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 4253
File: packages/desktop-client/src/components/banksync/EditSyncAccount.tsx:154-160
Timestamp: 2025-01-29T19:44:02.950Z
Learning: In EditSyncAccount.tsx, mappings state is initialized with defaultMappings (containing both 'payment' and 'deposit' directions) if no saved mappings exist, so direction maps are guaranteed to exist.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-16T21:27:47.818Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6428
File: eslint.config.mjs:249-278
Timestamp: 2025-12-16T21:27:47.818Z
Learning: Enforce the specified import order for all TypeScript/JavaScript files under packages/desktop-client: React imports, then built-in Node.js modules, then external packages, then loot-core packages, then parent imports, then sibling imports, then index imports, and finally desktop-client imports (desktop-client imports come after relative imports, not before). Apply this rule to all relevant files in that directory (extensions: .ts, .tsx, .js, .mjs).

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Visual regression (shard 3/5)
  • GitHub Check: build (windows-latest)
  • GitHub Check: build (macos-latest)
  • GitHub Check: Analyze
  • GitHub Check: compare
🔇 Additional comments (4)
packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (4)

164-170: LGTM!

The null/empty checks are well-implemented. Using != null for startingBalance correctly allows explicit zero values to be passed through, which aligns with the commit message intent.


651-690: LGTM!

The StartingOptionsFields component is well-structured with proper layout handling. The zeroSign calculation based on externalBalance correctly supports credit cards/loans (negative balances) by defaulting the sign appropriately. The use of Trans components for i18n follows the coding guidelines.


381-418: LGTM!

The table structure changes are well-organized with appropriate column widths for the new fields. The type parameter Table<ExternalAccount & { id: string }> correctly types the items, and the conditional rendering of StartingOptionsFields properly handles the new account creation flow.


594-599: LGTM!

The empty Field placeholders correctly maintain table column alignment when starting options aren't applicable for existing accounts.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (2)

289-304: Consider memoizing the default date calculation.

The default date calculation (lines 294-301) runs on every call to getCustomStartingDate, which occurs during each render for every account. While not a critical issue, you could memoize the default value to avoid repeated Date object creation.

♻️ Optional: Memoize default starting settings
+  const defaultStartingSettings = useMemo<CustomStartingSettings>(() => {
+    const ninetyDaysAgo = new Date();
+    ninetyDaysAgo.setDate(ninetyDaysAgo.getDate() - 90);
+    const year = ninetyDaysAgo.getFullYear();
+    const month = String(ninetyDaysAgo.getMonth() + 1).padStart(2, '0');
+    const day = String(ninetyDaysAgo.getDate()).padStart(2, '0');
+    return {
+      date: `${year}-${month}-${day}`,
+      balance: 0,
+    };
+  }, []);
+
   const getCustomStartingDate = (accountId: string) => {
     if (customStartingDates[accountId]) {
       return customStartingDates[accountId];
     }
-    // Default to 90 days ago (matches server default)
-    const ninetyDaysAgo = new Date();
-    ninetyDaysAgo.setDate(ninetyDaysAgo.getDate() - 90);
-    // Use locale-aware date formatting to avoid timezone issues with toISOString()
-    const year = ninetyDaysAgo.getFullYear();
-    const month = String(ninetyDaysAgo.getMonth() + 1).padStart(2, '0');
-    const day = String(ninetyDaysAgo.getDate()).padStart(2, '0');
-    return {
-      date: `${year}-${month}-${day}`,
-      balance: 0,
-    };
+    return defaultStartingSettings;
   };

306-314: Use CustomStartingSettings type for consistency.

The settings parameter uses an inline type that duplicates CustomStartingSettings. Consider using the defined type for consistency.

♻️ Suggested fix
   const setCustomStartingDate = (
     accountId: string,
-    settings: { date: string; balance: number },
+    settings: CustomStartingSettings,
   ) => {
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a6d90f and 65e4858.

📒 Files selected for processing (2)
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
  • packages/loot-core/src/server/accounts/app.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/loot-core/src/server/accounts/app.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Use TypeScript for all code
Use descriptive variable names with auxiliary verbs (e.g., 'isLoaded', 'hasError')
Use named exports for components and utilities; avoid default exports except in specific cases
Use functional and declarative programming patterns - avoid classes
Use the 'function' keyword for pure functions
Structure files with: exported component/page, helpers, static content, types
Organize imports in the following order: React imports, built-in Node.js modules, external packages, Actual packages, parent imports, sibling imports, index imports, with newlines between groups
Never use 'console.*' - use logger instead (enforced by ESLint rule 'actual/prefer-logger-over-console')
Never import from 'uuid' without destructuring - use 'import { v4 as uuidv4 } from 'uuid''

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Prefer 'type' over 'interface' for defining types in TypeScript
Avoid 'enum' - use objects or maps instead
Avoid 'any' or 'unknown' unless absolutely necessary
Avoid type assertions ('as', '!') - prefer 'satisfies' for type narrowing
Use inline type imports: 'import { type MyType } from '...''
Look for existing type definitions in 'packages/loot-core/src/types/' before creating new types

Do not allow creating new components or utilities with the @ts-strict-ignore comment

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{tsx,jsx}: Create new components in their own files
Don't use 'React.FunctionComponent' or 'React.FC' - type props directly
Don't use 'React.*' patterns - use named imports instead
Use '' instead of '' tags in React components
Avoid unstable nested components
Use 'satisfies' for type narrowing in React components
Use declarative JSX that is minimal and readable; avoid unnecessary curly braces in conditionals
Prefer explicit expressions ('condition && ') in JSX
Never import colors directly - use theme instead
Use 'Trans' component instead of 't()' function when possible for internationalization
All user-facing strings must be translated using i18n

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
packages/desktop-client/src/**/*.{tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/desktop-client/src/**/*.{tsx,jsx}: Use custom hooks from 'src/hooks' instead of react-router directly (e.g., 'useNavigate()' from 'src/hooks')
Use 'useDispatch()', 'useSelector()', 'useStore()' from 'src/redux' instead of react-redux

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (Custom checks)

Do not allow any oxlint-disable lines

Files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
🧠 Learnings (27)
📓 Common learnings
Learnt from: joel-jeremy
Repo: actualbudget/actual PR: 3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-10-24T17:05:41.415Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.
Learnt from: misu-dev
Repo: actualbudget/actual PR: 5167
File: packages/desktop-client/src/components/spreadsheet/useFormat.ts:64-72
Timestamp: 2025-06-16T17:45:40.807Z
Learning: The user misu-dev prefers strict type checking for financial format types in useFormat.ts as a long-term goal, but acknowledges that creating follow-up issues for cleanup should wait until after the current PR is merged, not during the development phase.
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 4253
File: packages/sync-server/src/app-gocardless/banks/nationwide_naiagb21.js:41-44
Timestamp: 2025-02-11T17:25:39.615Z
Learning: In bank sync providers, core fields like transactionId and amount should be mutated directly on the transaction object as they aren't covered by the fallback normalization logic and shouldn't be exposed for user mapping. Display-related fields should use editedTrans.
📚 Learning: 2024-10-24T17:05:41.415Z
Learnt from: joel-jeremy
Repo: actualbudget/actual PR: 3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-10-24T17:05:41.415Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-09-28T17:03:43.286Z
Learnt from: qedi-r
Repo: actualbudget/actual PR: 3527
File: packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx:47-47
Timestamp: 2024-09-28T17:03:43.286Z
Learning: Validating balance is outside the scope in `CreateLocalAccountModal.tsx`.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-11-09T20:18:28.468Z
Learnt from: csenel
Repo: actualbudget/actual PR: 3810
File: packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx:150-161
Timestamp: 2024-11-09T20:18:28.468Z
Learning: In `packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx`, prefer to keep the implementation of checks consistent with similar patterns elsewhere in the codebase, even if alternative implementations are more concise.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-11-04T00:47:00.968Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 6065
File: packages/desktop-client/src/components/transactions/TransactionList.tsx:197-205
Timestamp: 2025-11-04T00:47:00.968Z
Learning: In packages/desktop-client/src/components/transactions/TransactionList.tsx and similar schedule creation code, when using schedule/create with conditions and then updating the rule's actions, it's correct to filter rule.actions to keep only 'link-schedule' and append custom actions. Transactions created by schedules are defined by a mix of conditions (which create the base transaction with date, amount, payee, account) and actions (which apply additional modifications like category, notes, splits). The filtering pattern replaces any auto-generated actions with the desired custom actions.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-08T15:46:15.739Z
Learnt from: UnderKoen
Repo: actualbudget/actual PR: 3499
File: packages/desktop-client/e2e/page-models/close-account-modal.js:16-18
Timestamp: 2024-10-08T15:46:15.739Z
Learning: In the `CloseAccountModal` class, methods are implemented without additional error handling, return values, or additional comments to maintain consistency with existing codebase practices.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-25T04:49:31.861Z
Learnt from: tlesicka
Repo: actualbudget/actual PR: 3689
File: packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx:144-156
Timestamp: 2024-10-25T04:49:31.861Z
Learning: In `packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx`, styles for buttons may differ for each button in the future, so avoid suggesting extraction of common styles in this file.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-11-26T23:01:06.627Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6259
File: packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts:320-326
Timestamp: 2025-11-26T23:01:06.627Z
Learning: In packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts around lines 320-326 in the downloadBudget function, there's a potential TypeError when error.meta is null. The check `typeof error.meta === 'object'` passes for null (since typeof null === 'object' in JavaScript), but then `'isMissingKey' in error.meta` throws a TypeError. The safe fix is to add `error.meta != null &&` before the typeof check to handle both null and undefined cases. Remind about this when logic changes are made to this error handling code.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-24T18:57:16.406Z
Learnt from: lelemm
Repo: actualbudget/actual PR: 3732
File: packages/desktop-client/src/components/util/AmountInput.tsx:102-108
Timestamp: 2024-10-24T18:57:16.406Z
Learning: In `packages/desktop-client/src/components/util/AmountInput.tsx`, zero amounts are handled in the `onSwitch` function, so zero amounts are intentionally ignored in the `fireUpdate` function.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-11-22T17:03:41.876Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6158
File: packages/desktop-client/src/hooks/useScheduleEdit.ts:163-172
Timestamp: 2025-11-22T17:03:41.876Z
Learning: In packages/desktop-client/src/hooks/useScheduleEdit.ts around lines 163-172, the 'set-transactions' case uses a single-argument sort comparator (`transactions.sort(a => { return action.transactionId === a.id ? -1 : 1; })`), which is not symmetric and can produce unstable ordering. The correct approach is to use a two-argument comparator that returns -1/0/1 based on whether a or b matches action.transactionId. MatissJanis prefers to fix this in a future PR when this code is modified again.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-06-16T17:45:40.807Z
Learnt from: misu-dev
Repo: actualbudget/actual PR: 5167
File: packages/desktop-client/src/components/spreadsheet/useFormat.ts:64-72
Timestamp: 2025-06-16T17:45:40.807Z
Learning: The user misu-dev prefers strict type checking for financial format types in useFormat.ts as a long-term goal, but acknowledges that creating follow-up issues for cleanup should wait until after the current PR is merged, not during the development phase.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-09-28T08:34:21.188Z
Learnt from: misu-dev
Repo: actualbudget/actual PR: 5639
File: packages/desktop-client/src/components/util/GenericInput.jsx:68-73
Timestamp: 2025-09-28T08:34:21.188Z
Learning: In packages/desktop-client/src/components/util/GenericInput.jsx, for amount filtering with inflow/outflow options, the sign prop should always be '+' (for both inflow and outflow) because the UI layer keeps all amounts positive, while the server-side transaction rules engine handles the actual sign conversion and negation logic when querying the database.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-12-18T20:24:07.779Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 3958
File: packages/loot-core/src/shared/schedules.ts:279-280
Timestamp: 2024-12-18T20:24:07.779Z
Learning: User states the `amount` is not intended to be null or undefined, and the current type signature should remain unchanged, as the null checks are just a stop-gap measure to prevent crashes.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-16T03:51:04.683Z
Learnt from: tlesicka
Repo: actualbudget/actual PR: 3593
File: packages/desktop-client/src/components/sidebar/BudgetName.tsx:114-136
Timestamp: 2024-10-16T03:51:04.683Z
Learning: In 'packages/desktop-client/src/components/sidebar/BudgetName.tsx', empty budget names are handled elsewhere, so additional error handling within the 'EditableBudgetName' component is unnecessary.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-10-08T15:46:15.739Z
Learnt from: qedi-r
Repo: actualbudget/actual PR: 3527
File: packages/desktop-client/src/components/accounts/Header.jsx:0-0
Timestamp: 2024-10-08T15:46:15.739Z
Learning: In the Actual Budget project, importing `t` directly from 'i18next' is best avoided, and we should almost always prefer using the useTranslation hook if possible.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Use 'Trans' component instead of 't()' function when possible for internationalization

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-01-17T12:11:23.669Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 3840
File: packages/loot-core/src/server/budget/template-notes.ts:12-12
Timestamp: 2025-01-17T12:11:23.669Z
Learning: In server-side code or non-React contexts where React hooks cannot be used, prefer using `import { t } from 'i18next'` and directly using `t(string)` for translations, instead of using react-i18next hooks or other approaches.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to packages/desktop-client/src/**/*.{tsx,jsx} : Use 'useDispatch()', 'useSelector()', 'useStore()' from 'src/redux' instead of react-redux

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Don't use 'React.*' patterns - use named imports instead

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to packages/desktop-client/src/**/*.{tsx,jsx} : Use custom hooks from 'src/hooks' instead of react-router directly (e.g., 'useNavigate()' from 'src/hooks')

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-10-22T16:22:17.482Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 5978
File: packages/desktop-client/src/components/mobile/banksync/BankSyncAccountsListItem.tsx:58-67
Timestamp: 2025-10-22T16:22:17.482Z
Learning: In react-i18next, the Trans component supports interpolation using the syntax `<Trans>Text {{ variable: value }}</Trans>` where the double curly braces are special syntax recognized by react-i18next for variable substitution. This is valid and should not be flagged as incorrect.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-04T19:58:16.062Z
Learnt from: CR
Repo: actualbudget/actual PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-04T19:58:16.062Z
Learning: Applies to **/*.{tsx,jsx} : Don't use 'React.FunctionComponent' or 'React.FC' - type props directly

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-06-21T04:04:01.231Z
Learnt from: matt-fidd
Repo: actualbudget/actual PR: 5206
File: packages/desktop-client/src/components/Titlebar.tsx:63-63
Timestamp: 2025-06-21T04:04:01.231Z
Learning: In react-i18next Trans components, double curly braces `{{ }}` are the correct syntax for interpolation placeholders, not JSX object literals. For example: `<Trans count={value}>{{ value }} items</Trans>` is the proper way to interpolate values within translation strings.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-02-11T18:44:28.613Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 0
File: :0-0
Timestamp: 2025-02-11T18:44:28.613Z
Learning: The Button2 component is deprecated. Use actual-app/components/button instead.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2024-09-26T19:32:57.858Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 3507
File: packages/desktop-client/src/components/table.tsx:1220-1220
Timestamp: 2024-09-26T19:32:57.858Z
Learning: The `TableNavigator` type in `packages/desktop-client/src/components/table.tsx` is not used outside of this file and can safely be made private by removing the `export` keyword.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-08-16T16:42:08.306Z
Learnt from: sjones512
Repo: actualbudget/actual PR: 5554
File: packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:7-8
Timestamp: 2025-08-16T16:42:08.306Z
Learning: In the Actual Budget codebase, it's the established pattern and acceptable to import useSpreadsheet as a type-only import and then use ReturnType<typeof useSpreadsheet> in type annotations. This pattern is used consistently across all spreadsheet files including custom-spreadsheet.ts, grouped-spreadsheet.ts, spending-spreadsheet.ts, net-worth-spreadsheet.ts, cash-flow-spreadsheet.tsx, calendar-spreadsheet.ts, summary-spreadsheet.ts, and crossover-spreadsheet.ts.

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
📚 Learning: 2025-12-16T21:27:47.818Z
Learnt from: MatissJanis
Repo: actualbudget/actual PR: 6428
File: eslint.config.mjs:249-278
Timestamp: 2025-12-16T21:27:47.818Z
Learning: Enforce the specified import order for all TypeScript/JavaScript files under packages/desktop-client: React imports, then built-in Node.js modules, then external packages, then loot-core packages, then parent imports, then sibling imports, then index imports, and finally desktop-client imports (desktop-client imports come after relative imports, not before). Apply this rule to all relevant files in that directory (extensions: .ts, .tsx, .js, .mjs).

Applied to files:

  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
  • GitHub Check: Visual regression (shard 4/5)
  • GitHub Check: Functional (shard 3/5)
  • GitHub Check: Functional (shard 1/5)
  • GitHub Check: Functional (shard 2/5)
  • GitHub Check: Visual regression (shard 3/5)
  • GitHub Check: Functional (shard 5/5)
  • GitHub Check: Visual regression (shard 1/5)
  • GitHub Check: Visual regression (shard 5/5)
  • GitHub Check: Functional (shard 4/5)
  • GitHub Check: Visual regression (shard 2/5)
  • GitHub Check: Functional Desktop App
  • GitHub Check: build (ubuntu-22.04)
  • GitHub Check: build (macos-latest)
  • GitHub Check: test
  • GitHub Check: validate-cli
  • GitHub Check: build (windows-latest)
  • GitHub Check: Analyze
  • GitHub Check: compare
  • GitHub Check: web
🔇 Additional comments (13)
packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx (13)

1-1: LGTM!

Correctly using named imports from React instead of the React.* pattern, per coding guidelines.


64-76: LGTM!

Good extraction of this helper function. It improves readability and reduces duplication of the account option check logic.


146-148: LGTM!

Appropriate state structure for managing per-account custom starting settings.


178-184: LGTM!

The nullish checks are correct—!= null properly preserves 0 as a valid balance value while treating null/undefined as absent.


399-406: LGTM!

Table header layout properly accommodates the new columns with appropriate widths.


409-437: LGTM!

Good use of the isNewAccountOption helper and proper threading of the new props to TableRow.


483-486: LGTM!

Clean type definition using type as per coding guidelines.


605-618: LGTM!

Good approach to render empty placeholder fields when starting options aren't shown—this maintains the table's column alignment.


712-768: LGTM!

The stacked layout provides a good mobile-friendly presentation with proper labels and consistent behavior with the inline layout.


799-907: LGTM!

AccountCard properly integrates the starting options with consistent logic using isNewAccountOption helper and appropriate placement in the mobile UI flow.


771-777: LGTM!

Type correctly extends SharedAccountRowProps with the custom starting date props. The absence of showStartingOptions is appropriate since AccountCard computes it internally.


379-389: LGTM!

Mobile view correctly passes the custom starting date props to AccountCard.


670-709: The zeroSign logic is intentional and appropriate for account balance input.

When linking external accounts, if the bank reports a negative balance (credit cards/loans), the input defaults to a negative sign for convenience. The AmountInput component uses zeroSign only when the balance is zero; non-zero values always use their actual sign. This UX design matches expected behavior for account linking.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jan 12, 2026
acct: db.DbAccount,
): SyncError {
// TODO: refactor bank sync logic to use BankSyncError properly
// oxlint-disable-next-line typescript/no-explicit-any

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This wasn't part of the initial change, but coderabbit flagged it, so might as well fix it.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jan 12, 2026
@StephenBrown2 StephenBrown2 changed the title [WIP] Update the Create Linked Account workflow to prompt for Starting Date and Balance Update the Create Linked Account workflow to prompt for Starting Date and Balance Jan 12, 2026
@matt-fidd matt-fidd self-assigned this Jan 13, 2026
@StephenBrown2
StephenBrown2 force-pushed the sync-starting-date-txn branch 3 times, most recently from ec15be2 to b5e6e56 Compare January 22, 2026 17:15

@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.

Finally managed to test this, I like it!

I was initially confused by how it looks when all accounts are already selected, could you add some sort of placeholder in where you can't set it?

Image

I'm not sure what the wording should be, maybe "unavailable"?

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

Addresses: https://discord.com/channels/937901803608096828/1402270361625563186

Changes:
- Frontend: Added inline date and amount input fields in the account
  linking table for new accounts
- Redux: Extended link account actions to accept startingDate and
  startingBalance parameters
- Backend: Updated account linking handlers to pass custom values to
  sync logic
- Sync: Modified syncAccount and processBankSyncDownload to use custom
  starting date/balance for initial sync transactions

Features:
- Only displays starting options when creating new accounts (not upgrades)
- AmountInput with smart sign detection based on account balance
  (negative for credit cards/loans)
- Defaults to 90 days ago for date and 0 for balance
- Mobile-responsive with separate AccountCard layout
- Works across all sync providers: GoCardless, SimpleFIN, Pluggy.ai

The custom starting balance is used directly for the starting balance
transaction, and the custom starting date determines both the sync
start date and the transaction date for the starting balance entry.
…puts

- Create CustomStartingSettings type to replace repeated inline type definitions
- Extract StartingOptionsInput component to consolidate duplicate UI between mobile/desktop views
- Create LinkAccountBasePayload type shared across GoCardless, SimpleFIN, and PluggyAI link functions
- Apply same base type pattern to server-side link account handlers

This simplifies the code introduced for custom starting date/balance when linking bank accounts.

[autofix.ci] apply automated fixes
- Create isBankSyncError() type guard function with proper type narrowing
- Remove oxlint-disable-next-line comment that suppressed the no-explicit-any rule
- Add JSDoc comments for both isBankSyncError and handleSyncError functions
- Remove redundant type assertion now that type guard narrows correctly
- Use locale-aware date formatting instead of toISOString()
- Extract isNewAccountOption helper to reduce duplication
- Align AccountCardProps type definition pattern with TableRowProps
@StephenBrown2
StephenBrown2 force-pushed the sync-starting-date-txn branch from c7b299c to 2bfd568 Compare February 6, 2026 15:24
@StephenBrown2

Copy link
Copy Markdown
Contributor Author

@matt-fidd How does this look? Added info for existing accounts as plain text:

Screenshot_2026-02-06_10-13-18

@matt-fidd

Copy link
Copy Markdown
Member

@matt-fidd How does this look? Added info for existing accounts as plain text:

Screenshot_2026-02-06_10-13-18

Looks great, thank you!

Functionally works well too.

@matt-fidd
matt-fidd added this pull request to the merge queue Feb 6, 2026
Merged via the queue into actualbudget:master with commit 1a26253 Feb 6, 2026
30 checks passed
@StephenBrown2
StephenBrown2 deleted the sync-starting-date-txn branch February 11, 2026 17:45
nagydavid added a commit to realtwister/actual that referenced this pull request Feb 15, 2026
Brings in latest changes from master including:
- PR actualbudget#6629: LinkAccountBaseParams type and startingDate/startingBalance support
- Updated getAccounts() implementation
- Various bug fixes and improvements
- Test snapshot updates
nagydavid added a commit to realtwister/actual that referenced this pull request Feb 15, 2026
- Add LinkAccountBaseParams type (from master PR actualbudget#6629)
- Update linkGoCardlessAccount to use LinkAccountBaseParams with syncSource
- Update linkSimpleFinAccount to use LinkAccountBaseParams
- Update linkPluggyAiAccount to use LinkAccountBaseParams
- Matches master's pattern while adding Enable Banking's syncSource parameter
shawalli added a commit to shawalli/actual that referenced this pull request Mar 10, 2026
* Typescript: make arithmetic.ts strict (#6801)

* Make arithmetic.ts strict TypeScript compliant

- Add type definitions for ParserState, Operator, OperatorNode, and AstNode
- Add explicit type annotations to all function parameters
- Fix null/undefined handling in parsePrimary function
- Remove type assertion in makeOperatorParser by using explicit Operator type
- Handle null return from currencyToAmount function
- All functions now have proper return type annotations

* Add test for ignoring leftover characters in evalArithmetic function

* Add oxlint rule against direct theme imports; fix Login OpenID button styles (#6796)

Co-authored-by: Michael Clark <[email protected]>

* Improve bug report template with better structure and requirements (#6784)

* Improve bug report template with better structure and requirements

* Fix: Remove empty value fields from textarea inputs in bug report template

* Add release notes for PR #6784

* Update 6784.md

* Update bug report template to request a screenshot of the import screen along with a redacted file version for better issue resolution.

* Update bug report template for import issues

Clarified instructions for reporting import issues.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix translation issue #6828 (#6845)

* Fix translation issue #6828

* Add release note

* [autofix.ci] apply automated fixes

* update release number

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Avoid negative zero in budget summary amounts (#6843)

* fix: report widget tooltip z-index (#6849)

* Fix sync server migrations (#6346)

* Fix sync-server migrations to use ESM loader

* Add release notes

* Apply CodeRabbit suggestions

* [autofix.ci] apply automated fixes

* Add file extension filter to sync-server migrations import

* [autofix.ci] apply automated fixes

* Ensure migrations occur synchronously

* [autofix.ci] apply automated fixes

* Minor cleanup

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Co-authored-by: Matt Fiddaman <[email protected]>

* fix(i18n): respect browser preferred languages when supported (#6812)

* fix(i18n): respect browser preferred languages when supported

Instead of relying on the first browser language, the application now
iterates through navigator.languages and selects the first supported
locale, with a fallback to English.

* chore: add the release notes related file

* fix(i18n): check region locales support before falling back to base locale

* fix(i18n): make the unit test aligned with the region locales checking

* switch to node alpine docker image (#6840)

* switch to node alpine image

* note

* Include scheduled transactions in nYNAB imports (#6844)

* Include scheduled transactions in nYNAB imports

* Remove logs and restore schedule name from transaction memo

* Simplify rule actions

* Create schedules with unique names

* Set the note rather than append

* Update ynab5 demo budget and e2e test

* Update findSortUp and findSortDown parameter to be more generic (#6861)

* findSortUp and findSortDown is also used for CategoryEntity. Updating type to be more generic.

* Generics

* Add release notes for PR #6861

* Adjust category to Maintenance based on review feedback (#6865)

* Initial plan

* Change release notes category to Maintenance

Co-authored-by: joel-jeremy <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* Use consistent color variables on Budget Page. (#6820)

* Change color of budget table scrollbar.

* Update budget sidebar to use budget colors.

* Update fontWeight for 'Category' to match rest of table

* Update to use budget background

* Update ExpenseGroup to use budget color

* Update IncomeGroup to use budget color

* Update SidebarCategory colors

Change drag/drop to buttonPrimaryBackground so it will always be visible in any custom theme.

Background to budget color.

* Update SidebarGroup background to budget color

* Update EnvelopeBudgetComponents

Add 'budgetNumberNeutral' to cheveronDown in budgeted field instead of using default bare button text incases where bare button is set to normal button text and normal button is inverted. remove mobile color variable for shadow

* Update BudgetTotals.tsx

Use tableHeaderText for header.

* Update BudgetSummary.tsx

Use budget colors

* Update MonthPicker.tsx

change selected months at top from tableBorderHover color to buttonPrimaryBackground.

* [autofix.ci] apply automated fixes

* Update EnvelopeBudgetComponents.tsx

* Update BudgetTotals.tsx

revert

* Update SidebarCategory.tsx

* Update TrackingBudgetComponents to use budget colors

* [autofix.ci] apply automated fixes

* Update BudgetSummary to use budget colors

* Update BudgetTotal.tsx

* Update ExpenseProgress.tsx

* Update IncomeProgress.tsx

* Update Saved.tsx

* Use consistent color variables on budget pages.

* Update IncomeProgress.tsx

* Update ExpenseProgress.tsx

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6820

* Update EnvelopeBudgetComponents

Budget total header to follow current/other month style.

* Update EnvelopeBudgetComponents.tsx

* [autofix.ci] apply automated fixes

* Update EnvelopeBudgetComponents.tsx

* Update EnvelopeBudgetComponents.tsx

* [autofix.ci] apply automated fixes

* Update EnvelopeBudgetComponents.tsx

* Revert EnvelopeBudgetComponents.tsx

* [autofix.ci] apply automated fixes

* Update EnvelopeBudgetComponents.tsx

* Update EnvelopeBudgetComponents.tsx

* Update EnvelopeBudgetComponents.tsx

* Revert again :) EnvelopeBudgetComponents.tsx

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: isConcise state handling for CashFlow report (#6765)

* changes token expiry handling to be automatic sign out (#6798)

* changes token expiry handling to be automatic sign out

* add release notes

---------

Co-authored-by: Matt Fiddaman <[email protected]>

* Remove comma from all instances of month-year strings (#6748)

* Remove comma from all instances of month-year strings, e.g., "January 2026" rather than "January, 2026"

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6748

* All updated calls now include `locale` as an argument

* Update dependencies in `useEffect` to include `locale`

* Reorganized new import

* Remove double colon

* Consistent trailing commas

* Include locale in other dependency arrays

* Reorder imports

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6748

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Fiddaman <[email protected]>

* Move redux state to react-query - category states (#5977)

* Move redux state to react query - category states

* Fix typecheck errors

* Fix typecheck errors

* Fix typecheck errors

* Remove t argument

* [autofix.ci] apply automated fixes

* Coderabbot suggestion

* Code review feedback

* Fix type

* Coderabbit

* Delete useCategoryActions

* Fix lint

* Use categories from react query cache

* Fix typecheck error

* Update to use useDeleteCategoryGroupMutation

* Coderabbit feedback

* Break up useCategoryActions

* [autofix.ci] apply automated fixes

* Fix typecheck errors

* Fix typecheck error

* Fix typecheck error

* await nested mutations

* Await deleteCategory

* Rename to sendThrow

* Fix lint errors

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Fix react/exhaustive-deps in Modals (#6862)

* Fix react/exhaustive-deps in Modals

* Add release notes for PR #6862

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix react/exhaustive-deps in PayeeTable (#6863)

* Fix react/exhaustive-deps in Modals

* Fix react/exhaustive-deps in PayeeTable

* Add release notes for PR #6863

* Change category and fix dependency management in PayeeTable

Updated category from 'Enhancements' to 'Maintenance' and fixed dependency management in PayeeTable.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix react-hooks/exhaustive-deps in CustomReport (#6867)

* Fix react-hooks/exhaustive-deps in CustomReport

* Add release notes for PR #6867

* Fix typecheck errors

* [autofix.ci] apply automated fixes

* Change category to Maintenance and update description

* [autofix.ci] apply automated fixes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Fix react-hooks/exhaustive-deps in ImportTransactionsModal (#6868)

* Fix react-hooks/exhaustive-deps in ImportTransactionsModal

* [autofix.ci] apply automated fixes

* Add release notes for PR #6868

* Update category to Maintenance and fix warnings

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Apply tag colors to YNAB flag tags (#6866)

* Apply tag colors to match YNAB flags

* Update tag colors to match YNAB, add description on import

* Tighten types

* Use custom colors

* Use Actual palette equivalents for tag colors

* Nitpick fixes

* Fix nitpick 'fix'

* Handle YNAB flag tag conflicts

* Handle YNAB flag tag conflicts without creating separate color tags

* Simplify

* Reorganize

* Fix date range calculation in BudgetAnalysisCard (#6875)

* fix: corrected date range calculation in BudgetAnalysisCard using calculateTimeRange

* add release note

* fix: ensure correct date formatting in BudgetAnalysisCard for start and end dates

* fix: rename release note file

* Add Catppuccin Themes to custom theme catalog (#6857)

* Add Catppuccin Themes to theme catalog

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Avoid duplicate category import errors in YNAB5 importer (#6878)

* avoid duplicate category import errors

Add normalizeError helper function

* Add release notes file

* Fix react-hooks/exhaustive-deps in DateSelect (#6864)

* Fix react-hooks/exhaustive-deps in DateSelect

* Add release notes for PR #6864

* Fix remaining suppressions

* Change category to Maintenance and fix linting issues

Updated category from Enhancements to Maintenance and fixed linting issues related to react-hooks/exhaustive-deps in DateSelect.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add build-electron to tsconfig excludes (#6883)

* Add build-electron to tsconfig excludes

* Add release notes for PR #6883

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add bank sync option to update dates. (#6850)

Signed-off-by: Christian Speich <[email protected]>

* Add new theme 'You Need A Dark Mode' to catalog (#6891)

* Add new theme 'You Need A Dark Mode' to catalog

* Add 'You Need A Dark Mode' theme to catalog

* Update the Create Linked Account workflow to prompt for Starting Date and Balance (#6629)

* feat: Add optional starting date and balance for bank sync accounts

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

Addresses: https://discord.com/channels/937901803608096828/1402270361625563186

Changes:
- Frontend: Added inline date and amount input fields in the account
  linking table for new accounts
- Redux: Extended link account actions to accept startingDate and
  startingBalance parameters
- Backend: Updated account linking handlers to pass custom values to
  sync logic
- Sync: Modified syncAccount and processBankSyncDownload to use custom
  starting date/balance for initial sync transactions

Features:
- Only displays starting options when creating new accounts (not upgrades)
- AmountInput with smart sign detection based on account balance
  (negative for credit cards/loans)
- Defaults to 90 days ago for date and 0 for balance
- Mobile-responsive with separate AccountCard layout
- Works across all sync providers: GoCardless, SimpleFIN, Pluggy.ai

The custom starting balance is used directly for the starting balance
transaction, and the custom starting date determines both the sync
start date and the transaction date for the starting balance entry.

* refactor: Extract shared types and components for starting balance inputs

- Create CustomStartingSettings type to replace repeated inline type definitions
- Extract StartingOptionsInput component to consolidate duplicate UI between mobile/desktop views
- Create LinkAccountBasePayload type shared across GoCardless, SimpleFIN, and PluggyAI link functions
- Apply same base type pattern to server-side link account handlers

This simplifies the code introduced for custom starting date/balance when linking bank accounts.

[autofix.ci] apply automated fixes

* allow explicit zero values

* refactor: add type guard for BankSyncError to remove oxlint-disable

- Create isBankSyncError() type guard function with proper type narrowing
- Remove oxlint-disable-next-line comment that suppressed the no-explicit-any rule
- Add JSDoc comments for both isBankSyncError and handleSyncError functions
- Remove redundant type assertion now that type guard narrows correctly

* refactor: address code review nitpicks for SelectLinkedAccountsModal

- Use locale-aware date formatting instead of toISOString()
- Extract isNewAccountOption helper to reduce duplication
- Align AccountCardProps type definition pattern with TableRowProps

* Add placeholder date/balance for already linked accounts

* [autofix.ci] apply automated fixes

* Use StartingBalanceInfo only, and add mobile view

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* :art: Storybook docs for block, card, colorpicker, formerror (#6874)

* storybook docs for block, card, colorpicker, formerror

* release notes

* Fix Ctrl+Enter losing amount value when adding transaction (#6911)

* Fix Ctrl+Enter losing amount value when adding transaction

Fixes #6901

When using Ctrl+Enter to add a transaction immediately after typing
in the amount field, the value wasn't being committed before the
transaction was saved, resulting in a zero amount.

The fix wraps the add-and-close logic in an afterSave() callback
to ensure field values are committed before adding the transaction.

Added regression tests for both debit and credit fields to verify
the fix works correctly.

* Add release notes for PR #6911

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>

---------

Co-authored-by: Claude Sonnet 4.5 <[email protected]>

* Fix feedback link for budget analysis report experimental flag (#6914)

* :electron: Flathub PR to be draft on release (#6910)

* make flathub pr draft so that we dont attract attention

* release notes

* grammar

* Points: pay for contributions (#6481)

* Add point totals display to all statistics sections in count-points script

* Update funding contributors documentation and add release notes for contributor point counting script

* Refactor contributor points calculation and enhance PR category determination

- Updated point values for PR contributions: reduced points for Features, Enhancements, Bugfix, and Maintenance, and added a new category for Unknown contributions.
- Introduced a new function to retrieve the last commit SHA before a specified date to improve accuracy in reading release notes.
- Modified the getPRCategoryAndPoints function to accept a monthEnd parameter for better context in point assignment.

* Update contributor points values in count-points script to reflect new scoring system

* Add new blog post on funding contributors' next steps

This post outlines plans to expand the contributor compensation system, including broader rewards for project involvement, targeted donations, and a points-based system for feature work. It emphasizes transparency and community feedback in shaping future funding strategies.

* Increase Bugfix points from 2 to 3

* Change points awarded for Features to 2

* Enforce consistent TypeScript type import style (#6805)

* Refactor: extract tooltip components and clean up lint suppressions (#6721)

* Refactor: extract tooltip components and clean up lint suppressions

Extract CustomTooltip components from CrossoverGraph and NetWorthGraph
to module level to fix unstable nested components lint warnings. Also
consolidate theme file lint rule into oxlintrc.json and add proper
typing to styles object.

* Add release notes for maintenance updates addressing lint violations

* Remove style prop from CustomTooltip to prevent container layout styles from affecting tooltip

Co-authored-by: matiss <[email protected]>

* Refactor NetWorthGraph component by extracting TrendTooltip and StackedTooltip into separate functions for improved readability and maintainability. Update tooltip props to include necessary parameters for rendering. Clean up unused code and enhance tooltip styling.

* Refactor NetWorthGraph component to streamline tooltip handling

- Removed unnecessary prop passing for translation function in TrendTooltip.
- Adjusted import statements for better clarity and consistency.
- Cleaned up code to enhance readability and maintainability.

---------

Co-authored-by: Cursor Agent <[email protected]>

* Remove duplication of CrossoverData type (#6928)

* Remove duplication of CrossoverData type

Move the CrossoverData type definition to crossover-spreadsheet.tsx and
import it from the Crossover and CrossoverCard files instead of having
duplicate definitions in each file.

Signed-off-by: Jonathon Jongsma <[email protected]>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

---------

Signed-off-by: Jonathon Jongsma <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Add Tag API (#6746)

* Add Tag API

* Add Tag API tests

* Add Release Note for #6746

* Make release note more user-facing

* Remove unnecessary type coercion in tagModel.fromExternal

Since APITagEntity picks all properties from TagEntity, the types are
structurally identical and TypeScript can verify compatibility without
manual coercion.

Co-authored-by: Matiss Janis Aboltins <[email protected]>

---------

Co-authored-by: Matiss Janis Aboltins <[email protected]>

* [FIX] Update DesktopLinkedNotes so links stay inline (#6858)

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes so links stay inline

* Update TransactionsTable.tsx

make sure flexDirection is row.

* [autofix.ci] apply automated fixes

* Update DesktopLinkedNotes.tsx

* Update TransactionsTable.tsx

* Update DesktopLinkedNotes.tsx

* Update NotesTagFormatter.tsx trial

* Update DesktopLinkedNotes.tsx

* Update NotesTagFormatter.tsx

* Update NotesTagFormatter.tsx

* Update DesktopLinkedNotes.tsx

* [autofix.ci] apply automated fixes

* Update TransactionsTable.tsx

* Update DesktopLinkedNotes.tsx

Add role for accessibility

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

Revert to original

* Update DesktopLinkedNotes.tsx

Try to style the bare button to make it work.

* [autofix.ci] apply automated fixes

* Update DesktopLinkedNotes.tsx

Reverting to current master

* Update DesktopLinkedNotes.tsx

Add nowrap styling.

* Update DesktopLinkedNotes.tsx

* Update TransactionsTable.tsx

* Update TransactionsTable.tsx

* [autofix.ci] apply automated fixes

* Update DesktopLinkedNotes.tsx

* Update TransactionsTable.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* [autofix.ci] apply automated fixes

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* revert TransactionsTable.tsx

* Update TransactionsTable.tsx

* Update TransactionsTable.tsx

* Update TransactionsTable.tsx

* Update DesktopLinkedNotes.tsx

* Update TransactionsTable.tsx

* Update TransactionsTable.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Revert DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* [autofix.ci] apply automated fixes

* Update DesktopLinkedNotes.tsx

* [autofix.ci] apply automated fixes

* Update DesktopLinkedNotes.tsx

* Update DesktopLinkedNotes.tsx

* [autofix.ci] apply automated fixes

* Update DesktopLinkedNotes.tsx

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: youngcw <[email protected]>

* Add butterfly custom theme (#6900)

* Added butterfly custom theme

* Added release notes

* Fix/6885 crash when rule has empty date field (#6905)

* Fix crash when rule date field loses focus while empty

Fixes #6885

* Remove ts-strict-ignore and fix types in DateSelect

* Generate release note 6905

* fix(schedules): prevent past missed schedule dates from being marked as upcoming (#6925)

Fixes #6872

* [Goals] fix tracking budget balance carryover for templates (#6922)

* fix tracking budget balance carryover for templates

* Add release notes for PR #6922

* fix note

* fix tests

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* :art: Reorganising Storybook and more component stories (#6924)

* reorg of storybook docs and add some new components

* releaes notes

* Update meta tags for Actual Budget Design System

* Increase sidebar item font size from 14px to 16px

* Move redux state to react-query - category states [Part 2 - expose react-query states e.g. isPending, isSuccess, etc] (#6882)

* Move redux state to react-query - category states [Part 2 - expose react-query states]

* Add release notes for PR #6882

* Add default values to useCategories destructuring to prevent undefined crashes (#6884)

* Initial plan

* Add missing defaults to all useCategories usages

Co-authored-by: joel-jeremy <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* Fix lint errors

* Fix rebase mistake

* Change category from Enhancements to Maintenance

Migrate state management for category from Redux to React Query and update related hooks and components.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* Retrofit useTransactions to use react-query under the hood (#6757)

* Retrofit useTransactions to use react-query under the hood

* Add release notes for PR #6757

* Update packages/desktop-client/src/transactions/queries.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Disable when there is no query parameter

* Fix typecheck errors

* Remove space

* Update tests

* Coderabbit: Add pageSize to query key

* Use isPending instead of isFetching

* Unexport mockStore

* Revert variables

* Change category from Enhancements to Maintenance

Refactor the useTransactions hook to improve data fetching with react-query.

* Fix lint errors

* Fix lint errors

* Migrate setupTests.js to TypeScript with proper types (#6871)

* Initial plan

* Rename setupTests.js to setupTests.ts and add proper types

Co-authored-by: joel-jeremy <[email protected]>

* Extract Size type to avoid duplication

Co-authored-by: joel-jeremy <[email protected]>

* Add release note for setupTests TypeScript migration

Co-authored-by: joel-jeremy <[email protected]>

* Rename release note file to match PR number 6871

Co-authored-by: joel-jeremy <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* [autofix.ci] apply automated fixes

* Update transactionQueries

* Delete setupTests PR release note

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat(currency): Add South Korean Won (#6846)

* Add South Korean Won

* Update currencies.ts

* Add release notes

* feat(currency): Add Vietnamese Dong (VND) currency (#6902)

* feat(currency): add support for vietnamese dong currency

* release: add upcoming release note

* fix(currency): change the number format for vietnamese currency

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Add refetchOnSync option to useTransactions to refetch when a server sync event is emitted (#6936)

* Migrate setupTests.js to TypeScript with proper types (#6871)

* Initial plan

* Rename setupTests.js to setupTests.ts and add proper types

Co-authored-by: joel-jeremy <[email protected]>

* Extract Size type to avoid duplication

Co-authored-by: joel-jeremy <[email protected]>

* Add release note for setupTests TypeScript migration

Co-authored-by: joel-jeremy <[email protected]>

* Rename release note file to match PR number 6871

Co-authored-by: joel-jeremy <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* Delete setupTests PR release note

* Add refetchOnSync to useTransactions to refetch when a server sync event is emitted

* Add release note for useTransactions refetchOnSync feature (#6937)

* Initial plan

* Add release note for PR 6936

Co-authored-by: joel-jeremy <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* Coderabbit feedback

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* :art:  Add remaining component stories to storybook (#6940)

* final storybook stories

* release notes

* spelling mistake

* Fix react query cache not being cleared when switching budgets (#6953)

* Fix react query cache not being cleared when switching budgets

* React does not want to export function from src/index

* Release note

* Fix mobile budget amount inputs when hide decimal places is enabled (#6945)

* Upgrade oxfmt and oxlint, update .oxfmtrc.json import patterns (#6955)

Co-authored-by: Cursor <[email protected]>

* Retrofit useReports to use react-query under the hood (#6951)

* Retrofit useReports to use react-query under the hood

* Add release notes for PR #6951

* Update 6951.md

* Report mutations

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update `send` function to propagate any errors and fix `catchErrors` to return the error in result when an unknown command/method is sent to the browser server (#6942)

* Fix send not returning error when catchErrors option is enabled and an unknown method error is encountered

* Add release notes for PR #6942

* Fix send to properly propagate errors from the server

* Update release note

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* API Account Object (#6915)

* api change

* docs

* lint

* release notes

* spelling

* [autofix.ci] apply automated fixes

* spelling

* whoopsie, thanks rabbit

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add back button to reports pages (#6702)

* feat: add back button to reports pages

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6702

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Rename loot-core/platform/client/fetch to connection to match server-side package (#6943)

* Rename loot-core/platform/client/fetch package to connection to match the server side package name. Also to avoid confusion with the native fetch package.

* Update connection/init method to not receive any parameter to so browser and default implementation have the same signature

* Add release notes for PR #6943

* Fix names

* Fix imports

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat: show/hide reconciled transactions on mobile (#6896)

* feat: show/hide reconciled transactions on mobile

Resolves #2969

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Move redux state to react-query - tags states (#6941)

* Move redux state to react-query - tags states

* Add release notes for PR #6941

* Cleanup sendThrow

* Cleanup

* Update import

* Fix import

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* docs: add Architecture Decision Records page with bank sync credential ADR (#6965)

* docs: add Architecture Decision Records page for controversial decisions

Co-authored-by: Cursor <[email protected]>

* Add release notes for PR #6965

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Docs: add Claude Code Pro subscription benefit for core contributors (#6963)

* Add Claude Code Pro subscription benefit for core contributors

Co-authored-by: Cursor <[email protected]>

* Add release notes for PR #6963

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Agent instructions for commit messages and PR titles (#6964)

* [AI] Add mandatory [AI] prefix requirement for commit messages and PR titles

Co-authored-by: matiss <[email protected]>

* [autofix.ci] apply automated fixes

* Add release notes for PR #6964

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Move redux state to react-query - account states (#6140)

* Fix typecheck errors

* Move redux state to react-query - account states

* TestProviders

* Add release notes for PR #6140

* Fix lint error

* Fix TestProviders

* Coderabbit feedback

* Cleanup

* [autofix.ci] apply automated fixes

* Fix TestProviders

* Fix onbudget and offbudget displaying closed accounts

* [skip ci] Change category to Maintenance and update migration text

* Replace logger calls in desktop-client to console

* Fix lint errors

* Clear react query on closing of budget file similar to redux resetApp action

* [autofix.ci] apply automated fixes

* Remove sendThrow

* Code review feedback

* [autofix.ci] apply automated fixes

* Fix import

* Fix import

* Coderabbit feedback

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [AI] lint: convert oxlint warnings to errors (#6970)

Co-authored-by: Cursor <[email protected]>

* Add filter option for category groups (#6834)

* Add filter by category groups

* Add tests

* Add release notes

* [autofix.ci] apply automated fixes

* Fix typecheck findings

* Fix modal

* Address nitpick comment (filterBy)

* Fix e2e tests

* Make group a subfield of category

* Fix test by typing in autocomplete

* Replace testId with a11y lookups

* Apply new type import style rules

* Apply feedback

* Improve typing on array reduce, remove manual type coercion

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Fix some low-hanging-fruit `@ts-strict-ignore` (#6969)

* Fix low-hanging-fruit `@ts-strict-ignore`

* Add release notes

* A few more

* Include category group in transaction export (#6960)

* include category group in transaction export

* Apply suggestion from @yzAlvin

Co-authored-by: Alvin Zhao <[email protected]>

---------

Co-authored-by: youngcw <[email protected]>

* Implement missing logic for limit template type (#6690)

* core: support limit refill templates

* notes: refill templates

* core: apply refill limits during runs

* core: prioritize refill limits

* Patch

* Update release note

* Fix typecheck

* rework.  Tests and template notes still need reworked

* fix parser syntax

* Fix type issue

* Fix after rebase, support merging limit+refill

* PR feedback

---------

Co-authored-by: youngcw <[email protected]>

* :book: Move pluggy.ai doc out of experimental (#6975)

* move pluggy out of experimental

* remove note

* Add release notes for PR #6975

* fixes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [AI] Update CodeRabbit config for suspect AI generated labels (#6985)

Co-authored-by: Cursor <[email protected]>

* [AI] Introduce type-aware oxlint and disable no-duplicate-type-constituents rule (#6984)

Co-authored-by: Cursor <[email protected]>

* fix(ios): restore status bar color on iOS 26.2 (Safari 26) (#6983)

* fix(ios): restore status bar color on iOS 26.2 (Safari 26)

Safari 26 no longer uses the theme-color meta tag for the status bar
and instead derives the tint from the body background. Set body
background-color in HTML and sync it with the app theme so the status
bar shows purple (or the active theme) instead of white.

Fixes #6946

Co-authored-by: Cursor <[email protected]>

* [autofix.ci] apply automated fixes

* refactor(theme): update useMetaThemeColor to accept theme values directly

Modified the useMetaThemeColor hook to accept theme color values instead of predefined keys. Updated FinancesApp and ManagementApp components to utilize the new implementation, ensuring proper theme color handling based on screen width.

* [autofix.ci] apply automated fixes

* refactor(theme): remove unused body background color in index.html and add tests for useMetaThemeColor hook

Deleted the commented-out body background color in index.html to clean up the code. Added comprehensive tests for the useMetaThemeColor hook to ensure proper handling of theme colors, including support for CSS variables and reactivity to theme changes.

* refactor(theme): improve getPropertyValueFromVarString function in useMetaThemeColor hook

* [autofix.ci] apply automated fixes

* Add release notes for PR #6983

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Address some more low-hanging fruit for ts-strict-ignore (#6992)

* Address some more low-hanging fruit for ts-strict-ignore

* Add release notes

* Fix small issues

* Rabbit

* Retrofit dashboard hooks to use react-query (#6957)

* Retrofit useReports to use react-query under the hood

* Add release notes for PR #6951

* Update 6951.md

* Report mutations

* Fix react query cache not being cleared when switching budgets (#6953)

* Fix react query cache not being cleared when switching budgets

* React does not want to export function from src/index

* Release note

* Use react-query is dashboard queries and mutations

* Add release notes for PR #6957

* [autofix.ci] apply automated fixes

* Fix typecheck errors

* Coderabbit feedback

* Make error cause optional

* Rename useDashboardWidgetCopyMenu and update useDashboardWidget to accept object to prevent need to default id to empty string

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Fix operator precedence grouping for */ and +/- (#6993)

* Fix operator precedence grouping for */ and +/-

* Add release note for #6993

* Fix exponent associativity and add regression test

---------

Co-authored-by: Hadi Ayache <[email protected]>

* Add Tag API docs (#6979)

* Add Tag object type definition for API docs

* Add Tags nav entry to API reference sidebar

* Add Tags methods and examples to API reference

* Add theming to charts and hence allowing custom themes on charts (#6909)

* Add theming to charts and hence allowing custom themes on charts

* Removing additional color scales for charts.

* Fixed return fail over value.

* Add reports to command bar (#7002)

* Add reports to command bar

* Add release notes

* Improve category server app and react query mutation error handling (#6958)

* Improve category server app and react query mutation error handling

* Add release notes for PR #6958

* Fix test

* Fix throwing async test

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Do not swallow exceptions when batching messages - propagate instead

* Update error type to make 'cause' optional

Make 'cause' property optional in error type.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix redirect to accounts page when no accounts exists (#7007)

* Fix redirect to accounts page when no accounts exists

* Add release notes for PR #7007

* Use isFetching

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update useAccounts to return react query states (#7009)

* Fix redirect to accounts page when no accounts exists

* Add release notes for PR #7007

* Use isFetching

* Update useAccounts to return react query states (e.g. isPending, isFetching, etc.)

* Add release notes for PR #7009

* Delete upcoming-release-notes/7007.md

* Change category from Enhancements to Maintenance

Refactor `useAccounts` to improve data handling.

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Move redux state to react-query - payees states (#6880)

* Move redux state to react-query - account states

* Fix onbudget and offbudget displaying closed accounts

* Move redux state to react-query - payees states

* Add release notes for PR #6880

* Replace usage of logger in desktop-client with console

* Address feedback on adding default data to usePayees (#6931)

* Initial plan

* Add default data to usePayees usages using inline destructuring

Co-authored-by: joel-jeremy <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* Fix imports

* Update empty payees list test

* Cleanup and simplify AccountEntity definition to fix `satisfies` syntax

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: joel-jeremy <[email protected]>

* Document graph color variables for custom themes (#7011)

* Document graph color variables for custom themes

Added documentation for graph color variables in custom themes.

* [autofix.ci] apply automated fixes

* Update custom themes documentation for clarity

Clarify the impact of color palettes on custom report widget graphs and format the list of color variables.

* Update packages/docs/docs/experimental/custom-themes.md

Co-authored-by: Matt Fiddaman <[email protected]>

* Fix color variable syntax in custom themes documentation

Updated color variable syntax for chart colors in documentation.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Matt Fiddaman <[email protected]>

* :book: start of reports dashboard updates (#6976)

* start of reports dashboard updates

* spelling

* Add release notes for PR #6976

* don't need one of these

* consistent naming

* bunny fixes

* images

* image again

* extenion

* fix

* consistent naming

* naming

* fix

* last one

* Ill be done with this someday

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* ⬆️ mid month dependency bump (#7013)

* baseline-browser-mapping (^2.9.14 → ^2.9.19)

* minimatch (^10.1.1 → ^10.1.2)

* lage (^2.14.15 → ^2.14.17)

* react-aria-components (^1.14.0 → ^1.15.1)

* @storybook/addon-a11y (^10.2.0 → ^10.2.7)

* p-limit (^7.2.0 → ^7.3.0)

* better-sqlite3 (^12.5.0 → ^12.6.2)

* vitest (^4.0.16 → ^4.0.18)

* @storybook/addon-docs (^10.2.0 → ^10.2.7)

* @storybook/react-vite (^10.2.0 → ^10.2.7)

* eslint-plugin-storybook (^10.2.0 → ^10.2.7)

* storybook (^10.2.0 → ^10.2.7)

* @codemirror/state (^6.5.3 → ^6.5.4)

* @swc/core (^1.15.8 → ^1.15.11)

* @tanstack/react-query (^5.90.19 → ^5.90.20)

* @vitejs/plugin-basic-ssl (^2.1.3 → ^2.1.4)

* @vitejs/plugin-react (^5.1.2 → ^5.1.3)

* i18next (^25.7.4 → ^25.8.4)

* react-aria (^3.45.0 → ^3.46.0)

* react-hotkeys-hook (^5.2.1 → ^5.2.4)

* react-i18next (^16.5.1 → ^16.5.4)

* sass (^1.97.2 → ^1.97.3)

* @easyops-cn/docusaurus-search-local (^0.52.2 → ^0.52.3)

* react (^19.2.3 → ^19.2.4)

* react-dom (^19.2.3 → ^19.2.4)

* component lib peer deps

* eslint-vitest-rule-tester (^3.0.1 → ^3.1.0)

* lru-cache (^11.2.4 → ^11.2.5)

* ua-parser-js (^2.0.7 → ^2.0.9)

* cors (^2.8.5 → ^2.8.6)

* @babel/core (^7.28.5 → ^7.29.0)

* @types/node (^22.19.3 → ^22.19.10)

* react (mixed → 19.2.4)

* @testing-library/react (16.3.0 → 16.3.2)

* react-router (7.12.0 → 7.13.0)

* vite-plugin-node-polyfills (^0.24.0 → ^0.25.0)

* pluggy-sdk (^0.79.0 → ^0.83.0)

* note

* [AI] Allow var(--name) in custom theme CSS (no fallbacks) (#7018)

Co-authored-by: Cursor <[email protected]>

* ⬆️ @playwright/test (1.57.0 → 1.58.2) (#7021)

* @playwright/test (1.57.0 → 1.58.2)

* note

* disable moving nav bar animations

* vrt

* [AI] lint: await-thenable, no-floating-promises (#6987)

* [AI] Desktop client, E2E, loot-core, sync-server and tooling updates

Co-authored-by: Cursor <[email protected]>

* Refactor database handling in various modules to use async/await for improved readability and error handling. This includes updates to database opening and closing methods across multiple files, ensuring consistent asynchronous behavior. Additionally, minor adjustments were made to encryption functions to support async operations.

* Refactor sync migration tests to utilize async/await for improved readability. Updated transaction handling to streamline event expectations and cleanup process.

* Refactor various functions to utilize async/await for improved readability and error handling. Updated service stopping, encryption, and file upload/download methods to ensure consistent asynchronous behavior across the application.

* Refactor BudgetFileSelection component to use async/await for onSelect method, enhancing error handling and readability. Update merge tests to utilize async/await for improved clarity in transaction merging expectations.

* Refactor filesystem module to use async/await for init function and related database operations, enhancing error handling and consistency across file interactions. Updated tests to reflect asynchronous behavior in database operations and file writing.

* Fix typo in init function declaration to ensure it returns a Promise<void> instead of Proise<void>.

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6987

* Update tests to use async/await for init function in web filesystem, ensuring consistent asynchronous behavior in database operations.

* Update VRT screenshot for payees filter test to reflect recent changes

* [AI] Fix no-floating-promises lint error in desktop-electron

Wrapped queuedClientWinLogs.map() with Promise.all and void operator to properly handle the array of promises for executing queued logs.

Co-authored-by: Matiss Janis Aboltins <[email protected]>

* Refactor promise handling in global and sync event handlers

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6987

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matiss Janis Aboltins <[email protected]>

* Bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 (#7020)

* Bump @isaacs/brace-expansion from 5.0.0 to 5.0.1

Bumps @isaacs/brace-expansion from 5.0.0 to 5.0.1.

---
updated-dependencies:
- dependency-name: "@isaacs/brace-expansion"
  dependency-version: 5.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* note

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matt Fiddaman <[email protected]>

* feat(currency): Add Dominican Peso (DOP) currency (#7028)

* feat(currency): Add Dominican Peso (DOP) currency

* Add release notes

* ⬆️ recharts (3.4.0 → 3.7.1) (#7022)

* recharts (3.4.1 -> 3.7.0)

* Cell & activeShape deprecation

* note

* fix textAnchor

* remove Cell in BarGraph

* Fix Net Worth Calculations (#6968)

* fix: computed priorPeriodNetWorth and use it as a baseline for net worth calculations

* add release notes

* correct spelling

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6968

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6968

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6968

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6968

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6968

* note

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: youngcw <[email protected]>

* Set inital focus on category when covering overspending (#7012)

* Set inital focus on category when covering overspending

* Fixup: Make sure that the amount is set

* Unused import

* Fix bug where typing an amount and pressing enter uses previous value

---------

Co-authored-by: Dagur Ammendrup <[email protected]>

* 🎨 High Contrast Light theme for Actual (#7032)

* Update customThemeCatalog.json

* [autofix.ci] apply automated fixes

* Create 7032.md

🎨 High contrast light theme.

* Update customThemeCatalog.json

* Update 7032.md

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Require authentication for SimpleFIN and Pluggy.ai endpoints (#7034)

* Add authentication middleware to SimpleFIN and Pluggy.ai endpoints

Protect /simplefin/* and /pluggyai/* routes with validateSessionMiddleware
so only authenticated users can access bank account and transaction data.

Co-authored-by: Cursor <[email protected]>

* Release notes

---------

Co-authored-by: Cursor <[email protected]>

* Enhance PR template with structured sections (#6989)

* Enhance PR template with description, type of change, and checklist sections

Co-authored-by: Cursor <[email protected]>

* Update PR template to streamline instructions for writing release notes

* Remove unnecessary lines from the PR template to streamline instructions for writing release notes

* Add release notes for PR #6989

* Update category in release notes

Changed category from Enhancements to Maintenance.

* Update PULL_REQUEST_TEMPLATE.md

* Update AGENTS.md and PULL_REQUEST_TEMPLATE.md to clarify PR submission guidelines

* Update 6989.md

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add ACTUAL_USER_CREATION_MODE documentation to oauth-auth.md (#6935)

* Add ACTUAL_USER_CREATION_MODE documentation to oauth-auth.md

* [autofix.ci] apply automated fixes

* add note that first external auth user is admin and owner

Added details about admin permissions and server ownership for users authenticating with OpenID/OAuth2.

* improve ACTUAL_USER_CREATION_MODE environment documentation

clarify warning about server owner

* [autofix.ci] apply automated fixes

* move first user admin warning to "after setup" section of OIDC documentation

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* Add tooltip to imported payee in rule result window (#7031)

* Add tooltip to imported payee column in rule result window

The imported payee column in SimpleTransactionsTable was missing a
title attribute, so truncated text had no tooltip on hover. Other
columns (category, account, notes) already pass title for this purpose.

Fixes #7003

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* Add release notes for #7031

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Your Name <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>

* Hide selected accounts in the mobile filter (#7030)

When filtering for accounts in the mobile view of reports, hide the
already selected accounts.

* Prevent single-slash paths from being parsed as filepaths (#6966)

* fix: prevent single-slash paths from being parsed as filepaths

* add release notes

* [autofix.ci] apply automated fixes

* test: add tests related to filepath

* additonal test from coderabbit

---------

Co-authored-by: Pratik Silwal <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* [AI] Remove usage of 'web' file types (#7033)

* [AI] Desktop client, E2E, loot-core, sync-server and tooling updates

Co-authored-by: Cursor <[email protected]>

* Refactor database handling in various modules to use async/await for improved readability and error handling. This includes updates to database opening and closing methods across multiple files, ensuring consistent asynchronous behavior. Additionally, minor adjustments were made to encryption functions to support async operations.

* Refactor sync migration tests to utilize async/await for improved readability. Updated transaction handling to streamline event expectations and cleanup process.

* Refactor various functions to utilize async/await for improved readability and error handling. Updated service stopping, encryption, and file upload/download methods to ensure consistent asynchronous behavior across the application.

* Refactor BudgetFileSelection component to use async/await for onSelect method, enhancing error handling and readability. Update merge tests to utilize async/await for improved clarity in transaction merging expectations.

* Refactor filesystem module to use async/await for init function and related database operations, enhancing error handling and consistency across file interactions. Updated tests to reflect asynchronous behavior in database operations and file writing.

* Fix typo in init function declaration to ensure it returns a Promise<void> instead of Proise<void>.

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #6987

* Update tests to use async/await for init function in web filesystem, ensuring consistent asynchronous behavior in database operations.

* Update VRT screenshot for payees filter test to reflect recent changes

* Update filesystem module to remove web-specific implementations and streamline path handling. Refactor file operations to enhance type safety and consistency across different environments. Add tests for SQLite interactions and ensure proper handling of database transactions.

* Add release notes for maintenance: Remove usage of 'web' file types

* Refactor filesystem module to use type annotations for exports and improve consistency across methods. Remove deprecated web file handling and enhance encryption functions for better browser compatibility.

* Trigger CI

* Add asyncStorage API file to export Electron index module

* Trigger CI

* Feedback: typo

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [AI] Enforce file access authorization on sync API endpoints (#7040)

* [AI] Enforce file access authorization on sync API endpoints

Co-authored-by: Cursor <[email protected]>

* Refactor file deletion authorization to return error message as text

* Refactor file upload validation to improve error handling

* Add tests to allow admin users to retrieve encryption keys and sync files for other users

- Implemented a test for admin access to retrieve encryption keys for another user's file in the /user-get-key endpoint.
- Added a test for admin users to sync another user's file in the /sync endpoint, ensuring proper response and headers.

These changes enhance the authorization checks for admin actions on user files.

* Refactor file cleanup in tests to use onTestFinished for better error handling

* Enhance admin capabilities in file management tests

* Add migration to backfill file owners with admin ID

* Enhance file access authorization in sync API

* Update migration to backfill file owners with admin ID to ensure consistent ordering in the query

* Refactor access control tests for file downloads in sync API

* Add test for non-owner file download access via user_access in sync API

This test verifies that users with appropriate access can download files owned by others, utilizing the requireFileAccess logic and UserService.countUserAccess. It ensures correct response headers and content delivery for shared files.

* Refactor file cleanup in upload and download tests to utilize onTestFinished for improved error handling

This update consolidates file cleanup logic in the test suite, ensuring that temporary files are removed after each test execution. The changes enhance the reliability of tests by consistently managing file state across various scenarios.

---------

Co-authored-by: Cursor <[email protected]>

* Add limit/refill automation types (#6692)

* Add limit/refill automation components

* Add release note

* Fix typecheck

* Rabbit PR feedback

* Review

* [AI] Add per-package tsconfigs and typescript-strict-plugin for typecheck (#7019)

* [AI] Add per-package tsconfigs and typescript-strict-plugin for typecheck

Co-authored-by: Cursor <[email protected]>

* Update TypeScript configuration across multiple packages to correct plugin path key from "path" to "paths" and add reference to process-worker typings in index.electron.ts.

* Remove reference to process-worker typings in index.electron.ts and add new process-worker typings file for global Process augmentation.

* Refactor TypeScript build configurations across multiple packages by removing tsconfig.dist.json files and updating build scripts to use default TypeScript compilation. Adjusted compiler options to target ES2021 and enable declaration generation.

* Update TypeScript configuration in api package to refine include and exclude patterns for better file management.

* Update build script in api package to ensure migration SQL files are copied to the correct directory by creating the destination folder if it doesn't exist.

* Update TypeScript configurations in crdt and desktop-electron packages to refine include and exclude patterns for improved file management.

* Update TypeScript dependencies across multiple packages to include typescript-strict-plugin for enhanced type checking and maintain consistency in package.json files.

---------

Co-authored-by: Cursor <[email protected]>

* v26.2.1: critical security fix for simplefin, pluggy and multi-user (#7043)

* Add release notes for version 26.2.1, including critical security fixes for SimpleFin, Pluggy, and multi-user setups. Remove outdated upcoming release notes for related bugfixes.

* Add release notes for PR #7043

* Delete upcoming-release-notes/7043.md

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [AI] Bump version to 26.2.1 (#7052)

Co-authored-by: Cursor <[email protected]>

* Rename theme 'Okabe Ito' to 'Color-blind (dark)' (#7058)

* Rename theme 'Okabe Ito' to 'Color-blind (dark)'

* Rename 'Okabe Ito' theme to 'Color-blind (dark)'

* Fix capitalization in theme name for consistency

* Validate file IDs for correctness (#7067)

* Validate file IDs for correctness

* Add release notes

* 🐞 Midnight theme: Change menuAutoCompleteTextHover color - Fixes #7029 (#7048)

* Change menuAutoCompleteTextHover color to green400

* Change menuAutoCompleteTextHover color to green400 in Midnight theme.

Change menuAutoCompleteTextHover color to green400 in Midnight theme.

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* :bug: Fix file path on windows (#7076)

* fix file path on windows

* file path in migrations

* release notes

* [AI] Fix API build output path (dist/index.js instead of dist/api/index.js) (#7084)

* [AI] Fix API build output path (dist/index.js instead of dist/api/index.js)

- Set rootDir in packages/api/tsconfig.json so output is under dist/ not dist/api/
- Remove loot-core pegjs.ts from include; add local typings/pegjs.d.ts
- Use mkdir -p in build:migrations for idempotent build
- Exclude **/@types/** so declaration output does not conflict with input

Made-with: Cursor

* Update TypeScript configuration in api package to refine exclude patterns

* Mobile rules item alignment (#7081)

* [AI] Fix mobile rules list items to be full width and left-aligned

- Override Button's default justifyContent/alignItems centering in
  ActionableGridListItem to use flex-start alignment
- Add width: 100% to RulesListItem's SpaceBetween to fill the item width

Co-authored-by: Matiss Janis Aboltins <[email protected]>

* Add release notes for PR #7081

* Change category from Enhancements to Bugfix

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [AI] Remove 'suspect ai generated' label and associated workflow (#7087)

* Initial plan

* [AI] Remove 'suspect ai generated' label and associated workflow

Co-authored-by: MatissJanis <[email protected]>

* [AI] Remove 'suspect ai generated' label from coderabbit config

Co-authored-by: MatissJanis <[email protected]>

* Add release notes for PR #7087

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: MatissJanis <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [Cursor] Development environment setup (#7088)

* [AI] Add Cursor Cloud specific instructions to AGENTS.md

Co-authored-by: Matiss Janis Aboltins <[email protected]>

* [autofix.ci] apply automated fixes

* Add release notes for PR #7088

* [AI] Fix Node.js minimum version requirement in AGENTS.md (#7089)

* [AI] Fix outdated Node.js version requirement in Build Failures section

Co-authored-by: Matiss Janis Aboltins <[email protected]>

* [AI] Add test budget tip to Cursor Cloud instructions

Co-authored-by: Matiss Janis Aboltins <[email protected]>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>

* [AI] Github action for unfreezing PRs (#7094)

* [AI] Add GitHub Action to add PR to Merge Freeze unblocked list when unfreeze label is added

Made-with: Cursor

* Rename 7093.md to 7094.md

* Add concurrency control to unfreeze job in merge-freeze-unfreeze workflow

- Introduced concurrency settings to prevent overlapping executions of the unfreeze job based on labels.
- Updated error handling to abort the process if fetching the current merge freeze status fails, ensuring unblocked PRs are not overwritten.

* Refactor Merge Freeze workflow to simplify PR unblocking process

- Updated the workflow to directly post the PR to the unblocked list without fetching the current freeze status.
- Improved error handling by ensuring the access token is set before proceeding with the API call.

* Revert "feat(currency): Add Vietnamese Dong (VND) currency" (#7100)

* Revert "feat(currency): Add Vietnamese Dong (VND) currency (#6902)"

This reverts commit 7fa9fa900b3b590078ba88ac70377c25769782a7.

* Add release notes for PR #7100

* Delete 7100.md

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix bugfix categorisation in contributor points counting script (#7103)

* s/bugfix/bugfixes

* note

* add alias functionality

* note update

* [AI] Make merge-freeze-unfreeze workflow work on fork PRs (#7104)

* [AI] Make merge-freeze-unfreeze workflow work on fork PRs via pull_request_target

Made-with: Cursor

* Add release notes for the "unfreeze" workflow functionality in fork PRs

* Add empty permissions block to unfreeze job in merge-freeze-unfreeze workflow

* 🔖 (26.3.0) (#7097)

* 🔖 (26.3.0)

* Remove used release notes

* Add release notes for PR #7097

* Remove used release notes

* Remove used release notes

* Add release notes for version 26.3.0

* Add new terms to spelling expectation list

* Fix spelling and capitalization in release notes

Corrected spelling of 'reorganisation' to 'reorganization' and updated 'coderabbit' to 'CodeRabbit' for consistency.

* Update patterns.txt to allowlist 'CodeRabbit'

Add 'CodeRabbit' to allowlist of proper nouns.

* Clarify chart theming support in release notes

Updated the release notes to specify bar/pie chart theming support and added details about theme variables for customization.

* Remove 'CodeRabbit' from spelling expectations

* Refactor release notes and improve formatting

Reorganize release notes for clarity and update content.

* Create 2026-03-02-release-26-3-0.md

* Change release date to 2026-03-02

Updated the release date for version 26.3.0.

* Update release notes for version 26.3.0

---------

Co-authored-by: jfdoming <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Julian Dominguez-Schatz <[email protected]>

---------

Signed-off-by: Christian Speich <[email protected]>
Signed-off-by: Jonathon Jongsma <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Matiss Janis Aboltins <[email protected]>
Co-authored-by: Michael Clark <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nam <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Stephen Brown II <[email protected]>
Co-authored-by: Matthias Benaets <[email protected]>
Co-authored-by: Joshua Granick <[email protected]>
Co-authored-by: Matt Fiddaman <[email protected]>
Co-authored-by: Adam <[email protected]>
Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gm…
@coderabbitai coderabbitai Bot mentioned this pull request Apr 9, 2026
2 tasks done
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