ISS-040: on-board package hover traces from carrier's current position #48

Merged
kamilkrzywda merged 1 commits from fix/onboard-hover-current-location into master 2026-09-20 11:24:33 +02:00
Owner

What changed

Hovering an on-board package in the left pane now previews the route from the carrier plane's current (live) location instead of the airport where the package was received.

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

Tests

  • Unit: 2 new tests for hoverTraceGeoJson (exact endpoints from an arbitrary start coord; empty on missing dest). Suite now 290 passing.
  • E2E (e2e/hover.spec.ts): new mid-flight test — load at EDDF, fly to LEMD, wait until the carrier is clearly away from the hub, pause, hover the on-board row, and assert some trace segment starts within EPS of the live position, some ends near LEMD, and none start near EDDF.

Version

v0.23.1 → v0.23.2 (patch — behavior fix to an existing feature).

Closes #40.

## What changed Hovering an **on-board** package in the left pane now previews the route from the carrier plane's **current (live) location** instead of the airport where the package was received. - `lib/mapData.ts` — new pure builder `hoverTraceGeoJson(from: AirportCoord, toIcao, index)` that draws a great-circle arc from an arbitrary start coordinate to a destination ICAO (reuses `greatCircleArc`, mirrors `hoverRouteGeoJson`). - `components/Map.tsx` — for a package hover with a resolvable carrier in state, the trace now starts at the carrier's live `{lat, lon}`; falls back to the origin-ICAO route when no carrier is present. The `[state]` effect also re-applies the active hover so the trace follows a moving plane while hovered. - Endpoint rings and the open-package / Relocate hover paths are unchanged (still `hoverRouteGeoJson`). ## Tests - Unit: 2 new tests for `hoverTraceGeoJson` (exact endpoints from an arbitrary start coord; empty on missing dest). Suite now 290 passing. - E2E (`e2e/hover.spec.ts`): new mid-flight test — load at EDDF, fly to LEMD, wait until the carrier is clearly away from the hub, pause, hover the on-board row, and assert some trace segment starts within EPS of the live position, some ends near LEMD, and none start near EDDF. ## Version v0.23.1 → **v0.23.2** (patch — behavior fix to an existing feature). Closes #40.
kamilkrzywda added 1 commit 2026-09-20 11:17:22 +02:00
On-board package hover traces from the carrier's current position (ISS-040)
CI / build + unit + e2e (pull_request) Successful in 7m11s
3024606ac8
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-20 11:17:31 +02:00
kamilkrzywda merged commit 4620707abc into master 2026-09-20 11:24:33 +02:00
kamilkrzywda deleted branch fix/onboard-hover-current-location 2026-09-20 11:24:33 +02:00
Sign in to join this conversation.