Repository navigation
Description
Status: done
Size: M
Part of #3286.
Systems: route-planning, routing
TL;DR
Goal: No client asks for alternative routes and the route server computes none.
Problem: "Route options" lists alternative routes. It adds a link, a list, lines on the map and a second elevation view. The corridor alternative exists only for a route with two points, so trips almost never get it. The owner wants it removed everywhere.
Decision: Delete the feature in the web planner, the iOS app, the router, the service and the spec. The answer stays {"routes": [...]} with exactly one route, so the web planner can deploy before the route service. The service keeps no code for old clients, because the project has no released app.
Contracts: specs/route-api.md, specs/vectors/route-answer.json
Plan
- Web, whole files: delete
builder/web/src/lib/planner/route-options.ts,route-options.test.ts,builder/web/src/components/planner/CompareList.svelteandCompareProfile.svelte. builder/web/src/components/planner/PlannerApp.svelte: delete the statelistand each line that resets it, the "Route options" link (.list-links), its header and lead text (.list-head,.list-lead),optionRows,optionsReason,optionStatus,useOptionRow,comparison, thecompareprop of the map and theCompareProfilebranch of the drawer. The side panel then always shows the day list or the route list.builder/web/src/components/planner/PlannerMap.svelte: delete thecompareprop, its line layers and its letter marks.builder/web/src/lib/planner/plan-session.svelte.ts: deleteoptions,compared,findAlternatives,previewOptionand the function that applies an option.builder/web/src/lib/planner/routing.ts: deleterequestAlternatives, thealternativesfield of the request body,RoutingLine.primaryandvia.builder/web/src/lib/planner/route-legs.ts: deleteLegCache.add.route-answer.ts: stop readingreasonandvia.- Router: delete
planner/router/src/alternatives.rs. That file holdsRouter::routes, which goes with it. Inplanner/router/src/router.rsdeleteRequest.alternatives,Request.alternatives_only,Route.reason,Route.via, the structResponse, the fieldprimaryand the methodRouter::primary;Router::routestays the one entry point and computes the route itself.answer::answerinanswer.rstakes one&Routeand writes{"routes": [route]}.planner/service/src/lib.rscallsrouter.route. Updatelib.rs,shape.rs,search.rs,examples/query.rsandplanner/service/tests/http.rsto match. planner/router-build/tests/routing.rs: delete the tests of alternatives and the deleted struct fields.- Spec: in
specs/route-api.mddelete the request rowsalternativesandalternatives_only, the answer rowsreasonandvia, and the sentences about alternatives. The answer text becomes: "The answer is{"routes": [...]}. It holds one route."specs/vectors/route-answer.jsonkeeps one route; updatespecs/vectors/README.md. - READMEs: delete the lines about alternatives in
planner/router/README.md,planner/service/README.mdandplanner/router-build/README.md. - iOS: delete
companion-ios/Packages/OBCKit/Sources/OBCUI/PlannerPreview/PlannerRouteOptions.swift,PlannerRouteOptionsPanel.swiftandcompanion-ios/Packages/OBCKit/Tests/OBCUITests/PlannerRouteOptionsTests.swift. InPlannerPreviewView.swiftdelete the panel case.optionsand the "Route options" row. InPlannerPreviewModel.swiftandPlannerPreviewMap.swiftdelete the option state and the.optionline. InOBCPlanner/PlannerService.swiftdeleteRouteOption, the alternatives request and thealternativesparameter.LocalFirstPlanner.swiftandRouteAnswer.swift(fieldsreason,via) follow. - Tests: remove the alternatives cases from
plan-session.test.ts,routing.test.ts,PlannerApp.svelte.test.ts,builder/web/tests/browser/planner/stubs.jsandcompanion-ios/Packages/OBCKit/Tests/OBCPlannerTests/PlannerServiceTests.swift.
Stays: the presets (riding-profiles.ts), the less-climbing profiles, signed routes, saved versions and "Compare versions" (CompareScreen.svelte), townName.
Deployment order: the web planner, then a new iOS build, then the route service. The iOS app sends alternatives: false on every route request and the service rejects unknown fields. So every route request of an iOS build from before this change fails against the new service.
Done when
obc test -p planner-router -p planner-service -p planner-router-buildobc exec cargo clippy -p planner-router -p planner-service -p planner-router-build --all-targets -- -D warnings- From
builder/web:npx vitest run src/lib/planner/ src/components/planner/andnpm run check grep -ri "alternative" builder/web/src/lib/planner builder/web/src/components/planner planner/router planner/service specs/route-api.mdfinds nothing about route alternatives.- CI builds and tests the iOS package. iOS cannot be compiled on the Linux build machine.
Activity
Merge pull request #3313 from timohueser/claude/planner-ux-3287-delet…
timohueser commentedon Nov 10, 2026
Merged into
planner-uxwith #3313.