trails/apps/planner/app/lib
Ullrich Schäfer 34529a9432
Split ElevationChart + PlannerMap into deep modules; add visual regression testing
ElevationChart (1013 lines) split into:
- elevation-chart-draw.ts — pure drawElevationChart(ctx, w, h, params) function
- use-elevation-data.ts — useElevationData(routeData) hook
- ElevationChart.tsx — ~300 lines, interaction + render only

PlannerMap (869 lines) split into:
- MapHelpers.tsx — 7 Leaflet sub-components (MapExposer, RouteFitter, MapClickHandler,
  CursorTracker, NoGoAreaButton, OverlaySync, PoiRefresher)
- use-waypoint-manager.ts — all waypoint CRUD + route data sync
- use-gpx-drop.ts — GPX drag-and-drop hook
- PlannerMap.tsx — ~200 lines, orchestration only

Add Vitest browser visual regression tests for drawElevationChart via
@vitest/browser + Playwright (toMatchScreenshot). Tests cover plain, grade,
elevation, surface color modes plus hover and drag-select states.

Add update-visual-snapshots.yml workflow: triggered by workflow_dispatch or
the `update-snapshots` PR label; commits snapshots back to the branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 16:41:23 +02:00
..
brouter.test.ts BRouter host compose + Planner auth + cd-brouter rewrite 2026-04-23 22:52:48 +02:00
brouter.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
crash-recovery.test.ts Add transactional emails (SMTP) and planner features (no-go areas, notes, crash recovery) 2026-03-26 01:00:42 +01:00
db.ts Add Drizzle ORM with shared db package (#10) 2026-03-22 22:35:50 +00:00
elevation-chart-draw.browser.test.tsx Split ElevationChart + PlannerMap into deep modules; add visual regression testing 2026-05-10 16:41:23 +02:00
elevation-chart-draw.ts Split ElevationChart + PlannerMap into deep modules; add visual regression testing 2026-05-10 16:41:23 +02:00
host-election.test.ts Fix planner production server + use .ts extensions everywhere 2026-03-25 01:41:33 +01:00
host-election.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
logger.server.ts Add observability: health endpoints, structured logging, metrics, Grafana stack 2026-03-26 22:59:44 +01:00
metrics.server.ts Failover across multiple Overpass upstreams 2026-04-21 07:36:10 +02:00
overnight.test.ts Add per-day map coloring and remaining unit tests 2026-04-11 00:12:27 +02:00
overnight.ts Add multi-day data model, computeDays, and GPX roundtrip 2026-04-10 23:51:31 +02:00
overpass.server.ts Fix planner build: move Overpass upstream fetch to overpass.server.ts 2026-04-23 22:40:15 +02:00
overpass.test.ts Quantize Overpass query bbox to align cache keys across clients 2026-04-18 02:18:46 +02:00
overpass.ts Session-bind /api/route and /api/overpass 2026-04-21 22:18:45 +02:00
poi-cache.test.ts Add i18n keys and unit tests for overlays 2026-04-11 01:19:27 +02:00
poi-cache.ts Add Overpass client, POI categories, cache, and usePois hook 2026-04-11 01:15:34 +02:00
poi-categories.test.ts Extract @trails-cool/map-core package from Planner 2026-04-12 22:28:14 +02:00
poi-snap.ts Extract @trails-cool/map-core package from Planner 2026-04-12 22:28:14 +02:00
rate-limit.test.ts Fix planner production server + use .ts extensions everywhere 2026-03-25 01:41:33 +01:00
rate-limit.ts Increase route rate limit from 60 to 300 requests/hour 2026-04-11 02:05:41 +02:00
require-session.test.ts Session-bind /api/route and /api/overpass 2026-04-21 22:18:45 +02:00
require-session.ts Session-bind /api/route and /api/overpass 2026-04-21 22:18:45 +02:00
route-merge.test.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
route-merge.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
segment-cache.test.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
segment-cache.ts Cache BRouter segments client-side, fetch only the diff 2026-04-24 17:57:54 +02:00
sessions.ts Add split export: Export Route vs Export Plan 2026-04-03 10:52:39 +01:00
use-days.ts Add multi-day data model, computeDays, and GPX roundtrip 2026-04-10 23:51:31 +02:00
use-elevation-data.ts Split ElevationChart + PlannerMap into deep modules; add visual regression testing 2026-05-10 16:41:23 +02:00
use-gpx-drop.ts Split ElevationChart + PlannerMap into deep modules; add visual regression testing 2026-05-10 16:41:23 +02:00
use-host-election.ts Deepen three architectural seams: FIT consolidation, host election extraction, injectable db 2026-05-10 15:52:31 +02:00
use-pois.ts Session-bind /api/route and /api/overpass 2026-04-21 22:18:45 +02:00
use-profile-defaults.ts Extract @trails-cool/map-core package from Planner 2026-04-12 22:28:14 +02:00
use-routing.ts Deepen three architectural seams: FIT consolidation, host election extraction, injectable db 2026-05-10 15:52:31 +02:00
use-undo.test.ts Add undo/redo to planner 2026-04-04 10:04:01 +01:00
use-undo.ts Add undo/redo to planner 2026-04-04 10:04:01 +01:00
use-waypoint-manager.ts Split ElevationChart + PlannerMap into deep modules; add visual regression testing 2026-05-10 16:41:23 +02:00
use-yjs-poi-sync.ts Add Yjs sync for POI categories across participants 2026-04-11 02:28:11 +02:00
use-yjs.ts Sync notes through GPX, Journal, and Planner roundtrip 2026-04-11 03:35:40 +02:00
vite-yjs-plugin.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
yjs-server.test.ts Fix planner_active_sessions gauge drifting negative 2026-04-22 22:37:58 +02:00
yjs-server.ts Fix planner_active_sessions gauge drifting negative 2026-04-22 22:37:58 +02:00