[PR #7807] [WIP] Fix issues #3759, #1062, #1957 in loot-core #69720

Open
opened 2026-05-14 04:37:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7807
Author: @Sean220557
Created: 5/12/2026
Status: 🔄 Open

Base: masterHead: assignment/fix-issues-3759-1062-1957


📝 Commits (3)

📊 Changes

6 files changed (+537 additions, -20 deletions)

View changed files

ASSIGNMENT_README.txt (+227 -0)
📝 packages/loot-core/src/server/transactions/transaction-rules.test.ts (+66 -0)
📝 packages/loot-core/src/server/transactions/transaction-rules.ts (+19 -8)
📝 packages/loot-core/src/shared/schedules.test.ts (+110 -0)
📝 packages/loot-core/src/shared/schedules.ts (+109 -12)
upcoming-release-notes/7807.md (+6 -0)

📄 Description

Fixes #3759
Fixes #1062
Fixes #1957

See ASSIGNMENT_README.txt at repo root for a detailed breakdown of each fix.

What changed

  • loot-core rules: skip auto-generating an is-rule when an existing oneOf-rule already covers the payee with the same category.
  • loot-core schedules (recur): monthly recurrences starting on day 29/30/31 now fall back to the last day of the month for months that don't have that day.
  • loot-core schedules (hasTransactions): lower-bound for the "already paid this cycle" query is now derived from the schedule's frequency × interval, so transactions posted ahead of the due date are still counted.

Tests
Added 10 new unit tests across:

yarn typecheck is clean. All existing tests still pass.


Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 34 → 33 13.99 MB → 13.91 MB (-81.43 kB) -0.57%
loot-core 1 5.28 MB → 5.28 MB (+1.83 kB) +0.03%
api 2 3.9 MB → 3.9 MB (+1.78 kB) +0.04%
cli 1 7.97 MB 0%
crdt 1 43.41 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
34 → 33 13.99 MB → 13.91 MB (-81.43 kB) -0.57%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/schedules.ts 📈 +1.66 kB (+14.64%) 11.33 kB → 12.98 kB
locale/en.json 📈 +5 kB (+2.70%) 185.11 kB → 190.1 kB
locale/uk.json 📉 -120 B (-0.06%) 207.75 kB → 207.63 kB
locale/nb-NO.json 📉 -86 B (-0.06%) 148.31 kB → 148.23 kB
locale/pt-BR.json 📉 -137 B (-0.07%) 189.58 kB → 189.45 kB
locale/es.json 📉 -139 B (-0.08%) 179 kB → 178.87 kB
locale/de.json 📉 -137 B (-0.08%) 170.55 kB → 170.42 kB
locale/ca.json 📉 -151 B (-0.08%) 187.91 kB → 187.76 kB
locale/it.json 📉 -133 B (-0.08%) 165.3 kB → 165.17 kB
locale/fr.json 📉 -144 B (-0.08%) 178.9 kB → 178.76 kB
locale/nl.json 📉 -88 B (-0.08%) 106.47 kB → 106.39 kB
locale/th.json 📉 -146 B (-0.08%) 174.76 kB → 174.62 kB
locale/zh-Hans.json 📉 -118 B (-0.10%) 117.91 kB → 117.79 kB
locale/da.json 📉 -102 B (-0.10%) 101.38 kB → 101.28 kB
src/languages.ts 📉 -99 B (-6.17%) 1.57 kB → 1.47 kB
locale/pl.json 🔥 -86.52 kB (-100%) 86.52 kB → 0 B
View detailed bundle breakdown

Added
No assets were added

Removed

Asset File Size % Changed
static/js/pl.js 86.52 kB → 0 B (-86.52 kB) -100%

Bigger

Asset File Size % Changed
static/js/en.js 185.11 kB → 190.1 kB (+5 kB) +2.70%
static/js/Value.js 4.96 MB → 4.96 MB (+1.66 kB) +0.03%

Smaller

Asset File Size % Changed
static/js/ca.js 187.91 kB → 187.76 kB (-151 B) -0.08%
static/js/th.js 174.76 kB → 174.62 kB (-146 B) -0.08%
static/js/fr.js 178.9 kB → 178.76 kB (-144 B) -0.08%
static/js/es.js 179 kB → 178.87 kB (-139 B) -0.08%
static/js/de.js 170.55 kB → 170.42 kB (-137 B) -0.08%
static/js/pt-BR.js 189.58 kB → 189.45 kB (-137 B) -0.07%
static/js/it.js 165.3 kB → 165.17 kB (-133 B) -0.08%
static/js/uk.js 207.75 kB → 207.63 kB (-120 B) -0.06%
static/js/zh-Hans.js 117.91 kB → 117.79 kB (-118 B) -0.10%
static/js/da.js 101.38 kB → 101.28 kB (-102 B) -0.10%
static/js/extends.js 519.39 kB → 519.29 kB (-99 B) -0.02%
static/js/nl.js 106.47 kB → 106.39 kB (-88 B) -0.08%
static/js/nb-NO.js 148.31 kB → 148.23 kB (-86 B) -0.06%

Unchanged

Asset File Size % Changed
static/js/index.js 1.96 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/ReportRouter.js 1.22 MB 0%
static/js/ScheduleEditForm.js 146.45 kB 0%
static/js/TransactionEdit.js 190.4 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/bankSyncUtils.js 54.15 kB 0%
static/js/chart-theme.js 800.08 kB 0%
static/js/client.js 451.37 kB 0%
static/js/en-GB.js 8.2 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/narrow.js 364.22 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/theme.js 31.67 kB 0%
static/js/useFormatList.js 4.96 kB 0%
static/js/wide.js 453 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.28 MB → 5.28 MB (+1.83 kB) +0.03%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/schedules.ts 📈 +1.71 kB (+31.73%) 5.39 kB → 7.1 kB
home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts 📈 +127 B (+0.59%) 21.03 kB → 21.16 kB
View detailed bundle breakdown

Added

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

Removed

Asset File Size % Changed
kcab.worker.B9JGPKKy.js 5.28 MB → 0 B (-5.28 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
2 3.9 MB → 3.9 MB (+1.78 kB) +0.04%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/shared/schedules.ts 📈 +1.66 kB (+31.51%) 5.26 kB → 6.92 kB
home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts 📈 +124 B (+0.59%) 20.52 kB → 20.64 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.9 MB → 3.9 MB (+1.78 kB) +0.04%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
models.js 0 B 0%

cli

Total

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

crdt

Total

Files count Total bundle size % Changed
1 43.41 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 43.41 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/7807 **Author:** [@Sean220557](https://github.com/Sean220557) **Created:** 5/12/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `assignment/fix-issues-3759-1062-1957` --- ### 📝 Commits (3) - [`b2e3663`](https://github.com/actualbudget/actual/commit/b2e3663b11dff3459651cc7fe9b952f522a066ed) [AI] Fix issues #3759, #1062, #1957 in loot-core - [`c2d0b91`](https://github.com/actualbudget/actual/commit/c2d0b918a30fdf37462b7492f400dfc5abaf7309) [autofix.ci] apply automated fixes - [`784e138`](https://github.com/actualbudget/actual/commit/784e1386facfc89544de1548af86eb483c93e265) [AI] Add release note for #3759/#1062/#1957 ### 📊 Changes **6 files changed** (+537 additions, -20 deletions) <details> <summary>View changed files</summary> ➕ `ASSIGNMENT_README.txt` (+227 -0) 📝 `packages/loot-core/src/server/transactions/transaction-rules.test.ts` (+66 -0) 📝 `packages/loot-core/src/server/transactions/transaction-rules.ts` (+19 -8) 📝 `packages/loot-core/src/shared/schedules.test.ts` (+110 -0) 📝 `packages/loot-core/src/shared/schedules.ts` (+109 -12) ➕ `upcoming-release-notes/7807.md` (+6 -0) </details> ### 📄 Description Fixes #3759 Fixes #1062 Fixes #1957 See ASSIGNMENT_README.txt at repo root for a detailed breakdown of each fix. What changed - loot-core rules: skip auto-generating an `is`-rule when an existing `oneOf`-rule already covers the payee with the same category. - loot-core schedules (recur): monthly recurrences starting on day 29/30/31 now fall back to the last day of the month for months that don't have that day. - loot-core schedules (hasTransactions): lower-bound for the "already paid this cycle" query is now derived from the schedule's frequency × interval, so transactions posted ahead of the due date are still counted. Tests Added 10 new unit tests across: - [transaction-rules.test.ts](cci:7://file:///d:/%E5%8D%B7%E9%A5%BC%E5%B1%8B/%E5%A4%A7%E4%B8%89%E4%B8%8B/SE/A1/actual/packages/loot-core/src/server/transactions/transaction-rules.test.ts:0:0-0:0) (2) - [shared/schedules.test.ts](cci:7://file:///d:/%E5%8D%B7%E9%A5%BC%E5%B1%8B/%E5%A4%A7%E4%B8%89%E4%B8%8B/SE/A1/actual/packages/loot-core/src/shared/schedules.test.ts:0:0-0:0) (8) `yarn typecheck` is clean. All existing tests still pass. <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 34 → 33 | 13.99 MB → 13.91 MB (-81.43 kB) | -0.57% loot-core | 1 | 5.28 MB → 5.28 MB (+1.83 kB) | +0.03% api | 2 | 3.9 MB → 3.9 MB (+1.78 kB) | +0.04% cli | 1 | 7.97 MB | 0% crdt | 1 | 43.41 kB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 34 → 33 | 13.99 MB → 13.91 MB (-81.43 kB) | -0.57% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/schedules.ts` | 📈 +1.66 kB (+14.64%) | 11.33 kB → 12.98 kB `locale/en.json` | 📈 +5 kB (+2.70%) | 185.11 kB → 190.1 kB `locale/uk.json` | 📉 -120 B (-0.06%) | 207.75 kB → 207.63 kB `locale/nb-NO.json` | 📉 -86 B (-0.06%) | 148.31 kB → 148.23 kB `locale/pt-BR.json` | 📉 -137 B (-0.07%) | 189.58 kB → 189.45 kB `locale/es.json` | 📉 -139 B (-0.08%) | 179 kB → 178.87 kB `locale/de.json` | 📉 -137 B (-0.08%) | 170.55 kB → 170.42 kB `locale/ca.json` | 📉 -151 B (-0.08%) | 187.91 kB → 187.76 kB `locale/it.json` | 📉 -133 B (-0.08%) | 165.3 kB → 165.17 kB `locale/fr.json` | 📉 -144 B (-0.08%) | 178.9 kB → 178.76 kB `locale/nl.json` | 📉 -88 B (-0.08%) | 106.47 kB → 106.39 kB `locale/th.json` | 📉 -146 B (-0.08%) | 174.76 kB → 174.62 kB `locale/zh-Hans.json` | 📉 -118 B (-0.10%) | 117.91 kB → 117.79 kB `locale/da.json` | 📉 -102 B (-0.10%) | 101.38 kB → 101.28 kB `src/languages.ts` | 📉 -99 B (-6.17%) | 1.57 kB → 1.47 kB `locale/pl.json` | 🔥 -86.52 kB (-100%) | 86.52 kB → 0 B </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** Asset | File Size | % Changed ----- | --------- | --------- static/js/pl.js | 86.52 kB → 0 B (-86.52 kB) | -100% **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/en.js | 185.11 kB → 190.1 kB (+5 kB) | +2.70% static/js/Value.js | 4.96 MB → 4.96 MB (+1.66 kB) | +0.03% **Smaller** Asset | File Size | % Changed ----- | --------- | --------- static/js/ca.js | 187.91 kB → 187.76 kB (-151 B) | -0.08% static/js/th.js | 174.76 kB → 174.62 kB (-146 B) | -0.08% static/js/fr.js | 178.9 kB → 178.76 kB (-144 B) | -0.08% static/js/es.js | 179 kB → 178.87 kB (-139 B) | -0.08% static/js/de.js | 170.55 kB → 170.42 kB (-137 B) | -0.08% static/js/pt-BR.js | 189.58 kB → 189.45 kB (-137 B) | -0.07% static/js/it.js | 165.3 kB → 165.17 kB (-133 B) | -0.08% static/js/uk.js | 207.75 kB → 207.63 kB (-120 B) | -0.06% static/js/zh-Hans.js | 117.91 kB → 117.79 kB (-118 B) | -0.10% static/js/da.js | 101.38 kB → 101.28 kB (-102 B) | -0.10% static/js/extends.js | 519.39 kB → 519.29 kB (-99 B) | -0.02% static/js/nl.js | 106.47 kB → 106.39 kB (-88 B) | -0.08% static/js/nb-NO.js | 148.31 kB → 148.23 kB (-86 B) | -0.06% **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 1.96 MB | 0% static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 962.55 kB | 0% static/js/ReportRouter.js | 1.22 MB | 0% static/js/ScheduleEditForm.js | 146.45 kB | 0% static/js/TransactionEdit.js | 190.4 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/bankSyncUtils.js | 54.15 kB | 0% static/js/chart-theme.js | 800.08 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/en-GB.js | 8.2 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/narrow.js | 364.22 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/theme.js | 31.67 kB | 0% static/js/useFormatList.js | 4.96 kB | 0% static/js/wide.js | 453 B | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.28 MB → 5.28 MB (+1.83 kB) | +0.03% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/schedules.ts` | 📈 +1.71 kB (+31.73%) | 5.39 kB → 7.1 kB `home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts` | 📈 +127 B (+0.59%) | 21.03 kB → 21.16 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.BIxiHjnS.js | 0 B → 5.28 MB (+5.28 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.B9JGPKKy.js | 5.28 MB → 0 B (-5.28 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 ----------- | ----------------- | --------- 2 | 3.9 MB → 3.9 MB (+1.78 kB) | +0.04% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/shared/schedules.ts` | 📈 +1.66 kB (+31.51%) | 5.26 kB → 6.92 kB `home/runner/work/actual/actual/packages/loot-core/src/server/transactions/transaction-rules.ts` | 📈 +124 B (+0.59%) | 20.52 kB → 20.64 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.9 MB → 3.9 MB (+1.78 kB) | +0.04% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- models.js | 0 B | 0% </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.97 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.97 MB | 0% </div> </details> --- #### crdt **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 43.41 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 | 43.41 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-14 04:37:37 -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#69720