When hovering in packages over "on board" panel there should be shown route from current location, not where package was received. #40

Closed
opened 2026-09-20 10:18:57 +02:00 by kamilkrzywda · 1 comment
Owner
No description provided.
Author
Owner

Fixed in v0.23.2.

What changed: Hovering an on-board package in the left pane now previews the route from the carrier plane's current (live) position instead of the airport where the package was received. The trace also follows the moving plane while hovered.

  • lib/mapData.ts — new pure builder hoverTraceGeoJson(fromCoord, toIcao, index) drawing a great-circle arc from an arbitrary start coordinate to a destination ICAO (reuses greatCircleArc).
  • components/Map.tsx — package hover with a resolvable carrier now starts the trace at the carrier's live {lat, lon}; falls back to the origin-ICAO route when no carrier is present. The [state] effect re-applies the active hover so the trace tracks a moving plane.
  • Endpoint rings and the open-package / Relocate hover paths are unchanged.

Tests: 2 new unit tests for hoverTraceGeoJson; new e2e mid-flight test (load at EDDF → fly to LEMD → wait until clearly away from hub → pause → hover row → assert a trace segment starts within EPS of the live position, one ends near LEMD, none start near EDDF).

Fixed in **v0.23.2**. **What changed:** Hovering an on-board package in the left pane now previews the route from the carrier plane's *current (live) position* instead of the airport where the package was received. The trace also follows the moving plane while hovered. - `lib/mapData.ts` — new pure builder `hoverTraceGeoJson(fromCoord, toIcao, index)` drawing a great-circle arc from an arbitrary start coordinate to a destination ICAO (reuses `greatCircleArc`). - `components/Map.tsx` — package hover with a resolvable carrier now starts the trace at the carrier's live `{lat, lon}`; falls back to the origin-ICAO route when no carrier is present. The `[state]` effect re-applies the active hover so the trace tracks a moving plane. - Endpoint rings and the open-package / Relocate hover paths are unchanged. **Tests:** 2 new unit tests for `hoverTraceGeoJson`; new e2e mid-flight test (load at EDDF → fly to LEMD → wait until clearly away from hub → pause → hover row → assert a trace segment starts within EPS of the live position, one ends near LEMD, none start near EDDF). - PR: #48 - Merge commit: `4620707abcb027e5edc849c33e3bcf26aa8301ae` - Deployed: https://flight.dev.kkhost.pl (verified `/api/version` = 0.23.2, root HTTP 200)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/Flight-Ops#40