[PR #7434] [AI] Add per-schedule custom upcoming length override #14218

Open
opened 2026-04-10 22:16:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7434
Author: @jreniel
Created: 4/9/2026
Status: 🔄 Open

Base: masterHead: feature/per-schedule-upcoming-length


📝 Commits (9)

  • b960223 [AI] Add per-schedule custom upcoming length override
  • c0a7de8 [AI] Add release notes for PR #7434
  • 54e1d67 [AI] Add custom length option to per-schedule upcoming length selector
  • c9b04da [AI] Deduplicate preset values and guard against malformed custom upcoming length
  • a5b91b5 [autofix.ci] apply automated fixes
  • 856667f [AI] Retrigger CI (flaky accounts E2E test)
  • c0d120d [AI] Improve schedule editor layout for upcoming length field
  • 9cd63f4 [AI] Address CodeRabbit review feedback
  • f9d8026 Update VRT screenshots

📊 Changes

14 files changed (+175 additions, -52 deletions)

View changed files

📝 packages/desktop-client/e2e/schedules.mobile.test.ts-snapshots/Mobile-Schedules-clicking-on-a-schedule-opens-edit-form-1-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/schedules.mobile.test.ts-snapshots/Mobile-Schedules-clicking-on-a-schedule-opens-edit-form-2-chromium-linux.png (+0 -0)
📝 packages/desktop-client/e2e/schedules.mobile.test.ts-snapshots/Mobile-Schedules-clicking-on-a-schedule-opens-edit-form-3-chromium-linux.png (+0 -0)
📝 packages/desktop-client/src/components/schedules/ScheduleEditForm.tsx (+141 -44)
📝 packages/desktop-client/src/components/schedules/ScheduleEditModal.tsx (+1 -0)
📝 packages/desktop-client/src/hooks/useScheduleEdit.ts (+8 -0)
📝 packages/desktop-client/src/hooks/useSchedules.ts (+1 -1)
packages/loot-core/migrations/1769000000000_add_custom_upcoming_length.sql (+5 -0)
📝 packages/loot-core/src/server/aql/schema/index.ts (+1 -0)
📝 packages/loot-core/src/server/db/types/index.ts (+2 -0)
📝 packages/loot-core/src/server/schedules/app.ts (+1 -1)
📝 packages/loot-core/src/shared/schedules.ts (+8 -6)
📝 packages/loot-core/src/types/models/schedule.ts (+1 -0)
upcoming-release-notes/7434.md (+6 -0)

📄 Description

Description

Currently, the "upcoming" schedule length is a single global preference (upcomingScheduledTransactionLength) that applies to all schedules. This PR adds a per-schedule custom_upcoming_length field that overrides the global setting when set.

Use case: A user may want their rent to show as "upcoming" 30 days out, but their weekly grocery subscription only 3 days out. Today this isn't possible — it's all-or-nothing.

Changes:

  • New custom_upcoming_length column on the schedules table (nullable, defaults to global behavior)
  • getStatus() and computeSchedulePreviewTransactions() respect per-schedule override
  • Schedule edit form includes an optional "Custom upcoming length" dropdown
  • Fully backward-compatible: NULL means use global preference

N/A — this is a new feature proposal.

Testing

  • Typecheck passes (yarn typecheck)
  • Lint passes (yarn lint:fix)
  • Existing schedule behavior unchanged when custom_upcoming_length is NULL

Checklist

  • Release notes added
  • No obvious regressions in affected areas
  • Self-review has been performed - I understand what each change in the code does and why it is needed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 12.43 MB → 12.43 MB (+6.09 kB) +0.05%
loot-core 1 4.84 MB → 4.84 MB (+75 B) +0.00%
api 1 3.84 MB → 3.84 MB (+74 B) +0.00%
cli 1 7.89 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 12.43 MB → 12.43 MB (+6.09 kB) +0.05%
Changeset
File Δ Size
src/components/schedules/ScheduleEditForm.tsx 📈 +5.8 kB (+27.67%) 20.96 kB → 26.76 kB
src/hooks/useScheduleEdit.ts 📈 +111 B (+1.70%) 6.38 kB → 6.49 kB
src/components/schedules/ScheduleEditModal.tsx 📈 +65 B (+1.21%) 5.26 kB → 5.33 kB
src/hooks/useSchedules.ts 📈 +28 B (+1.14%) 2.41 kB → 2.43 kB
home/runner/work/actual/actual/packages/loot-core/src/shared/schedules.ts 📈 +95 B (+0.87%) 10.72 kB → 10.82 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 3.31 MB → 3.32 MB (+5.97 kB) +0.18%
static/js/useTransactionBatchActions.js 4.33 MB → 4.33 MB (+123 B) +0.00%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/BackgroundImage.js 121.09 kB 0%
static/js/FormulaEditor.js 852.77 kB 0%
static/js/ReportRouter.js 1.17 MB 0%
static/js/TransactionList.js 82.49 kB 0%
static/js/ca.js 191.98 kB 0%
static/js/da.js 104.66 kB 0%
static/js/de.js 174.38 kB 0%
static/js/en-GB.js 8.2 kB 0%
static/js/en.js 175.89 kB 0%
static/js/es.js 181.8 kB 0%
static/js/fr.js 177.08 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 165.87 kB 0%
static/js/narrow.js 363.02 kB 0%
static/js/nb-NO.js 151.85 kB 0%
static/js/nl.js 108.93 kB 0%
static/js/pl.js 88.34 kB 0%
static/js/pt-BR.js 177.44 kB 0%
static/js/resize-observer.js 18.06 kB 0%
static/js/th.js 179.3 kB 0%
static/js/theme.js 30.79 kB 0%
static/js/uk.js 212.6 kB 0%
static/js/wide.js 295 B 0%
static/js/workbox-window.prod.es5.js 7.33 kB 0%
static/js/zh-Hans.js 109.61 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.84 MB → 4.84 MB (+75 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts 📈 +40 B (+0.41%) 9.6 kB → 9.64 kB
home/runner/work/actual/actual/packages/loot-core/src/server/schedules/app.ts 📈 +35 B (+0.29%) 11.92 kB → 11.95 kB
View detailed bundle breakdown

Added

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

Removed

Asset File Size % Changed
kcab.worker.2cr-I6dh.js 4.84 MB → 0 B (-4.84 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.84 MB → 3.84 MB (+74 B) +0.00%
Changeset
File Δ Size
home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts 📈 +39 B (+0.41%) 9.33 kB → 9.36 kB
home/runner/work/actual/actual/packages/loot-core/src/server/schedules/app.ts 📈 +35 B (+0.29%) 11.67 kB → 11.71 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
index.js 3.84 MB → 3.84 MB (+74 B) +0.00%

Smaller
No assets were smaller

Unchanged
No assets were unchanged


cli

Total

Files count Total bundle size % Changed
1 7.89 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.89 MB 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/7434 **Author:** [@jreniel](https://github.com/jreniel) **Created:** 4/9/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `feature/per-schedule-upcoming-length` --- ### 📝 Commits (9) - [`b960223`](https://github.com/actualbudget/actual/commit/b960223bbaa1a15a02f8ee054ab88820a377a936) [AI] Add per-schedule custom upcoming length override - [`c0a7de8`](https://github.com/actualbudget/actual/commit/c0a7de843ce07b273392b4572d83ad21571a263d) [AI] Add release notes for PR #7434 - [`54e1d67`](https://github.com/actualbudget/actual/commit/54e1d6714cde8ab381cdfd5a8734fcdb9476ee38) [AI] Add custom length option to per-schedule upcoming length selector - [`c9b04da`](https://github.com/actualbudget/actual/commit/c9b04da33ae45beda6c3604c75d82cae2a775430) [AI] Deduplicate preset values and guard against malformed custom upcoming length - [`a5b91b5`](https://github.com/actualbudget/actual/commit/a5b91b51cbdac7811c829ae0299bcda41f94f2ba) [autofix.ci] apply automated fixes - [`856667f`](https://github.com/actualbudget/actual/commit/856667f988d955d94d3a61e143fe9801722698c7) [AI] Retrigger CI (flaky accounts E2E test) - [`c0d120d`](https://github.com/actualbudget/actual/commit/c0d120dae4fb332a63f86611e013476d968e4b4e) [AI] Improve schedule editor layout for upcoming length field - [`9cd63f4`](https://github.com/actualbudget/actual/commit/9cd63f4d6218c505ef82a39dcebe7ce7c8d81fa2) [AI] Address CodeRabbit review feedback - [`f9d8026`](https://github.com/actualbudget/actual/commit/f9d8026e027561e2a3de8b1bc7c993cb77fe0dd3) Update VRT screenshots ### 📊 Changes **14 files changed** (+175 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/schedules.mobile.test.ts-snapshots/Mobile-Schedules-clicking-on-a-schedule-opens-edit-form-1-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/schedules.mobile.test.ts-snapshots/Mobile-Schedules-clicking-on-a-schedule-opens-edit-form-2-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/e2e/schedules.mobile.test.ts-snapshots/Mobile-Schedules-clicking-on-a-schedule-opens-edit-form-3-chromium-linux.png` (+0 -0) 📝 `packages/desktop-client/src/components/schedules/ScheduleEditForm.tsx` (+141 -44) 📝 `packages/desktop-client/src/components/schedules/ScheduleEditModal.tsx` (+1 -0) 📝 `packages/desktop-client/src/hooks/useScheduleEdit.ts` (+8 -0) 📝 `packages/desktop-client/src/hooks/useSchedules.ts` (+1 -1) ➕ `packages/loot-core/migrations/1769000000000_add_custom_upcoming_length.sql` (+5 -0) 📝 `packages/loot-core/src/server/aql/schema/index.ts` (+1 -0) 📝 `packages/loot-core/src/server/db/types/index.ts` (+2 -0) 📝 `packages/loot-core/src/server/schedules/app.ts` (+1 -1) 📝 `packages/loot-core/src/shared/schedules.ts` (+8 -6) 📝 `packages/loot-core/src/types/models/schedule.ts` (+1 -0) ➕ `upcoming-release-notes/7434.md` (+6 -0) </details> ### 📄 Description ## Description Currently, the "upcoming" schedule length is a single global preference (`upcomingScheduledTransactionLength`) that applies to all schedules. This PR adds a per-schedule `custom_upcoming_length` field that overrides the global setting when set. **Use case:** A user may want their rent to show as "upcoming" 30 days out, but their weekly grocery subscription only 3 days out. Today this isn't possible — it's all-or-nothing. **Changes:** - New `custom_upcoming_length` column on the `schedules` table (nullable, defaults to global behavior) - `getStatus()` and `computeSchedulePreviewTransactions()` respect per-schedule override - Schedule edit form includes an optional "Custom upcoming length" dropdown - Fully backward-compatible: NULL means use global preference ## Related issue(s) N/A — this is a new feature proposal. ## Testing - Typecheck passes (`yarn typecheck`) - Lint passes (`yarn lint:fix`) - Existing schedule behavior unchanged when `custom_upcoming_length` is NULL ## Checklist - [x] Release notes added - [x] No obvious regressions in affected areas - [x] Self-review has been performed - I understand what each change in the code does and why it is needed <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 12.43 MB → 12.43 MB (+6.09 kB) | +0.05% loot-core | 1 | 4.84 MB → 4.84 MB (+75 B) | +0.00% api | 1 | 3.84 MB → 3.84 MB (+74 B) | +0.00% cli | 1 | 7.89 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 12.43 MB → 12.43 MB (+6.09 kB) | +0.05% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `src/components/schedules/ScheduleEditForm.tsx` | 📈 +5.8 kB (+27.67%) | 20.96 kB → 26.76 kB `src/hooks/useScheduleEdit.ts` | 📈 +111 B (+1.70%) | 6.38 kB → 6.49 kB `src/components/schedules/ScheduleEditModal.tsx` | 📈 +65 B (+1.21%) | 5.26 kB → 5.33 kB `src/hooks/useSchedules.ts` | 📈 +28 B (+1.14%) | 2.41 kB → 2.43 kB `home/runner/work/actual/actual/packages/loot-core/src/shared/schedules.ts` | 📈 +95 B (+0.87%) | 10.72 kB → 10.82 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/index.js | 3.31 MB → 3.32 MB (+5.97 kB) | +0.18% static/js/useTransactionBatchActions.js | 4.33 MB → 4.33 MB (+123 B) | +0.00% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/BackgroundImage.js | 121.09 kB | 0% static/js/FormulaEditor.js | 852.77 kB | 0% static/js/ReportRouter.js | 1.17 MB | 0% static/js/TransactionList.js | 82.49 kB | 0% static/js/ca.js | 191.98 kB | 0% static/js/da.js | 104.66 kB | 0% static/js/de.js | 174.38 kB | 0% static/js/en-GB.js | 8.2 kB | 0% static/js/en.js | 175.89 kB | 0% static/js/es.js | 181.8 kB | 0% static/js/fr.js | 177.08 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.46 kB | 0% static/js/it.js | 165.87 kB | 0% static/js/narrow.js | 363.02 kB | 0% static/js/nb-NO.js | 151.85 kB | 0% static/js/nl.js | 108.93 kB | 0% static/js/pl.js | 88.34 kB | 0% static/js/pt-BR.js | 177.44 kB | 0% static/js/resize-observer.js | 18.06 kB | 0% static/js/th.js | 179.3 kB | 0% static/js/theme.js | 30.79 kB | 0% static/js/uk.js | 212.6 kB | 0% static/js/wide.js | 295 B | 0% static/js/workbox-window.prod.es5.js | 7.33 kB | 0% static/js/zh-Hans.js | 109.61 kB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.84 MB → 4.84 MB (+75 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts` | 📈 +40 B (+0.41%) | 9.6 kB → 9.64 kB `home/runner/work/actual/actual/packages/loot-core/src/server/schedules/app.ts` | 📈 +35 B (+0.29%) | 11.92 kB → 11.95 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CLFO6AaW.js | 0 B → 4.84 MB (+4.84 MB) | - **Removed** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.2cr-I6dh.js | 4.84 MB → 0 B (-4.84 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.84 MB → 3.84 MB (+74 B) | +0.00% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `home/runner/work/actual/actual/packages/loot-core/src/server/aql/schema/index.ts` | 📈 +39 B (+0.41%) | 9.33 kB → 9.36 kB `home/runner/work/actual/actual/packages/loot-core/src/server/schedules/app.ts` | 📈 +35 B (+0.29%) | 11.67 kB → 11.71 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.84 MB → 3.84 MB (+74 B) | +0.00% **Smaller** No assets were smaller **Unchanged** No assets were unchanged </div> </details> --- #### cli **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 7.89 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.89 MB | 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-04-10 22:16:41 -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#14218