trails/openspec/changes/gpx-parser-robustness
Ullrich Schäfer b7b8906ce9
feat(gpx): metadata name/desc fallback + <cmt> merge
Task group 4 of gpx-parser-robustness. Many apps put the only
human-readable title on the <trk>/<rte>, not in <metadata>.

- name/description now fall back to the first <trk>/<rte>'s <name>/<desc>
  when <metadata> lacks them (<metadata> still wins when present).
- that track/route's <cmt> is appended to the description (blank-line
  separated) when present and not already identical (OM BuildDescription
  dedup); used as the description outright when there's no <desc>.

`directChildText` reads direct-child text without relying on `:scope`
(portable across the jsdom + linkedom paths). No GpxData shape change;
well-formed files with metadata are unaffected.

Verified: gpx typecheck+lint clean, 87/87; full `pnpm test` 11/11;
journal + planner typecheck unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-14 00:23:53 +02:00
..
specs/gpx-parsing docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
.openspec.yaml docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
design.md docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
proposal.md docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
tasks.md feat(gpx): metadata name/desc fallback + <cmt> merge 2026-07-14 00:23:53 +02:00