Skip to content

Add RTD Denver transit support - #1

Merged
CJFData merged 1 commit into
CJFData:pico-transitfrom
jbriones95:feature/rtd-denver
Aug 6, 2026
Merged

Add RTD Denver transit support#1
CJFData merged 1 commit into
CJFData:pico-transitfrom
jbriones95:feature/rtd-denver

Conversation

@jbriones95

Copy link
Copy Markdown

Summary

  • Add RTD Denver to the agency picker with static GTFS and GTFS-realtime feeds.
  • Use RTD's current canonical TripUpdate and VehiclePosition endpoints.
  • Resolve relative redirects in static and realtime feed clients while preserving HTTPS-only behavior.
  • Update supported-agency documentation.

Validation

  • Verified the downloaded RTD GTFS archive contains valid agency, routes, trips, stops, stop_times, and calendar data.
  • Verified RTD static and realtime URLs respond successfully.
  • ./gradlew :tool:assembleDebug could not complete because GitHub Maven credentials are unavailable for com.thelightphone.lp3keyboard:ui:0.0.16.,workdir

Copilot AI lite review requested due to automatic review settings August 5, 2026 16:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds RTD Denver as a supported transit agency (static GTFS + GTFS-realtime) and updates the feed clients to correctly resolve relative redirects while maintaining HTTPS-only behavior.

Changes:

  • Add RTD Denver to GtfsAgency with static and realtime feed endpoints.
  • Update GTFS static and GTFS-RT clients to resolve relative redirects (via URI.resolve).
  • Update README documentation to include RTD Denver in the supported agency list.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsRealtime.kt Resolves redirect targets (including relative) for GTFS-RT fetches while enforcing HTTPS-only.
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsIngestor.kt Resolves redirect targets (including relative) for GTFS zip HEAD/GET while enforcing HTTPS-only.
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsAgency.kt Adds RTD Denver static + realtime endpoint URLs to the agency enum.
tool/README.md Documents RTD Denver as a supported agency.
README.md Documents RTD Denver as a supported agency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +186 to +194
/** Resolves absolute and relative redirects while never following a redirect back to plain HTTP. */
private fun secureRealtimeRedirectUrl(currentUrl: String, location: String): String {
val resolved = URI(currentUrl).resolve(location).toString()
return if (resolved.startsWith("http://")) {
"https://" + resolved.removePrefix("http://")
} else {
resolved
}
}
Comment on lines +195 to +203
/** Resolves absolute and relative redirects while never following a redirect back to plain HTTP. */
private fun secureRedirectUrl(currentUrl: String, location: String): String {
val resolved = URI(currentUrl).resolve(location).toString()
return if (resolved.startsWith("http://")) {
"https://" + resolved.removePrefix("http://")
} else {
resolved
}
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hey Jose! Does this change resolve the HTTP:// vs HTTPS:// issues for other agencies aswell? before I merge the change, I'd like to confirm that RIPTA will still work with these changes (HTTP:// Realtime feed)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It did on my end, but you can compile and test on your end to make sure that this is the case for your device as well. Lmk and if it doesn’t work I’ll find a workaround.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

It worked but because the netconfig module bypass isn't removed I think RIPTA is still using that. I have a discussion open on it in the light SDK. just tested denver. Loaded up On here. Left a parentheses in the homescreen that stopped the compile... my bad... but It looks like Denver is working but was a little wonky switching agencies earlier. Thoughts on bustang? it looks like they have a separate feed for it. I can add it as a separate feed. the one structural difference I noticed is direction is in the routes, I'd just need add a check to see if routes contain directions, if not schedules should jump to the stops screen for agencies like Bustang... On another note I need to add an issue for a bug with stop tracking for buses, if it falls back on raw geocodes it may jump ahead if a stop is technically closer. happened to me the other day when I was riding in to providence, passed the stop going into the city and finished the trip while the bus needed to hit a few more stops... working on it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@CJFData Bustang is a good idea, but having to use a different GTFS is problematic. I'll see if I can make the Denver selector pull from both feeds at the same time.

@CJFData CJFData self-assigned this Aug 6, 2026
@CJFData
CJFData merged commit 04c65ab into CJFData:pico-transit Aug 6, 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.

3 participants