Propagate waypoint notes through session init, save-to-journal, and Journal display

- use-yjs: seed note from initialWaypoints on session open
- api.sessions: include note in initialWaypoints type
- SaveToJournalButton: include note in GPX waypoints on save
- Journal routes.: map and display waypoint notes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-05-18 20:50:52 +02:00
parent 353dcb2c13
commit 02f8a8be44
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
5 changed files with 14 additions and 6 deletions

View file

@ -42,7 +42,7 @@ export interface YjsState {
export function useYjs(
sessionId: string,
initialWaypoints?: Array<{ lat: number; lon: number; name?: string; isDayBreak?: boolean }>,
initialWaypoints?: Array<{ lat: number; lon: number; name?: string; isDayBreak?: boolean; note?: string; osmId?: number; poiTags?: Record<string, string> }>,
initialNoGoAreas?: Array<{ points: Array<{ lat: number; lon: number }> }>,
initialNotes?: string,
): YjsState | null {
@ -108,6 +108,9 @@ export function useYjs(
yMap.set("lon", wp.lon);
if (wp.name) yMap.set("name", wp.name);
if (wp.isDayBreak) yMap.set("overnight", true);
if (wp.note) yMap.set("note", wp.note);
if (wp.osmId !== undefined) yMap.set("osmId", wp.osmId);
if (wp.poiTags) yMap.set("poiTags", wp.poiTags);
waypoints.push([yMap]);
}
if (initialNoGoAreas?.length && noGoAreas.length === 0) {