Skip to content

feat: modify /plan-journey so it returns bus polylines - #47

Draft
jumpy-cat wants to merge 2 commits into
parsed-bus-route-linesfrom
nav/plan-journey-bus-polylines
Draft

feat: modify /plan-journey so it returns bus polylines#47
jumpy-cat wants to merge 2 commits into
parsed-bus-route-linesfrom
nav/plan-journey-bus-polylines

Conversation

@jumpy-cat

@jumpy-cat jumpy-cat commented Jul 25, 2026

Copy link
Copy Markdown
Member

Description

Add detailed info about the path that will be taken on bus legs to make it easier for the frontend.

Type of Change

  • New feature (feat)
  • Bug fix (fix)
  • Refactor / code improvement
  • Dependency / build update
  • Documentation
  • Other (explain)

Related Issues

Backend Side of mbusdev/bluebus-flutter#98

Changes Made

  • Flutter: n/a
  • Backend (TypeScript):
    • getBusLegPolyline contains the core logic of the new feature
    • getpredictions -> processPredictions -> (various usages) refactored to add type safety. Was trying to confirm if StopTime needed rt to be optional, turns out it does since the virtual origin/dest trips don't have a route
      • refactored graphBuilder to clean up now unneeded checks and anys
      • zod schema validation done (more strict than needed, might loosen if bustimes misbehave)
    • filled out the z.any() being used for the response body schema of plan-journey
      • redid the processed leg types with zod
      • see ProcessedJourneySchema
    • consolidated LatLon type being duplicated across a few places
    • new part of transit state: stop to stop paths
      • stores a valid polyline for going from a stop to its immediate neighbors (given a route)
      • populated by buildStopToStopPaths
      • this required the Key type I made for reminders, which I refactored into the toplevel types.ts file
      • made imports from bustimeCommon follow the import * as alias pattern
  • Firebase / Shared: n/a

Testing Done

Flutter:

  • Tested on:
    • iOS Simulator
    • Android Emulator
    • Physical device

Screenshots / Demo (if UI or notification change)

Checklist

  • Commit messages follow Conventional Commits
  • PR title follows [type](scope): short description
  • PR target branch is not main and is our current working update branch (e.g. maizebus2.1)
  • No print() / debugPrint() / console.log() left in production code
  • Secrets / keys not committed

@jumpy-cat jumpy-cat changed the title feat: modify /plan-journey so it returns bus polylines, uses documented feat: modify /plan-journey so it returns bus polylines, /getAllRoutes & /getAllRideRoutes to return processed data Jul 25, 2026
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch 2 times, most recently from 032b194 to e5f4055 Compare July 25, 2026 21:44
@jumpy-cat jumpy-cat changed the title feat: modify /plan-journey so it returns bus polylines, /getAllRoutes & /getAllRideRoutes to return processed data feat: modify /getAllRoutes & /getAllRideRoutes to return processed data Jul 26, 2026
@jumpy-cat jumpy-cat changed the title feat: modify /getAllRoutes & /getAllRideRoutes to return processed data feat: modify /plan-journey so it returns bus polylines, /getAllRoutes & /getAllRideRoutes to return processed data Jul 26, 2026
@jumpy-cat
jumpy-cat changed the base branch from dev to http-api-docs August 1, 2026 22:45
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch from 209f9dc to 1f94be3 Compare August 2, 2026 02:01
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch 2 times, most recently from 7da68ce to 213fb48 Compare August 2, 2026 19:50
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch from 213fb48 to 1e2959d Compare August 2, 2026 19:55
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch from 1e2959d to 980fb37 Compare August 2, 2026 20:09
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch 2 times, most recently from 65a1191 to bdd1deb Compare August 13, 2026 23:11
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch 3 times, most recently from 394e8a9 to 06c534b Compare August 15, 2026 23:26
@jumpy-cat
jumpy-cat changed the base branch from http-api-docs to docu/mostly-feature-complete August 15, 2026 23:26
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch from 06c534b to 70dc4f9 Compare August 16, 2026 00:04
@jumpy-cat
jumpy-cat changed the base branch from docu/mostly-feature-complete to parsed-bus-route-lines August 16, 2026 01:56
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch from 70dc4f9 to 688d0b3 Compare August 16, 2026 01:57
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch from 688d0b3 to cb135c7 Compare August 16, 2026 02:14
@jumpy-cat
jumpy-cat force-pushed the nav/plan-journey-bus-polylines branch from cb135c7 to 0941657 Compare August 16, 2026 02:38
@jumpy-cat jumpy-cat changed the title feat: modify /plan-journey so it returns bus polylines, /getAllRoutes & /getAllRideRoutes to return processed data feat: modify /plan-journey so it returns bus polylines Aug 16, 2026
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.

1 participant