Files
Flights/Flights.xcodeproj
Trey T e5333ff965 Enrich existing flights with aircraft types
The user re-imported the CSV expecting the new enrichment-during-import
to kick in, but every row dedupe-matched their existing log so nothing
got updated. Adds a dedicated "look up missing types" flow for
already-saved flights.

- EnrichAircraftTypesView: scans every LoggedFlight where
  aircraftType == nil and carrierIATA + flightNumber are present,
  walks them sequentially through routeExplorer.searchSchedule for
  that carrier/flight/date window, patches in equipmentIata when the
  schedule has a match. Live progress (N / total), found count,
  Stop to cancel. Saves once at the end so SwiftData batches the
  writes.
- AircraftStatsView now takes a RouteExplorerClient and:
  - Surfaces a "Look up missing types" CTA button in the empty
    state (the most useful place to discover this).
  - Adds a wand.and.stars toolbar button so the flow is reachable
    even when stats are already populated (for top-ups after
    new imports).
- HistoryView passes the existing routeExplorer through to
  AircraftStatsView.

Net behavior: user opens Aircraft Stats → sees empty state → taps
"Look up missing types" → modal scans the log, queries
route-explorer per flight, fills in types, hits Done. Stats screen
populates without needing a re-import.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 18:48:59 -05:00
..