Commit Graph

479 Commits

Author SHA1 Message Date
gnezim 1cd39b094e Match Angular per-carrier OperatorLogo aspect ratios (120x31 SU, etc) 2026-04-20 03:30:15 +03:00
gnezim db697d4b5e Switch TransferBar + FullRouteTimeline to design tokens; correct transfer icon size (20.5×6.5) 2026-04-20 03:26:10 +03:00
gnezim 0782674140 Match Angular BoardDetailsHeader typography (18px/500), use $border and $blue-light tokens 2026-04-20 03:23:08 +03:00
gnezim 1156dd6f90 Replace hardcoded #6b7280/#1c2330/#8a8a8a greys with design tokens ($light-gray/$text-color) 2026-04-20 03:02:10 +03:00
gnezim c4ba540e1c Normalize caption/time-note greys to $light-gray (#657282) across FlightCard, CityAutocomplete, details accordion, board header, and filter 2026-04-20 02:57:41 +03:00
gnezim 1842415eed Use $light-gray (#657282) for mini-list date/airport to match Angular tokens 2026-04-20 02:54:31 +03:00
gnezim aa2602475d Lay out AircraftPanel as 5-col grid (desktop) / 4 (tablet) / 2 (mobile) like Angular flight-props 2026-04-20 02:51:34 +03:00
gnezim 7cf15f11ab Match Angular typography: terminal-link color, board header padding/grid 2026-04-20 02:31:27 +03:00
gnezim 74d7c119d5 Match Angular FlightCard grid tracks, tablet overrides, and search-frame radius 2026-04-20 02:28:09 +03:00
gnezim 353bd62296 Render branded 404 page on invalid URLs and malformed params
Replace the inline 'Invalid parameters' fallbacks and the framework's
default '404' text with the existing Aeroflot 404 screen. Unknown
locale, malformed flight/route/station params, and unmatched URLs
(including bad paths like onlineboard//route/...) now all land on the
same ErrorPage component.
2026-04-20 02:23:16 +03:00
gnezim 0e9191be05 Match Angular PageLayout: 24px tablet padding, single title wrapper 2026-04-20 02:07:51 +03:00
gnezim bc15c83d22 Add 'Дата рейса' caption to DayTabs mobile dropdown on details page 2026-04-20 01:54:22 +03:00
gnezim 5a17962527 Stack board-details-header rows vertically on mobile 2026-04-20 01:50:55 +03:00
gnezim 4b6632cad5 Match Angular flights-map canvas height (500 → 800px) 2026-04-20 01:50:07 +03:00
gnezim 4095344b7b Revert "Convert schedule WeekTabs to day-of-week strip"
This reverts commit c097ab21fe.
2026-04-20 01:38:12 +03:00
gnezim c097ab21fe Convert schedule WeekTabs to day-of-week strip
Angular's schedule renders 7 day pills ("20 пн … 26 вс") spanning the
active week, not weekly date ranges. Match that: tabs now render the
seven days of selectedMonday's week with day-num + weekday-abbr stack.
Prev/next arrows shift by full weeks. Day clicks scroll to the
matching day group in DayGroupedFlightList for the schedule UX.
2026-04-20 01:29:53 +03:00
gnezim f1f0030b69 Auto-expand today's day group + dynamic dates in visual diff
Schedule list day accordion stays collapsed by default but auto-
opens the day matching today's date when it's in the visible week
window — mirrors Angular's p-accordion default-active behaviour
where today's flights are visible without a click. The user can
still collapse it; we never re-open after that for the same date.

Visual-diff URLs were hardcoded to a past date with the wrong React
URL format (Angular path-style /AAQ/16042026 instead of React's
single-segment /AAQ-20260420-00002400). Switch to dynamic
yyyyMMdd of today for onlineboard pages and Mon→Sun of the current
week for schedule. Schedule-route diff dropped from ~91% to ~28%
on desktop after these two fixes.
2026-04-20 01:17:58 +03:00
gnezim 6a3edeb0e7 Make visual-parity diff script env-configurable
ANGULAR_BASE / ANGULAR_PATH_PREFIX / REACT_BASE / MOCK_ANGULAR /
MOCK_REACT env vars let the script target the live test env
(https://flights.test.aeroflot.ru/ru-ru) without code changes.

Used to rerun the Visual Parity Report against the live Angular
backend instead of a local ng serve.
2026-04-20 00:58:15 +03:00
gnezim 9cdc8fd75b Default schedule day groups to collapsed
Match Angular's p-accordion default-collapsed state on the schedule
results page. State now tracks expanded days (default empty)
instead of collapsed days (default empty), so the initial render
shows day headers only and the user clicks to reveal flights.
2026-04-20 00:35:44 +03:00
gnezim e05ef1ca20 Render rich Schedule details page + fix broken SEO key
Schedule details page used to show only a one-line FlightCard and
stop. Reuse ScheduleFlightBody so each flight in the chain renders
the same per-leg layout the schedule results page uses (route
summary, leg cards, transit pill, share/Купить/Детали рейса
actions). Add a `Вернуться к Расписанию` back link to the header.

While here, fix the SEO title key — buildScheduleDetailsSeo was
calling SEO.SCHEDULE.DETAILS.TITLE with `flights={...}`, but the
i18n bundle only defines SEO.SCHEDULE.FLIGHT-DETAILS.TITLE with
`flightNumber={...}`. The unresolved key was leaking into the
document title as "SEO.SCHEDULE.DETAILS.TITLE".
2026-04-20 00:30:39 +03:00
gnezim b21ae2638b Add Туда/Обратно direction switch to round-trip schedule page
Round-trip schedules used to render outbound and inbound lists
stacked. Mirror Angular's schedule-direction-switch: keep both
fetches running, but render only the active direction's list and add
a button group to the sticky header that swaps which one is shown.
WeekTabs track the active direction's week independently, and tab
navigation updates whichever direction is currently active.
2026-04-20 00:21:20 +03:00
gnezim ddc8e9f6dc Wire Вы искали sidebar accordion to live search history
Each schedule + onlineboard search now records itself into the
existing useSearchHistory localStorage hook, with a structured
params payload (departure/arrival/dates/flightNumber). The
SearchHistory sidebar renders the rich Angular layout: clock or
plane icon, optional sub-title (e.g. "Расписание рейсов, в одну
сторону"), city pair, and date range, with inbound dates appended
for round-trip searches.
2026-04-20 00:12:58 +03:00
gnezim d6ef3c8433 Render Angular schedule expanded body in React
Schedule flight cards now expand into the rich Angular layout instead
of the online-board time/transition rows. Mirrors connecting-flight-
body / multi-flight-body: horizontal timeline summary, per-leg card
with section number + flight number + operator + aircraft + dep/arr
times + leg duration + stations, transfer-inline-extended pill
between legs (Пересадка, ground time, transit city), and the actions
row (share, Купить, Детали рейса).

Wired via a renderExpandedBody render prop on FlightCard/FlightList so
ui/flights doesn't need to know about schedule-specific bodies.
2026-04-20 00:01:24 +03:00
gnezim 8bf672f3fa Schedule-specific sidebar (ScheduleFilter)
Replace OnlineBoardFilter on schedule pages with a dedicated
ScheduleFilter that matches Angular's schedule-filter:
- Город вылета / Город прилета with swap arrows
- 'Показать расписание на' date range picker
- 'Время вылета' time slider
- 'Только прямые рейсы' checkbox (sets connections=0)
- 'Показать обратные рейсы' checkbox
- 'Показать расписание' submit button (blue, full-width)

The OnlineBoardFilter accordion (Номер рейса + Маршрут tabs) is no
longer rendered on schedule pages — Angular only ships flight-number
search on the online-board side.
2026-04-19 23:36:05 +03:00
gnezim d74061e03b Sortable schedule columns + collapsible day accordion
Add sort arrows on ВЫЛЕТ / ВРЕМЯ В ПУТИ / ПРИЛЕТ headers — clicking
toggles ascending/descending order; clicking again clears the sort.

Day groups (Понедельник 20 апреля, etc.) are now collapsible via the
header chevron — matches Angular's p-accordion structure where each
day is an accordionTab. Default state expanded.
2026-04-19 23:29:48 +03:00
gnezim 4c487ab1b2 Render Connecting flights + Angular grid for schedule rows
- Connecting (multi-leg via transit) flights are now folded into a
  synthetic MultiLeg shape with combined flight numbers (SU 6188,
  SU 6233) and per-leg airline logos, matching Angular's
  schedule-list-flight-header.

- Schedule grid now uses Angular's 8-column layout
  (80/120/100/240/100/100/240/16). The middle status icon is
  replaced by a duration column with the blue clock icon and
  '3ч. 48мин.' / '4h 19m' formatting.

- Multi-leg airline logos use the round badge variant (separate
  round.png assets) so two carriers fit side-by-side without overlap.

- Action buttons removed from collapsed rows — Angular only shows
  flight-actions in the expanded body. Added chevron column for
  every schedule card and made schedule cards expandable by default.

- Removed 'Туда: MOW → KUF' subhead from outbound section, matching
  Angular's bare flight list under the column header.
2026-04-19 23:24:06 +03:00
gnezim bdd3a099bc Drop MOW fallback on flights-map, match Angular's geo-only seed
Angular's FlightsMapFilterComponent only sets departure when
UserLocationService.location emits an actual position — there's no
fallback to Moscow. Removing the React fallback aligns the empty
initial state (no splines drawn before user input).
2026-04-19 22:49:13 +03:00
gnezim 8ccf560bf5 Resolve airport codes to parent city in popular requests
Angular's getCityOrAirport walks airport→city when the input code is
an airport (SVO → Москва), only falling back to the airport name when
no parent city is dictionarised. React was returning the raw airport
name (Шереметьево) on the popular requests panel.
2026-04-19 22:37:12 +03:00
gnezim b2abde9210 Inline Купить + Статус рейса buttons on schedule cards
Match Angular's flight-actions layout — schedule rows now show the
orange Buy and outlined Status рейса buttons inline at the right edge
of the row instead of inside the expanded panel.
2026-04-19 22:22:05 +03:00
gnezim 8005356db5 docs: parity report markdown + auto-memory plan
Companion markdown to the comparison-report/visual/report.html with
the same coverage matrix and per-page findings. Useful for git-based
review without serving the HTML.

Also adds AGENTS.md (subagent role definitions for future sessions)
and the modernjs-v3-upgrade plan stub from the earlier scoping.
2026-04-19 22:06:05 +03:00
gnezim b62f894f45 DaySelect: hide when no available dates
The mobile day-select dropdown was rendering as an empty <select>
on detail pages where the calendar API hasn't shipped any usable
days for that view. The empty box took layout space and looked
broken. Match Angular: don't render the picker when there's
nothing to pick.
2026-04-19 22:03:04 +03:00
gnezim 27b1ab1329 Schedule start: empty date-range placeholder
ScheduleStartPage now starts dateFrom/dateTo as null so the input
shows the `ДД.ММ.ГГГГ - ДД.ММ.ГГГГ` placeholder Angular ships
instead of pre-filling with the current week. The submit handler
defaults to current-week range when the user submits without
picking dates, preserving the legacy "find this week" UX.

Same pattern as the onlineboard date fix.
2026-04-19 21:52:03 +03:00
gnezim 71d0eef3e2 Schedule heading + column header row
- ScheduleSearchPage: H1 now reads `Расписание по маршруту: …`
  using SCHEDULE.SCHEDULE-BY-ROUTE — the existing onlineboard
  variant was leaking through. Matches Angular's schedule-search
  title-bar verbatim.
- DayGroupedFlightList: render a non-sortable column header bar
  above the list with `Рейс / Авиакомпания, борт / Вылет / Время
  в пути / Прилет`. Mirrors Angular's schedule-list-flight-header
  column row. Sort arrows still TBD.
- New i18n keys: SCHEDULE.COL-FLIGHT, COL-AIRLINE, COL-DEPARTURE,
  COL-DURATION, COL-ARRIVAL (RU + EN both filled).

Schedule-route mismatch now 11.99% (was 12.47% pre-heading fix).
2026-04-19 21:44:19 +03:00
gnezim 64c86dcdd6 visual-diff: mask Angular-only test-env chrome
Paint 3 known noise regions white in both screenshots before pixel-
matching:
  - top-left ~200×90 (debug counter + orange `Тестовая версия` badge)
  - top-right ~240×50 (build tag like `rc/2026-04-06`)
  - bottom-right ~90×90 (chat-widget bubble)

These show only on the deployed Angular test env, not in the React
dev build, and were inflating every parity score by ~1-2pp.

Mismatch deltas vs prior run:
  en-onlineboard-route       4.62% → 4.45%
  flight-details            11.24% → 10.82%
  mobile-flight-details     17.92% → 16.58%
  mobile-onlineboard-start  20.37% → 18.66%
  onlineboard-arrival        4.63% → 4.46%
  onlineboard-departure      5.03% → 4.86%
  onlineboard-route          4.78% → 4.60%
  onlineboard-start         14.52% → 13.77%
  schedule-route            12.47% → 11.87%
  schedule-start            13.39% → 12.86%
  flights-map               37.28% → 36.40%
2026-04-19 21:34:44 +03:00
gnezim a41c767dd1 Schedule per-leg operator logos + Купить button
- FlightCard: when the flight is multi-leg, render one OperatorLogo
  per leg in the header so code-share / multi-carrier journeys show
  both airline brands (Angular's `operator-logo-and-model x N` row).
  Direct flights keep the single logo.
- FlightCard: add an orange "Купить" (buy ticket) link rendered next
  to "Детали рейса" when the card is in the schedule context. Links
  to aeroflot.ru's booking flow per Angular's flight-actions wiring.
- Reverted earlier per-leg flight-number stack — IFlightLeg in React
  doesn't carry a per-leg flightId, so the parent SU number is the
  authoritative label. The Angular dual-number stack belongs to the
  ConnectingFlight shape (separate from MultiLeg) which the React
  code already renders flat.
2026-04-19 21:23:46 +03:00
gnezim 69706e023d Schedule + flights-map structural parity
- flights-map: default departure to Москва (MOW) when geolocation
  doesn't yield a city. Mirrors Angular which seeds the orange
  marker on Moscow regardless of geo permission. Hook now has two
  effects — a synchronous MOW fallback that fires once dictionaries
  load, and the existing geo callback that may upgrade to a closer
  city when permission is granted.
- Schedule: introduce DayGroupedFlightList. Buckets the flat result
  list by scheduled-departure date and renders each group under a
  `Воскресенье 19 Апреля`-style header (Intl-driven, weekday +
  genitive month). Single-day result skips the grouping noise.
- Schedule: introduce WeekTabs. Replaces the daily DayTabs in the
  schedule sticky-content with Monday-anchored 7-day windows like
  `13 апр - 19 апр`, matching Angular's week-tabs component.
  handleWeekChange recomputes both dateFrom (Monday) and dateTo
  (Sunday) when the tab changes.
- Schedule: aircraft model now visible in the collapsed FlightCard
  row when `direction === "schedule"` (Sukhoi SuperJet 100 / Airbus
  A321 etc., per Angular's operator-logo-and-model column).
- FlightCard / FlightList: extend `direction` union with `"schedule"`.

Tests updated: useGeolocationDefault tests now assert the MOW
fallback fires when permission is denied / API missing / arrival
already set (was previously expected to no-op).
2026-04-19 20:52:41 +03:00
gnezim e7cf11e799 Visual parity fixes — drop pixel mismatch on 6+ pages
- OperatorLogo: accept BCP-47 codes (`ru-ru`) by trimming to first 2
  chars before picking the en/ru asset variant. Fixes the Russian
  flight-details page rendering ROSSIYA (Latin) instead of РОССИЯ.
- FlightCard / FlightList: thread `direction` from the search page so
  arrival results show Высадка (deboarding) instead of Посадка
  (boarding) — Angular parity. The arrival side reads from
  arrivalLeg.transition.deboarding when direction === 'arrival'.
- OnlineBoardFilter:
  - Дата рейса starts blank with `ДД.ММ.ГГГГ` placeholder; submit
    handler defaults to today on empty.
  - Город вылета / Город прилета placeholders flip to
    `Все направления` when the opposite-direction field is filled.
  - Filter content row now flows with $space-l vertical gap to match
    Angular's accordion-content rhythm (was ~6 px tighter).
- FlightsMiniList: `display: none` on mobile. Avoids the duplicate
  summary card that was floating above the main details on small
  viewports — Angular hides the sidebar mini-list there.
- FlightsMap calendar trigger: override PrimeReact's filled-blue
  button to a transparent outline so it reads as a glyph (matches
  Angular's outline calendar icon).

Pixel-mismatch results (re-diffed via scripts/visual-diff.mjs):
  en-onlineboard-route       5.50% → 4.62%
  onlineboard-arrival        5.53% → 4.63%
  onlineboard-departure      5.92% → 5.03%
  onlineboard-route          5.16% → 4.78%
  mobile-onlineboard-start  23.51% → 20.37%
  mobile-flight-details     18.82% → 17.92%
  flight-details            carrier-logo verified visually; pixel
                            count unchanged (height delta dominates)
  onlineboard-start         14.56% → 14.52%

Larger remaining mismatches (schedule-route 14%, flights-map 34%,
flight-details 11%) are dominated by structural Angular features the
React port doesn't yet ship (day grouping, code-share bundling on
schedule; geo-driven origin marker on map; height-delta on details).
Tracked as P1 follow-ups in the comparison report.
2026-04-19 20:18:15 +03:00
gnezim 9acfeb4052 i18n: switch URL locale codes to xx-xx (Angular contract)
Angular's LocalizationService reads `Country = baseHref[1..3]` and
`Language = baseHref[4..6]` — both halves are the same 2-letter
language code (`/ru-ru/`, `/en-en/`, `/zh-zh/`, …), confirmed by
the spec fixtures using `/en-en/onlineboard/...`. The previous
shipping codes mixed in IETF region codes (`en-us`, `ja-jp`, `ko-kr`,
`zh-cn`) which do not match the customer's URL surface.

Renamed:
  en-us → en-en
  ja-jp → ja-ja
  ko-kr → ko-ko
  zh-cn → zh-zh

The `LANGUAGE_TO_LOCALE_CODE` table now mirrors Angular exactly.
Resolver/hreflang tests + layout 404 message updated.
2026-04-19 18:39:51 +03:00
gnezim ce2ca4a689 i18n: BCP-47 URL locales + complete EN translations
- URL surface now matches Angular: `/ru-ru/`, `/en-us/`, `/zh-cn/`, …
  (BCP-47). Bare short codes still work — the [lang]/layout auto-
  promotes them with a replace navigation. Internally everything that
  needs the short language (i18n file lookup, API path segment,
  Accept-Language header, dictionary `title[lang]` key, Intl
  formatters) reads it through the new `useLocale()` hook, which
  returns both `locale` (BCP-47) and `language` (short).
- ApiClient.locale is now mutable and is updated from the [lang]
  layout whenever the URL locale changes — was hard-coded to "ru" in
  the root layout before, so backend responses for /en/... still came
  back in Russian. Cities / airports / flight statuses now arrive in
  the active language.
- All 21 empty EN translation keys filled in (AIRPLANE.*, BOARD.
  PREVIOUS-FLIGHT, SCHEDULE.FILE-NAME, SEO.SCHEDULE.*, SEO.FLIGHTS-
  MAP.*, SHARED.FLIGHT-TRANSFER-PLURAL-*, SHARED.WEEK_FORMAT-WRONG)
  so /en-us renders without falling back to raw keys.
- Added BOARD.LOAD-FAILED-TITLE / -MESSAGE keys (RU + EN) and removed
  the three hardcoded Russian error strings from the search-page
  error card.
- FlightStatus now reads `FLIGHT-STATUSES.{Status}` from i18n instead
  of hardcoding the Russian labels.
- FlightCard's OperatorLogo now picks the en/ru carrier-logo variant
  from `useLocale().language` instead of always passing "ru" — the
  Aeroflot/Rossiya logos display in the active language where
  variants exist.
- registerPrimeLocales(): all 9 supported languages get a PrimeReact
  `addLocale` entry at module load (RU + EN hand-curated, others built
  from Intl). Calendar/AutoComplete widgets switch with the URL.
- ErrorBoundary catches outside the i18n provider, so it now ships
  its own minimal localised string table keyed off the URL locale —
  no more "Something went wrong" leaking on the Russian site.
- Hreflang URLs now emit BCP-47 (`/en-us/...`) while `hreflang="en"`
  stays the short Google-friendly form.
- Datetime helpers accept either short or BCP-47 locale (`isRussianLocale`)
  so callers can pass through whatever the route hands them.
2026-04-19 17:36:24 +03:00
gnezim b8e595dc25 URL surface parity with Angular for /popular and start-page prefill
- Drop the React-only standalone /popular route (and its e2e
  smoketest). Angular returns 404 for /ru-ru/popular; popular
  requests are surfaced inline on onlineboard/schedule start pages
  via PopularRequestsPanel (which stays). Matching the URL surface
  is a contractual requirement for the MF remote.
- Replace ?tab/?departure/?arrival/?return query-string prefill on
  the onlineboard and schedule start pages with a sessionStorage
  transient slot. Mirrors Angular's OnlineBoardFiltersStateService /
  ScheduleFiltersStateService cross-page singletons: URLs stay
  clean of query strings, the start-page form still seeds itself
  from a popular-request click, and a fresh page reload (which
  bypasses the in-memory state in Angular) lands on a pristine form.
  Same-page popular clicks remount the filter via key bump so the
  useState initializers pick up the new prefill.
2026-04-19 16:51:31 +03:00
gnezim b63fd8fb6b Visual parity fixes vs Angular reference
- SharePanel: fix wrong i18n key (SHARED.COPY → SHARE.COPY) and switch
  to the brand-icon-on-top + translated-label layout that Angular uses
  (renders as untranslated raw key + plain text list before).
- LastUpdate: stamp now reflects when the client received the data, not
  the API record's mutation timestamp — Angular sets `flight.lastUpdate
  = new Date()` in populate.logic.ts; we mirror that behavior so users
  no longer see stale 'updated' values from cached API rows.
- FlightCard: keep operator logo + plane icon + status text on mobile
  (previously hidden via display:none); regrid to 3-col layout so the
  card mirrors Angular's mobile pattern. Boarding status row gains the
  leading colour-coded dot Angular ships ('Уточняется' grey).
- OnlineBoardSearchPage: H1 for /flight/... search now reads
  'Рейс: SU 6497, Сегодня' instead of 'Номер рейса: SU6497' (matches
  Angular's title.service); add the '* Время в системе - МЕСТНОЕ.'
  footer note Angular's <page-footer-notes> renders.
- FlightsMap filter: drop the React-only 'Найдите свой маршрут'
  header; replace the horizontal swap glyph with vertical blue arrows
  (Angular rotates the same SVG 90deg); add Leaflet city-tooltip
  styling so labels render text-only with a white text-shadow halo
  rather than as PrimeReact-default white pills.
- DayQuickPick: new mobile-only 3-day quick-pick row above the manual
  date input on both onlineboard and flights-map filters, mirroring
  Angular's calendar-input.component .calendar--mobile block. Uses
  Intl.DateTimeFormat formatToParts to get the genitive month form.
2026-04-19 16:14:47 +03:00
gnezim 314889de2a Rotate FlightStatus plane icon 90° to point right
Angular's sprite has the plane nose-right, but the inline 24×24 path
bundled with FlightStatus is nose-up. Transform-rotate matches the
Angular direction without swapping the SVG asset.
2026-04-19 15:22:00 +03:00
gnezim f0ed99ed0e Drop search-heading breadcrumb — it's already in the h1
Angular's crumb trail ends at 'Онлайн-Табло'; the route description
lives only in the h1 below. React was repeating the heading as a third
crumb, doubling up the text.
2026-04-19 15:00:48 +03:00
gnezim b04e80d2d8 Add share icon to expanded flight card
Angular's expanded FlightCard bottom bar has a share button on the
left next to the 'Детали рейса' action on the right. Render an icon
button backed by /assets/img/share.svg with the same
justify-content: space-between layout. Click uses the Web Share API
when available and falls back to writing the current URL to the
clipboard.
2026-04-19 14:59:14 +03:00
gnezim 217971bd81 Match Angular TimeGroup + expanded time-row typography
Render the latest time on top (30px/light/#333) with the crossed-out
scheduled time below (12px/#f37b09/line-through), mirroring Angular's
'time' vs 'oldTime' pattern instead of the inverted order React had.
Drop the local .flight-card__time font-size override so TimeGroup owns
its own typography.

In the expanded panel, show both scheduled and latest time columns.
Angular falls back to estimatedBlockOff/On when actual is absent and
labels the column 'Ожидаемое' vs 'Фактическое' accordingly — mirror
that logic so flights with only an ETA surface it.
2026-04-19 14:56:13 +03:00
gnezim f9dec146f8 Flush DayTabs against flight list + mask viewport top on scroll
Drop the 8px margin below the day-tabs strip so the sticky card touches
the results frame, matching Angular's layout.

Add page-layout__scroll-overlay — a fixed 25px dark-blue strip across
the top of the viewport — so flight rows scrolling past the 20px-sticky
date row don't peek through the gap above it.

Realign DayTabs range to match Angular's boardSearchFrom=1 /
boardSearchTo=7 defaults (today-1 through today+7). Previous 2/14
window left today off-center in the 7-tab page.
2026-04-19 14:50:40 +03:00
gnezim f2661768b0 Match Angular day-tabs UI + fix flights-map SEO key
Rebuild DayTabs to mirror Angular's flat single-line tab strip: one label
per tab ('17 апр.' siblings, '19 апреля' active), 48px tall, 7 tabs per
page, brand blue label on light-blue background with white active cell.
Single Intl.DateTimeFormat call keeps Russian months in genitive case.

Drop the 60px sticky-content offset to 20px so the date strip aligns
with the left filter column (both already sticky at top:20px).

Correct SEO.FLIGHTS_MAP translation key to SEO.FLIGHTS-MAP.MAIN — the
underscored path never existed in the locale files, so the browser tab
title on /{lang}/flights-map fell back to the raw key.
2026-04-19 14:35:13 +03:00
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
gnezim f50a0d5b33 Show 'Сегодня' in filter date field when the selected date is today
Angular's search filter rewrites the 'Дата рейса' input value to the
translated 'Сегодня' label whenever the picked date equals today,
matching the 'Сегодня' that appears in the H1 and SEO strings. React
was showing the raw 'DD.MM.YYYY' even when today, so the filter read
clinical next to the warm page heading.

PrimeReact's Calendar doesn't support a custom display formatter, but
exposes an inputRef. Wire one up on both Calendar instances (flight
number tab + route tab) and rewrite the DOM value to SHARED.TODAY
whenever flightDate / routeDate is today. The ref update runs on
every mount + date change, so navigating between tabs also gets it
right.
2026-04-19 13:50:37 +03:00
gnezim eea8d92212 Resolve IATA → city + today → 'Сегодня' in search-page SEO
On /ru/onlineboard/route/MOW-LED-20260419 (and /departure/, /arrival/)
the H1 already read 'Маршрут: Москва - Санкт-Петербург, Сегодня' but
document.title and meta[name=description] carried the raw 'MOW - LED
19.04.2026' because SeoHead runs at the route level with URL-only
params. Angular ships the resolved city names + 'Сегодня' in both.

Add a useEffect in OnlineBoardSearchPage that, once the dictionary
hook returns, overwrites document.title + meta description using the
same describeStation/dateLabel helpers that feed the H1. Route,
departure, and arrival search types all get handled; flight-number
search is unchanged.
2026-04-19 11:43:01 +03:00