Skip to content

feat: add unknown aircraft mapping to imports#669

Merged
johanohly merged 2 commits into
johanohly:mainfrom
achatman:fix/map_unknown_aircraft
Jul 19, 2026
Merged

feat: add unknown aircraft mapping to imports#669
johanohly merged 2 commits into
johanohly:mainfrom
achatman:fix/map_unknown_aircraft

Conversation

@achatman

@achatman achatman commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #630. Also lays groundwork for fixing #664.

This is a rough draft, submitting for review on the approach.

These issues could be fixed by more intelligently mapping aircraft names, but that seems dangerous to me. Instead, I matched the existing approach for airlines and airports to let the user map the incoming values:
image

If you're interested in this approach, I can continue working on it. Or feel free to take it over.
Outstanding issues:

  1. UI is not handling longer aircraft names well
  2. If you map some of the values then import, the status bar gets out of sync (I believe this is preexisting):
image
  1. I don't like how I handled the typing in import/index.ts with withDefaultUnknownValues. That was a quick workaround to get something testable
  2. This only handles OpenFlights. I figured that's a good starting place for now, but it's worth reviewing other imports to see which could benefit from the same feature. Clearly Flighty can, but having no Apple devices, I can't find a way to create an import file for testing :(. Supporting other sources might also be better left for separate MRs, to keep things focused.
  3. Unit tests
  4. Support for creating a new Aircraft during the workflow
  5. Oops, forgot prettier

Note

Add unknown aircraft mapping to Flighty and OpenFlights imports

  • The import pipeline now detects unresolved aircraft during Flighty and OpenFlights imports, reports them as unknownAircraft in the result, and excludes affected flights from insertion until resolved.
  • A new aircraft mapping UI in StatusStep.svelte lets users pick or create aircraft for unknown entries, mirroring the existing airport/airline mapping flow.
  • AircraftPicker.svelte gains an onCreateNew callback that shows a "Create a new aircraft?" action when no search results are found.
  • Applied airport, airline, and aircraft mappings are now accumulated across reprocess attempts and only cleared on reset.
  • Behavioral Change: flights with unresolved aircraft are silently excluded from the inserted batch rather than inserted with a null aircraft reference.

Macroscope summarized a7ce499.

@github-actions github-actions Bot added the Web label Jul 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@johanohly johanohly changed the title feat: Support mapping aircraft during import feat: add unknown aircraft mapping to imports Jul 19, 2026
@johanohly
johanohly marked this pull request as ready for review July 19, 2026 20:53
@johanohly
johanohly merged commit 7b9f940 into johanohly:main Jul 19, 2026
11 of 12 checks passed
@johanohly

Copy link
Copy Markdown
Owner

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants