[PR #7041] [MERGED] [Mobile] Fix preview running balances not displaying on toggle #48717

Closed
opened 2026-04-26 10:37:06 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7041
Author: @LeviBorodenko
Created: 2/21/2026
Status: Merged
Merged: 3/8/2026
Merged by: @youngcw

Base: masterHead: bugfix/refresh-preview-running-balance-on-options-change


📝 Commits (4)

  • 8a950f7 refactor(usePreviewTransactions): Move running balances to useMemo
  • 49d2ea3 docs(relnotes): Add note for mobile running balance fix
  • d0a48bf refactor(hooks): Remove unnecessary options ref
  • 8a0547f Merge branch 'master' into bugfix/refresh-preview-running-balance-on-options-change

📊 Changes

2 files changed (+25 additions, -25 deletions)

View changed files

📝 packages/desktop-client/src/hooks/usePreviewTransactions.ts (+19 -25)
upcoming-release-notes/7041.md (+6 -0)

📄 Description

Description

On Mobile, toggling the "Show running balance" preference was not displaying (or updating) the running balances for upcoming preview transactions.

The issue was fixed by moving the relevant balance calculation to a useMemo that reacts to the settings change.

Fixes #6797

Testing

To reproduce the bug:

  1. On mobile, go to an account with the running balance disabled
  2. Turn on running balance
  3. see that the upcoming transactions don't have a running balance.

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

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 14.85 MB → 14.85 MB (+1.52 kB) +0.01%
loot-core 1 5.82 MB 0%
api 1 4.43 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 14.85 MB → 14.85 MB (+1.52 kB) +0.01%
Changeset
File Δ Size
src/hooks/usePreviewTransactions.ts 📈 +1.52 kB (+51.45%) 2.96 kB → 4.48 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/usePayeeRuleCounts.js 10.04 kB → 11.57 kB (+1.52 kB) +15.14%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 9.54 MB 0%
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/ca.js 188.11 kB 0%
static/js/da.js 106.35 kB 0%
static/js/de.js 180.07 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 170.33 kB 0%
static/js/es.js 174.55 kB 0%
static/js/fr.js 179.6 kB 0%
static/js/it.js 171.16 kB 0%
static/js/nb-NO.js 156.96 kB 0%
static/js/nl.js 106.37 kB 0%
static/js/pl.js 88.37 kB 0%
static/js/pt-BR.js 154.22 kB 0%
static/js/th.js 181.87 kB 0%
static/js/uk.js 214.74 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/ReportRouter.js 1.16 MB 0%
static/js/narrow.js 637.77 kB 0%
static/js/TransactionList.js 106.22 kB 0%
static/js/wide.js 164.15 kB 0%
static/js/AppliedFilters.js 9.71 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.82 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
kcab.worker.C2vnwNMt.js 5.82 MB 0%

api

Total

Files count Total bundle size % Changed
1 4.43 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
bundle.api.js 4.43 MB 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/7041 **Author:** [@LeviBorodenko](https://github.com/LeviBorodenko) **Created:** 2/21/2026 **Status:** ✅ Merged **Merged:** 3/8/2026 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `bugfix/refresh-preview-running-balance-on-options-change` --- ### 📝 Commits (4) - [`8a950f7`](https://github.com/actualbudget/actual/commit/8a950f767d599d2d651f6002a8007414a81fa20a) refactor(usePreviewTransactions): Move running balances to useMemo - [`49d2ea3`](https://github.com/actualbudget/actual/commit/49d2ea3308e27b76ce683eb8bb7feb7824baba2a) docs(relnotes): Add note for mobile running balance fix - [`d0a48bf`](https://github.com/actualbudget/actual/commit/d0a48bf886a555729569337f17d8a511cd09849a) refactor(hooks): Remove unnecessary options ref - [`8a0547f`](https://github.com/actualbudget/actual/commit/8a0547ffc135bc7ef57e6c371fc1ee5975b82f3f) Merge branch 'master' into bugfix/refresh-preview-running-balance-on-options-change ### 📊 Changes **2 files changed** (+25 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/hooks/usePreviewTransactions.ts` (+19 -25) ➕ `upcoming-release-notes/7041.md` (+6 -0) </details> ### 📄 Description ## Description On Mobile, toggling the "Show running balance" preference was not displaying (or updating) the running balances for upcoming preview transactions. The issue was fixed by moving the relevant balance calculation to a `useMemo` that reacts to the settings change. ## Related issue(s) Fixes #6797 ## Testing To reproduce the bug: 1. On mobile, go to an account with the running balance disabled 2. Turn on running balance 3. see that the upcoming transactions don't have a running balance. ## 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 ---> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 14.85 MB → 14.85 MB (+1.52 kB) | +0.01% loot-core | 1 | 5.82 MB | 0% api | 1 | 4.43 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 14.85 MB → 14.85 MB (+1.52 kB) | +0.01% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/hooks/usePreviewTransactions.ts` | 📈 +1.52 kB (+51.45%) | 2.96 kB → 4.48 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/usePayeeRuleCounts.js | 10.04 kB → 11.57 kB (+1.52 kB) | +15.14% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 9.54 MB | 0% 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/ca.js | 188.11 kB | 0% static/js/da.js | 106.35 kB | 0% static/js/de.js | 180.07 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 170.33 kB | 0% static/js/es.js | 174.55 kB | 0% static/js/fr.js | 179.6 kB | 0% static/js/it.js | 171.16 kB | 0% static/js/nb-NO.js | 156.96 kB | 0% static/js/nl.js | 106.37 kB | 0% static/js/pl.js | 88.37 kB | 0% static/js/pt-BR.js | 154.22 kB | 0% static/js/th.js | 181.87 kB | 0% static/js/uk.js | 214.74 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/ReportRouter.js | 1.16 MB | 0% static/js/narrow.js | 637.77 kB | 0% static/js/TransactionList.js | 106.22 kB | 0% static/js/wide.js | 164.15 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/useTransactionBatchActions.js | 13.23 kB | 0% static/js/FormulaEditor.js | 1.04 MB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.82 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 ----- | --------- | --------- kcab.worker.C2vnwNMt.js | 5.82 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.43 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 ----- | --------- | --------- bundle.api.js | 4.43 MB | 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-04-26 10:37:06 -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#48717