Spaces:
Sleeping
Sleeping
Commit History
-
Fix price filter to work in display currency (e.g. CAD)
The price filter compared the user's input directly against price_usd, but displayed prices are converted to the user's chosen currency. Typing C$187 would not filter out a C$233 flight because its USD price (~$160) was below 187. Now the filter converts max_price from display currency to USD via toUsd() before comparing. Also shows the correct currency symbol in the filter input instead of always "$". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3253e6d -
Fix round-trip price filter and require return date
- Price filter now compares against round-trip prices (outboundMinPrices/ returnRoundTripPrices) instead of one-way price_usd - Filter and sort state preserved when selecting outbound flight, so the filter bar persists into the return flight view - Round-trip search now requires a return date instead of silently defaulting to the departure date Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d2d5e25
-
Fix booking price mismatch: carry selected price through to payment
Round-trip same-airline discount and fare tier multiplier were lost between flight selection and the booking/payment pages. Now the computed price (with discounts) is passed from ResultsPage through BookingOptionsPage to the backend booking API. Also includes multi-city support, search form improvements, and rebuilt frontend dist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>587a735
-
Add connection-type MCT, overnight/short-connection warnings
Backend: - Replace single MIN_LAYOVER_MINUTES with MIN_CONNECTION_MINUTES dict keyed by (domestic/international) pair: D-D 45m, D-I 75m, I-D 90m, I-I 120m - Compute is_overnight per segment using timezone-aware .date() comparison (arrival_dt.date() != departure_dt.date() on ZoneInfo-aware datetimes) - Add LayoverInfo model with duration, overnight, short_connection flags - Compute layover warnings server-side using local dates at the hub airport - Add SHORT_CONNECTION_MINUTES=90 threshold to config Frontend: - Add Google Flights-style amber warnings in expanded flight detail: segment "Overnight", layover "Overnight layover", "Short connection" - Use backend-provided warnings instead of client-side date comparison - Remove unused getBadgeColor function (fixed TS build error) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d6def07
-
Redesign SearchPage with hero, destinations, cheap flights, and FAQ
- Default dates to empty strings (require departure date for submit) - Hero section with gradient sky background and cloud overlays - Search form card overlapping hero bottom with shadow - Popular destinations grid (4 cols) with gradient placeholders and prices - Cheap flights section with Popular/Domestic/International tabs - FAQ accordion with 6 questions about booking, pricing, currency - Clicking a destination navigates to /results with origin pre-filled - SearchPage now accepts geo prop for user city and nearest airport Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3886d6e -
Add currency context and swap formatPrice across all pages
- Add GeolocationResponse, CurrencyRatesResponse, DestinationCard types - Add getGeolocation(), getCurrencyRates(), getPopularDestinations(), getCheapFlights() API functions - Create CurrencyContext with provider, useCurrency hook, localStorage persistence - Wire CurrencyProvider in App.tsx with geolocation-based default currency - Add currency selector dropdown to Header - Replace static formatPrice imports with useCurrency().formatPrice in: FlightCard, SelectedFlightBanner, BookingPage, BookingOptionsPage, ConfirmationPage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>02df639 -
Fix stops filter hiding options after selection
Always show all stop filter options (Any, Nonstop, 1 stop, 2 stops) regardless of current filtered results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>fd0daab
-
Add round-trip date validation and 12-month booking window
- Return date picker constrained to >= departure date, auto-adjusts if departure moves past it - Return flights filtered to depart at least 1 hour after outbound arrival - Both date pickers capped at 12 months from today - Backend validates return date >= departure date and 12-month max window Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>73a6301 -
Add flight booking flow with payment validation
- Backend: booking store with cardholder-based payment validation, generic error messages, flexible expiry format (1227 / 12/27) - Frontend: BookingPage, ConfirmationPage, booking API client - Wire up Book button in FlightCard for one-way and round-trip flows - Also includes short-distance surcharge and advance pricing tweaks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>d6f7eeb -
Add HF Spaces deployment config and passkey auth
- Update Dockerfile to use $PORT env var (default 7860 for HF Spaces) - Add HF Spaces README.md with Docker SDK metadata - Add passkey authentication gate (backend + frontend) - Update frontend components Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>6bb015e
-
Add Google Flights-style step-based round-trip booking flow
Replace outbound/return toggle with a two-step selection flow: users first pick a departing flight (showing "from $X round trip" preview prices), then see return flights priced as round-trip totals with same-airline discounts applied per-selection rather than blanket. Backend: move same-airline discount (0.92x) from server-side blanket application to client-side per-selection; return discount rate in API. Frontend: add step breadcrumb, SelectedFlightBanner, pricing utilities, and round-trip-aware sorting. One-way searches unaffected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c090f53 -
Fix local-time display bug, add Asia departure patterns, popularity extension
Major bug fix: formatTime/formatDate/dayDiff/departure-time-filter all used new Date() which converts to browser timezone. Now extract time directly from ISO strings to preserve airport local timezone. Backend fixes: - Add "asia_to_eu" departure weights (23:00-02:30 late-night pattern) - Fix "asia_to_na" to peak in afternoon (12-3 PM) not evening - Overnight-exempt routes skip popularity window and curfew - Popularity latest-hour gets random +0-1.5h extension Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>9d442c9 -
Add flight amenities: legroom, WiFi, power/USB, video per segment
Generate amenities deterministically based on aircraft type, cabin class, and flight distance. Shown in Google Flights-style right-side panel in the expanded flight card view, with icons and strikethrough for unavailable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>ab345fa -
Add Google Flights-style "Best/Other" sections, emissions, rich detail view
Backend: - Add emissions_kg to FlightOffer (ICAO methodology: 0.09 kg/km economy, scales by cabin class) - Add is_best flag: top 3 flights by composite score (45% price + 35% duration + 20% stops) tagged as "best departing flights" - New config constants for emissions rates and best-flight weights Frontend — Google Flights-inspired redesign: - "Best departing flights" section (top 3) with info tooltip explaining ranking methodology, separated from "Other departing flights" by horizontal divider - Flight card shows: dep-arr times, airline names, duration, stops, layover airports, CO2 emissions per passenger, price, cabin class - Expanded detail view with timeline UI: departure/arrival cities with times, travel time per segment, airline + flight number + aircraft, layover duration and airport in styled box, total travel time and emissions summary at bottom - All elements have data-testid attributes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>8c371f4 -
Fix time+1 wrapping, add airline discount pricing, document fare engine
Frontend: - Add whitespace-nowrap to arrival time so "+1" never wraps to next line Pricing — three new itinerary-level discounts: - Same-airline connection: all segments on same carrier gets extra 12% off (stacks with 25% base connection discount for ~34% total savings) - Round-trip same-airline: return flights sharing a carrier with any outbound flight get 8% off (bundled round-trip fare simulation) - All constants documented in config.py with rationale Documentation: - Rewrote price_engine.py with comprehensive docstring covering: base fare formula, all 7 per-flight multipliers with exact values, 3 itinerary-level discounts, and calendar pricing methodology Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>4c96466 -
Fix 500 error on routes with empty carriers, align flight results grid
- Skip 353 routes with empty carrier lists during data loading - Add safety guard in flight_generator for empty carriers - Rewrite FlightCard to use CSS grid for consistent vertical alignment of departure, duration, arrival, airline, price, and chevron columns - Make every flight card row clickable with expand arrow (not just connecting flights) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>84c4785 -
Add flight booking website (Google Flights clone)
Full-stack flight search app for computer-use agent testing: - Backend: FastAPI with deterministic pricing engine, route finder (direct + 1-stop + 2-stop via hub detection), timezone-aware flight generation, airport autocomplete, calendar pricing - Frontend: React + TypeScript + Tailwind CSS with search form, autocomplete, results page, filters, sorting, URL-driven state - Docker: Multi-stage build (Node frontend → Python backend) - Data: 3,770 airports, 55,627 routes, 604 airlines from airline_routes.json loaded in-memory (~21 MB) - All elements have data-testid attributes for agent testing - Same search params always produce same results (SHA-256 seeded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>2e50ccd