Skip to content

Route playback: support reverse traversal#858

Closed
davecraig wants to merge 1 commit intomainfrom
feature/reverse-route
Closed

Route playback: support reverse traversal#858
davecraig wants to merge 1 commit intomainfrom
feature/reverse-route

Conversation

@davecraig
Copy link
Contributor

This is a feature branch for the "Reverse route playback feature" - it makes it easier to access.

Squash PR changes onto latest upstream/main.

Made-with: Cursor
@davecraig
Copy link
Contributor Author

I haven't tested this outside yet, but the previous/next skipping seems to work as expected. The only confusion is that the Route is still described by it's "forward" name i.e. the one it's save under, so the user has to remember that they are playing it in reverse.

However, having traced through the code it seems like the changes are way more invasive than are really required. The UI and plumbing for starting the reverse route is all good, but then RoutePlayer.startRoute just needs to reverse the route that the player will use:

            currentRouteData = if (reverse) {
                RouteWithMarkers(route.route, route.markers.reversed())
            } else {
                route
            }

Then all of the next/previous doesn't have to change anywhere else in the code. We can also change the name of the route there to "ROUTE in reverse" so that anywhere the route name is used will indicate that it's in reverse.

Although the end result is the same, it's much less risky landing the change as the changed code only runs if the new "Start in reverse" code is used. The initial commit would require re-testing on all forward route playback too.

I've got a commit that alters the original commit to do this - just go to figure out how to land it here.

@davecraig davecraig closed this Mar 19, 2026
@davecraig
Copy link
Contributor Author

Landing separately.

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