trails/apps/planner/app/lib
Ullrich Schäfer 0f57e9b9ac
fix(planner): clear the route when waypoints drop below two
Deleting waypoints down to <2 left the last computed route rendered —
nothing cleared the stale geometry (recompute only runs for >=2). Add a
waypoints observer that drops the computed geometry once fewer than two
waypoints remain, via a new clearComputedRoute (keeps the routing
profile, unlike clearRouteData). Covers all delete paths (sidebar, map,
undo).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 23:46:00 +02:00
..
__screenshots__/elevation-chart-draw.browser.test.tsx chore: update visual snapshots [skip ci] 2026-07-15 23:22:05 +00:00
brouter.test.ts fix(planner/brouter): cap upstream response size to 10MB 2026-05-26 00:48:45 +02:00
brouter.ts fix: extensionless server-side imports + lint rule to catch them 2026-05-26 08:08:19 +02:00
color-runs.test.ts perf(planner): group colored route into color runs, not 1 polyline/coord 2026-07-16 08:32:36 +02:00
color-runs.ts perf(planner): group colored route into color runs, not 1 polyline/coord 2026-07-16 08:32:36 +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 Fix Vitest browser provider setup and test cleanup 2026-05-10 19:01:24 +02:00
elevation-chart-draw.ts feat(planner): restyle elevation chart canvas on tokens 2026-07-16 01:20:36 +02:00
gpx-export.test.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
gpx-export.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +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
http.server.test.ts fix(planner/brouter): add 30s timeout to outbound fetch 2026-05-25 23:53:19 +02:00
http.server.ts fix(planner/brouter): add 30s timeout to outbound fetch 2026-05-25 23:53:19 +02:00
logger.server.test.ts feat(planner): per-request requestId propagated through logs 2026-05-25 22:43:58 +02:00
logger.server.ts feat(planner): per-request requestId propagated through logs 2026-05-25 22:43:58 +02:00
metrics.server.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +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
poi-cache.test.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
poi-cache.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
poi-categories.test.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
poi-snap.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
pois.test.ts fix(planner): nearby-POI lookup sends the real session (was 401) 2026-07-16 23:37:31 +02:00
pois.ts fix(planner): nearby-POI lookup sends the real session (was 401) 2026-07-16 23:37:31 +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-data.test.ts fix(planner): clear the route when waypoints drop below two 2026-07-16 23:46:00 +02:00
route-data.ts fix(planner): clear the route when waypoints drop below two 2026-07-16 23:46:00 +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 fix(planner): bound /api/sessions listing (default 50, max 200) 2026-05-26 00:46:38 +02:00
snap-to-poi.test.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
url-validation.server.test.ts security: validate Planner callback URL to close an SSRF sink 2026-06-10 22:18:18 +02:00
url-validation.server.ts security: validate Planner callback URL to close an SSRF sink 2026-06-10 22:18:18 +02:00
use-days.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-elevation-data.ts feat(planner): store computed route compact-encoded (groups 2–4) 2026-07-15 17:07:28 +02:00
use-gpx-drop.ts Centralize waypoint Yjs serialization in waypointFromYMap/waypointToYMap 2026-05-18 21:02:27 +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-nearby-pois.ts fix(planner): nearby-POI lookup sends the real session (was 401) 2026-07-16 23:37:31 +02:00
use-participants.ts feat(planner): redesign topbar with tokens + primitives, presentational 2026-07-15 23:51:27 +02:00
use-pois.ts poi-index: map-core selectors, planner.pois schema, /api/pois route + client, metrics 2026-07-12 22:38:03 +02:00
use-profile-defaults.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-routing.ts fix(planner): clear the route when waypoints drop below two 2026-07-16 23:46:00 +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 planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-yjs-poi-sync.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
use-yjs.ts chore(ts): drop two more redundant casts 2026-05-26 01:02:49 +02:00
vite-yjs-plugin.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
waypoint-ymap.test.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
waypoint-ymap.ts planner: give the Yjs document a typed schema seam 2026-06-10 01:35:04 +02:00
yjs-server.test.ts fix(planner): raise WS frame cap above doc cap (fixes sync reconnect loop) 2026-07-14 08:58:24 +02:00
yjs-server.ts fix(planner): raise WS frame cap above doc cap (fixes sync reconnect loop) 2026-07-14 08:58:24 +02:00