trails/apps/planner/app/lib
Ullrich Schäfer b9a77be020
Add route error toasts with waypoint rollback
- Show error toasts when route calculation fails, with distinct messages:
  - "No route found" for BRouter 4xx (unroutable waypoints, missing tiles)
  - "Route calculation failed" for server errors / network failures
  - "Too many requests" for rate limiting
- Rollback all waypoints to last known good state on route failure
- Guard against restore→recompute loop via restoringRef flag
- Extract reusable useToasts hook from awareness toast logic
- Add BRouterError class to distinguish client vs server errors
- API returns 422 for unroutable requests instead of blanket 502

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 14:09:20 +02:00
..
brouter.test.ts Add route interactions: click-to-split, drag-to-reshape, colored route rendering 2026-03-26 21:15:55 +01:00
brouter.ts Add route error toasts with waypoint rollback 2026-03-29 14:09:20 +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
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 Add observability: health endpoints, structured logging, metrics, Grafana stack 2026-03-26 22:59:44 +01:00
rate-limit.test.ts Fix planner production server + use .ts extensions everywhere 2026-03-25 01:41:33 +01:00
rate-limit.ts Add BRouter proxy, rate limiting, and spec updates (tasks 5.1-5.2) (#11) 2026-03-22 22:43:47 +00:00
sessions.ts Use explicit .ts extensions for Node-compatible imports 2026-03-25 01:34:16 +01:00
use-routing.ts Add route error toasts with waypoint rollback 2026-03-29 14:09:20 +02:00
use-yjs.ts Add transactional emails (SMTP) and planner features (no-go areas, notes, crash recovery) 2026-03-26 01:00:42 +01:00
vite-yjs-plugin.ts Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
yjs-server.ts Fix Yjs WebSocket server to use sync protocol 2026-03-25 02:24:13 +01:00