feat: SimBrief integration, enroute centers, VATSIM flight status - #5
Merged
Conversation
…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>
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.
SimBrief Integration
Enroute Centers
Mobile
Tests
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com