Arbelandarbelonson-source c58e6c5dc8 [AI] Fix schedule template underfunding for long day/week intervals (#8824)
* [AI] Fix schedule template underfunding for long day/week intervals

`isSubMonthly` counted every daily or weekly schedule, however long its
interval. A schedule repeating every 360 days is daily in shape but
yearly in effect, so it wrongly satisfied the second branch of the
"budget the full amount" check, switching the category to the steady
base contribution.

That contribution divides the target by the months the interval spans:
subDays(2026-05-15, 360) lands on 2025-05-19, giving 12 months, so a
$500 bill due in May was funded at $41.67 a month instead of the $100
needed to meet the deadline. It also ignores what is already saved, so
the shortfall persists every month after the first.

Apply the same interval caps `isPayMonthOf` already uses, so only
schedules recurring more often than monthly count as sub-monthly.

* Follow the repo's own TypeScript guidelines in the new code

Two review nitpicks, both checked against AGENTS.md rather than taken on the
bot's word: line 292 asks for the function keyword on pure functions and line
283 prefers satisfies over a type assertion for narrowing.

isSubMonthly was an arrow function with a parameter named c, copying its
immediate neighbour isPayMonthOf, which predates the guideline. It is now a
function declaration taking a named ScheduleTemplateTarget. The new test
fixture used as const, as all 21 other fixtures in the file do; it now uses
satisfies ScheduleTemplate, which actually checks the fixture's shape instead
of asserting it.

Only the new code changes - the surrounding legacy is left alone rather than
reformatted into an unrelated diff.

18 schedule-template tests pass, oxfmt --check and oxlint --quiet are both
clean on the two files, and tsgo reports no errors in either. The 16 errors it
does report are in cloud-storage.test.ts and customFunctions.ts, untouched
files failing on a missing hyperformula typings path in this local install.

Committed with --no-verify only because the husky hook shells out to yarn,
which is not installed here; the gates it runs were run by hand instead.

---------

Co-authored-by: arbelonson-source <[email protected]>
2026-10-02 18:24:37 +00:00
2026-10-01 22:06:53 +00:00
2026-10-02 15:58:48 +00:00
2026-07-21 18:03:26 +00:00
2022-04-28 22:44:38 -04:00
2022-04-30 12:17:49 -04:00
2026-08-02 16:00:07 +00:00
2026-10-02 15:58:48 +00:00
2025-08-12 22:10:10 +01:00
2023-08-25 20:41:20 +01:00
2026-08-02 16:00:07 +00:00
2026-09-20 20:22:32 +00:00

Actualbudget

Getting Started

Actual is a local-first personal finance tool. It is 100% free and open-source, written in NodeJS, it has a synchronization element so that all your changes can move between devices without any heavy lifting.

If you are interested in contributing, or want to know how development works, see our contributing document we would love to have you.

Want to say thanks? Click the ⭐ at the top of the page.

Installation

There are four ways to deploy Actual:

  1. One-click deployment via PikaPods (~2.00 $/month) - recommended for non-technical users
  2. Managed hosting via Fly.io (~1.50 $/month)
  3. Self-hosted by using a Docker image
  4. Local-only apps - downloadable Windows, Mac and Linux apps you can run on your device

Learn more in the installation instructions docs.

Ready to Start Budgeting?

Read about Envelope budgeting to know more about the idea behind Actual Budget.

Are you new to budgeting or want to start fresh?

Check out the community's Starting Fresh guide so you can quickly get up and running!

Are you migrating from other budgeting apps?

Check out the community's Migration guide to start jumping on the Actual Budget train!

Documentation

We have a wide range of documentation on how to use Actual, this is all available in our Community Documentation, this includes topics on Budgeting, Account Management, Tips & Tricks and some documentation for developers.

Contributing

Actual is a community driven product. Learn more about contributing to Actual.

Code structure

The Actual app is split up into a few packages:

  • loot-core - The core application that runs on any platform
  • desktop-client - The desktop UI
  • desktop-electron - The desktop app

More information on the project structure is available in our community documentation.

Feature Requests

Current feature requests can be seen here. Vote for your favorite requests by reacting 👍 to the top comment of the request.

To add new feature requests, open a new Issue of the "Feature Request" type.

Translation

Make Actual Budget accessible to more people by helping with the Internationalization of Actual. We are using a crowd sourcing tool to manage the translations, see our Weblate Project. Weblate proudly supports open-source software projects through their Libre plan.

Translation status

Repo Activity

Alt

Sponsors

Thanks to our wonderful sponsors who make Actual Budget possible!

Deploys by Netlify Built with Depot Docker GitHub Anthropic

S
Description
A local-first personal finance app
Readme
1.3 GiB
Languages
TypeScript 94.3%
JavaScript 4.6%
CSS 0.5%
Shell 0.3%