[PR #8017] [MERGED] [AI] Persist bank sync status in the accounts table #126984

Closed
opened 2026-06-14 06:29:02 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/8017
Author: @MatissJanis
Created: 6/1/2026
Status: Merged
Merged: 6/4/2026
Merged by: @MatissJanis

Base: masterHead: claude/sync-status-db-field-rz8fL


📝 Commits (10+)

  • 3719e44 [AI] Persist bank sync status in the accounts table
  • 64e5ebd [AI] Add release note for persisted bank sync status
  • 4eb9213 [AI] Persist only durable failure states, keep pending ephemeral
  • 2377f44 Merge remote-tracking branch 'origin/master' into claude/sync-status-db-field-rz8fL
  • 2befb0b [AI] Un-export AccountSyncSidebar, refine release note
  • 29edbf3 [AI] Publish account changes in bank-sync sync-events
  • 3bfe320 Merge branch 'master' into claude/sync-status-db-field-rz8fL
  • b625f53 Merge remote-tracking branch 'origin/master' into claude/sync-status-db-field-rz8fL
  • f8f1327 [AI] Re-timestamp bank_sync_status migration after master
  • c4c8874 Merge remote-tracking branch 'origin/claude/sync-status-db-field-rz8fL' into claude/sync-status-db-field-rz8fL

📊 Changes

15 files changed (+225 additions, -64 deletions)

View changed files

packages/desktop-client/src/accounts/syncStatus.test.ts (+22 -0)
packages/desktop-client/src/accounts/syncStatus.ts (+12 -0)
📝 packages/desktop-client/src/components/accounts/Account.tsx (+0 -6)
📝 packages/desktop-client/src/components/accounts/Header.tsx (+2 -12)
📝 packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx (+4 -11)
📝 packages/desktop-client/src/components/mobile/accounts/AccountsPage.tsx (+3 -4)
📝 packages/desktop-client/src/components/sidebar/Accounts.tsx (+3 -4)
packages/loot-core/migrations/1780606215000_add_bank_sync_status.sql (+5 -0)
📝 packages/loot-core/src/mocks/index.ts (+3 -0)
📝 packages/loot-core/src/server/accounts/app-bank-sync.test.ts (+85 -0)
📝 packages/loot-core/src/server/accounts/app.ts (+62 -27)
📝 packages/loot-core/src/server/aql/schema/index.ts (+1 -0)
📝 packages/loot-core/src/server/db/types/index.ts (+8 -0)
📝 packages/loot-core/src/types/models/account.ts (+9 -0)
upcoming-release-notes/8017.md (+6 -0)

📄 Description

Description

Persisting bank sync status. So if you fail syncing, reload the page - the account will remain "red".

Extracted from https://github.com/actualbudget/actual/pull/7782

Testing

N/A - unit tests added

Checklist

  • Release notes added (see link above)
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Generated by Claude Code

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 37 14.05 MB → 14.05 MB (-611 B) -0.00%
loot-core 1 5.28 MB → 5.28 MB (+1.11 kB) +0.02%
api 2 3.86 MB → 3.86 MB (+1.09 kB) +0.03%
cli 1 7.97 MB 0%
crdt 1 11.12 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
37 14.05 MB → 14.05 MB (-611 B) -0.00%
Changeset
File Δ Size
src/accounts/syncStatus.ts 🆕 +230 B 0 B → 230 B
src/components/accounts/Account.tsx 📉 -156 B (-0.35%) 44.09 kB → 43.94 kB
src/components/accounts/Header.tsx 📉 -109 B (-0.38%) 28 kB → 27.89 kB
src/components/mobile/accounts/AccountsPage.tsx 📉 -202 B (-0.97%) 20.42 kB → 20.23 kB
src/components/mobile/accounts/AccountPage.tsx 📉 -107 B (-1.15%) 9.07 kB → 8.96 kB
src/components/sidebar/Accounts.tsx 📉 -267 B (-2.97%) 8.77 kB → 8.51 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller

Asset File Size % Changed
static/js/narrow.js 364.5 kB → 364.2 kB (-309 B) -0.08%
static/js/wide.js 299.14 kB → 298.88 kB (-265 B) -0.09%
static/js/ManageRules.js 46.64 kB → 46.6 kB (-35 B) -0.07%
static/js/index.js 1.56 MB → 1.56 MB (-2 B) -0.00%

Unchanged

Asset File Size % Changed
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/PayeeRuleCountLabel.js 7.33 kB 0%
static/js/ReportRouter.js 1.26 MB 0%
static/js/ScheduleEditForm.js 146.44 kB 0%
static/js/SchedulesTable.js 202.7 kB 0%
static/js/TransactionEdit.js 90.63 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/Value.js 5.08 MB 0%
static/js/_baseIsEqual.js 98.38 kB 0%
static/js/ca.js 186.63 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 101.02 kB 0%
static/js/de.js 170.87 kB 0%
static/js/en-GB.js 9.25 kB 0%
static/js/en.js 199.45 kB 0%
static/js/es.js 178.57 kB 0%
static/js/extends.js 508.06 kB 0%
static/js/fr.js 178.44 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 164.87 kB 0%
static/js/nb-NO.js 147.94 kB 0%
static/js/nl.js 107 kB 0%
static/js/pt-BR.js 188.32 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 174.31 kB 0%
static/js/theme.js 31.88 kB 0%
static/js/toString.js 705.14 kB 0%
static/js/uk.js 209.01 kB 0%
static/js/useFormatList.js 2.52 kB 0%
static/js/useTransactionBatchActions.js 9.71 kB 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 117.01 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.28 MB → 5.28 MB (+1.11 kB) +0.02%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts 📈 +1.08 kB (+4.01%) 26.88 kB → 27.96 kB
home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts 📈 +34 B (+0.34%) 9.81 kB → 9.85 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.8g6UP_wl.js 0 B → 5.28 MB (+5.28 MB) -

Removed

Asset File Size % Changed
kcab.worker.CCn_Decu.js 5.28 MB → 0 B (-5.28 MB) -100%

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged
No assets were unchanged


api

Total

Files count Total bundle size % Changed
2 3.86 MB → 3.86 MB (+1.09 kB) +0.03%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts 📈 +1.05 kB (+4.02%) 26.2 kB → 27.26 kB
home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts 📈 +33 B (+0.34%) 9.52 kB → 9.56 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.86 MB → 3.86 MB (+1.09 kB) +0.03%

Smaller
No assets were smaller

Unchanged

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

cli

Total

Files count Total bundle size % Changed
1 7.97 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
cli.js 7.97 MB 0%

crdt

Total

Files count Total bundle size % Changed
1 11.12 kB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 11.12 kB 0%

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/8017 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 6/1/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `claude/sync-status-db-field-rz8fL` --- ### 📝 Commits (10+) - [`3719e44`](https://github.com/actualbudget/actual/commit/3719e4421d719c1de8c24593ab8d22f8b14c70f6) [AI] Persist bank sync status in the accounts table - [`64e5ebd`](https://github.com/actualbudget/actual/commit/64e5ebd3824e1f9ede836103c8241b1be8e90ccc) [AI] Add release note for persisted bank sync status - [`4eb9213`](https://github.com/actualbudget/actual/commit/4eb9213baf0c1d018966e77bff53029b897ba357) [AI] Persist only durable failure states, keep pending ephemeral - [`2377f44`](https://github.com/actualbudget/actual/commit/2377f44f4f3b035585c0e07a3072917e4f33dcb2) Merge remote-tracking branch 'origin/master' into claude/sync-status-db-field-rz8fL - [`2befb0b`](https://github.com/actualbudget/actual/commit/2befb0b25cfb2cd43e1802e8e20a16879f2f05ae) [AI] Un-export AccountSyncSidebar, refine release note - [`29edbf3`](https://github.com/actualbudget/actual/commit/29edbf3421964c215315790a3352b4fe5b4cd432) [AI] Publish account changes in bank-sync sync-events - [`3bfe320`](https://github.com/actualbudget/actual/commit/3bfe3204e386c6416a7ecb019029b7b50503f497) Merge branch 'master' into claude/sync-status-db-field-rz8fL - [`b625f53`](https://github.com/actualbudget/actual/commit/b625f530628a822af2813b2e422805bc1f476164) Merge remote-tracking branch 'origin/master' into claude/sync-status-db-field-rz8fL - [`f8f1327`](https://github.com/actualbudget/actual/commit/f8f132743165045de659b945f6e977883f3c3692) [AI] Re-timestamp bank_sync_status migration after master - [`c4c8874`](https://github.com/actualbudget/actual/commit/c4c8874c442d9e8d4f827e40a1af317230ddfec4) Merge remote-tracking branch 'origin/claude/sync-status-db-field-rz8fL' into claude/sync-status-db-field-rz8fL ### 📊 Changes **15 files changed** (+225 additions, -64 deletions) <details> <summary>View changed files</summary> ➕ `packages/desktop-client/src/accounts/syncStatus.test.ts` (+22 -0) ➕ `packages/desktop-client/src/accounts/syncStatus.ts` (+12 -0) 📝 `packages/desktop-client/src/components/accounts/Account.tsx` (+0 -6) 📝 `packages/desktop-client/src/components/accounts/Header.tsx` (+2 -12) 📝 `packages/desktop-client/src/components/mobile/accounts/AccountPage.tsx` (+4 -11) 📝 `packages/desktop-client/src/components/mobile/accounts/AccountsPage.tsx` (+3 -4) 📝 `packages/desktop-client/src/components/sidebar/Accounts.tsx` (+3 -4) ➕ `packages/loot-core/migrations/1780606215000_add_bank_sync_status.sql` (+5 -0) 📝 `packages/loot-core/src/mocks/index.ts` (+3 -0) 📝 `packages/loot-core/src/server/accounts/app-bank-sync.test.ts` (+85 -0) 📝 `packages/loot-core/src/server/accounts/app.ts` (+62 -27) 📝 `packages/loot-core/src/server/aql/schema/index.ts` (+1 -0) 📝 `packages/loot-core/src/server/db/types/index.ts` (+8 -0) 📝 `packages/loot-core/src/types/models/account.ts` (+9 -0) ➕ `upcoming-release-notes/8017.md` (+6 -0) </details> ### 📄 Description <!-- This PR extracts a self-contained slice of #7782 by @jcam (https://github.com/actualbudget/actual/pull/7782): just the persisted bank-sync-status DB field and the minimal UI that reads it. All credit for the original implementation goes to @jcam. The external sync accounts API and the cross-client propagation/polling pieces from #7782 are intentionally left out of this PR. --> ## Description <!-- What does this PR do? Why is it needed? Please give context on the "why?": why do we need this change? What problem is it solving for you?--> Persisting bank sync status. So if you fail syncing, reload the page - the account will remain "red". ## Related issue(s) <!-- e.g. Fixes #123, Relates to #456 --> Extracted from https://github.com/actualbudget/actual/pull/7782 ## Testing <!-- What did you test? How can we reproduce the issue you are fixing or how can we test the feature you built? --> N/A - unit tests added ## Checklist - [x] Release notes added (see link above) - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> --- _Generated by [Claude Code](https://claude.ai/code/session_014MXn6Qi8skvFL9kXw7ctFD)_ <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 37 | 14.05 MB → 14.05 MB (-611 B) | -0.00% loot-core | 1 | 5.28 MB → 5.28 MB (+1.11 kB) | +0.02% api | 2 | 3.86 MB → 3.86 MB (+1.09 kB) | +0.03% cli | 1 | 7.97 MB | 0% crdt | 1 | 11.12 kB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 37 | 14.05 MB → 14.05 MB (-611 B) | -0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/accounts/syncStatus.ts` | 🆕 +230 B | 0 B → 230 B `src/components/accounts/Account.tsx` | 📉 -156 B (-0.35%) | 44.09 kB → 43.94 kB `src/components/accounts/Header.tsx` | 📉 -109 B (-0.38%) | 28 kB → 27.89 kB `src/components/mobile/accounts/AccountsPage.tsx` | 📉 -202 B (-0.97%) | 20.42 kB → 20.23 kB `src/components/mobile/accounts/AccountPage.tsx` | 📉 -107 B (-1.15%) | 9.07 kB → 8.96 kB `src/components/sidebar/Accounts.tsx` | 📉 -267 B (-2.97%) | 8.77 kB → 8.51 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** Asset | File Size | % Changed ----- | --------- | --------- static/js/narrow.js | 364.5 kB → 364.2 kB (-309 B) | -0.08% static/js/wide.js | 299.14 kB → 298.88 kB (-265 B) | -0.09% static/js/ManageRules.js | 46.64 kB → 46.6 kB (-35 B) | -0.07% static/js/index.js | 1.56 MB → 1.56 MB (-2 B) | -0.00% **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 962.55 kB | 0% static/js/PayeeRuleCountLabel.js | 7.33 kB | 0% static/js/ReportRouter.js | 1.26 MB | 0% static/js/ScheduleEditForm.js | 146.44 kB | 0% static/js/SchedulesTable.js | 202.7 kB | 0% static/js/TransactionEdit.js | 90.63 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/Value.js | 5.08 MB | 0% static/js/_baseIsEqual.js | 98.38 kB | 0% static/js/ca.js | 186.63 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 101.02 kB | 0% static/js/de.js | 170.87 kB | 0% static/js/en-GB.js | 9.25 kB | 0% static/js/en.js | 199.45 kB | 0% static/js/es.js | 178.57 kB | 0% static/js/extends.js | 508.06 kB | 0% static/js/fr.js | 178.44 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 164.87 kB | 0% static/js/nb-NO.js | 147.94 kB | 0% static/js/nl.js | 107 kB | 0% static/js/pt-BR.js | 188.32 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 174.31 kB | 0% static/js/theme.js | 31.88 kB | 0% static/js/toString.js | 705.14 kB | 0% static/js/uk.js | 209.01 kB | 0% static/js/useFormatList.js | 2.52 kB | 0% static/js/useTransactionBatchActions.js | 9.71 kB | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 117.01 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.28 MB → 5.28 MB (+1.11 kB) | +0.02% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts` | 📈 +1.08 kB (+4.01%) | 26.88 kB → 27.96 kB `home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts` | 📈 +34 B (+0.34%) | 9.81 kB → 9.85 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.8g6UP_wl.js | 0 B → 5.28 MB (+5.28 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CCn_Decu.js | 5.28 MB → 0 B (-5.28 MB) | -100% **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 2 | 3.86 MB → 3.86 MB (+1.09 kB) | +0.03% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/accounts/app.ts` | 📈 +1.05 kB (+4.02%) | 26.2 kB → 27.26 kB `home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts` | 📈 +33 B (+0.34%) | 9.52 kB → 9.56 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- index.js | 3.86 MB → 3.86 MB (+1.09 kB) | +0.03% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- models.js | 0 B | 0% </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.97 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- cli.js | 7.97 MB | 0% </div> </details> --- #### crdt **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 11.12 kB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- index.js | 11.12 kB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end ---> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-14 06:29:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#126984