Skip to content

chore: proper trims impact calculation#122

Merged
desoindx merged 1 commit intodevelopfrom
fix/trims
Feb 27, 2026
Merged

chore: proper trims impact calculation#122
desoindx merged 1 commit intodevelopfrom
fix/trims

Conversation

@desoindx
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 27, 2026 09:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the calculation of trims impact in the Ecobalyse scoring system by properly retrieving it from the backend API response rather than deriving it through incorrect circular logic.

Changes:

  • Added trimsImpacts field to the Ecobalyse API response type
  • Modified trims calculation to use the value from result.trimsImpacts.ecs directly
  • Updated tests to include the new trimsImpacts field with correct expected values

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/utils/ecobalyse/server-app.js Backend Elm code refactoring to properly expose trims impacts in the API response
src/utils/ecobalyse/api.ts Removed circular trims calculation, now uses result.trimsImpacts.ecs directly from API
src/utils/ecobalyse/api.test.ts Updated test mocks to include trimsImpacts field with correct values
src/types/Ecobalyse.ts Added trimsImpacts field to EcobalyseResponse type definition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@desoindx desoindx merged commit b739186 into develop Feb 27, 2026
4 of 5 checks passed
@desoindx desoindx deleted the fix/trims branch February 27, 2026 09:58
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.

2 participants