feat: flight time estimates with range slider, bug fixes, and test infrastructure - #7
Merged
Merged
Conversation
- Add lat/lon coordinates to all 111 airports from OpenFlights database - Pre-compute distance_nm and flight_time_minutes for all 1251 routes - Optimized block time formula: (distance_nm / 6.6) + 38, ~2.7% avg error - Add PSP (Palm Springs) and EUG (Eugene) airports with 32 new routes - Create FlightTimeDisplay component showing formatted flight duration - Create FlightTimeRangeSlider dual-handle range slider filter - Integrate flight time display in route list, departure groups, and flight detail page - Add minFlightTime/maxFlightTime to FilterState with clear filters support - Strip lat/lon from client-sent airport data in flight page server loader - Update unit tests for new Route shape and filter fields (125 tests pass) - All 89 E2E tests pass Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Edge labels show '< 50m' and '> 7h' for clearer bounds - Active filter shows contextual text: 'Under X', 'X+', or 'X – Y' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Center header (label + range text) above slider - Constrain slider width and center within filter panel Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- FlightTimeRangeSlider: clamp handleMinChange/handleMaxChange to [min, max] to prevent out-of-bounds values when sliders are near edges - route-filter: add null check for undefined flight_time_minutes - Add data-testid attributes to DepartureGroupedList and EmptyState Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Desktop slider tests: visibility, range labels, filtering, reset, combined filters - Mobile slider tests: touch targets, overflow, collapse/expand, filter summary - Flight page: atis.info failure handling, invalid route 404 tests - Enroute: 14 unit tests for center detection, ARTCC lookup, controller counts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Create shared E2E fixtures: faa-datis.ts, test-constants.ts - Create shared E2E helpers: mobile.ts, setupWithFlightPageMocks() - Create shared unit test factories: mock-factories.ts - Refactor 10 test files to use shared infrastructure - Eliminate duplicated mock data, setup functions, and magic strings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ests - Remove spread operator in mock factories that caused 'specified more than once' errors - Add createMockFix helper with all required SimBriefNavlogFix fields - Replace inline fix objects with typed factory calls in enroute tests 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.
Summary
Adds estimated flight times to all routes with a dual-thumb range slider filter, fixes two bugs found during code review, and overhauls the test infrastructure for better DRY compliance and maintainability.
Background
Flight time estimates were the last missing data point for route selection. This branch adds flight time data to all routes and provides a slider UI for filtering by duration. During review, we identified and fixed bugs in the slider boundary logic and route filter null handling, then productionized the entire test suite.
Changes
Feature: Flight Time Estimates
Bug Fixes
Test Infrastructure (DRY refactoring)
New Tests
Testing