trails/apps/journal/app
Ullrich Schäfer 78b8b8f55f
Atomic GPX save: validate + persist row + geometry in one transaction
Eliminates the silent-failure pattern where a route/activity row could
be committed with gpx IS NOT NULL but geom IS NULL if the PostGIS write
failed after the row insert.

- New gpx-save.server.ts owns all GPX validation (GpxValidationError,
  validateGpx) and PostGIS geometry writes (writeGeom, tx-aware)
- createRoute, updateRoute, createActivity, createRouteFromActivity all
  wrapped in db.transaction() covering row + geom + version snapshot
- demo-bot uses createRoute/createActivity instead of raw inserts;
  errors propagate loudly
- Callback endpoint returns 400 for GpxValidationError instead of 401
- ADR-0006 documents the invariant for future explorers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 15:02:56 +02:00
..
components Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
hooks Implement notifications + supporting fixes 2026-04-26 01:28:55 +02:00
jobs Cursor-based pagination for /notifications 2026-04-26 01:42:32 +02:00
lib Atomic GPX save: validate + persist row + geometry in one transaction 2026-05-10 15:02:56 +02:00
routes Atomic GPX save: validate + persist row + geometry in one transaction 2026-05-10 15:02:56 +02:00
entry.client.tsx Add legal pages, ToS acceptance, and alpha banner 2026-04-18 00:08:48 +02:00
entry.server.tsx Consolidate Sentry config into shared package; fix inconsistencies 2026-04-18 00:30:09 +02:00
root.tsx Drop auth.server.ts re-exports + rename to .server.ts convention (task 5.2) 2026-05-08 03:01:30 +02:00
routes.ts Add Wahoo push action route + OAuth callback resume 2026-04-30 22:41:24 +02:00