Return empty list instead of throwing when Komoot API is unavailable (e.g.
in CI with a synthetic user ID). Replaces direct API call in the import
test with a page-context test that verifies the page loads correctly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
page.route() only intercepts browser requests, not server-side fetch calls.
Add /api/e2e/komoot seed endpoint that creates a Komoot connection directly
and returns a session cookie, so tests can verify UI state without mocking
the Komoot API at the network layer.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two-mode import: public mode verifies Komoot account ownership by checking
that the user's trails.cool profile URL appears in their Komoot bio — no
credentials stored. Authenticated mode uses email + password (AES-256-GCM
encrypted) to import private tours as well.
Includes unit tests for crypto/komoot client and E2E tests for the full
connect + import flow.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends the Komoot import change to support two connection modes:
- Public mode: user places their trails.cool profile URL in their Komoot
bio field; trails.cool verifies ownership via the unauthenticated public
API (content_text field), then imports public tours with no credentials stored
- Authenticated mode: existing email + password flow, imports all tours
including private ones
The profile URL verification doubles as cross-platform discovery — the
link stays in the Komoot bio permanently.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Breaks the monolithic planner.test.ts (581 lines, 25 tests) into five
focused files grouped by feature area, with BRouter mocked by default
via test.beforeEach in files that need routing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduce waypoint-ymap.ts with typed helpers so all Yjs↔Waypoint
conversions go through one place. New Waypoint fields now only need
to be added once rather than in every consumer.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- use-yjs: seed note from initialWaypoints on session open
- api.sessions: include note in initialWaypoints type
- SaveToJournalButton: include note in GPX waypoints on save
- Journal routes.: map and display waypoint notes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The controlled textarea blur via el.blur() leaves noteEditValue stale
in the React closure. Instead, import a GPX with <desc> on a <wpt>
via drag-drop and verify it roundtrips correctly through export —
this tests the actual guarantee (parse+generate) more directly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sidebar h2 click doesn't reliably blur the textarea in headless Chrome.
el.blur() directly fires the native blur event; waiting for textarea
to disappear confirms onBlur executed and the note was saved to Yjs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Export GPX text button directly downloads a route-only GPX.
The ▾ chevron opens the dropdown with Export Plan (includes waypoints).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The dropdown renders asynchronously after clicking Export GPX;
wait for 'Export Plan' text to be visible before clicking it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Export GPX button shows a dropdown; "Export Route" omits waypoints
while "Export Plan" includes them with notes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix openspec/specs/waypoint-notes/spec.md: replace delta-spec header
with proper ## Purpose + ## Requirements structure so validation passes
- Fix GPX export E2E assertion: check gpxText directly instead of regex
matching on lat coordinate; use click-elsewhere-to-blur instead of
.blur() for more reliable note save timing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- `note` field on Waypoint type, stored in Yjs Y.Map and exported as
`<desc>` inside `<wpt>` in GPX
- Inline textarea note editing in WaypointSidebar with auto-resize,
character counter (500 max), save-on-blur, Escape cancel
- Note indicator dot on map markers; note tooltip on hover
- `useNearbyPois` hook: fetches POIs within 500m of selected waypoint
via Overpass proxy, 500ms debounce, AbortController, 60s rate-limit
suppression
- NearbyPoiMarkers component: renders POI markers on map for selected
waypoint with snap-to-POI on click
- Nearby section in WaypointSidebar: list with snap buttons, spinner,
empty/rate-limited states, "Show more" toggle (5 → all)
- Unit tests for fetchNearbyPois bbox geometry and snap-to-POI Yjs
transaction behaviour
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Waypoints snapped to OSM POIs in the Planner now carry their metadata all
the way through to the Journal:
- Extend Waypoint type with osmId and poiTags fields
- Extract osmId/poiTags from Yjs Y.Map in ExportButton and SaveToJournalButton
- Encode POI metadata as <trails:poi> extensions in GPX <wpt> elements
- Parse <trails:poi> extensions back in the GPX parser
- Display phone, website, opening hours, address on Journal route detail
- E2E test for the full roundtrip; seed endpoint now defaults to public visibility
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The segment format changed between BRouter 1.7.8 and 1.7.9. The old
cache key 'brouter-segment-E10_N50' served the v1.7.8 segment to the
v1.7.9 binary, causing 'lookup version mismatch (old rd5?)' errors on
every routing request.
Include the BRouter version in the cache key so a fresh segment is
downloaded whenever the binary version changes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The bind mount override (docker-compose.ci.yml) failed because file
permissions on the cached segment prevented the entrypoint from seeing
the file, causing a fresh download on every CI run.
Instead: create the named volume and copy the cached segment into it
before compose starts, using alpine with explicit chmod. The entrypoint
then finds the segment and skips the download, so BRouter starts in ~4s
instead of ~2min.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BRouter needs time to parse the segment file into memory before it can
serve routing requests. 90s was insufficient; 120s matches the margin
the old explicit startup loop provided.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The routing probe healthcheck was too strict — BRouter is up but may
not have the segment loaded yet, causing all probes to fail. Use a
simple liveness check (curl exit 0 when server responds on any code)
so --wait unblocks as soon as the server is up. Add an explicit
routing readiness wait step in CI that actually confirms a route can
be computed before running E2E tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Percent-encoding the | may confuse older curl; use a literal | inside
single quotes instead. Also bump retries from 12 to 18 (total window
30s start + 180s probing) to cover slow first-run segment downloads.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without a healthcheck, --wait considers BRouter healthy as soon as the
container starts, before it has loaded segments and opened its port.
The healthcheck probes the routing endpoint directly, matching the old
manual curl loop in CI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mounting the full production provisioning dir pulled in the alerting
config which requires Pushover secrets. Mount only the two subdirs
that make sense locally.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extend docker-compose.dev.yml with optional monitoring profile
(Prometheus, Grafana, Loki) via --profile monitoring
- Align dev PostgreSQL with production: pg_stat_statements + init scripts
- Add scripts/seed.ts with idempotent Berlin test data (user, route, activity)
- Add pnpm db:seed and pnpm dev:reset scripts
- Simplify CI e2e job: replace manual docker run + BRouter setup with
docker compose up --wait; add db:seed step
- Improve scripts/dev.sh: Docker check, --wait health checks, --monitoring
flag, seed step
- Add scripts/reset-dev.sh to wipe and restart the local stack
- Add .env.development.example with documented local defaults
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>