trails/openspec/specs/no-go-areas/spec.md
Ullrich Schäfer ba044610b7
Add route interactions: click-to-split, drag-to-reshape, colored route rendering
- Enrich BRouter response with per-point 3D coordinates and segment boundary
  tracking (EnrichedRoute interface)
- ColoredRoute component: plain, elevation gradient (green→yellow→red), and
  surface color modes with invisible wide polyline for click targeting
- Click-to-split: click on route polyline inserts waypoint at nearest point,
  mapped to correct segment via boundary indices
- MidpointHandles: draggable CircleMarkers at route segment midpoints for
  reshaping, hidden below zoom 12, opaque on hover
- Color mode toggle (select) synced via Yjs routeData
- i18n keys for color mode labels (en + de)
- Unit tests for segment boundary tracking (13 tests)
- E2E tests for enriched route response and color mode toggle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 22:36:42 +01:00

643 B

Requirements

Requirement: Draw no-go areas

Users SHALL be able to draw polygons on the map that BRouter avoids when computing routes.

Scenario: Draw polygon

  • WHEN a user activates the no-go area tool and draws a polygon on the map
  • THEN the polygon is added to the Yjs doc and visible to all participants

Scenario: Route avoids no-go area

  • WHEN a route is computed and a no-go area intersects the direct path
  • THEN BRouter routes around the no-go area

Scenario: Delete no-go area

  • WHEN a user deletes a no-go area polygon
  • THEN it is removed from the Yjs doc and the route is recomputed