You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Alternative approach**: `api-plan-adsbexchange.md` (ADSBexchange via RapidAPI, Feb 2026)
9
9
10
10
---
@@ -589,12 +589,14 @@ Flight Summary Light is only needed to obtain the `fr24_id` and confirm the flig
589
589
590
590
4.**Vite proxy `flight_ended` filter** — ✅ FIXED. The local dev Vite custom middleware (`vite.config.js`) now replicates the full `flight-lookup.js` logic including the `flight_ended === true` filter. Local dev behavior matches production. The only difference is no Upstash Redis cache locally — every search hits FR24 live.
591
591
592
-
5.**Callsign resolved airports display styling** — The resolved FROM/TO airports in callsign mode use inline `fontFamily: 'monospace'`styling (lines 304, 321 of FlightInputPanel.jsx) which doesn't match the routemode styling. Should use the same CSS classes as route mode's airport code display. Cosmetic issue for UI polish phase.
592
+
5.**Callsign resolved airports display styling** — ✅ FIXED (2026-03-21). Replaced inline `fontFamily: 'monospace'`with `.callsign-airport-code` CSS class matching route mode's `.airport-columns.route-mode .input-group input` styling (ABCReproMono, 48px, weight 300, letter-spacing 2px). BW mode override and mobile breakpoint added. Color set to `rgba(255, 255, 255, 0.85)` for dark mode.
593
593
594
594
6.**`vercel.json` rewrite change** — Updated `/(.*) → /index.html` to `/((?!api/).*)` for `vercel dev` compatibility. This is a no-op in production (Vercel resolves functions before rewrites). Should be verified on production deploy.
595
595
596
596
7.**Serverless functions use `export default` (ES modules)** — Changed from `module.exports` (CommonJS) to `export default` due to `"type": "module"` in package.json. Works with both Vercel deployment and `vercel dev`. Verified.
597
597
598
+
8.**Flight mode shows great circle distance instead of real route distance** — ✅ FIXED (2026-03-20). In `handleCallsignStart()`, the displayed distance was computed as a great circle between origin/destination airports, identical to route mode. Now the real route distance is computed by sampling the CatmullRom curve (500 points via `getPointAt`) and summing haversine segment distances. The great circle distance is still used for camera positioning (`centerCameraOnFlight`) and plane icon scaling (`getFlightScale`), since those depend on the airport-to-airport span. The `results.distance` value now reflects the actual airway routing (typically 2–8% longer than great circle for transatlantic flights).
599
+
598
600
### Phase 4b: Caching & Date-Independence ✅
599
601
600
602
-[x] Create `api/flight-lookup.js` — merged serverless function that handles both summary + events in a single call, with Upstash Redis cache layer (see §8.2). Uses `@upstash/redis` package.
@@ -615,17 +617,31 @@ Flight Summary Light is only needed to obtain the `fr24_id` and confirm the flig
615
617
-[x] Ensure `handleCallsignStart()` updates URL with the user-selected date/time after rendering: `navigate(\`/flight/${callsignInput}/${dt.toFormat('yyyy-MM-dd')}/${dt.toFormat('HHmm')}\`, { replace: true })`
616
618
-[x] Update `main.jsx` routes: `/flight/:segment1/:date/:time` and `/flight/:callsign`
617
619
618
-
### Phase 5: Testing & Polish
620
+
### Phase 5: Testing & Polish (in progress)
621
+
622
+
**Completed (2026-03-21):**
623
+
-[x] Delete legacy `api/flight-search.js` and `api/flight-events.js` — superseded by `api/flight-lookup.js`, no longer called by client
624
+
-[x] CSS refinement: `.callsign-airport-code` class matching route mode styling (both color and B&W themes)
625
+
-[x] Fix date field click area — `onClick` added directly on hidden date `<input>` instead of parent div (z-index conflict)
626
+
-[x] Error differentiation — `fr24.js` now throws typed errors (`rate_limited`, `server_error`, `request_failed`); `handleCallsignSearch()` shows specific user-facing messages for 429 / 5xx / generic errors
627
+
-[x] Remove dead `buildControlPoints()` from `routeInterpolation.js` — was unused, `handleCallsignStart` builds control points inline
628
+
-[x] Fix `flightDurationMs` rounding inconsistency — rendering useEffect now reads exact `totalDurationMs` from `flightDataRef.current.flightDurationMs` instead of recomputing from rounded hours/minutes (eliminates ~30s precision loss)
629
+
-[x] Graceful fallback when events are insufficient — if `< 2` events with lat/lon, falls back to great circle via `calculateFlight()`
630
+
-[x] Loading indicator — FIND button shows `'...'` with pulsing animation (`calculate-pill--loading`) during search
631
+
-[x] Callsign error state — inline styles extracted to CSS classes (`.callsign-error`, `.callsign-error-message`, `.callsign-error-dismiss`) with BW mode overrides
0 commit comments