Skip to content

feat(api): sync a new bank connection as soon as it is linked - #279

Merged
suiramdev merged 1 commit into
devfrom
feat/sync-after-bank-connect
Nov 13, 2026
Merged

suiramdev merged 1 commit into
devfrom
feat/sync-after-bank-connect

Conversation

@suiramdev

Copy link
Copy Markdown
Owner

Summary

bankConnection.exchangeCode now starts the new connection's first sync right after saving it, through startAccountSync, extracted unchanged from budget.syncAccounts. Look first at packages/api/src/routers/bank-connection.ts and the shell guard in use-account-sync.ts.

Motivation

  • During onboarding no sync ran until the user reached Home, so the first page loaded data on demand.
  • Home and Budget now show data already imported, or a sync in progress.

Drawbacks

  • One sync runs at a time: a bank linked during a running sync waits for the next one (documented).
  • A failure to start the sync is only logged; the connection still succeeds.

Prior art

  • Keeping the client-side trigger was rejected: it only fires once onboarding completes.

Notes

  • No visual change.
  • No new test: exchangeCode has no injection seam for provider, prisma, signed state and nonce.
  • Docs updated: use/bank-connections, reference/procedures, index.
  • exchangeCode returns a new syncStartedAt field; no migration.

@suiramdev
suiramdev enabled auto-merge (squash) November 13, 2026 13:36
@github-actions github-actions Bot added the type: feature A new capability, or an improvement to an existing one label Nov 13, 2026
@suiramdev
suiramdev merged commit a7f4db5 into dev Nov 13, 2026
4 checks passed
@suiramdev
suiramdev deleted the feat/sync-after-bank-connect branch November 13, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature A new capability, or an improvement to an existing one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant