[PR #7807] [CLOSED] Fix issues #3759, #1062, #1957 in loot-core #109669

Closed
opened 2026-06-02 18:37:49 -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: Closed

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


📝 Commits (7)

📊 Changes

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

View changed files

ASSIGNMENT_README.txt (+227 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-3-chromium-linux.png (+0 -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 33 14 MB → 14 MB (+1.66 kB) +0.01%
loot-core 1 5.34 MB → 5.34 MB (+1.83 kB) +0.03%
api 2 3.96 MB → 3.96 MB (+1.78 kB) +0.04%
cli 1 7.97 MB 0%
crdt 1 11.12 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
33 14 MB → 14 MB (+1.66 kB) +0.01%
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
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/Value.js 5.08 MB → 5.08 MB (+1.66 kB) +0.03%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 2.02 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 962.55 kB 0%
static/js/ReportRouter.js 1.25 MB 0%
static/js/ScheduleEditForm.js 146.45 kB 0%
static/js/TransactionEdit.js 86.89 kB 0%
static/js/TransactionList.js 85.81 kB 0%
static/js/bankSyncUtils.js 54.15 kB 0%
static/js/ca.js 187.62 kB 0%
static/js/chart-theme.js 800.08 kB 0%
static/js/client.js 451.37 kB 0%
static/js/da.js 101.17 kB 0%
static/js/de.js 170.27 kB 0%
static/js/en-GB.js 10.01 kB 0%
static/js/en.js 195.88 kB 0%
static/js/es.js 178.71 kB 0%
static/js/extends.js 500.36 kB 0%
static/js/fr.js 178.61 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 165.02 kB 0%
static/js/narrow.js 364.2 kB 0%
static/js/nb-NO.js 148.08 kB 0%
static/js/nl.js 106.24 kB 0%
static/js/pt-BR.js 189.28 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 174.48 kB 0%
static/js/theme.js 31.67 kB 0%
static/js/uk.js 207.45 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%
static/js/zh-Hans.js 117.65 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.34 MB → 5.34 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.09 kB → 21.21 kB
View detailed bundle breakdown

Added

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

Removed

Asset File Size % Changed
kcab.worker.BkJq0HmC.js 5.34 MB → 0 B (-5.34 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.96 MB → 3.96 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.57 kB → 20.69 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.96 MB → 3.96 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 11.12 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 11.12 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:** ❌ Closed **Base:** `master` ← **Head:** `assignment/fix-issues-3759-1062-1957` --- ### 📝 Commits (7) - [`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 - [`a48640a`](https://github.com/actualbudget/actual/commit/a48640acd219ae4c23c6492c80a3ab0a1fb5ec15) Merge branch 'master' into assignment/fix-issues-3759-1062-1957 - [`412ff51`](https://github.com/actualbudget/actual/commit/412ff518995e232475841e316c03e82fc467a98e) [AI] Trigger CI rerun - [`1337588`](https://github.com/actualbudget/actual/commit/1337588e96113a4bdad6c73069d38882f3dc6a4a) [AI] Trigger CI rerun - [`d72c3e1`](https://github.com/actualbudget/actual/commit/d72c3e1e40cb808a85872e31971b0734b7c29074) Update VRT screenshots ### 📊 Changes **12 files changed** (+537 additions, -20 deletions) <details> <summary>View changed files</summary> ➕ `ASSIGNMENT_README.txt` (+227 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-loads-balance-forecast-report-with-monthly-granularity-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/reports.test.ts-snapshots/Reports-balance-forecast-switches-to-daily-granularity-3-chromium-linux.png` (+0 -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 | 33 | 14 MB → 14 MB (+1.66 kB) | +0.01% loot-core | 1 | 5.34 MB → 5.34 MB (+1.83 kB) | +0.03% api | 2 | 3.96 MB → 3.96 MB (+1.78 kB) | +0.04% cli | 1 | 7.97 MB | 0% crdt | 1 | 11.12 kB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 33 | 14 MB → 14 MB (+1.66 kB) | +0.01% <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 </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/Value.js | 5.08 MB → 5.08 MB (+1.66 kB) | +0.03% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/index.js | 2.02 MB | 0% static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 962.55 kB | 0% static/js/ReportRouter.js | 1.25 MB | 0% static/js/ScheduleEditForm.js | 146.45 kB | 0% static/js/TransactionEdit.js | 86.89 kB | 0% static/js/TransactionList.js | 85.81 kB | 0% static/js/bankSyncUtils.js | 54.15 kB | 0% static/js/ca.js | 187.62 kB | 0% static/js/chart-theme.js | 800.08 kB | 0% static/js/client.js | 451.37 kB | 0% static/js/da.js | 101.17 kB | 0% static/js/de.js | 170.27 kB | 0% static/js/en-GB.js | 10.01 kB | 0% static/js/en.js | 195.88 kB | 0% static/js/es.js | 178.71 kB | 0% static/js/extends.js | 500.36 kB | 0% static/js/fr.js | 178.61 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 165.02 kB | 0% static/js/narrow.js | 364.2 kB | 0% static/js/nb-NO.js | 148.08 kB | 0% static/js/nl.js | 106.24 kB | 0% static/js/pt-BR.js | 189.28 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 174.48 kB | 0% static/js/theme.js | 31.67 kB | 0% static/js/uk.js | 207.45 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% static/js/zh-Hans.js | 117.65 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.34 MB → 5.34 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.09 kB → 21.21 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.uH5C38yE.js | 0 B → 5.34 MB (+5.34 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.BkJq0HmC.js | 5.34 MB → 0 B (-5.34 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.96 MB → 3.96 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.57 kB → 20.69 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.96 MB → 3.96 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 | 11.12 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 | 11.12 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-06-02 18:37:49 -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#109669