trails/packages
Ullrich Schäfer c7a09e865d
Add sync_pushes table and granted_scopes column
sync_pushes tracks outbound route pushes to providers, keyed by
(user_id, route_id, route_version, provider). Successful rows hold
the remote_id; failed rows hold the error and can be retried in
place. The unique index makes idempotent push trivial.

granted_scopes records the OAuth scope set we requested at
exchangeCode time. Wahoo doesn't return a scope field in token
responses and grants scopes all-or-nothing, so the requested set is
the source of truth. Defaults to an empty array, which means any
pre-existing connection will be flagged as scope-mismatched on the
first routes_write push — the intended UX for the slice 3 re-auth
flow.

Adjusts tasks 2.3/2.4 in the spec to match repo reality: this
project runs `drizzle-kit push --force` schema-first, with no
checked-in migrations directory.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 22:33:43 +02:00
..
api DRY up ZodError → FieldError mapping 2026-04-19 11:45:09 +02:00
db Add sync_pushes table and granted_scopes column 2026-04-30 22:33:43 +02:00
fit Add @trails-cool/fit package with GPX→FIT Course encoder 2026-04-30 22:31:37 +02:00
gpx Standardize monorepo pipeline: test, lint, typecheck across all workspaces 2026-04-13 00:00:43 +02:00
i18n Redesign navbar with avatar dropdown and mobile drawer 2026-04-26 09:56:20 +02:00
jobs Bump the production group with 28 updates 2026-04-26 08:37:27 +00:00
map Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00
map-core Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00
sentry-config Fix sentry-config typecheck: explicit types: [node] in tsconfig 2026-04-18 00:43:48 +02:00
types Standardize monorepo pipeline: test, lint, typecheck across all workspaces 2026-04-13 00:00:43 +02:00
ui Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00