Skip to content

feat: SimBrief integration, enroute centers, VATSIM flight status - #5

Merged
GeekTrainer merged 22 commits into
mainfrom
feature/simbrief-integration
Feb 18, 2026
Merged

feat: SimBrief integration, enroute centers, VATSIM flight status#5
GeekTrainer merged 22 commits into
mainfrom
feature/simbrief-integration

Conversation

@GeekTrainer

Copy link
Copy Markdown
Owner

SimBrief Integration

  • File with SimBrief — opens dispatch in popup with origin/dest pre-filled, no aircraft pre-selection (user picks from their saved airframes)
  • Load from SimBrief — fetches existing plan for users who already filed
  • Flight strip — unified card showing callsign, aircraft, route, FL, Mach, ETE, alternate, enroute centers, fuel/weights
  • VATSIM pre-file — button to open VATSIM prefile form with plan data
  • VATSIM flight status — detects prefiled/connected status from live VATSIM data using stored CID
  • Settings page — SimBrief username + VATSIM CID stored in localStorage, gear icon in headers

Enroute Centers

  • Detects ARTCCs along the route from SimBrief navlog waypoints
  • Falls back to departure/arrival ARTCCs when no plan loaded
  • Interactive tooltips showing center name, controller count, callsigns + frequencies
  • Updates live every 30 seconds with VATSIM data refresh

Mobile

  • Compact flight strip card above airport cards
  • Collapsed: callsign, route, stats, enroute centers
  • Expandable: full route, fuel/weights grid, VATSIM actions
  • Center tooltips work via tap

Tests

  • ✅ 124 unit tests (31 new for SimBrief service + VATSIM status)
  • ✅ 89 E2E tests (9 new for settings + SimBrief button)
  • ✅ 0 TypeScript errors

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

GeekTrainer and others added 22 commits February 17, 2026 10:21
…efile

- 'File with SimBrief' button on flight page (desktop only for now)
- Inline pilot ID prompt stored in localStorage
- Opens SimBrief dispatch in popup with origin/dest/airline pre-filled
- No aircraft pre-selection — user picks from their SimBrief airframes
- Callback page sends postMessage + auto-closes popup
- Fetches OFP JSON and displays: route, cruise FL, distance, ETE,
  fuel breakdown (block/trip/reserve), weights (ZFW/TOW/LDW)
- Route mismatch warning if plan doesn't match current flight
- 'Pre-file on VATSIM' button with params from SimBrief plan
- 'Re-file' and 'Clear' actions
- Link to full OFP PDF
- No API key needed — uses public dispatch URL + fetcher endpoint
- 0 TypeScript errors, 64 E2E tests passing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Username is friendlier and easier to remember than numeric pilot ID.
The fetcher API supports both — switched to ?username= parameter.
Updated all UI text, localStorage key, and component references.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- New /settings page for configuring SimBrief username
- Gear icon in both main page and flight page headers
- SimBriefButton simplified: shows 'Set up in Settings' link when
  not configured, clean 'File with SimBrief' button when configured
- Username config removed from flight page (lives in Settings now)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Unit tests cover: buildDispatchUrl, fetchSimBriefPlan (success/error/
network failure), validatePlanMatchesRoute, formatFlightTime, formatFuel,
formatAltitude, buildVatsimPrefileUrl.

E2E tests cover: settings page load, localStorage read/clear, gear icon
navigation, SimBrief button visibility based on username configuration.

117 unit + 87 E2E = 204 total tests passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prevents indefinite polling if the user leaves the SimBrief popup
open. Cleans up interval, timeout, and message listener on any
completion path (popup closed, postMessage received, or timeout).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Two buttons side by side:
- 'File with SimBrief' — opens SimBrief dispatch to create a new plan
- 'Load from SimBrief' — fetches the user's latest existing plan

Both validate that the loaded plan matches the current route and
show a warning if it doesn't.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replaced separate airport headers and floating SimBrief buttons with
a unified flight strip bar (card-themed):
- Departure ICAO ← route/FL/time/aircraft → Arrival ICAO | SimBrief actions
- When no plan: dashed line between airports + File/Load buttons
- When plan loaded: route string, altitude, ETE, aircraft on the strip
  with fuel/weights detail row below
- SimBrief plan display is now integrated into the strip
- ATC/ATIS section headers now include airport code for context

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Alternate shown in parentheses after the route string in yellow.
Cruise Mach (e.g. M0.78) shown between FL and ETE on the strip.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shows SWA1234 with aircraft ICAO (B738) on the left side of the strip
when a plan is loaded. Separated by a vertical divider from the
departure airport. Aircraft name removed from the route line to
avoid duplication.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- VATSIM CID field in Settings page (stored in localStorage)
- Flight strip button dynamically changes based on live VATSIM data:
  - 'Pre-file VATSIM' — when not filed (default)
  - '✓ Filed' — when CID found in prefiles array
  - '✓ Connected' — when CID found in pilots array (online flying)
- Status updates every 30 seconds with the existing VATSIM data refresh
- No extra API calls — uses the same vatsim-data.json we already fetch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7 new unit tests for checkVatsimFlightStatus: connected, prefiled,
not-filed, priority (connected > prefiled), invalid/empty CID,
non-matching CID.

2 new E2E tests: VATSIM CID field visible in settings, reads stored
CID from localStorage.

124 unit + 89 E2E = 213 total tests passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shows a horizontal strip of ARTCCs the flight passes through:
- Green dot + name = center is staffed (with controller count if >1)
- Gray dot = unstaffed
- Connected by lines (green when adjacent centers are online)
- Uses SimBrief navlog waypoints for route detection when plan loaded
- Falls back to departure/arrival ARTCCs when no plan
- Updates every 30s with VATSIM data refresh
- Desktop only for now

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enroute center badges now sit between the route line and fuel stats
within the flight strip card, as a distinct row with its own border.
No longer floating as a separate element below the strip.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Moved enroute center badges to sit right below the route text,
aligned with it — not as a separate bordered row. Visually reads as
route on top, centers below, both in the same flow area between
departure and arrival airports.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Hover (desktop) or tap (iPad/touch) a center badge to see:
- Full center name (e.g. 'Los Angeles Center')
- ARTCC code
- Controller count and online status
- List of individual controllers with callsigns and frequencies

Dark themed tooltip with arrow, positioned above the badge.
Tap-elsewhere dismisses on touch devices.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Moved ZFW center point south (32.8→31.5) to cover the Texas corridor
(ELP, SAT). Increased radii across all centers to reduce gaps.
SAN→HOU now correctly detects ZLA → ZAB → ZFW → ZHU.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Compact card above the mobile airport cards showing:
- Without plan: route (KSAN→KHOU) + SimBrief File/Load buttons + centers
- With plan (collapsed): callsign, aircraft, FL, Mach, ETE + centers
- With plan (expanded): route string, fuel/weights grid, VATSIM
  prefile/status, re-file/clear actions
- Enroute center tooltips work via tap on mobile
- All 89 E2E tests passing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Stats line: FL/Mach/time left-aligned, ALTN right-aligned
- Route string centered in expanded view
- Actions row centered
- Removed text-left from button for balanced layout

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@GeekTrainer
GeekTrainer merged commit b8e244d into main Feb 18, 2026
@GeekTrainer
GeekTrainer deleted the feature/simbrief-integration branch February 18, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant