trails/apps/planner/app/lib
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
..
brouter.test.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
brouter.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
db.ts Add Drizzle ORM with shared db package (#10) 2026-03-22 22:35:50 +00:00
host-election.test.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
host-election.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
rate-limit.test.ts Add BRouter proxy, rate limiting, and spec updates (tasks 5.1-5.2) (#11) 2026-03-22 22:43:47 +00:00
rate-limit.ts Add BRouter proxy, rate limiting, and spec updates (tasks 5.1-5.2) (#11) 2026-03-22 22:43:47 +00:00
sessions.ts Add Drizzle ORM with shared db package (#10) 2026-03-22 22:35:50 +00:00
use-routing.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
use-yjs.ts Fix waypoint loading in Edit in Planner flow 2026-03-24 20:22:58 +00:00
vite-yjs-plugin.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
yjs-server.ts Complete Planner session management (tasks 4.2, 4.6, 4.7) (#9) 2026-03-22 22:18:36 +00:00