Expand RTD support and restore RIPTA realtime feeds - #3
Open
jbriones95 wants to merge 3 commits into
Open
Conversation
- Merge Bustang GTFS into RTD Denver as an additional static feed, with per-feed ID namespacing (feed1:) to prevent key collisions. - Rework GtfsIngestor to build a temp database and atomically move it into place, avoiding deleting an in-use database (SQLiteReadOnlyDatabaseException). - Use ZipFile instead of ZipInputStream for reliable entry reads. - Serialize ingestion with a mutex and cancel the previous ingest job when switching agencies. - Store feed URLs in feed_meta.txt so a changed URL forces a refresh. - Support directionless routes (nullable directionId) end-to-end and auto-skip direction selection when a route has no directions. - Disable RIPTA realtime (HTTP-only feeds) and remove the :netconfig cleartext exception module.
There was a problem hiding this comment.
Pull request overview
This PR expands the transit tool’s GTFS ingestion and browsing capabilities by supporting multi-feed static GTFS ingestion (RTD Denver + Bustang) with ID namespacing, improving ingestion reliability during agency switching, enabling schedule browsing for routes without direction_id, and restoring RIPTA realtime support via a narrowly scoped cleartext networking exception.
Changes:
- Add multi-feed static ingestion for RTD Denver (including Bustang) with per-feed ID namespacing and improved ingestion reliability (temp DB + atomic replace, ZipFile streaming, serialized ingests).
- Allow nullable
direction_idthrough stop/departure selection flows and auto-advance directionless routes. - Restore RIPTA realtime feed URLs and reintroduce
:netconfigfor a host-scoped cleartext exception; update docs accordingly.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tool/src/main/kotlin/com/thelightphone/transit/HomeScreen.kt | Cancels stale ingest jobs on agency switch and prevents older ingests from overwriting newer UI state. |
| tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsRepository.kt | Allows nullable direction_id queries for stops/departures to support directionless routes. |
| tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsIngestor.kt | Adds serialized ingestion, multi-feed loading with ID prefixes, ZipFile-based parsing, and temp DB replacement. |
| tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsAgency.kt | Adds RTD additional static feed URL(s) and updates RIPTA realtime documentation/fields. |
| tool/src/main/kotlin/com/thelightphone/transit/FirstStopSelectionScreen.kt | Propagates nullable directionId into stop selection flow. |
| tool/src/main/kotlin/com/thelightphone/transit/DirectionSelectionScreen.kt | Auto-advances directionless routes directly to stop selection. |
| tool/src/main/kotlin/com/thelightphone/transit/DepartureListScreen.kt | Propagates nullable directionId into departure listing flow. |
| tool/README.md | Updates user-facing notes about RIPTA HTTP-only realtime with scoped exception. |
| tool/build.gradle.kts | Documents the RIPTA cleartext exception dependency on :netconfig. |
| settings.gradle.kts | Adds mavenLocal() to dependency resolution repositories. |
| README.md | Updates top-level documentation about RIPTA HTTP-only realtime with scoped exception. |
| netconfig/src/main/res/xml/network_security_config.xml | Restricts cleartext allowance to realtime.ripta.com and updates module comments. |
| netconfig/src/main/AndroidManifest.xml | Supplies networkSecurityConfig via manifest merge for the tool app. |
| netconfig/build.gradle.kts | Simplifies module header commentary while preserving purpose. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
19
to
24
| dependencyResolutionManagement { | ||
| repositories { | ||
| mavenLocal() | ||
| google() | ||
| mavenCentral() | ||
| maven { |
Comment on lines
+106
to
+110
| LaunchedEffect(state) { | ||
| if (state is DirectionSelectionState.Loaded && (state as DirectionSelectionState.Loaded).directions.isEmpty()) { | ||
| navigateTo(screenFactory = { activity -> | ||
| FirstStopSelectionScreen(activity, dbFile, routeId, routeLabel, null, "Route") | ||
| }) |
Author
There was a problem hiding this comment.
I'll investigate and fix this.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This replaces closed PR #2 and includes all transit changes since the last accepted RTD PR (#1), plus restored RIPTA live realtime support.
Changes since PR #1
RTD and Bustang
Ingestion reliability
ZipFilestreams to avoidZipInputStreamEOF/corruption failures.Schedule browsing
direction_id, including Bustang.RIPTA live data
:netconfigmodule with a narrowly scoped cleartext exception forrealtime.ripta.comonly.Validation
:netconfig:assembleDebugsucceeds.git diff --checkpasses.com.thelightphone.lp3keyboard:ui:0.0.16.,workdir