Repository navigation
[AI] Port upstream schedule and rule fixes - #215
Merged
Merged
Conversation
…951) * [AI] fix(schedules): allow auto-posting to run again the same day advanceSchedulesService is throttled to one run per calendar day through the lastScheduleRun pref, so a schedule that starts posting transactions after that run could not post until the next day. Clear the marker whenever such a schedule is created or updated. * [AI] test(schedules): cover the auto-posting marker reset * [AI] chore: add release note * [AI] fix(schedules): type the shared test date condition as const Without the assertion the shared object literal widens op/field to string, so it is not assignable to RuleConditionEntity and typecheck (and every build that runs tsc) fails. * [AI] test(schedules): cover the persisted posts_transaction fallback The existing omitted-field test creates a schedule that does not post transactions, so it only proves the no-reset branch. This one updates a schedule that already posts transactions without repeating the field, which is the case that has to fall back to the stored value before the marker is cleared.
…(#9191) * [AI] Keep a weekend date moved onto today or later as a schedule's next date Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PvVofKtxTWe228iQ8r1xiD * [AI] Use the local day when creating a schedule west of UTC `new Date(currentDay())` parses the day as UTC midnight, which is still the previous day west of UTC, so a past occurrence could become the next date. Parse it as a local date instead. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EogsQHZizXa8kotaRRQXVf --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…transactions (#9288) Co-authored-by: Matt Fiddaman <[email protected]>
…ounts (#9205) * fix: preserve category when making transfer between on/off-budget accounts The batch "Make transfer" action unconditionally cleared the category. Now it only clears when both accounts share the same budget type, matching the server-side clearCategory logic. Fixes #9200 * fix: resolve TS7006 implicit any in account lookup Add explicit type annotations to the accounts.find callbacks. * [autofix.ci] apply automated fixes * Add release note for #9205 --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
…ons (#8792) * [AI] Keep explicitly cleared fields empty when entering new transactions Rules re-run on every field commit while a new transaction is being entered, and they are allowed to fill any empty field. A field the user deliberately cleared (e.g. a category pre-assigned from the payee) was treated as empty too, so the rule immediately re-filled it - either on the clear itself or on a later run triggered by editing another field such as the amount. Track which fields the user explicitly emptied for the lifetime of the new-transaction row (desktop register) or edit screen (mobile), and bar rule runs from re-filling those fields until the row is added or reset. Auto-fill for untouched fields and notes append/prepend rules keep working as before. Fixes the desktop half of #7390; the mobile modal was fixed in #7521. Co-Authored-By: Claude Fable 5 <[email protected]> * [AI] Keep cleared fields blocked during mobile payee rule runs The payee exception in the mobile transaction edit bypassed shouldApplyRuleChange entirely, so selecting a payee could re-fill a field the user had explicitly cleared. Check the cleared-field set before the payee exception, matching the desktop behavior. Addresses CodeRabbit review feedback on #8792. Co-Authored-By: Claude Fable 5 <[email protected]> * [AI] Track cleared fields per transaction row Review feedback on the cleared-fields tracking: the fields were stored by name only, shared across the parent and all split rows, so clearing e.g. the category on one split row stopped rules from filling the category on its siblings too. Track cleared fields in a Map keyed by transaction id on both the desktop register and the mobile transaction edit screen. The rules merge is extracted into a pure applyRulesToTransaction() helper with unit tests covering the split scenarios, and split propagation now skips only rows whose field the user actually cleared instead of inferring a clear from the parent's (always empty) field value. Co-Authored-By: Claude Fable 5 <[email protected]> * [AI] Share split propagation between desktop and mobile rule merges The mobile transaction edit screen kept its own copy of the parent-to-subtransaction propagation step. Extract it into an exported propagateRuleChangeToSubtransactions() helper and call it from both paths so the two cannot drift apart. The mobile payee override is unchanged. Addresses CodeRabbit review feedback on #8792. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: bsmarsh333 <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
…ee or category (#9017)
…(#9238) The SQLite REGEXP function built the pattern with new RegExp() unguarded, so a "matches" rule condition that is still being typed (e.g. "asdf\") made the rule editor preview query throw and show an error. It now returns no match for an invalid pattern, the same as matches conditions evaluated in memory. The web and Electron databases share the helper. Fixes #6317
…(#9154) Co-authored-by: Kristián Valentín <[email protected]>
runRules, getSchedule, aqlQuery and the rule/transaction inserts are synchronous in this fork, so drop the awaits the upstream code and tests used, and keep oxfmt happy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assigning undefined to process.env.TZ stores the string "undefined", which runs every later test in the file in UTC. Co-Authored-By: Claude Opus 5.5 <[email protected]>
chrisvasz
force-pushed
the
claude/port-upstream-schedule-rule-fixes
branch
from
November 29, 2026 02:18
8b779f5 to
809ddeb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports upstream schedule and rule fixes as cherry-picks (upstream authorship kept), plus one commit adapting them to the fork's synchronous reads.
Ported
setNextDatekept synchronous)runRuleskept synchronous)Adapted
TransactionEdithalf is dropped (no mobile in the fork)regexpgoes into the fork's sqlite-wasmindex.tsand better-sqlite3index.api.ts(upstream changedindex.electron.ts); only the regex test was kept from the conflicting test hunksSkipped
schedule-template.ts,category-template-context.ts,goal-template.pegjs) were removed in [AI] Remove the upstream goal template system #111The last commit drops
awaits on calls that are synchronous here (runRules,getSchedule,aqlQuery, rule/transaction inserts) soawait-thenablelint passes.yarn typecheckandyarn lintpass, as do the loot-core schedules, transactions and sqlite (node + web) tests and the desktop-clientapplyRulesToTransaction,table/utils,schedule-actionsandPayeeAutocompletetests.🤖 Generated with Claude Code