Skip to content

Let pilots import their own SimBrief plan from the dashboard - #364

Merged
oskarbarcz merged 1 commit into
mainfrom
pilot-simbrief-import
Nov 18, 2026
Merged

oskarbarcz merged 1 commit into
mainfrom
pilot-simbrief-import

Conversation

@oskarbarcz

Copy link
Copy Markdown
Member

What changes

Pilots import their own SimBrief plan and fly it without operations. This is the last step after the unconfirmed aircraft below in the stack.

  • Dashboard. While the pilot has no flight in progress, the Next scheduled flight card offers Import from SimBrief. It's the one flight card that also shows on phones. When a flight is shown, the import sits beside See flight details. With nothing scheduled, the card reads "No flight scheduled" with an Import from SimBrief button, in place of "Awaiting dispatch". Without a SimBrief ID it offers Add your SimBrief ID, linking to the account page. On the ground-stop card, the next step reads "Import a flight from SimBrief" instead of "Wait for dispatch".
  • Import window, titled SimBrief import / DLH80. It shows the latest plan in the pilot's SimBrief account (route, departure, aircraft and when it was generated), so they can tell it's the plan they just made. One line says they'll be checked in with the plan's estimated times. Import and check in creates the flight, refreshes the current flight and opens the flight page with a toast. If SimBrief doesn't answer the preview, the import is still offered.
  • Refusals in plain words, inside the window and in the operations import's toast:
    • a missing SimBrief ID, or one SimBrief doesn't recognise
    • an airline or aircraft type MyPreflight doesn't have yet
    • a plan with no registration or type
    • a type mismatch (the API's own message names the registration and both types)
    • a flight already in progress
    • SimBrief, or our own server, not answering
  • The departure stand can be set until boarding starts, not only until check-in, both in the briefing's airport card and on the operations flight page. Its lock now reads "Cannot assign after boarding starts". The check-in window drops its "No departure stand set" warning, since the stand can still be set afterwards.

Code

  • NextScheduledFlightBox takes simbriefImport (hasSimbriefId, open). PilotDashboardRoute passes it while user.currentFlightId is null, owns the modal, and on success awaits useCurrentFlight().refresh() (now typed as returning its promise) before navigating to /track/:id.
  • ImportSimbriefFlightModal (app/features/flight/components/Modal/) loads the preview with userService.verifySimbriefUser and imports with flightService.importFlightFromSimbrief.
  • SimbriefPlanSummary (app/features/user/components/) is the plan rows pulled out of SimbriefAccountPreview, with showCallsign so the window doesn't repeat its title.
  • describeSimbriefImportFailure (app/features/flight/lib/) matches the API's refusals the way describeUnlinkFailure does. PlanFlightOptions uses it too.
  • Stories:
    • three new states in NextScheduledFlightBox
    • ImportSimbriefFlightModal: latest plan, preview unavailable, import refused
    • GroundStopBox and BriefingAirportCard updated for the new copy
  • Version 2.138.0.

Checked

  • On a clean checkout of this commit, npm run lint, npm run typecheck, npm run build and npm run build-storybook all exit 0. npm run test:storybook passes 235 on the same tree.
  • In Chrome against the API branch of Let pilots import their own SimBrief plan and check in with its estimated times api#348, at 1440 and 1280px and at phone width:
    • A new pilot with the mock SimBrief account sees the import beside a dispatched flight, and the window shows DLH80 EDDF → KJFK on D-AIMC.
    • Import and check in lands on LH80's Briefing, checked in, with the plan's estimated times on the timeline (off-block 09:05Z, taxi-in 17:14Z, on-block 17:26Z).
    • Setting stand B42 after check-in works.
    • The dashboard then shows LH80 as the current flight, with no import.
    • A pilot without a SimBrief ID sees Add your SimBrief ID on a phone.

Related

🤖 Generated with Claude Code

While a pilot has no flight in progress, the Next scheduled flight card
offers Import from SimBrief, or asks for a SimBrief ID first. The
import window shows the latest plan in their SimBrief account: route,
departure, aircraft and when it was generated. Import and check in then
creates the flight, checks the pilot in with the plan's estimated times
and opens the flight page. A refused import says why in plain words, on
the operations import too.

The departure stand can now be set until boarding starts, so the
briefing and the operations flight page offer it while checked in, and
the check-in window no longer warns that it locks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oskarbarcz
oskarbarcz force-pushed the pilot-simbrief-import branch from 6912f0d to d10ed84 Compare November 18, 2026 11:03
@oskarbarcz oskarbarcz self-assigned this Nov 18, 2026
@oskarbarcz
oskarbarcz merged commit 2e0454d into main Nov 18, 2026
3 checks passed
@oskarbarcz
oskarbarcz deleted the pilot-simbrief-import branch November 18, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant