[PR #6094] [MERGED] Disable fontSizeChanged to prevent undo stack exceeding limit after dashboard reset #32244

Closed
opened 2026-04-18 08:19:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6094
Author: @pyfisssh
Created: 11/9/2025
Status: Merged
Merged: 11/22/2025
Merged by: @MatissJanis

Base: masterHead: fix/reports-undo-broken


📝 Commits (5)

  • ffae380 fix: temporarily disable fontSizedChanged to prevent infinite update loop after dashboard reset
  • 9dcc284 chore: add release note for disabling fontSizeChanged to prevent undo stack exceeding limit after dashboard reset
  • b0b8066 Revert "fix: temporarily disable fontSizedChanged to prevent infinite update loop after dashboard reset"
  • 4aaf268 fix: prevent infinite loop by disabling fontSizeChanged
  • fdf1baa Clean up SummaryCard by removing unused code

📊 Changes

2 files changed (+6 additions, -7 deletions)

View changed files

📝 packages/desktop-client/src/components/reports/reports/SummaryCard.tsx (+0 -7)
upcoming-release-notes/6094.md (+6 -0)

📄 Description

Fixes #6074

Summary

Undo functionality was broken after using "reset to default" due to the fontSizeChanged function in SummaryNumber.tsx.

The reset uses DEFAULT_DASHBOARD_STATE (loot-core/src/shared/dashboard.ts), which contains widget fontSize values that differ from those calculated on the frontend. After a reset, fontSizeChanged always triggers dashboard-update-widget, modifying the undo stack and preventing users from undoing back to the pre-reset state.

Additionally, fontSizeChanged can cause an infinite loop. Based on testing, this PR temporarily disables fontSizeChanged during dashboard reset. I believe addressing fontSizeChanged itself to be a separate issue, but I am not sure if the maintainers would agree.

Screen Recording

Issue demonstration — fontSizeChanged behavior:

Screenshot 2025-11-09 at 10 45 26 PM

Note

Removes the fontSizeChanged callback from SummaryNumber in SummaryCard.tsx and adds a bugfix release note.

  • Reports:
    • In packages/desktop-client/src/components/reports/reports/SummaryCard.tsx, remove fontSizeChanged callback when rendering SummaryNumber (still passes initialFontSize).
  • Release Notes:
    • Add bugfix entry upcoming-release-notes/6094.md describing the fontSizeChanged disablement.

Written by Cursor Bugbot for commit fdf1baa1d4. This will update automatically on new commits. Configure here.


🔄 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/6094 **Author:** [@pyfisssh](https://github.com/pyfisssh) **Created:** 11/9/2025 **Status:** ✅ Merged **Merged:** 11/22/2025 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `fix/reports-undo-broken` --- ### 📝 Commits (5) - [`ffae380`](https://github.com/actualbudget/actual/commit/ffae380eebcfa6946f578ed27f357453d307f957) fix: temporarily disable fontSizedChanged to prevent infinite update loop after dashboard reset - [`9dcc284`](https://github.com/actualbudget/actual/commit/9dcc284f7e2e566c76fd2069bdab60a0c406c392) chore: add release note for disabling fontSizeChanged to prevent undo stack exceeding limit after dashboard reset - [`b0b8066`](https://github.com/actualbudget/actual/commit/b0b80660fea8a691d1f6e996b071d51dc82aee02) Revert "fix: temporarily disable fontSizedChanged to prevent infinite update loop after dashboard reset" - [`4aaf268`](https://github.com/actualbudget/actual/commit/4aaf2685bb096c19a2bf784b37cecd34e853f909) fix: prevent infinite loop by disabling fontSizeChanged - [`fdf1baa`](https://github.com/actualbudget/actual/commit/fdf1baa1d4659bf52d9bd12d8c019069f2a323c2) Clean up SummaryCard by removing unused code ### 📊 Changes **2 files changed** (+6 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/reports/reports/SummaryCard.tsx` (+0 -7) ➕ `upcoming-release-notes/6094.md` (+6 -0) </details> ### 📄 Description Fixes #6074 #### Summary Undo functionality was broken after using "reset to default" due to the `fontSizeChanged` function in SummaryNumber.tsx. The reset uses `DEFAULT_DASHBOARD_STATE` (loot-core/src/shared/dashboard.ts), which contains widget fontSize values that differ from those calculated on the frontend. After a reset, `fontSizeChanged` always triggers `dashboard-update-widget`, modifying the undo stack and preventing users from undoing back to the pre-reset state. Additionally, `fontSizeChanged` can cause an infinite loop. Based on testing, this PR temporarily disables `fontSizeChanged` during dashboard reset. I believe addressing `fontSizeChanged` itself to be a separate issue, but I am not sure if the maintainers would agree. #### Screen Recording Issue demonstration — `fontSizeChanged` behavior: <img width="1512" height="982" alt="Screenshot 2025-11-09 at 10 45 26 PM" src="https://github.com/user-attachments/assets/e32dd30e-6ccf-41df-baa3-a31fc24ecedf" /> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes the `fontSizeChanged` callback from `SummaryNumber` in `SummaryCard.tsx` and adds a bugfix release note. > > - **Reports**: > - In `packages/desktop-client/src/components/reports/reports/SummaryCard.tsx`, remove `fontSizeChanged` callback when rendering `SummaryNumber` (still passes `initialFontSize`). > - **Release Notes**: > - Add bugfix entry `upcoming-release-notes/6094.md` describing the `fontSizeChanged` disablement. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit fdf1baa1d4659bf52d9bd12d8c019069f2a323c2. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --- <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-18 08:19:20 -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#32244