Skip to content

Revert "[AI] fix: preserve explicit category on imported transactions"#7388

Merged
youngcw merged 3 commits intomasterfrom
revert-7185-api2062/7171
Apr 5, 2026
Merged

Revert "[AI] fix: preserve explicit category on imported transactions"#7388
youngcw merged 3 commits intomasterfrom
revert-7185-api2062/7171

Conversation

@youngcw
Copy link
Copy Markdown
Member

@youngcw youngcw commented Apr 5, 2026

Reverts #7185

fixes #7302. Can remerge after the release when there is time to debug.


Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 28 12.27 MB 0%
loot-core 1 4.82 MB → 4.82 MB (-318 B) -0.01%
api 1 3.83 MB → 3.83 MB (-315 B) -0.01%
cli 1 7.88 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
28 12.27 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
static/js/index.js 3.24 MB 0%
static/js/BackgroundImage.js 119.98 kB 0%
static/js/FormulaEditor.js 846.44 kB 0%
static/js/ReportRouter.js 1.1 MB 0%
static/js/TransactionList.js 81.29 kB 0%
static/js/ca.js 183.36 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 174.79 kB 0%
static/js/en-GB.js 7.16 kB 0%
static/js/en.js 170.76 kB 0%
static/js/es.js 182.18 kB 0%
static/js/fr.js 177.47 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 166.25 kB 0%
static/js/narrow.js 354.5 kB 0%
static/js/nb-NO.js 152.2 kB 0%
static/js/nl.js 108.93 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 177.84 kB 0%
static/js/resize-observer.js 18.03 kB 0%
static/js/sv.js 80.58 kB 0%
static/js/th.js 179.94 kB 0%
static/js/theme.js 30.68 kB 0%
static/js/uk.js 213.14 kB 0%
static/js/useTransactionBatchActions.js 4.29 MB 0%
static/js/wide.js 418 B 0%
static/js/workbox-window.prod.es5.js 7.28 kB 0%
static/js/zh-Hans.js 93.57 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.82 MB → 4.82 MB (-318 B) -0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts 📉 -318 B (-1.39%) 22.42 kB → 22.1 kB
View detailed bundle breakdown

Added

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

Removed

Asset File Size % Changed
kcab.worker.3maKMh4x.js 4.82 MB → 0 B (-4.82 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.83 MB → 3.83 MB (-315 B) -0.01%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/accounts/sync.ts 📉 -315 B (-1.40%) 22.04 kB → 21.73 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
index.js 3.83 MB → 3.83 MB (-315 B) -0.01%

Unchanged
No assets were unchanged


cli

Total

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

@actual-github-bot actual-github-bot Bot changed the title Revert "[AI] fix: preserve explicit category on imported transactions" [WIP] Revert "[AI] fix: preserve explicit category on imported transactions" Apr 5, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 5, 2026

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit dd31cc8
🔍 Latest deploy log https://app.netlify.com/projects/actualbudget/deploys/69d269054b49f50008d3f763
😎 Deploy Preview https://deploy-preview-7388.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@youngcw youngcw changed the title [WIP] Revert "[AI] fix: preserve explicit category on imported transactions" Revert "[AI] fix: preserve explicit category on imported transactions" Apr 5, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 5, 2026

📝 Walkthrough

Walkthrough

This change removes the explicit field preservation logic from transaction normalization and the addTransactions function, eliminating code that maintained explicitly provided transaction categories when rules were applied. The corresponding test and release notes documenting this feature are also deleted.

Changes

Cohort / File(s) Summary
Transaction Sync Logic
packages/loot-core/src/server/accounts/sync.ts
Removed explicitFields computation during normalization and reconstruction in addTransactions. The finalTransaction now applies the rule-enriched trans object directly. The cleared field is now derived from trans.cleared with a fallback to true, rather than from an explicit-fields-augmented object.
Test Validation
packages/loot-core/src/server/accounts/sync.test.ts
Deleted test case validating category precedence: that explicitly provided categories are preserved when addTransactions is called, rather than being replaced by rule-derived categories.
Release Documentation
upcoming-release-notes/7185.md
Removed release notes entry documenting the bugfix for preserving explicitly provided transaction categories during rule application.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

size small

Poem

🐰 Explicit fields once held their ground,
But rules now flow without a bound,
What once was saved is set to rest,
Perhaps the cleaner path is best!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: a revert of a previous commit that fixed explicit category preservation on imported transactions.
Linked Issues check ✅ Passed The PR reverts code changes related to explicit field handling during transaction normalization, which may address the cleared-status issue reported in #7302 where Post rules fail to mark transactions as cleared in the Edge build.
Out of Scope Changes check ✅ Passed All changes are directly related to the revert objective: removing explicit field handling in transaction normalization and the associated test case and release notes.
Description check ✅ Passed The pull request description is clearly related to the changeset, explaining that it reverts a previous commit (#7242) to address issue #7302 regarding Post rules not setting transactions as cleared.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-7185-api2062/7171

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 5, 2026
@youngcw youngcw added this to the v26.4.0 milestone Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 5, 2026

🤖 Auto-generated Release Notes

Hey @youngcw! I've automatically created a release notes file based on CodeRabbit's analysis:

Category: Bugfixes
Summary: Remove logic preserving explicit transaction categories during normalization and delete related test cases.
File: upcoming-release-notes/7388.md

If you're happy with this release note, you can add it to your pull request. If not, you'll need to add your own before a maintainer can review your change.

@youngcw youngcw added the unfreeze Unfreeze a PR during the mergefreeze label Apr 5, 2026
@youngcw youngcw added this pull request to the merge queue Apr 5, 2026
Merged via the queue into master with commit 7667923 Apr 5, 2026
39 of 41 checks passed
@youngcw youngcw deleted the revert-7185-api2062/7171 branch April 5, 2026 14:20
matt-fidd pushed a commit that referenced this pull request Apr 5, 2026
#7388)

* Revert "[AI] fix: preserve explicit category on imported transactions (#7185)"

This reverts commit 91e8393.

* Add release notes for PR #7388

* Delete upcoming-release-notes/7388.md

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size small ✨ merged unfreeze Unfreeze a PR during the mergefreeze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Post Rule Does Not Set Transaction as Cleared in Edge Build

3 participants