Repository navigation
[AI] Fix budget templates with a priority not allocating funds in tracking budgets - #8549
Conversation
…cking budgets Tracking budgets never define a `to-budget` sheet cell (only envelope budgets do), so the priority-tier engine always saw $0 available and clamped every priority>0 template to 0. Seed the pool from `total-saved` instead when in tracking mode, since it's the structural analog (budgeted income minus budgeted expenses) and preserves genuine priority-tier competition rather than disabling the clamp outright. Fixes #8422
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughChangesTracking budget template priority
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/loot-core/src/server/budget/goal-template.test.ts (1)
488-528: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse descriptive category fixture names.
Rename
cat1/cat2andcats/cto domain names such asgroceriesCategory,rentCategory, andcategoriesto keep the multi-category allocation scenario readable. As per coding guidelines, use descriptive variable names with auxiliary verbs where applicable.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/loot-core/src/server/budget/goal-template.test.ts` around lines 488 - 528, Rename the category fixtures and related parameters in setupAqlMultiCategory to descriptive domain names: use groceriesCategory and rentCategory instead of cat1 and cat2, categories instead of cats, and a descriptive name such as category instead of c in callbacks. Update all references consistently without changing the test behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/loot-core/src/server/budget/goal-template.test.ts`:
- Around line 488-528: Rename the category fixtures and related parameters in
setupAqlMultiCategory to descriptive domain names: use groceriesCategory and
rentCategory instead of cat1 and cat2, categories instead of cats, and a
descriptive name such as category instead of c in callbacks. Update all
references consistently without changing the test behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3ae68da0-04eb-453f-bd2a-35a3d88e5d04
📒 Files selected for processing (3)
packages/loot-core/src/server/budget/goal-template.test.tspackages/loot-core/src/server/budget/goal-template.tsupcoming-release-notes/fix-tracking-budget-template-priority.md
…cking budgets (actualbudget#8549) * [AI] Fix budget templates with a priority not allocating funds in tracking budgets Tracking budgets never define a `to-budget` sheet cell (only envelope budgets do), so the priority-tier engine always saw $0 available and clamped every priority>0 template to 0. Seed the pool from `total-saved` instead when in tracking mode, since it's the structural analog (budgeted income minus budgeted expenses) and preserves genuine priority-tier competition rather than disabling the clamp outright. Fixes actualbudget#8422 * Trigger Build * Trigger Build * Trigger Build
Description
Fix issue where the template code would see a 0 available funds value, thus making templates with priorities not budget anything.
Claude wrote the test
Related issue(s)
Fixes #8422
Testing
Checklist
Bundle Stats
View detailed bundle stats
desktop-client
Total
Changeset
src/components/transactions/TransactionList.tsxsrc/components/transactions/TransactionsTable.tsxsrc/components/accounts/Account.tsxsrc/components/accounts/Header.tsxView detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
Unchanged
loot-core
Total
Changeset
home/runner/work/actual/actual/packages/loot-core/src/server/budget/goal-template.tsView detailed bundle breakdown
Added
Removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged
No assets were unchanged
api
Total
Changeset
home/runner/work/actual/actual/packages/loot-core/src/server/budget/goal-template.tsView detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
Smaller
No assets were smaller
Unchanged
cli
Total
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
crdt
Total
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