Skip to content

Show a pilot only their own flights, and ask a new pilot for their first plan - #366

Merged
oskarbarcz merged 1 commit into
mainfrom
pilot-own-flights
Nov 18, 2026
Merged

oskarbarcz merged 1 commit into
mainfrom
pilot-own-flights

Conversation

@oskarbarcz

@oskarbarcz oskarbarcz commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

What changes

Once pilots import their own plans (#364), the dashboard has to be the pilot's own, and a new pilot needs one clear first step.

  • Only the pilot's own flights.
  • A first step for a new pilot.
    • With no flight in progress and nothing scheduled, the card shows "No flight scheduled", one line and a small primary button.
    • Add SimBrief ID, with the line "Add your SimBrief ID in order to import your first flight plan.", opens the SimBrief connection dialog on the dashboard, not the account page. Once the ID is saved, it goes straight on to the import.
    • With an ID the button is Import from SimBrief.
    • The import no longer shows beside a scheduled flight.
  • Recent flights is left out until the first flight closes. The next flight card then spans its row.
  • One calm empty state on every empty card (EmptyState, app/shared/ui/Layout/):
    • a centred outline icon (Lucide) on a quiet tile, a short title, one muted line, at most one small action
    • the tile is indigo only on the card that asks for an action
    • used by Current flight, Recent flights, Next scheduled flight, Current location and Postcards, in place of the dashed wells
  • The import window shows the plan line by line, with no box inside the dialog:
    • FRA over Frankfurt to JFK over New York
    • the scheduled off-block and on-block with the block time between them
    • the aircraft with its type picture and registration

Code

  • useNextScheduledFlight(rotations, loading, currentFlightId) picks the leg and loads the flight. useCurrentRotation also returns active.
  • FlightService.fetchAllFlights takes captain.
  • SimbriefPlanTile (app/features/user/components/) is used by ImportSimbriefFlightModal. SimbriefAirport gains city.
  • DESIGN.md describes EmptyState and the first-run card.
  • Version 2.139.0.

Checked

  • CI commands: on a clean checkout of this commit, npm run lint, npm run typecheck, npm run build and npm run build-storybook exit 0. npm run test:storybook passed 232 of 236 while the API suite ran alongside; the four failures (Signed-in devices, two route chart globes, Report predicted times) are in untouched stories and pass on a rerun, 22 of 22.
  • Light, dark, 1440 and 1280 px and phone, against the local API branch: a fresh pilot's dashboard; the SimBrief connect dialog opening from the card; the import window for DLH80; Recent flights left out until the first flight.

Related

🤖 Generated with Claude Code

…rst plan

Recent flights and Flight history list only the flights the pilot
captained, and Next scheduled flight is the earliest ready flight in a
rotation Operations released to them, so a new pilot no longer sees
other pilots' flights as theirs. With nothing scheduled and no flight
in progress, the card asks for the first step: Add SimBrief ID opens
the SimBrief connection on the dashboard and goes straight on to the
import, or Import from SimBrief once an ID is set. Until the first
flight closes, Recent flights is left out and the card spans its row.

Every empty dashboard card now uses one calm empty state: an outline
icon on a quiet tile, a short title and one line. The import window
shows the plan line by line: the airports as IATA codes over their
cities, the scheduled off-block and on-block with the block time
between them, and the aircraft with its picture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oskarbarcz oskarbarcz self-assigned this Nov 18, 2026
@oskarbarcz
oskarbarcz merged commit 376fef6 into main Nov 18, 2026
3 checks passed
@oskarbarcz
oskarbarcz deleted the pilot-own-flights branch November 18, 2026 11:15
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