trails/openspec/changes
Ullrich Schäfer a9c0093877
Add Wahoo push action route + OAuth callback resume
Adds /api/sync/push/:provider/:routeId as the user-triggered entry
point for pushing a route. The route action delegates to a new
pushes.server.ts pipeline that:

- resolves the latest route_versions row and uses that GPX (not
  routes.gpx) so the bytes Wahoo gets match the snapshot the user
  sees
- short-circuits on (user, route, version, provider) idempotency:
  a successful prior push returns the existing remote_id without
  re-calling Wahoo
- detects scope_missing before hitting Wahoo and redirects through
  getAuthUrl with a base64url-encoded state carrying pushAfter +
  returnTo
- refreshes tokens once on PushError({ code: "token_expired" }) and
  retries the push, then updates sync_connections in place
- records every outcome in sync_pushes (insert on first attempt,
  update on retry) so the UI can show success/failure state

The OAuth callback handler now decodes the state, resumes a
pushAfter pipeline server-side after exchangeCode, and handles the
?error=access_denied path with a needs_permission notice.

Also flips packages/fit/src/fitsdk.d.ts to a regular .ts side-effect
shim so journal's tsc picks up the @garmin/fitsdk module declaration
when consuming the workspace package via source.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 22:41:24 +02:00
..
activity-photos Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
archive Archive add-explore-page change and promote specs 2026-04-26 09:40:42 +02:00
changelog Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
configurable-demo-persona Apply configurable-demo-persona: per-instance demo identity + voice 2026-04-19 10:30:32 +02:00
demo-activity-bot Apply demo-activity-bot: Bruno, the synthetic public-walk generator 2026-04-19 10:14:58 +02:00
e2e-test-reorganization Fix all openspec validation errors (45/45 pass) 2026-04-12 22:41:51 +02:00
journal-poi-details Fix all openspec validation errors (45/45 pass) 2026-04-12 22:41:51 +02:00
komoot-import Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
local-dev-stack Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
mobile-app Implement mobile route editor with MapLibre and BRouter routing 2026-04-15 01:06:10 +02:00
pg-boss-background-jobs Add pg-boss background job queue with session expiry 2026-04-13 21:17:24 +02:00
route-discovery Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
route-features Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
route-sharing Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
social-federation Propose: social-federation (ActivityPub via Fedify) 2026-04-25 22:31:28 +02:00
staging-environments Add OpenSpec proposal for staging environments 2026-04-14 09:02:23 +02:00
visual-redesign Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
wahoo-route-push Add Wahoo push action route + OAuth callback resume 2026-04-30 22:41:24 +02:00
waypoint-notes Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00