Analyse page: composition, year comparison and year table; fix year filter loop #5
Loading…
Reference in a new issue
No description provided.
Delete branch "analytics-views"
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?
Summary
Step 3 of the analytics plan: three more views on the Analyse page, plus a fix for a bug in
mainwhere changing the year filter stopped the page from updating.Fix: year filter navigation loop
Choosing a year in "Von" or "Bis" started an endless navigation loop: one click caused about 2,700 navigations in 3 seconds. The page never updated, and because the browser then throttled navigation, the Monat / Quartal / Jahr buttons stopped working too.
Cause:
FluentSelectreports its selected value again on every re-render. The handler compared it with the year on the page, which only changes once a navigation has finished, so every re-render started another navigation to the same URL and cancelled the previous one.Fix:
OnFromChanged/OnToChangedtake over the chosen year immediately, so a repeated report of the same value does nothing. The bug came in with #4.New views
2026*with a footnote.Other changes
chartjs-chart-treemap4.2.2 (MIT, by a Chart.js maintainer), vendored inwwwroot/lib/chartjs-chart-treemapwith its licence and checked against the npm registry checksum. It is loaded only when the treemap is first used.ExpenseAnalysisalso returns the year profiles, the category × year table and the two-level composition.StackedBarChartbecame a genericChartJsChart:Kind= stackedBar / line / treemap, and newDataupdates the chart in place.charts.jshas onecreateChartentry point.Test plan
dotnet build: no warningsdotnet test: 81/81 pass, including 6 newExpenseAnalysisTestShouldtests (year profiles with empty future months, category × year values and same-months change, no previous year, nested composition, single-level composition for an account, negative amounts left out)🤖 Generated with Claude Code