Repository navigation
Add unknown aircraft from a SimBrief import, unconfirmed until operations confirm them - #347
Merged
Merged
Conversation
The user's defaultAtisSource is required on the Prisma type, but the seeded users never set it. The seed runs untyped in CI, so nothing failed there, but the dev server type-checks it and would not start. Each user gets say_intentions, the column's default.
…ions confirm them An imported plan whose registration isn't in the fleet now creates the aircraft for the plan's operator with the plan's ICAO type and the operator's default livery, marked unconfirmed, instead of failing with 404. A plan that flies a fleet registration as another type is refused with 409, and a plan without a registration or type with 422. Aircraft gain isConfirmed (default true, so existing and manually created aircraft stay confirmed). Every aircraft read model returns it and the aircraft PATCH accepts it, which is how operations confirm an aircraft.
OpenTofu plan for
|
This was referenced Nov 18, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A SimBrief import used to fail with 404 when the plan's registration wasn't in the fleet. It now adds the aircraft, marked unconfirmed, so operations can check it later. This prepares for pilots requesting a SimBrief plan themselves, without switching to an operations account.
ImportAircraftByRegistrationCommand(aircraft module) finds the aircraft by the plan's registration, trimmed and upper-cased. If none exists, it creates one for the plan's operator with the plan'saircraft.icaocode, the operator's default livery and no SELCAL, base or ETOPS rating, withisConfirmed: false. It replacesGetAircraftByRegistrationQuery, which nothing else used.Aircraft D-AIMC is registered as A359, but the flight plan uses A339.), and no flight is created. A plan without a registration or type gets a 422, and a new registration whose type isn't a known airframe gets a 404.isConfirmed, added by migration20261117150000_add_aircraft_is_confirmed. It defaults totrue, so existing and manually created aircraft stay confirmed, and the previous release can still insert rows during the deploy. Every aircraft read model returns it.PATCH /operator/:operatorId/aircraft/:aircraftIdaccepts it and rejectsnull, which is how operations confirm an aircraft; the app shows that as its own "Confirm correctness" button.defaultAtisSourceto the seeded users. Remember the ATIS source each pilot prefers #346 made it required without updating the seed. CI runs the seed untyped, but the dev server type-checks it and wouldn't start.icaocode: A339. The "non existing aircraft" mock (D-TEST) is now a complete plan, so the import gets past the aircraft.null. Every aircraft response expectation now includesisConfirmed. There's a unit spec for the command, and the aircraft-management spec describes both rules.Lint, Jest (1,430 tests) and Cucumber (1,618 scenarios) pass locally.
Knowledge base: mypreflight/product#76 (draft). The app change follows separately.