feat(balance): chart vehicle/class toggle + collapsible returns #208
No reviewers
Labels
No labels
autopilot:pending-human
source:analyste
source:defenseur
source:human
source:medic
status:approved
status:blocked
status:in-progress
status:needs-clarification
status:needs-fix
status:ready
status:review
status:triage
type:bug
type:feature
type:infra
type:refactor
type:schema
type:security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: maximus/Simpl-Resultat#208
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-204-chart-vehicle-toggle-collapsible-returns"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #204
Issue 3 of
overnight-2026-06-01-bilan-axe-vehicule. Tracking/reporting UI on top of the merged data layer (#202) + input UI (#203).What
getSnapshotTotalsByVehicleAndDate(range)mirrors the by-category aggregation withGROUP BY COALESCE(a.vehicle_type, none)— null-envelope accounts collapse into a singlenonebucket, never a SQL NULL key.vehicle_typeadded togetAccountsLatestSnapshotSELECT +AccountLatestSnapshottype.useBalanceOverviewnewgroupAxis(class|vehicle) state ORTHOGONAL tochartMode; loadsbyVehiclealongsidebyCategory. DefaultgroupAxis = class.BalanceEvolutionChart+BalancePage): stacked-mode sub-toggle « Par classe dactif » (default) / « Par enveloppe ». Vehicle legend REUSES the #203vehicleType.*labels; thenonebucket uses the newbalance.vehicle.none.BalanceAccountsTable): the 4 Modified-Dietz columns are collapsed by default, toggle persisted across sessions viauserPreferenceServicekeybalance_show_returns(load on mount, write on toggle). Returns computation is gated so a collapsed table never runs Modified Dietz.balance.chart.axis.{byAssetClass,byVehicle},balance.vehicle.none,balance.accountsTable.toggleReturns.{show,hide}(+balance.chart.axisLegendaria-label). Parity verified.Tests
npm run build(tsc + vite): green, 0 type errors.npm test(vitest): 3314 passed / 201 files.vehicle_typethreaded.Reviewer focus
none-bucket COALESCE ingetSnapshotTotalsByVehicleAndDate(HIGH caveat).groupAxiskept independent ofchartMode(MEDIUM caveat) — sub-toggle only renders in stacked mode.BalanceAccountsTablediff is large mostly from re-indentation under the new toggle wrapper div.🤖 Generated with Claude Code
Review — APPROVE ✅
Revue indépendante (orchestrateur
/sprint), diff vérifié sur la branche.Vérifications
getSnapshotTotalsByVehicleAndDate:COALESCE(a.vehicle_type,'none')présent dans le SELECT et le GROUP BY → bucket'none'unique pour les comptes sans enveloppe, jamais une clé SQL NULL. Mirror fidèle degetSnapshotTotalsByCategoryAndDate. Tests service (shape SQL + mixed-envelope + all-none).groupAxisorthogonal àchartMode: état indépendant dansuseBalanceOverview, n'affecte que le mode empilé, défaut'class'. Charge byCategory ET byVehicle en parallèle.getAccountsLatestSnapshot:vehicle_typeajouté au SELECT + au type.stacked, boutons classe(défaut)/enveloppe avecaria-pressed; le chart sélectionne byVehicle vs byCategory + activeLabels selon l'axe.showReturnsdéfautfalse, persisté viauserPreferenceService(balance_show_returns), togglearia-expanded; le calcul Modified-Dietz est gated derrièreshowReturns(perf, neutre — ces valeurs ne servent qu'aux 4 colonnes masquées).balance.vehicle.*ne contient quenone; les 6 enveloppes réutilisentbalance.account.form.vehicleType.*. i18n parité 6/6 (FR/EN).npm run build+vitestverts.Déviation acceptée :
balance.chart.axisLegendajouté (aria-label du groupe de toggle, miroir demodeLegend).Verdict : APPROVE.