Transit journeys, journey following, Transitous fallback and rail boards; scrollable sheets
Summary
Transit journeys, journey following, Transitous fallback, rail station boards, and the sheet-scroll fix.
planner (Mezzi)
Da ⇄ A · mode · time chip (from #24)
alternatives: departure–arrival · line badges + change markers · walking · changes · timing confidence
selected timeline: walk → board (stop, code, direction, platform, live/scheduled) → ride (intermediate stops) → alight → … → arrive
primary action: "Cerca percorsi" → "Segui viaggio" (only a selected transit alternative; never walking guidance)
follow screen (native session authoritative)
stages: access walk · waiting · riding · transfer · final walk · arrived
anchored actions: Sono alla fermata / Sono a bordo / Sono sceso / Sono arrivato · Stop
next departure from the GTT board (trip match, else unique schedule match, else "Corsa non confermata")
stop board: "Cerca su Transitous" when GTT realtime is unavailable/unjoinable (disclosure first, replaces source, never merged)
Trasporti: up to 3 pilot rail stations within 3 km (local) → Partenze/Arrivi board via Transitous
sheets: content scrolls (shrinking wrappers, not flex:1); full snap sits under the search bar
Root cause of "transit following never starts": the whole UI RoutePlan was sent to startTransitNavigation; MATO-parsed legs carry keys set to undefined, which expo-modules-core cannot convert inside nested maps, so the bridge rejected the call (ERR_UNEXPECTED) before Kotlin ran. Native payloads are now built explicitly and checked as bridge-safe (src/domain/navigation-payload.ts).
Evidence
- Before: "Segui viaggio" → "Operazione non riuscita (codice ERR_UNEXPECTED)", no
AvoidNav command start-transit.
After: Android 16 emulator, device location OFF:command start-transit → session start mode=transit → service promoted → transit admitted → navigating (location-disabled); Politecnico journey on bus 68 completed with buttons only (walk-complete → board → alight → walk-complete → arrived). - Before: planner/settings sheet content did not scroll (timeline, Salva viaggio, hand-off unreachable). After: planner, settings, stop board and search results scroll on the emulator; full sheet top moved from 472 px to 316 px.
- "Apri in un'altra app" opens Organic Maps (F-Droid build, emulator) on a place page titled "Mole Antonelliana" at 45.068989, 7.693192.
- Native date dialog opens from the time chip; Cancel keeps "Partenza adesso".
bun run verify: typecheck, zero-warning lint, 498 tests (incl. bridge-safety payload tests reproducing the old failure).- Not covered: physical-device GPS, screen-off following, real boarding/transfers in the city.
Merge Danger
Door: two-way
Blast Radius: transit-and-sheets
Planner transit results, the new follow screen, stop/rail boards, and every bottom sheet's layout.
Summary by cubic
Adds transit journey planning and live journey following, fixes transit navigation never starting, and makes bottom-sheet content scrollable.
Transit planner and follow
- Mezzi now shows transit alternatives with line badges, changes, walking and timing confidence; the selected journey traces walk → board → ride → alight → arrive.
- Segui viaggio starts transit following: stages (access walk, waiting, riding, transfer, final walk, arrived) each confirmed by the rider, with boarding matched to the GTT board by trip or scheduled time — a prediction without a known timetable time stays "Corsa non confermata" unless the GTT trip ID joins — plus the road panel's mute control, disabled while no offline voice is ready.
- Starting transit navigation no longer fails with
ERR_UNEXPECTED: native payloads are now built explicitly, omitting absent optional fields and rejecting non-bridge-safe values.
Transitous and sheets
- A GTT stop board without usable realtime offers "Cerca su Transitous" behind a one-time disclosure; Transitous rows are shown separately, never merged with GTT rows. Metro-only stops note that realtime is unavailable.
- Trasporti lists up to three pilot rail stations within 3 km and opens a departures/arrivals board from Transitous.
- Bottom-sheet content now scrolls: wrappers shrink instead of plain
flex: 1, and the full snap sits just under the search bar.
Summary by CodeRabbit
- New Features
- Browse nearby pilot rail stations and view departure or arrival boards through Transitous. GTT stop boards without usable real-time data can also switch to Transitous on request.
- Review transit journey alternatives and timelines, then follow a selected journey with boarding details, progress, and guidance.
- Transitous requests require a privacy disclosure and your explicit action; requests are not made automatically.
- Updates
- Timetable mirror requests are disabled while no mirrors are configured. Schedule updates arrive with app releases.
- Documentation clarifies the distinction between starting road guidance and following a transit journey.