feat(reports): getCategoryOverTime -> arbre tendances (sidecar id-keyed) + resultats (#264) #268
Closed
maximus
wants to merge 1 commit from
issue-264-overtime-tree into issue-263-generic-tree-builder
pull from: issue-264-overtime-tree
merge into: maximus:issue-263-generic-tree-builder
maximus:main
maximus:issue-291-collapse-docs
maximus:issue-290-categories-unify
maximus:issue-289-budget-collapse
maximus:issue-288-collapse-socle
maximus:fix-database-locked-serialization
maximus:issue-228-v16-guard-convertible-scope
maximus:issue-187-balance-cleanup-post-184-185
maximus:issue-188-webkit-date-picker-7-inputs
maximus:issue-180-postcss-audit-fix
maximus:issue-190-restructure-settings-pages
maximus:issue-161-smoke-scaffold
maximus:issue-171-ci-drop-push-trigger
maximus:issue-169-asset-type-balance-categories
maximus:issue-67-feedback-widget
maximus:issue-97-cartes-page
maximus:issue-96-compare-refactor
maximus:issue-51-compte-maximus-oauth
maximus:issue-46-license-commands-entitlements
maximus:issue-48-gate-auto-updates
maximus:issue-47-license-ui-card
maximus:fix/simpl-resultat-54-argon2id-pin
maximus:fix/simpl-resultat-59-bump-vite
maximus:issue-43-update-picomatch
maximus:fix/simpl-resultat-41-category-time-report-filter
maximus:fix/simpl-resultat-31-dashboard-month-dropdown
maximus:fix/simpl-resultat-29-budget-visual-adjustments
maximus:fix/simpl-resultat-23-dashboard-category-ordering
maximus:fix/simpl-resultat-16-prev-year-budget
maximus:fix/simpl-resultat-19-tooltip-transparency
maximus:fix/simpl-resultat-17-remove-piechart-title
maximus:fix/simpl-resultat-16-budget-previous-year
1 commit
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
19cdad2718 |
feat(reports): getCategoryOverTime -> id-keyed trends tree (sidecar) + tree-based results
Adds an id-keyed hierarchical `tree: OverTimeRow[]` sidecar to getCategoryOverTime, built via the generic buildLeafDrivenTree (#263) as buildOverTimeTree — leaf-driven, income-first, no top-N / no "Other" bucket. The name-keyed pivot (data/categories/colors/types/categoryIds) is left BYTE-IDENTICAL, so the Trends chart and the dashboard render unchanged. computeOverTimeResults now consumes the id-keyed tree LEAVES (never the `is_parent` subtotals) grouped by each leaf's category_id-resolved type, so the section subtotals and the Result-before/net lines are exact: two homonym categories of different types no longer collide, and a non-top-N income or transfer category is no longer lumped into "Other" as an expense. CategoryOverTimeTable renders the tree leaves (every category, id-safe) instead of the top-N pivot; the chart keeps reading the top-N-capped pivot so its stacked series stay bounded. OverTimeRow mirrors CategoryDelta's snake_case hierarchy block (parent_id/is_parent/depth/category_type) so it composes with collapsibleRows / useCollapsibleGroups for the #265 hierarchy work. Tests: rewrote overTimeResults.test.ts onto the tree (homonym regression + leaves-only-not-parents); added buildOverTimeTree suite (nesting, income-first, grand-total invariance, orphan, A->B->A cycle depth guard) and a getCategoryOverTime tree-wiring test proving the pivot stays top-N+Other while the tree carries every category. 720 vitest green, build + tsc green. Resolves #264 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |