trails/apps/journal/app
Ullrich Schäfer 6ed828ef9c
Fix PostGIS geom population: use parseGpxAsync + raw SQL
The initial approach (#150) didn't work because:
1. routes.server.ts used parseGpx (sync, needs browser DOMParser)
   instead of parseGpxAsync (uses linkedom on Node.js) — GPX parsing
   silently failed, so stats AND geom were never populated
2. Drizzle's customType doesn't pass SQL expressions through toDriver

Fixes:
- Switch to parseGpxAsync for all server-side GPX parsing
- Use db.execute() with raw ST_GeomFromGeoJSON SQL after insert
- Remove unused lineStringFromCoords helper from schema
- Share setGeomFromGpx between routes and activities
- Add unit tests for GPX→GeoJSON coordinate extraction

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 17:32:07 +01:00
..
components Remove useEffect flicker from ClientDate 2026-03-29 11:48:01 +02:00
lib Fix PostGIS geom population: use parseGpxAsync + raw SQL 2026-04-02 17:32:07 +01:00
routes Pass full locale from Accept-Language to ClientDate 2026-03-29 11:46:21 +02:00
entry.client.tsx Upgrade i18next v26 + react-i18next v17 with SSR-safe init 2026-03-29 11:38:36 +02:00
entry.server.tsx Upgrade i18next v26 + react-i18next v17 with SSR-safe init 2026-03-29 11:38:36 +02:00
root.tsx Pass full locale from Accept-Language to ClientDate 2026-03-29 11:46:21 +02:00
routes.ts Add account settings page with passkey management 2026-03-29 10:09:06 +02:00