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

Closed
opened 2026-04-14 21:42:39 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6094

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6094 **State:** closed **Merged:** Yes --- 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 -->
GiteaMirror added the pull-request label 2026-04-14 21:42:39 -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#20682