[PR #7568] Fix append/prepend notes rule not working when note already exists #56562

Open
opened 2026-05-01 04:30:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7568
Author: @okxint
Created: 4/21/2026
Status: 🔄 Open

Base: masterHead: fix/append-notes-existing-note


📝 Commits (3)

  • 0c15088 [AI] fix: preserve schedule link when merging transactions
  • b983d12 Add release notes for PR #7177
  • 7c655c4 [AI] Fix append/prepend notes rule not working when note already exists

📊 Changes

8 files changed (+134 additions, -0 deletions)

View changed files

📝 packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx (+2 -0)
📝 packages/desktop-client/src/components/transactions/TransactionList.tsx (+2 -0)
📝 packages/loot-core/src/server/rules/action.ts (+8 -0)
📝 packages/loot-core/src/server/rules/index.test.ts (+60 -0)
📝 packages/loot-core/src/server/transactions/merge.test.ts (+53 -0)
📝 packages/loot-core/src/server/transactions/merge.ts (+2 -0)
📝 packages/loot-core/src/types/models/transaction.ts (+1 -0)
upcoming-release-notes/7177.md (+6 -0)

📄 Description

Summary

  • When using "append to notes" or "prepend to notes" rule actions, the rule correctly computed the new notes value but the UI discarded it because it only applied changes to empty fields
  • Added _forceApplyFields metadata to track fields modified by append/prepend operations, so the UI always applies those changes
  • Fixed in both desktop (TransactionList.tsx) and mobile (TransactionEdit.tsx) code paths

Fixes #7303

Test plan

  • Added unit tests for append-notes and prepend-notes actions covering empty, null, and existing notes
  • Added tests verifying _forceApplyFields metadata is set correctly
  • All existing tests pass (527/527)

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 34 13.86 MB → 13.86 MB (+234 B) +0.00%
loot-core 1 5.26 MB → 5.27 MB (+230 B) +0.00%
api 1 3.89 MB → 3.89 MB (+226 B) +0.01%
cli 1 7.91 MB 0%
crdt 1 41.83 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
34 13.86 MB → 13.86 MB (+234 B) +0.00%
Changeset
File Δ Size
src/components/transactions/TransactionList.tsx 📈 +100 B (+0.56%) 17.29 kB → 17.38 kB
src/components/mobile/transactions/TransactionEdit.tsx 📈 +134 B (+0.21%) 61.1 kB → 61.23 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/TransactionEdit.js 186.46 kB → 186.59 kB (+134 B) +0.07%
static/js/Value.js 4.94 MB → 4.94 MB (+100 B) +0.00%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 1.87 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/PayeeRuleCountLabel.js 52.52 kB 0%
static/js/ReportRouter.js 1.2 MB 0%
static/js/ScheduleEditForm.js 136.13 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/ca.js 191.68 kB 0%
static/js/chart-theme.js 796.5 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 104.4 kB 0%
static/js/de.js 174.08 kB 0%
static/js/en-GB.js 8.2 kB 0%
static/js/en.js 176.64 kB 0%
static/js/es.js 181.5 kB 0%
static/js/extends.js 518.36 kB 0%
static/js/fr.js 182.7 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 168.53 kB 0%
static/js/narrow.js 364.25 kB 0%
static/js/nb-NO.js 151.58 kB 0%
static/js/nl.js 108.66 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 193.45 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 178.91 kB 0%
static/js/theme.js 31.67 kB 0%
static/js/uk.js 212.28 kB 0%
static/js/useFormatList.js 8.63 kB 0%
static/js/wide.js 453 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 119.52 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.26 MB → 5.27 MB (+230 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/rules/action.ts 📈 +230 B (+2.81%) 7.99 kB → 8.21 kB
View detailed bundle breakdown

Added

Asset File Size % Changed
kcab.worker.FcDM9Ybm.js 0 B → 5.27 MB (+5.27 MB) -

Removed

Asset File Size % Changed
kcab.worker.wT3tRINf.js 5.26 MB → 0 B (-5.26 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
1 3.89 MB → 3.89 MB (+226 B) +0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/rules/action.ts 📈 +226 B (+2.93%) 7.54 kB → 7.76 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.89 MB → 3.89 MB (+226 B) +0.01%

Smaller
No assets were smaller

Unchanged
No assets were unchanged


cli

Total

Files count Total bundle size % Changed
1 7.91 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.91 MB 0%

crdt

Total

Files count Total bundle size % Changed
1 41.83 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 41.83 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/7568 **Author:** [@okxint](https://github.com/okxint) **Created:** 4/21/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/append-notes-existing-note` --- ### 📝 Commits (3) - [`0c15088`](https://github.com/actualbudget/actual/commit/0c1508833443cfcc5727dfe322f792bca0641ed0) [AI] fix: preserve schedule link when merging transactions - [`b983d12`](https://github.com/actualbudget/actual/commit/b983d12288440392718c7bbac289fdf1afe5ebc7) Add release notes for PR #7177 - [`7c655c4`](https://github.com/actualbudget/actual/commit/7c655c4f9a53dfb0df2a8629a6a0ff2e9c368c99) [AI] Fix append/prepend notes rule not working when note already exists ### 📊 Changes **8 files changed** (+134 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx` (+2 -0) 📝 `packages/desktop-client/src/components/transactions/TransactionList.tsx` (+2 -0) 📝 `packages/loot-core/src/server/rules/action.ts` (+8 -0) 📝 `packages/loot-core/src/server/rules/index.test.ts` (+60 -0) 📝 `packages/loot-core/src/server/transactions/merge.test.ts` (+53 -0) 📝 `packages/loot-core/src/server/transactions/merge.ts` (+2 -0) 📝 `packages/loot-core/src/types/models/transaction.ts` (+1 -0) ➕ `upcoming-release-notes/7177.md` (+6 -0) </details> ### 📄 Description ## Summary - When using "append to notes" or "prepend to notes" rule actions, the rule correctly computed the new notes value but the UI discarded it because it only applied changes to empty fields - Added `_forceApplyFields` metadata to track fields modified by append/prepend operations, so the UI always applies those changes - Fixed in both desktop (`TransactionList.tsx`) and mobile (`TransactionEdit.tsx`) code paths Fixes #7303 ## Test plan - Added unit tests for `append-notes` and `prepend-notes` actions covering empty, null, and existing notes - Added tests verifying `_forceApplyFields` metadata is set correctly - All existing tests pass (527/527) <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 34 | 13.86 MB → 13.86 MB (+234 B) | +0.00% loot-core | 1 | 5.26 MB → 5.27 MB (+230 B) | +0.00% api | 1 | 3.89 MB → 3.89 MB (+226 B) | +0.01% cli | 1 | 7.91 MB | 0% crdt | 1 | 41.83 kB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 34 | 13.86 MB → 13.86 MB (+234 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/transactions/TransactionList.tsx` | 📈 +100 B (+0.56%) | 17.29 kB → 17.38 kB `src/components/mobile/transactions/TransactionEdit.tsx` | 📈 +134 B (+0.21%) | 61.1 kB → 61.23 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/TransactionEdit.js | 186.46 kB → 186.59 kB (+134 B) | +0.07% static/js/Value.js | 4.94 MB → 4.94 MB (+100 B) | +0.00% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 1.87 MB | 0% static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 962.55 kB | 0% static/js/PayeeRuleCountLabel.js | 52.52 kB | 0% static/js/ReportRouter.js | 1.2 MB | 0% static/js/ScheduleEditForm.js | 136.13 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/ca.js | 191.68 kB | 0% static/js/chart-theme.js | 796.5 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 104.4 kB | 0% static/js/de.js | 174.08 kB | 0% static/js/en-GB.js | 8.2 kB | 0% static/js/en.js | 176.64 kB | 0% static/js/es.js | 181.5 kB | 0% static/js/extends.js | 518.36 kB | 0% static/js/fr.js | 182.7 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 168.53 kB | 0% static/js/narrow.js | 364.25 kB | 0% static/js/nb-NO.js | 151.58 kB | 0% static/js/nl.js | 108.66 kB | 0% static/js/pl.js | 88.34 kB | 0% static/js/pt-BR.js | 193.45 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 178.91 kB | 0% static/js/theme.js | 31.67 kB | 0% static/js/uk.js | 212.28 kB | 0% static/js/useFormatList.js | 8.63 kB | 0% static/js/wide.js | 453 B | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 119.52 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.26 MB → 5.27 MB (+230 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/rules/action.ts` | 📈 +230 B (+2.81%) | 7.99 kB → 8.21 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.FcDM9Ybm.js | 0 B → 5.27 MB (+5.27 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.wT3tRINf.js | 5.26 MB → 0 B (-5.26 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 ----------- | ----------------- | --------- 1 | 3.89 MB → 3.89 MB (+226 B) | +0.01% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/rules/action.ts` | 📈 +226 B (+2.93%) | 7.54 kB → 7.76 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.89 MB → 3.89 MB (+226 B) | +0.01% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.91 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.91 MB | 0% </div> </details> --- #### crdt **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 41.83 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 | 41.83 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-05-01 04:30:22 -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#56562