Skip to content

fix(services): Use unix time directly from Ride API - #126

Open
grantlh1122 wants to merge 5 commits into
devfrom
grant-2
Open

grantlh1122 wants to merge 5 commits into
devfrom
grant-2

Conversation

@grantlh1122

@grantlh1122 grantlh1122 commented Oct 26, 2026 •

Copy link
Copy Markdown

Description

Originally the service for getting Ride predictions would estimate the unix time based on the predicted minutes until arrival field. This changes the function to use the unix timestamp from the Ride API instead.

Type of Change

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

Changed Files

  • graphBuilder.ts
    • Changed to use the Ride API estimation when processing Ride predictions.

Related Issues

Subissue of bus notifications tracking issue #33

Does your code rely on another PR

N/A

Testing Done

Flutter:

  • Tested on:
    • iOS Simulator
    • Android Emulator
    • Physical device
      Vitest:
  • existing test(s) with coverage: 'should get unix timestamp from ride bus api'
  • new tests added: (describe)

Screenshots / Demo (if UI or notification change)

image image

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, dev)
  • No print() / debugPrint() / console.log() left in production code
  • Secrets / keys not committed

@jumpy-cat jumpy-cat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good. Just one small note: the existing test with coverage is actually should have cached preds in a good state. That test had the ride fields commented out for some reason so I've pushed a commit that uncomments them.

This branch has not been deployed

No deployments
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.

use the arrival timestamp for the ride instead of guessing based off of the prediction in minutes

2 participants