front: fold deleted origin's arrival time into start time#17373
Merged
Conversation
Akctarus
force-pushed
the
tmn/front/fix-edited-train-after-removing-origin
branch
from
June 24, 2026 15:18
1568fcb to
9a2d88d
Compare
Akctarus
force-pushed
the
tmn/front/fix-edited-train-after-removing-origin
branch
4 times, most recently
from
July 1, 2026 12:24
01361b9 to
6d8fd14
Compare
Akctarus
force-pushed
the
tmn/front/fix-edited-train-after-removing-origin
branch
from
July 15, 2026 12:07
6d8fd14 to
db187e8
Compare
Signez
approved these changes
Jul 15, 2026
Signez
left a comment
Contributor
There was a problem hiding this comment.
LGTM! I have some ideas around the name of that function but it's more a suggestion than anything, feel free to discard.
SharglutDev
approved these changes
Jul 15, 2026
SharglutDev
left a comment
Contributor
There was a problem hiding this comment.
Lgtm and tested ✅
You can close the comment when fixed.
Note
@Signez, you'll have to adapt this code as well for your "drop part 2" feature :)
Signed-off-by: Theo Macron <theo.macron0315@gmail.com>
Signed-off-by: Theo Macron <theo.macron0315@gmail.com>
Akctarus
force-pushed
the
tmn/front/fix-edited-train-after-removing-origin
branch
from
July 15, 2026 14:20
ae55b68 to
c8af259
Compare
Akctarus
enabled auto-merge
July 15, 2026 14:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #17341
The first waypoint of a path can't have an arrival time (the backend rejects it). This typically happens after deleting the origin: the new origin keeps the arrival offset it had as an intermediate waypoint.
To fix that and preserve the schedule, we fold that offset into the train's start time and shift the remaining waypoints arrivals back by the same amount, so every waypoint keeps the same absolute time.
I'm open to any suggestions if you've found a better way to fix this bug