trails/apps/planner
Ullrich Schäfer 55806fc84a
Fix waypoint drag, host election, segment routing, debug panel
Waypoint drag:
- Use observeDeep instead of observe to detect Y.Map property changes

Host election:
- Extracted to host-election.ts with 8 unit tests
- Simple rule: lowest real client ID is always host, deterministic
- Always sets role (host or participant), no missing roles
- Filters server docs (empty awareness state) from election

BRouter routing:
- Route segment-by-segment like bikerouter.de (one request per
  waypoint pair), guarantees route passes through every waypoint
- Merge GeoJSON segments with accumulated stats
- 8 unit tests for segment merging and waypoint splitting

Awareness cleanup:
- Track client IDs per WebSocket connection
- Immediately remove awareness on WebSocket close

Debug panel:
- Visibility + expanded state persisted in localStorage
- Hotkey (Shift+Cmd+Option+T) toggles visibility
- Labels server docs as (server)
- All logic self-contained in YjsDebugPanel.tsx

User identity:
- Color and name persisted in localStorage across reloads

Tests: 32 total (16 existing + 8 host election + 8 routing)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 08:52:52 +01:00
..
app Fix waypoint drag, host election, segment routing, debug panel 2026-03-23 08:52:52 +01:00
Dockerfile Add infrastructure: Terraform, Docker Compose, BRouter, CD pipeline (#2) 2026-03-22 13:32:01 +01:00
package.json Fix Yjs WebSocket in dev mode 2026-03-23 01:12:13 +01:00
react-router.config.ts Complete monorepo toolchain setup (tasks 1.1-1.7) 2026-03-22 12:12:57 +01:00
server.ts Add Planner session management with Yjs WebSocket (#1) 2026-03-22 13:26:03 +01:00
tsconfig.json Add Planner session management with Yjs WebSocket (#1) 2026-03-22 13:26:03 +01:00
vite.config.ts Fix Yjs WebSocket in dev mode 2026-03-23 01:12:13 +01:00