Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unrecognized op and preserve invalid state #10472

Closed
wants to merge 1 commit into from

Conversation

achrafmohye
Copy link
Contributor

Closes #10396

@achrafmohye achrafmohye requested a review from a team as a code owner January 21, 2025 09:31
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Jan 21, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 81.93%. Comparing base (eeb8aa2) to head (17e44ae).
Report is 143 commits behind head on dev.

Files with missing lines Patch % Lines
...nt/src/modules/pathfinding/hooks/usePathfinding.ts 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10472      +/-   ##
==========================================
- Coverage   81.93%   81.93%   -0.01%     
==========================================
  Files        1078     1078              
  Lines      107555   107555              
  Branches      733      733              
==========================================
- Hits        88125    88122       -3     
- Misses      19391    19394       +3     
  Partials       39       39              
Flag Coverage Δ
editoast 74.38% <ø> (-0.01%) ⬇️
front 89.42% <0.00%> (ø)
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 88.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RomainValls
Copy link
Contributor

I tried to reproduce the bug, by importing the trainSchedule. When i modify this train, i can see in itinerary that the unrecognized waypoint is marked in red (correct behavior). When I modify this train, and go back to its itinerary tab, I only see an "undefined" with no red and no error message.

@achrafmohye achrafmohye force-pushed the ame/fix-unrecognized-op-points-error branch from 2aa2f09 to 2b527ee Compare February 5, 2025 13:30
@achrafmohye achrafmohye force-pushed the ame/fix-unrecognized-op-points-error branch from 2b527ee to 17e44ae Compare February 10, 2025 13:45
Copy link
Contributor

@RomainValls RomainValls left a comment

Choose a reason for hiding this comment

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

Tested, it works, thanks for the fix 👍

@clarani
Copy link
Contributor

clarani commented Feb 11, 2025

Hum actually, this issue is more complex. It comes from the fact that the pathfinding is launched in setupItinerary, which does not handle the invalid items.
Adding this dependency in the useEffects will break the power restrictions, because the pathfinding will be launched twice: once in the hook useSetupItinerary and once in the usePathfinding hook (which will erase the power restrictions).

The best way to solve this bug would be to refacto the code so the pathfinding is launched only once when editing a train

@achrafmohye
Copy link
Contributor Author

@clarani do you manage to reporduce the bug ?

@clarani
Copy link
Contributor

clarani commented Feb 19, 2025

The original bug must have been solved by #10696, it can't be reproduced now

@clarani clarani closed this Feb 19, 2025
@clarani clarani deleted the ame/fix-unrecognized-op-points-error branch February 19, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:front Work on Standard OSRD Interface modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unrecognized operational points error not displayed anymore
4 participants