trails/apps/planner/app/routes
Ullrich Schäfer 14b179bb0c Fix waypoint loading in Edit in Planner flow
Three issues fixed:

1. GPX parser used browser DOMParser which doesn't exist in Node/Vite SSR.
   Added async parseGpxAsync() using linkedom for server-side parsing.

2. Server-side session initialization stored waypoints in a Yjs doc
   instance separate from the Vite WebSocket plugin's doc store.
   Moved waypoint initialization to client-side: API returns parsed
   waypoints, client adds them to Yjs after sync.

3. GPX was encoded in URL params causing HTTP 431. Now the Journal
   creates a Planner session via API (POST body), and only passes
   compact waypoint coordinates in URL params.

Verified: Journal route → Edit in Planner → 4 waypoints loaded,
route computed (79.3km), elevation profile, Save to Journal ready.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:22:58 +00:00
..
api.route.ts Add BRouter proxy, rate limiting, and spec updates (tasks 5.1-5.2) (#11) 2026-03-22 22:43:47 +00:00
api.sessions.ts Fix waypoint loading in Edit in Planner flow 2026-03-24 20:22:58 +00:00
home.tsx Add GitHub Actions CI, wire ESLint, lock in Caddy 2026-03-22 12:55:12 +01:00
new.tsx Implement Planner-Journal handoff (Group 9) 2026-03-24 20:22:58 +00:00
session.$id.tsx Fix waypoint loading in Edit in Planner flow 2026-03-24 20:22:58 +00:00