Update route-coloring spec with all 10 modes, create follow-up changes
Spec updates: - route-coloring: Added speed limit, smoothness, track type, cycleway, and bike route modes. Added OSM wiki links, BRouter profile patching, dropdown order, bike route human-readable legends. New follow-up changes (proposals only): - elevation-map-interaction: Bidirectional chart ↔ map interaction (route hover → chart, chart click → pan, chart drag → zoom) - e2e-test-reorganization: Mock BRouter by default, split tests by feature, shared helpers - journal-poi-details: Surface POI metadata in Journal route detail (phone, address, website, opening hours from snapped waypoints) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
80404b2494
commit
a44beb87ef
7 changed files with 148 additions and 43 deletions
2
openspec/changes/e2e-test-reorganization/.openspec.yaml
Normal file
2
openspec/changes/e2e-test-reorganization/.openspec.yaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
schema: spec-driven
|
||||
created: 2026-04-11
|
||||
21
openspec/changes/e2e-test-reorganization/proposal.md
Normal file
21
openspec/changes/e2e-test-reorganization/proposal.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
## Why
|
||||
|
||||
The planner E2E test file (`e2e/planner.test.ts`) has grown to 42+ tests in a single describe block. Tests that need a computed route manually call `mockBRouter(page)` — this is opt-in and easy to forget, leading to flaky tests when BRouter is slow. Test setup is duplicated across tests (create session, goto URL, wait for connected).
|
||||
|
||||
## What Changes
|
||||
|
||||
- **Mock BRouter by default**: Use a shared Playwright fixture or `beforeEach` that mocks BRouter for all planner tests. Only integration tests that explicitly test the real BRouter pipeline should use the real endpoint.
|
||||
- **Split by feature**: Break `planner.test.ts` into focused files: `planner-session.test.ts`, `planner-routing.test.ts`, `planner-multiday.test.ts`, `planner-overlays.test.ts`, `planner-coloring.test.ts`
|
||||
- **Shared test helpers**: Extract common patterns (create session + goto + wait for connected) into a reusable helper
|
||||
|
||||
## Capabilities
|
||||
|
||||
### Modified Capabilities
|
||||
- Testing infrastructure only — no user-facing changes
|
||||
|
||||
## Impact
|
||||
|
||||
- `e2e/planner.test.ts` → split into 5-6 files
|
||||
- `e2e/fixtures/brouter-mock.ts` → becomes default fixture
|
||||
- New `e2e/helpers/planner.ts` for shared setup
|
||||
- `playwright.config.ts` may need testMatch updates
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
schema: spec-driven
|
||||
created: 2026-04-11
|
||||
21
openspec/changes/elevation-map-interaction/proposal.md
Normal file
21
openspec/changes/elevation-map-interaction/proposal.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
## Why
|
||||
|
||||
The elevation chart and map currently have one-directional interaction: hovering the chart shows a red dot on the map. But hovering the route on the map doesn't highlight the chart, clicking the chart doesn't pan the map, and there's no way to zoom into a section of the route from the chart. This makes it hard to correlate what you see on the map with what you see in the elevation profile.
|
||||
|
||||
## What Changes
|
||||
|
||||
- **Route hover → chart marker**: Hovering over the route polyline on the map shows the corresponding position on the elevation chart with a crosshair
|
||||
- **Chart click → map pan**: Clicking on the elevation chart pans the map to center on that point along the route
|
||||
- **Chart drag → map zoom**: Dragging/selecting a range on the elevation chart zooms the map to fit that section of the route
|
||||
|
||||
## Capabilities
|
||||
|
||||
### Modified Capabilities
|
||||
- `route-coloring`: Elevation chart gains bidirectional interaction with the map
|
||||
- `map-display`: Route polyline hover reports position back to the chart
|
||||
|
||||
## Impact
|
||||
|
||||
- `ElevationChart.tsx`: Add click handler (pan map), drag-select handler (zoom map), accept highlighted index from map hover
|
||||
- `PlannerMap.tsx` / `ColoredRoute.tsx`: Route polyline hover finds closest point and reports index/position back to SessionView
|
||||
- `SessionView.tsx`: Wire bidirectional state between chart and map
|
||||
2
openspec/changes/journal-poi-details/.openspec.yaml
Normal file
2
openspec/changes/journal-poi-details/.openspec.yaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
schema: spec-driven
|
||||
created: 2026-04-11
|
||||
23
openspec/changes/journal-poi-details/proposal.md
Normal file
23
openspec/changes/journal-poi-details/proposal.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
## Why
|
||||
|
||||
Waypoints snapped to POIs in the Planner store OSM metadata (osmId, phone, address, website, opening hours) on the Yjs Y.Map. This data travels through GPX export and Journal save but is never displayed. When planning a multi-day bike tour, seeing campsite contact details, water point locations, or bike shop opening hours on the Journal route detail page would be valuable.
|
||||
|
||||
## What Changes
|
||||
|
||||
- **GPX export with POI metadata**: Include osmId and key tags as GPX waypoint extensions so they survive the GPX roundtrip
|
||||
- **Journal route detail**: Show POI details (phone, address, website, opening hours) for waypoints that have POI metadata
|
||||
- **Journal waypoint list**: Display POI icons and names alongside waypoint coordinates
|
||||
|
||||
## Capabilities
|
||||
|
||||
### Modified Capabilities
|
||||
- `gpx-export`: Waypoint extensions for POI metadata
|
||||
- `journal-route-detail`: POI details display for waypoints
|
||||
- `route-management`: Store and retrieve POI metadata
|
||||
|
||||
## Impact
|
||||
|
||||
- `packages/gpx/src/generate.ts`: Add GPX extensions for POI tags
|
||||
- `packages/gpx/src/parse.ts`: Parse POI extensions back
|
||||
- `apps/journal/app/routes/routes.$id.tsx`: Display POI details per waypoint
|
||||
- `@trails-cool/types`: Extend Waypoint type with optional POI fields
|
||||
Loading…
Add table
Add a link
Reference in a new issue