Save full planning state to journal (waypoints + no-go areas)

Save to Journal now includes waypoints and no-go areas alongside
the track — the full planning state needed for round-tripping.
Export Route remains the clean track-only option for other apps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-04-03 12:41:35 +01:00
parent 45d1360be5
commit fdfacd2997
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -41,7 +41,13 @@ export function SaveToJournalButton({ yjs, callbackUrl, callbackToken, returnUrl
points: (yMap.get("points") as Array<{ lat: number; lon: number }>) ?? [],
})).filter((a) => a.points.length >= 3);
const gpx = generateGpx({ name: "trails.cool route", waypoints: [], tracks, noGoAreas });
const waypoints = yjs.waypoints.toArray().map((yMap: Y.Map<unknown>) => ({
lat: yMap.get("lat") as number,
lon: yMap.get("lon") as number,
name: yMap.get("name") as string | undefined,
}));
const gpx = generateGpx({ name: "trails.cool route", waypoints, tracks, noGoAreas });
// POST to Journal callback
const response = await fetch(callbackUrl, {