osrd icon indicating copy to clipboard operation
osrd copied to clipboard

front: match PathStep and SuggestedOP with pathStepId

Open emersion opened this issue 1 year ago • 1 comments

Last episode: https://github.com/OpenRailAssociation/osrd/pull/9967

Matching via uic/trigram/ch/etc is unreliable because:

  • Two OPs can have the same trigram/ch.
  • The same OP could appear multiple times at different spots in a path.

Moreover, we had multiple variants of the matching with slight differences. Some of the matching logic got adjusted to account for specific bugs, while others were left alone.

Each path step can be identified with a unique ID stored in PathStep.id. Use that instead.

(The refactoring has been split into small digestible commits to ease bisecting and make it more obvious why type and test adjustments are necessary.)

emersion avatar Dec 10 '24 11:12 emersion

Fyi : https://github.com/OpenRailAssociation/osrd/pull/10334#discussion_r1920020968

SharglutDev avatar Jan 20 '25 13:01 SharglutDev