Repository navigation
Conversation
…mize-busyness-card-jod034
[MA-753] live updating busyness card
[MA-751] Optimize student cards silkfiy
|
Need ONE_BUS_AWAY_API_KEY in .env file to test |
[MA-755] Dining card search silkfiy
|
@klortiz13 added to our password tool |
- Read OneBusAway configuration from the app's .env file - Coordinate overlapping startup fetches and reuse cached stop data - Retry HTTP 429 responses with Retry-After support and bounded backoff - Clear stale errors after successful refreshes - Avoid duplicate arrival requests for selected closest stops - Safely sort immutable service results - Keep successful stops visible when another stop's arrivals fail - Display empty arrival responses without a generic card error - Allow card height and text to adapt to screen width and text scaling - Fix spacing around unavailable-arrivals messages - Show "Arriving Now" instead of "Arriving in: 0 minutes" - Restore readable, working Reload and Hide menu options - Improve JSON logging and sanitized API/parsing error messages - Add service, provider, layout, arrival text, and menu regression tests
|
Fixed a lot of issues. To mention some, the data was not being parsed correctly, the frontend was not rendering the data, it was making unecessary calls to the API, and when I fixed all of the above, I got data overflows, and some of the error messages were not following our UI standards (alignment and spacing). |
Normalize selected stops, share catalog and per-stop arrival work, decouple location updates, and carry arrival errors in per-stop results.
|
Changed the base back to experimental to trigger builds. This PR is now stable. The AI got this task 40-50% to completion. I had to intervene to get it to 100%. I am assuming heavy tasks like this one (where migration is involved) are not suitable for an automated AI system. |
|
TODO: Need to add the one bus away .env variables to code magic for the builds to work. |
Summary
Migrates the Transit screen's shuttle data feed from the legacy campus shuttle API (per-stop endpoint map with OAuth2 bearer tokens and 401-token-retry) to the OneBusAway REST API (Jira MA-685).
OneBusAwayClient(lib/core/services/one_bus_away_client.dart): reads the API endpoint and key from theONE_BUS_AWAY_API/ONE_BUS_AWAY_API_KEYenvironment variables (with a--dart-definefallback for device builds). Values are never hardcoded, committed, or logged; all exceptions are sanitized so key-bearing request URLs cannot leak into logs or the UI.GET /api/where/stops-for-agency/UCSD.json(one call returns all 69 campus shuttle stops, including off-campus Grocery-Convoy stops); arrivals fromGET /api/where/arrivals-and-departures-for-stop/{stopId}.json, both with envelope validation.ShuttleStopModel/ArrivingShuttleshapes — provider and Transit UI files needed zero changes.Testing
flutter analyze --no-pub --no-fatal-warnings --no-fatal-infos(exact CI invocation): clean (exit 0; remaining repo infos/warnings are pre-existing baseline in untouched files)flutter test --no-pub: 58/58 passed, including 36 new tests covering the client (mocked dio HTTP adapter, no live API), OBA response mapping, and service behaviorNotes for reviewers
--dart-define=ONE_BUS_AWAY_API=.../ONE_BUS_AWAY_API_KEY=...fallback path (values still never committed). If the team prefers a different injection channel (e.g. credential store → build pipeline), that can be layered on top.Refs: MA-685
Implemented by an AI agent session (opencode, model api-glm-5.3) in a Coder pilot workspace; commit carries the
Generated by opencode (AI)attribution trailer. Agent commits locally; push + PR opened by the orchestrator (a6wu).