Do not count hidden categories in tracking budgets + cleanup table math - #4567
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged No assets were unchanged |
|
Working for everything except income categories. Hiding/unhiding those is broken |
|
/update-vrt |
|
Looks like I broke the envelope budget math |
Do not count hidden categories in tracking budgetsDo not count hidden categories in tracking budgets
|
""" WalkthroughThe changes involve significant modifications to the budget management system across multiple files. In Assessment against linked issues
Suggested labels
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (6)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@youngcw I moved the new logic to |
Do not count hidden categories in tracking budgets|
Yes those last 2 are already happening but untested afaik. I will open a PR against your branch @lelemm |
Add tests for handling hidden categories and groups in budget totals
|
@youngcw added the tests here |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/loot-core/src/server/budget/base.test.ts (1)
68-339: Consider adding tests for the reverse visibility change.The current tests verify behavior when changing from hidden to visible, but don't test the opposite - when categories or groups change from visible to hidden. Adding these tests would provide more complete coverage.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/loot-core/src/server/budget/base.test.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Visual regression
- GitHub Check: Functional
🔇 Additional comments (4)
packages/loot-core/src/server/budget/base.test.ts (4)
68-142: Well-structured test for hidden categories in Report Budget!This test effectively verifies that hidden categories are excluded from group totals in Report Budget, and that toggling visibility correctly updates the totals. This aligns with the PR objective to exclude hidden categories from budget totals.
144-229: Good coverage of hidden category groups behavior in Report Budget.This test properly verifies that hidden category groups are excluded from total budget calculations in the Report Budget type. The test clearly demonstrates the toggling behavior, showing that previously hidden amounts are included when made visible.
231-281: Good test for Rollover Budget hidden categories behavior.This test effectively confirms that in Rollover Budget, hidden categories are still included in group totals, contrasting with the Report Budget behavior. This distinction is key to the PR objectives.
283-339: Comprehensive test for hidden groups in Rollover Budget.The test properly verifies that hidden category groups remain included in budget totals for Rollover Budget type, maintaining the expected behavior distinction between budget types.
|
@lelemm if you think this is ready then we can call it good and merge it |
This changes the budget table calculations to exclude hidden categories from totals. To test, hide and unhide categories and groups and compare the group and budget totals.
This also changes the summation for balance and spending to include all amounts that month regardless of a category balance being carried forward. The balance will still carry to the next month for now.
fixes #4116
resolves #2400