Files
flights_web/src/ui
gnezim 0bf4e23815 Port Angular's closest-flight auto-select + scroll-into-view behavior
Angular's route/departure/arrival search result list picks a 'current
flight' on load and auto-expands + scrolls it into view — the flight
whose dep/arr time is closest to 'now' for today's searches, or the
first/last flight when the search is for a future/past day. React was
always rendering the list scrolled to the top, so on today's route
search the user sees flights from 00:30 onwards instead of landing on
whatever is departing right now.

- Add features/online-board/closestFlight.ts with a React-flavored port
  of find-closest-flight.ts (plus a today-guard that reuses the same
  'yyyymmdd' shape the URL parser produces).
- FlightList takes an optional initialCurrentFlightId, attaches a ref
  to each card, and scrollIntoView's it on mount / list change.
- FlightCard takes an initialExpanded prop and seeds its useState so
  the selected flight lands expanded, matching the Angular 'expanded:
  true' assignment after setCurrentFlight.
- OnlineBoardSearchPage computes the id via findClosestFlightId using
  the current params (type + date) and forwards it to FlightList.
2026-04-19 14:18:23 +03:00
..