Skip to content

feat(planner): /planner journey planner (walk + transit) - #486

Open
valeboth wants to merge 1 commit into
n3ary:mainfrom
valeboth:feat/planner-prototype
Open

feat(planner): /planner journey planner (walk + transit)#486
valeboth wants to merge 1 commit into
n3ary:mainfrom
valeboth:feat/planner-prototype

Conversation

@valeboth

@valeboth valeboth commented Aug 14, 2026

Copy link
Copy Markdown

Fills the reserved /planner route with a walk + transit (bus / trolleybus / tram) journey planner. Routing runs client-side (RAPTOR) over the feed's SQLite in the GTFS worker — no backend, works offline, feed-agnostic.

What's in it

  • src/lib/domain/raptor.ts — pure, framework-free RAPTOR engine (pattern preprocessing + rounds + reconstruction) with unit tests (raptor.test.ts, 10 cases).
  • src/lib/workers/gtfs/plannerNetwork.ts — lazy, feed-scoped RAPTOR graph built from SQLite (patterns, footpaths, shapes); cleared on feed switch next to shapeCache.
  • src/lib/workers/gtfs/queries/planner.ts + planJourney on GtfsRepo — access/egress via getStopsNear, active services via activeServicesOn, hydrates legs with names/coords/route/mode; transit legs carry real shapes.txt geometry.
  • src/routes/planner/ — Leaflet map (same OSM tiles as the route map), offline stop search + tap-to-set + GPS origin, day/time controls, itinerary cards, shareable deep links (?from&to&t&d).
  • Nav entry wired in src/routes/+layout.svelte.

Scope / safety

  • Additive: station boards, live pipeline, and reconcile are untouched — "next bus at a stop" behaves exactly as before.
  • Deferred: live-time overlay (needs the station-board per-stop recompute) and street-level walking + address/POI geocoding (Faza C — hosting decision).

Verification

  • Isolated strict tsc on the pure/glue .ts files passes; RAPTOR unit tests pass (10/10).
  • Full npm run check && npm test && npm run build was not run in the authoring environment (private @n3ary/gtfs-spec needs NPM_TOKEN) — CI validates the rest; the .svelte page wasn't run through svelte-check locally.

docs/plan/planner.md is included as a review aid — per the issue/plan lifecycle it should be distilled into a spec and deleted before merge.

@valeboth
valeboth force-pushed the feat/planner-prototype branch 2 times, most recently from 6d457b9 to 93b5c35 Compare August 15, 2026 09:35
Fills the reserved /planner route with a walk + transit (bus/trolley/tram)
journey planner. Client-side RAPTOR over the feed's SQLite - no backend,
works offline; feed-agnostic.

- domain/raptor.ts: pure RAPTOR engine (patterns + footpaths + rounds +
  reconstruction) with unit tests.
- workers/gtfs/plannerNetwork.ts: lazy, feed-scoped RAPTOR graph built from
  SQLite (patterns, footpaths, shapes); cleared on feed switch.
- workers/gtfs/queries/planner.ts + planJourney on GtfsRepo: access/egress
  via getStopsNear, active services via activeServicesOn, hydrate legs with
  names/coords/route/mode; transit legs carry real shapes.txt geometry.
- routes/planner: Leaflet map, stop search + tap-to-set + GPS origin,
  day/time controls, itinerary cards, shareable deep links.

Additive only: station boards / live pipeline / reconcile untouched.

Deferred: live times (needs station-board per-stop recompute) and
street-level walking + address/POI geocoding (Faza C, hosting decision).

Note: full `npm run check && npm test && npm run build` not run in the
authoring env (private @n3ary/gtfs-spec needs NPM_TOKEN). Isolated strict
tsc + RAPTOR unit tests pass; CI / local run validates the rest.
@valeboth
valeboth force-pushed the feat/planner-prototype branch from 93b5c35 to c5c01a5 Compare August 15, 2026 09:37
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.

1 participant