front: include can_backtrack to stdcm pathfinding calls - #18114
front: include can_backtrack to stdcm pathfinding calls#18114RomainValls wants to merge 4 commits into
Conversation
Signed-off-by: Angelina Kuntz <angelina.kuntz@epita.fr>
|
17825c8 to
ed098da
Compare
Signed-off-by: Angelina Kuntz <angelina.kuntz@epita.fr>
Erashin
left a comment
There was a problem hiding this comment.
LGTM! Looked at both front and editoast (but I don't touch the front-end very often, so I might've missed something).
| const dateTimeLocale = useDateTimeLocale(); | ||
| const osrdconf = useSelector(getStdcmConf); | ||
| const infraId = useSelector(getStdcmInfraID); | ||
| const canBacktrackEnabled = useSelector(getFeatureFlag('stdcmBacktrack')); |
There was a problem hiding this comment.
nit: backtrackEnabled to be coherent with useStaticPathfinding.ts
| dateTimeLocale: Intl.Locale, | ||
| osrdconf: OsrdStdcmConfState | ||
| osrdconf: OsrdStdcmConfState, | ||
| canBacktrackEnabled: boolean |
There was a problem hiding this comment.
nit: same, backtrackEnabled to be coherent with rest of the code.
| 'effort_curves' | 'loading_gauge' | 'max_speed' | 'length' | 'supported_signaling_systems' | ||
| >; | ||
| pathSteps: (PathItemLocation | null)[]; | ||
| canBacktrack?: boolean[]; |
There was a problem hiding this comment.
Don't have the time to dig too much into it, but it seems weird that canBacktrack can be None here, might be nice to check it out.
There was a problem hiding this comment.
It is probably because we use only the first commit of the PR for the api, I did some fixup since
|
Can the PR title be updated to describe what this PR does? |
flomonster
left a comment
There was a problem hiding this comment.
Reviewed editoast and docker compose.
Tested that the can_backtrack value sent to editoast takes into account the feature flag.
| rolling_stock_supported_signaling_systems: BTreeSet<String>, | ||
| /// List of waypoints given to the pathfinding | ||
| path_items: Vec<PathItemLocation>, | ||
| path_items: Vec<PathfindingItem>, |
There was a problem hiding this comment.
Nit: PathfindingItem should be moved to this module. Since it makes more sense to have it here than stdcm.
| can_backtrack: pathfinding_input | ||
| .path_items | ||
| .get(index) | ||
| .map(|item| item.can_backtrack) | ||
| .unwrap_or(false), |
There was a problem hiding this comment.
| can_backtrack: pathfinding_input | |
| .path_items | |
| .get(index) | |
| .map(|item| item.can_backtrack) | |
| .unwrap_or(false), | |
| can_backtrack: pathfinding_input.path_items[index].can_backtrack, |
closes #18028
closes #18029
only the front commit and this editoast commit is to be reviewed
this PR will be rebased once this PR will be merged
To test the backtracking you should
Enable STDCM Backtrackingflag in the users settingsYou can test the backtracking in LMR with this example :
St-Louis-les-Aygalades -> Miramas -> Fos
With the via being a stop (service stop or driver switch)