Skip to content

refactor(service): use parsed bus route lines instead of raw patterns; feat(api): serve these parsed lines - #74

Open
jumpy-cat wants to merge 9 commits into
pattern-schema-and-sum-type-journeyfrom
parsed-bus-route-lines
Open

refactor(service): use parsed bus route lines instead of raw patterns; feat(api): serve these parsed lines#74
jumpy-cat wants to merge 9 commits into
pattern-schema-and-sum-type-journeyfrom
parsed-bus-route-lines

Conversation

@jumpy-cat

@jumpy-cat jumpy-cat commented Aug 16, 2026

Copy link
Copy Markdown
Member

Description

Move the majority of bus route line processing into the backend so that more information in available during journey planning. Old routes kept for backwards compatibility. Add regression tests for the summer bug and something else that was enccountered.

Type of Change

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

Related Issues

Part of the backend side for mbusdev/bluebus-flutter#98

Changes Made

  • Flutter: n/a
  • Backend (TypeScript):
    • new api/v4/ router for backwards incompatible changes
      • contains new getAllMbusRoutes and getAllRideRoutes
    • Patterns are now being processed into BusRouteLines similar to those used in the frontend (but missing a few fields)
    • existing usages of routes / ride routes refactored to use processed bus route lines, also reduced the amount of nesting using flatten/flatMap
    • new test file: tries detours and routes of differing lengths to recreate the previous bug, confirms that detours & routes are both correclty passed through
    • renamed from bustimeTypes to bustimeCommon because it also contains logic now
  • Firebase / Shared: n/a

Testing Done

Flutter:

  • Tested on:
    • iOS Simulator
    • Android Emulator (checked if routes still show up, see the corresponding FE issue)
    • 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 force-pushed the parsed-bus-route-lines branch from ed2969b to a902a4a Compare August 16, 2026 01:57
@jumpy-cat
jumpy-cat changed the base branch from docu/mostly-feature-complete to pattern-schema-and-sum-type-journey August 16, 2026 02:09
@jumpy-cat
jumpy-cat force-pushed the parsed-bus-route-lines branch from a902a4a to 21f64fc Compare August 16, 2026 02:14
@jumpy-cat jumpy-cat changed the title parsed bus route lines refactor(service): use parsed bus route lines instead of raw patterns; feat(api): serve these parsed lines Aug 16, 2026
@jumpy-cat
jumpy-cat marked this pull request as ready for review August 16, 2026 02:38
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