fix(budget): categories filter only applies to Budget Health, not Cost Breakdown#578
Conversation
…t Breakdown The categories filter on the budget page was filtering both the Budget Health section and the Cost Breakdown table. Now the Cost Breakdown always receives an empty category set, showing all categories regardless of filter selection. Fixes #577 Co-Authored-By: Claude frontend-developer (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude qa-integration-tester (Haiku) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
steilerDev
left a comment
There was a problem hiding this comment.
[security-engineer]
PR #578 reviewed. Frontend-only bug fix — 2 lines of production code changed:
- Module-level
const emptyCategories = new Set<string | null>()added (stable reference, no user input). selectedCategories={emptyCategories}replacesselectedCategories={selectedCategories}at theCostBreakdownTablecall site.
Security checklist:
- No injection surface — no user input, no API calls, no DOM manipulation
- No new dependencies
- No sensitive data exposure
- No auth/authz changes
- No XSS vectors — the
emptyCategoriesconstant is a typed Set literal;CostBreakdownTablewas already audited (PR #157) - Test additions correctly assert the intentional decoupling of the cost breakdown from the category filter state
No security findings.
steilerDev
left a comment
There was a problem hiding this comment.
[product-architect]
Reviewed the 2-file diff. Clean, minimal fix with correct approach.
Architecture compliance: Pass. No structural changes -- just a prop value swap at the page level.
Technical correctness:
- The module-level
emptyCategoriesconstant is the right pattern: stable reference avoids unnecessary re-renders ofCostBreakdownTable, andsize === 0is already the "show all" semantic in that component (line 606). - No risk of mutation since the Set is never exposed to modifying code.
Test coverage: Two new tests adequately cover the fix -- partial category selection and full clear -- verifying that Budget Health filters while Cost Breakdown remains unaffected.
No wiki updates needed (no API, schema, or architecture changes).
LGTM.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🎉 This PR is included in version 1.13.0-beta.26 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.13.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
emptyCategoriesconstant to avoid re-rendersFixes #577
Test plan
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com