Add Pico Transit: MBTA/RIPTA schedule + realtime tool - #133
Closed
CJFData wants to merge 15 commits into
Closed
Conversation
Adds a full transit tool on top of the Light SDK scaffold: - GTFS static ingestion (SQLite) with agency picker for MBTA/RIPTA - Explore Schedules: line type -> route -> direction -> stop -> departures -> trip detail, with tap-to-connect to other routes at any stop - Leave Now: geocoded/IP-approximated location search -> nearest stops -> live upcoming arrivals (GTFS-RT TripUpdates) with On Time/Late/Early status - ETA radar screen: live/scheduled bus positions and nearby stops plotted by true bearing/distance around the selected stop, with proximity clustering to avoid stacked icons - :netconfig module granting a narrowly-scoped cleartext exception for RIPTA's HTTP-only realtime feeds (see its build.gradle.kts for details and removal steps) - Renamed the scaffold's com.thelightphone.sample package to com.thelightphone.transit and updated lighttool.toml's id/label - Added tool/README.md with build/run/sideload instructions Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014sF9rJBmDSbG6LQKf2ua2h
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014sF9rJBmDSbG6LQKf2ua2h
Updated the app name from 'Transit' to 'Pico Transit' in README.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014sF9rJBmDSbG6LQKf2ua2h
- Map screen: dark CARTO tiles, density-based zoom-to-fit, mode-specific vehicle emojis, tap-to-reveal nearby stop labels, per-stop live vehicle cap, optional "Nearby Vehicles" toggle for secondary stops, edge-anchored compass, solid top scrim, and a custom touch handler so edge-swipe-back keeps working alongside marker taps. - Deduplicate GTFS stations via parent_station (shared by Map markers and stop search) instead of a stop_name heuristic, resolving to real child stop_id(s) for schedule lookups. - Add a back button (LightTopBar) to every screen but Home, including a Canvas-overlay treatment for the Map screen. - Add a Settings screen for picking a default agency (DataStore-backed), auto-selected on launch, with conditional GTFS re-download via HEAD/ETag/Last-Modified so a fresh feed isn't always re-fetched. - Rename the app display label to "Pico Transit". - Strip "via ..." clauses from direction labels and label live ETAs explicitly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014sF9rJBmDSbG6LQKf2ua2h
…scaffold screen - Replace the stale "ETA Radar" description with what the Map screen actually does now (tap-to-reveal nearby stops, mode-specific vehicle emojis, live vehicles at true position, the Nearby Vehicles toggle). - Document the Settings/default-agency feature, which wasn't mentioned anywhere. - Make the root README consistently say "Pico Transit" instead of "Transit" in its body. - Remove DetailScreen.kt, an unused SDK-scaffold leftover that's never instantiated anywhere in the app. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014sF9rJBmDSbG6LQKf2ua2h
…ehicle, dark map option - Choose Stop (Explore Schedules) now sorts by real distance to you, matching the distance already shown per row, instead of route/stop_sequence order. - Connections now also lists the next 3 departures at any stop within 100 feet of the current one (route, direction, distance, time), skipping any route+direction already offered at the current stop. - Trip Detail shows a live mode emoji next to whichever stop the trip's vehicle is currently at or closest to, polling VehiclePositions every 10s. Derives the agency from the db file path (GtfsAgency.forDbFile) rather than threading it through every screen between here and where it was selected. - Map screen switched to CARTO's brighter Voyager tiles by default for street legibility, with all text drawn directly on the map (compass, center label, bus markers) given the same white-fill/black-outline treatment already used for nearby-stop labels, so it stays legible over both styles. - Added a Settings option to pick Dark Matter over Voyager instead, persisted the same way as the default agency. Also switched Settings to LightScrollView so a growing settings list doesn't run off the bottom of the screen (found while testing this addition). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014sF9rJBmDSbG6LQKf2ua2h
LICENSE-TRANSIT already existed (added in the first Transit commit) but was never linked to from anywhere, so nothing made clear it separately covers tool/ under its own copyright rather than the root LICENSE. Also add Christian Ferreira's full name alongside the CJFData handle. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014sF9rJBmDSbG6LQKf2ua2h
Updated the phrasing from 'when's my bus' to 'where's my bus' for clarity.
- Replace emoji markers with SDK LightIcons for stops/vehicles, fix the
back button being drawn over by unclipped Canvas content, tighten the
fit-to-bounds zoom range, and shrink the top scrim now that it only
needs to cover the attribution line.
- Fix tapped-stop and vehicle labels clipping at the screen edge by
flipping to the opposite side of their icon when needed (shared
resolveLabelSide helper), and stop them overlapping their own icon.
- Shorten vehicle trip descriptions to "<route> - Toward <destination>"
now that the mode icon replaces the old text prefix; same icon now
replaces the "Bus -" prefix on Upcoming Arrivals.
- Tint solid marker/vehicle/toggle icons black when Light map tiles are
selected, so they stay legible against bright tiles.
- Add a Settings toggle ("Tap and hold a stop") that lets long-pressing
any stop marker on the Map screen jump straight to its Upcoming
Arrivals, off by default.
- Rename the Upcoming Arrivals "Map" link to show the stop name instead,
relabel the stop-name line "Selected stop", and enlarge the map icon.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pull_request_target grants privileged repo secrets/token access to workflows triggered by fork PRs -- a guardrail GitHub blocks by default for exactly that reason (the "pwn request" risk). This repo is solo-maintained and isn't accepting outside fork contributions, so that privileged-access trigger was never actually needed here; the standard pull_request event checks out and runs against PR code just as well without it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…verhaul - Board/alight a trip from Trip Detail; HomeScreen shows live route, ETA, and stops remaining, plus an optional progress bar, while boarded - "You've reached your stop" detection now also runs from HomeScreen, not just Trip Detail, via a shared checkReachedAlightStop - Every screen gets a "Current Trip" header shortcut and a "Home" footer button that pops back to HomeScreen however many screens deep - Warn (delete-icon indicator) when boarding a different trip would end tracking of the one already in progress - Fix Map screen vehicle clutter: a station's platforms now share one display allotment instead of each platform getting its own - Move "Track Tapped Stops" into Settings; unify every Settings toggle on the SDK's toggle-state icons instead of a two-row On/Off list - Station-aware Connections screen (unions all platforms, not just one) - New About screen: full icon/mode legend, boarding behavior, attribution - Fix two crash-prone unguarded DB queries (UpcomingArrivals, StopConnections) surfaced by rapid back-navigation - Drop dead ScheduleLocationScreen; update both READMEs to match Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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
Adds Pico Transit, a full transit-companion example tool built on the SDK (
tool/) for MBTA and RIPTA:parent_station(shared between Map markers and stop search), resolving to real childstop_ids for schedule lookupsLightTopBarback navigation on every screen but HomeTest plan
:tool:compileDebugKotlin— builds clean:tool:testDebugUnitTest— 4/4 passing (GTFS station-dedup logic, verified against real MBTA data):tool:assembleDebug— builds a working debug APK🤖 Generated with Claude Code
https://claude.ai/code/session_014sF9rJBmDSbG6LQKf2ua2h