Skip to content

029 co2 savings dashboard - #81

Merged
aligneddev merged 5 commits into
mainfrom
029-co2-savings-dashboard
Aug 27, 2026
Merged

029 co2 savings dashboard#81
aligneddev merged 5 commits into
mainfrom
029-co2-savings-dashboard

Conversation

@aligneddev

Copy link
Copy Markdown
Owner

No description provided.

aligneddev and others added 5 commits August 27, 2026 13:44
Add calculateCo2Saved pure function and Co2PerMileLbs constant to the
F# domain calculations, wire the new Co2Saved and Co2SavedPerMileLbs
fields through the API contracts and GetAdvancedDashboardService, and
surface the CO2 savings in the frontend SavingsWindowsTable and
advanced dashboard page (types, column, per-mile caption).

Includes backend unit tests (AdvancedDashboardCalculationsTests,
GetAdvancedDashboardServiceTests), frontend unit tests
(SavingsWindowsTable, advanced-dashboard-page), and extended e2e
coverage in savings-calculation.spec.ts, following TDD.

Completes tasks T001-T023 in specs/029-co2-savings-dashboard/tasks.md.
Co2SavedPerMileLbs had a redundant '= 0.90m' default value in
AdvancedDashboardContracts.cs, duplicating the single source of truth
(AdvancedDashboardCalculations.Co2PerMileLbs). If the emission factor
were ever changed there, this default would silently go stale. Made
the parameter required (moved before the optional DifficultySection
parameter to satisfy C# ordering rules) so callers must always supply
it explicitly from the F# constant.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aligneddev
aligneddev merged commit 1a061d7 into main Aug 27, 2026
7 checks passed
@aligneddev
aligneddev deleted the 029-co2-savings-dashboard branch August 27, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant