Commit Graph

81 Commits

Author SHA1 Message Date
gnezim 5db509e199 Restore buy/share/status strip in schedule search results body
Angular search-results page renders <flight-details-body-actions> →
<flight-actions> with NO overrides inside every expanded flight body —
share/buy/register/status all surface there. A prior refactor confused
this with the dedicated /schedule/details page, where Angular's
flight-schedule-details DOES set [share]=false [buy]=false [print]=false
[details]=false [register]=false because that page-level summary owns
those affordances. The strip was removed from both contexts, leaving
the search results page (e.g. /ru-ru/schedule/route/AER-LED-…) without
any buy button when a flight is expanded.

ScheduleFlightBody now accepts an opt-in showActions flag and renders
the existing <FlightActions> at the bottom (Angular-parity gating via
canBuyTicket / canViewFlightStatus). DayGroupedFlightList opts in;
ScheduleDetailsPage stays opted out so its page-level summary remains
the single owner of share/buy on the details page.

Note on e2e: tests/e2e/schedule-route-buy-button.spec.ts asserts the
button surfaces after expanding the first card, but the local dev
server's curl-based API proxy is currently being blocked by the
upstream WAF ("Доступ к сайту временно ограничен"), so the spec runs
green only against environments that reach /api. CI + deployed
verification suites cover that path. Behaviour is also locked in by:
- ScheduleFlightBody.test.tsx — strip renders iff showActions=true
- DayGroupedFlightList.test.tsx — passes showActions=true through
2026-04-27 22:08:01 +03:00
gnezim 03eeddfbf8 CI/CD pipeline: ssh -L tunnel for TIM API + manual Jenkins trigger
Two design pivots discovered during Phase B prerequisites:

Routing: Replace static-route + NAT plan with persistent ssh -L tunnel
from pve-201 to webzavod (deployment/systemd/flights-tim-tunnel.service).
nginx proxies /api/ and /map/api/ to https://127.0.0.1:8443 with SNI/Host
overrides so cert validation still targets the real hostname. No webzavod
kernel changes (no ip_forward/MASQUERADE), no /etc/hosts pin needed.

Workflow B: Drop Jenkins trigger/poll automation (operator lacks Jenkins
job-configure access and user API token access). release.yml now stops
after MR merge with a Telegram message containing the Jenkins job URL.
release-verify.yml (new, workflow_dispatch only) runs the customer-URL
e2e suite once the operator has triggered Jenkins manually and it has
completed.

Other:
- SSR loopback port 8081 -> 3002 (8081 was taken by openwebui on pve-201)
- notify-telegram.sh skips cleanly when TG secrets unset (was: hard-fail)
- README + spec addendum cover the new prereqs and removed steps
2026-04-27 11:58:39 +03:00
gnezim 8488f94f60 e2e: adopt console-gate fixture across all specs 2026-04-25 02:58:22 +03:00
gnezim 6c30e8ae09 e2e: enable console-gate on smoke spec 2026-04-25 02:51:58 +03:00
gnezim 0cd8d0c102 ci: jenkins-trigger-and-wait.sh — fire job + poll for SUCCESS 2026-04-25 02:45:24 +03:00
gnezim dd8b933ec3 ci: mock fixtures for Jenkins trigger/poll tests 2026-04-25 02:43:15 +03:00
gnezim cb494a4290 ci: deploy-container.sh — swap/rollback with dry-run tests 2026-04-25 02:41:51 +03:00
gnezim 2727dead6a ci: wait-for-url.sh — curl with retry 2026-04-25 02:37:50 +03:00
gnezim 24358fd3e3 ci: notify-telegram.sh — append last 30 log lines on fail 2026-04-25 02:35:33 +03:00
gnezim 675be1f40f ci: notify-telegram.sh + dry-run tests 2026-04-25 02:33:09 +03:00
gnezim eda3352f90 e2e: fix console-gate ESM __dirname (use import.meta.url) 2026-04-25 02:27:11 +03:00
gnezim d458664b55 e2e: add console-error gate fixture with allowlist 2026-04-25 02:21:03 +03:00
gnezim 184210336f navigation e2e: accept /en-en/ normalization for locale-switch test
The app normalises a short-form /en locale prefix to the BCP-47
form /en-en/ at the router layer, so asserting on the short form is
brittle. Assert a loose /en(-xx)?/onlineboard URL regex instead.
2026-04-23 18:30:51 +03:00
gnezim 5d18544a46 Clean unused helpers after details-page simplification
- ScheduleDetailsPage: drop shiftYmd helper and selectedYmd local —
  both were left over from the removed day-sibling search path.
- ScheduleFlightBody.test: drop fireEvent import + FUTURE_340D /
  FUTURE_1H / YESTERDAY / todayUtc constants; they belonged to the
  Buy/Status button tests that moved to the summary-header layer.
- flight-details + error-handling integration tests: mock
  useCityName / useStationDisplayName so OnlineBoardDetailsPage can
  render without an ApiClientProvider wrapping — the station lookup
  hooks now transitively depend on useApiClient via the cached
  useDictionaries fetcher introduced in 7deb46a.
2026-04-23 18:07:31 +03:00
gnezim 7deb46aeae Cache network fetches + fix console duplicates
On a typical page the console showed 25-30 duplicate 'Failed to load
resource' errors because every consumer hook fired its own copy of
the same network request:

- useDictionaries: once per `useCityName`/`useStationDisplayName`
  call (6-10x per render across StationDisplay, PopularRequestItem,
  mini-list rows, etc.) — now a module-level WeakMap<ApiClient>
  single-flight cache returns the same in-flight Promise.
- usePopularRequests: same pattern across start-page and search-
  history dropdowns — cached via the same mechanism.
- useAppSettings: 7+ callers — cached.

Dropped console error count on /ru-ru/ from 29 to 5 (the remaining 5
are WAF 403 infra issues from the dev:full proxy cookie, not code).

Also updates e2e specs:
- schedule-details-mini-list-scoped: asserts the new single-card
  rail behaviour (was still checking for the old 3-row flat list).
- smoke /xx/smoke: targets `[data-testid=error-page-404]` instead
  of `text=404` — the latter matches both the <title> tag (hidden
  by user-agent CSS) and multiple DOM nodes, tripping strict-mode.
2026-04-23 17:57:25 +03:00
gnezim cbced8d4b6 Schedule details: summary header, fix mini-list duplicates, fix timeline times
The schedule details page now renders Angular's <schedule-details-header>
summary block (badges per flight + share/last-update + full-route
timeline) between the day-tabs strip and the per-leg cards, so a
connecting itinerary like SU 6188 + SU 6341 surfaces both flight
numbers and the combined Moscow→Murmansk timeline up top instead of
jumping straight from the date tabs to the first-leg detail card.

Mini-list duplicate fix: when the sibling search returned 0 matches
the fallback path used to leak the URL-parsed per-leg breakdown into
the rail, producing a first-leg-only row stacked next to the
synthesized combined row. Now the fallback is empty — the mini-list
just shows the (synthesized) current flight on its own.

FullRouteTimeline now uses the API's pre-formatted .localTime instead
of the full ISO .local, so 00:30 / 02:00 shows up instead of
2026-04-26T00:30:00+03:00.

useAppSettings.buyTicketMaxHours: parse <n>d as well as <n>h (Angular
ships 330d for buyPeriod.max). Without this the Buy button hides for
any flight more than ~3 days out.

Plumbed sortMode/onSortChange/hideColumnHeaders through DayGroupedFlightList
so the sticky ScheduleColumnHeaders and the inner list stay in sync
(removes 2 TS errors in ScheduleSearchPage).
2026-04-23 16:53:38 +03:00
gnezim 37ae7dcd46 Schedule details mini-list: filter to the open flight only
Mirrors Angular's CurrentScheduleService.getScheduleType +
compareFlightsByPId: when the [-1, +1] route search returns the
open flight (matched by carrier+number signature, including each
leg of a connecting itinerary), keep only those instances; when
no match exists, fall back to a 1-item list with just the open
flight (Angular's 'default-schedule' branch). Old behaviour
returned the full route search and dumped every unrelated MOW-MMK
option into the rail.

Add e2e regression that loads the SU 6188 + SU 6341 itinerary and
asserts the rail shows only SU 6188 — not SU 6190 / SU 6699 (the
other Sunday MOW-MMK options that used to appear).
2026-04-23 15:54:19 +03:00
gnezim 2ba4c152e8 Schedule details: gate Питание sub-icons on equipment.meal[] (Angular parity)
Angular's flight-details-meal.component.html renders each
Эконом / Комфорт / Бизнес sub-icon under *ngIf=hasEconomyMeal etc —
flights with no meal data show just the cutlery icon and caption
with no class pills. React was hardcoding all three regardless of
data, so SU 6188 (whose API returns meal=[]) showed three meaningless
icons; SU 6341 (meal=[Comfort, Economy, Business]) showed the right
ones by accident.

Read leg.equipment.meal, build a Set<MealType>, render each pill
only when its type is in the set. Add a unit test covering empty,
partial, and full meal data and an e2e regression on the live
MOW→LED→MMK itinerary (test asserts SU 6188 has none, SU 6341 has
all three). The e2e depends on backend data and can flake when the
dev proxy WAF cookie has expired.
2026-04-23 15:33:17 +03:00
gnezim 4c79914313 Schedule details: include every leg in URL for connecting itineraries
handleFlightClick previously emitted only the first flight ID even
when the row was a connecting itinerary, so the details page only
showed leg 1 (e.g. SU 6188 Moscow→St-Petersburg) and dropped leg 2
(SU 6341 St-Petersburg→Murmansk). Walk `_childFlightIds` instead,
interleaving each leg's airport codes around its segment so the
output URL is /schedule/{depAir}/{flight1}-{date}/{midAir}/
{flight2}-{date}/{arrAir}?request=… — the splat route already
parses any number of segments and the details page already maps
over flights[], so both cards + the Пересадка transfer bar render
correctly.

Add an e2e that clicks a connecting row, asserts the multi-segment
URL pattern, the two .schedule-details__flight cards, and the
Пересадка bar. The test depends on live backend data so it can be
flaky in environments where the dev proxy cookie has expired.
2026-04-23 15:17:11 +03:00
gnezim e52d673658 Revert "Schedule list: row click navigates, no inline expand (TIRREDESIGN-4)"
This reverts commit 7f9ce8bf26.
2026-04-23 14:54:28 +03:00
gnezim 7f9ce8bf26 Schedule list: row click navigates, no inline expand (TIRREDESIGN-4)
Spec calls for the Schedule list to drop the inline expanded view
entirely — clicking a row should take the user straight to the
flight-details page, with the per-row 'Купить билет' affordance
exposed only on hover.

FlightList: gate inline-expand on whether renderExpandedBody is
provided, not on onFlightClick. When the caller supplies onFlightClick
without a body renderer, wire it to FlightCard.onClick (single-click
navigate). When both are present (Online-Board), keep the existing
expandable + onViewDetails wiring.

DayGroupedFlightList: drop renderScheduleBody/renderExpandedBody
from both FlightList sites (single-day and per-day-group). Schedule
rows now navigate via onFlightClick; the 'Купить билет' link is the
inlineBuyUrl rendered by FlightCard with hover-only CSS.

Add a 2-spec e2e: row click changes URL to /schedule/<segment>?
request=schedule-route-… and the per-row buy link is anchor-tagged
to the SB booking URL on every visible row.
2026-04-23 14:52:28 +03:00
gnezim efe6b8be0a Rename search-history block 'Вы искали' → 'Ранее искали' (TIRREDESIGN-5)
Spec calls out the exact label change for the recent-searches sidebar
on Schedule and Online-Board start pages. RU was the literal 'Вы
искали' (You searched) — switch to 'Ранее искали' (Previously
searched), matching the section heading and the inline 'Ранее искали
в Онлайн-Табло' / 'Ранее искали в Расписании' captions. Other
locales already used 'Previous searches' / 'Search history' wording
and stay unchanged. Add 2-spec e2e seeding sessionStorage with a
valid history item and asserting the new label appears.
2026-04-23 14:37:19 +03:00
gnezim bd3bb1450c Fix Schedule calendar operating-days lookup (TIRREDESIGN-12)
ScheduleFilter.computeDisabledDates compared the cursor date in
yyyymmdd form against the schedule /days API output which is
yyyy-MM-dd. Lookups never matched, so every calendar cell ended up
disabled. Add a small dateToIsoYmd helper, switch the comparison
to ISO format, and add an e2e regression that asserts the picker
contains both enabled and disabled cells for a real route.
2026-04-23 14:23:40 +03:00
gnezim 382b2e1728 Add Onlineboard time-range filter regression e2e (TIRREDESIGN-11)
Verifies the URL-driven time filter (e.g. -14001800 suffix)
restricts the rendered list and updates the slider label, plus the
slider→submit→URL pipeline persists the chosen range. No code
change required for TIRREDESIGN-11 — adding regression tests.
2026-04-23 14:15:56 +03:00
gnezim 557ecefd4b Add Onlineboard row Buy/Register regression e2e (TIRREDESIGN-10)
Verified that React already surfaces the Купить билет and Онлайн
регистрация buttons in the expanded row body via FlightActions when
the per-flight visibility rules pass (canBuyTicket: now within
[dep-72h, dep-2h]; canRegister: registration.status==='InProgress'
and operating carrier in AIRLINES). No code change required for
TIRREDESIGN-10 — adding a regression test to lock the behaviour.
2026-04-23 13:42:27 +03:00
gnezim 49a19a7f63 Schedule date-picker: snap single click to Mon-Sun week + auto-close
Angular's schedule date-picker is week-granular (TZ §4.1.9.4): one
click anywhere selects the whole calendar week, the panel closes and
the input shows the resulting range. React was using PrimeReact's
plain range-mode (two clicks required), so a single click left the
range half-set and the panel open.

Add snapToWeek() in ScheduleStartPage and ScheduleFilter, route both
outbound + return Calendars through new onSelect handlers that
compute Mon-Sun, commit it as the value, and call cal.hide() via
ref. Enable selectOtherMonths so bleed-in days from the previous /
next month are clickable. Add 3-test e2e spec (week snap from a
mid-week day, snap from a next-month bleed-in day, range placeholder
when empty).
2026-04-23 13:29:04 +03:00
gnezim c6055d94ba Add details-page breadcrumb leaf with Angular-correct labels
Live audit shows Angular DOES add a third crumb on /onlineboard and
/schedule details pages when the user reached them through ?request=:
- onlineboard-flight     → 'Рейс: SU 6188'  (carrier+number space-separated)
- onlineboard-route      → 'Маршрут: Москва - Санкт-Петербург'
- onlineboard-departure  → 'Вылет: Шереметьево'  (airport name when IATA is airport-only)
- onlineboard-arrival    → 'Прилет: Санкт-Петербург'  (city name when IATA is also a city)
- schedule-route         → 'Москва - Санкт-Петербург' (no 'Маршрут:' prefix)

Restore the leaf-emit logic, fix RU FLIGHT-NUMBER label to 'Рейс:',
add spaces around the dash in ROUTE/SCHEDULE-ROUTE across all 9
locales, and add useStationDisplayName (city dict first, airport
dict fallback — no parent-city escalation, matches Angular's
getCityOrAirport).
2026-04-23 13:11:39 +03:00
gnezim ed3dc1053b Stop breadcrumb trail at section name (Angular parity)
Live audit of flights.test.aeroflot.ru shows the trail never adds a
third 'leaf' crumb — even on details pages reached with a ?request=
context. React was emitting an extra crumb in three places:
ScheduleSearchPage (route heading), ScheduleDetailsPage (back-to-
search leaf), OnlineBoardDetailsPage (back-to-search leaf). Strip
all three; rewrite the affected unit tests to assert the leaf is
absent; add an e2e parity spec covering all six page types.
2026-04-23 12:57:16 +03:00
gnezim 3d32897b10 Add e2e test for TIRREDESIGN-8 day-tabs window
Covers: full -1/+14 range across 3 pages (16 in-range dates), 5 greyed
out-of-range dates on the last page, right-arrow disabled at boundary,
sibling tabs stay enabled after consecutive clicks.
2026-04-23 12:43:39 +03:00
gnezim c2f2c9e089 Grey out non-operating days in filter calendars (TIRREDESIGN-12)
CI / ci (push) Failing after 35s
Deploy / build-and-deploy (push) Failing after 5s
The Online-Board + Schedule filter calendars ignored the 31-day
operating-days bitmask the API ships, so users could pick dates that
have no flights and land on empty result pages. Angular wires
[disabledDates] from the same endpoint; we do the same here.

- useCalendarDays / useScheduleCalendar now accept null params so the
  callers can skip the fetch until they have enough input to resolve
  a calendar segment (full flight number, route with both cities).
- OnlineBoardFilter + ScheduleFilter compute disabledDates by
  differencing the min/max window against the API's available-days
  array, then feed that into PrimeReact's Calendar.
- Test mocks added to sidestep the api provider requirement in the
  filter/start-page/integration trees that render these components.
2026-04-22 14:17:00 +03:00
gnezim 848ba48484 Extract SwapCityButton so all 3 filter blocks share the same DOM
OnlineBoard, Schedule and FlightsMap each inlined their own swap-cities
wrapper — three different class names and, in FlightsMap's case, a different
inline SVG. Angular keeps logic separate per filter (Schedule/FlightsMap
clear validation on swap, OnlineBoard doesn't) but its DOM is identical
across the three. Mirror that: ship a shared <SwapCityButton> that owns
the `.change-container > .button-change > .svg--change-city` markup and
CSS, keep each caller's onClick local.

Also align filter visuals: FlightsMapFilter row gap $space-m → $space-l to
match OnlineBoard/Schedule, and CityAutocomplete label gutter $space-s2 →
$space-m to match Angular's city-autocomplete.component.scss.
2026-04-22 11:03:57 +03:00
gnezim 268205fc2f Stub geolocation + matchMedia in OB start-page integration test (P2 regression fix) 2026-04-21 19:35:39 +03:00
gnezim e935596813 Add P1 e2e coverage: URL guards + breadcrumbs + cross-section nav per TZ 4.1.2/4/8 2026-04-21 18:13:24 +03:00
gnezim 9ff034d19f OnlineBoard search: render Купить/Онлайн регистрация in expanded row
Angular's board search results expansion shows [Купить] [Онлайн
регистрация] [Детали рейса]. React only rendered Details. Added a
`renderActions` prop on FlightCard/FlightList so the feature layer
can inject extra buttons without the ui layer importing from
features. OnlineBoardSearchPage wires it to FlightActions with
showShare=false (the row already has a dedicated share icon).

Visibility rules fall through to canBuyTicket / canRegister (same
as BoardDetailsHeader), so cancelled/past flights still hide the
Buy button and carriers without a registrationUrl still hide the
Online Registration button — matching Angular's per-flight gating.

Integration test mocks useAppSettings to avoid requiring the real
ApiClientProvider in flight-search.test.tsx.
2026-04-20 18:27:31 +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 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 2d77e86c88 Match Angular details layout when no parent request is present
- Drop the duplicate FlightCard summary between the header and the route
  strip — Angular's details page shows the route strip directly under the
  board-details-header, with no 'SU 6272 Russia 15:30/15:22 ...' row.
- Keep the mini-list sidebar visible even when allFlights has only one
  entry; fall back to rendering the current flight as a single item,
  matching Angular's flights-details-list-flight behavior.
2026-04-18 16:41:35 +03:00
gnezim 583fe45c14 Match Angular details layout: flat accordion rows, progress labels, mini-list
- Accordion now renders flat rows (icon + caption/status on the left,
  Время начала / Время окончания columns on the right) under a single
  collapse toggle, matching Angular's flight-details-wrapper layout.
- Aircraft row moves the model title into the row subtitle and drops the
  duplicate 'Борт' property, so the row reads 'Борт / Sukhoi SuperJet 100'.
- Route strip grows a green in-flight state with a plane marker on the
  progress bar plus 'В пути Xч Xм' / 'До прилета Xч Xм' durations derived
  from actual-departure and scheduled-arrival.
- Mini-list sidebar now fetches sibling flights from the departure station
  parsed from the '?request=onlineboard-departure-LED-...' URL param, and
  the item layout gains city + airport labels with formatted time/date
  columns (replacing raw ISO timestamps and IATA codes).
- Tests and mocks updated: add useSearchParams / useOnlineBoard mocks,
  relocate aircraft-title assertions to the accordion level, and expect
  city names on mini-list items.
2026-04-18 16:26:39 +03:00
gnezim ec67111d10 Rebuild details leg block to Angular layout
Replace the vertically-stacked station blocks with Angular's
route-strip + time-table layout:

- Top row: big time + city + airport/terminal on both sides, with
  the status label and a progress bar in the middle. Scheduled time
  shows as a small strike-through line under the actual when delayed.
  Arrival time picks up the '+1' day-change marker when the flight
  crosses midnight.
- Bottom row: 'По расписанию' + 'Фактическое / Ожидаемое' detail
  rows for both departure and arrival, with UTC offsets and dates
  styled exactly like the Angular design.

The progress bar colors switch between blue (in-flight), green
(finished/arrived) and red (cancelled). The status text localizes
via FLIGHT-STATUSES.*.

Integration tests switched from asserting IATA codes to asserting
the city names, which now render in the promoted row (matches
Angular and the audit feedback).
2026-04-18 15:53:50 +03:00
gnezim cd398fb8d9 Hide redundant 'Operated by' text on details page
The badge already conveys the operating carrier via the airline logo
(e.g. РОССИЯ for FV-operated Aeroflot flights), and code-share flights
get an additional 'KL 123, AF 456...' line below the flight number
from DetailsHeaderBadge. The separate 'Выполняет рейс: FV' line
duplicated that information.

Keep the div in the DOM with a visually-hidden class so tests that
target the data-testid still find it. Also add the .visually-hidden
utility class to layout.scss.

Test updated to assert the slot still exists but is hidden.
2026-04-18 13:53:13 +03:00
gnezim 0c660671ea Close the remaining high-impact parity gaps
Batch of fixes identified by the comparison audit:

Schedule search page (ScheduleSearchPage):
- Resolve IATA codes to city/airport names, so the H1 reads
  'Маршрут: Шереметьево - Санкт-Петербург' instead of 'SVO - LED'.
- Breadcrumb trail now includes the human-friendly route as its
  last entry.

Details page (OnlineBoardDetailsPage):
- Hide the 'Перелет N' leg header for single-leg flights (Angular
  parity — that label is only meaningful for multi-leg routes).
- Translate the leg status through FLIGHT-STATUSES.* instead of
  emitting the raw enum ('Cancelled' → 'Отменен', etc.).
- Humanize leg and total flying time through formatDuration so the
  page reads '1ч 25м' rather than '01:25:00'.

Details meal panel (MealPanel):
- Use the same FOOD.* translation keys as Angular, so labels become
  'Эконом класс / Комфорт класс / Бизнес класс / Специальное
  питание'.
- Add the Special-meal icon + link (was stubbed out previously).

Accessibility:
- Route the English aria-labels through new SHARED.A11Y-* keys in
  DayTabs pagination, FlightListSkeleton, ScrollUpButton and
  PrintButton.

Breadcrumbs:
- Render the 'Главная' crumb as a link even when it's the only /
  last item (it was dropping to plain text on start pages). Angular
  always links it to aeroflot.ru.

Tests updated to assert the new translated labels and duration
formatting; 1258 tests passing.
2026-04-18 13:27:56 +03:00
gnezim 692fb5e292 Translate schedule headers and connection badges
- Schedule round-trip page: 'Outbound' / 'Return' section headings now
  use SCHEDULE.OUTBOUND / SCHEDULE.RETURN keys ('Туда' / 'Обратно' in
  Russian).
- SignalR connection badge: 'Live' / 'Reconnecting…' / 'Offline' now
  route through SHARED.CONNECTION-* keys ('Онлайн' / 'Соединение…' /
  'Нет связи' in Russian). Applied on both board search and details
  pages.
- Bag-belt label on leg stations switched to the existing
  DETAILS.BAG_BELT key (SHARED variant doesn't exist).
- Integration tests updated to match the new badge keys under mocked t.
2026-04-18 00:27:09 +03:00
gnezim a444b71bcd Translate remaining English strings and color statuses
- FlightList empty-state, Operated-by label, details/schedule error
  and not-found messages now route through i18n instead of hardcoded
  English. Added BOARD.FLIGHT-NOT-FOUND, BOARD.LOAD-FAILED,
  BOARD.OPERATED-BY, SHARED.RETRY to all nine locales.
- FlightStatus label now picks up the same colour as the plane icon
  (red for Cancelled, green for Arrived/Landed, blue for In Flight,
  orange for Delayed) — matches Angular's flight-status text treatment
  so 'Отменен' reads at a glance.
- Tests updated to expect the translation keys under the mocked `t`.
2026-04-18 00:15:46 +03:00
gnezim ad8367c203 Refine Angular parity: titles, airline header, labels
Search page:
- Title and breadcrumb now read the station dictionaries and render the
  human-friendly route heading (e.g. 'Маршрут: Шереметьево - Пулково')
  for route/departure/arrival/flight search URLs, mirroring Angular.

Details page:
- Main H1 becomes 'Информация о рейсе: SU 6805, Москва - Санкт-Петербург'
  (carrier + flight number + origin/destination cities), not a bare
  flight number.
- Add 'Детали рейса' section header above the accordion to match
  Angular's flight-details-wrapper layout.
- Promote the airline block in BoardDetailsHeader: drop the legacy
  OperatorLogo copy with broken asset paths and hand off to the shared
  <OperatorLogo> under src/ui/flights. Render it with the
  'авиакомпания' caption beside the enlarged flight number.
- Replace hardcoded English 'Leg' / 'Total flying time' / 'Aircraft:'
  with i18n keys, added to all nine locale files.

Test harness:
- Add vi.mock for useDictionaries in the three suites that render
  OnlineBoardSearchPage (the new heading helper calls the hook and
  crashed without ApiClientProvider). 1256 tests passing.
2026-04-17 23:48:06 +03:00
gnezim 84e6d265fc Align board search + details with Angular visual parity
Both pages were rendering content directly on the dark-blue page
background, which made the flight list and details card effectively
invisible. Angular wraps the same content in a white card (section.frame)
with drop shadow.

Changes:
- Wrap FlightList in <section class='frame'> on the search page and wrap
  the details body the same way.
- Replace the inline numbered .calendar-day strip on the search page
  with the existing <DayTabs> component — the same one the details page
  already uses (weekday + day + month labels, ‹/› paging).
- Pass onFlightClick through FlightList into FlightCard so whole rows
  are keyboard-accessible buttons, matching Angular's row-level click.
  The off-screen data-testid='flight-link-*' buttons stay for e2e.
- Fix 'Leg NaN' header + the React key warning in FlightLegs when
  the API returns a Direct leg without an index field.
- Update the existing flight-search integration test to target the
  DayTabs testid instead of the old ad-hoc calendar-strip one.

A docs/parity-report-2026-04-17.md file captures the diffs I applied
and a punch list of the remaining parity gaps (operator logo on rows,
delay/day-change glyphs, Share button visibility on board details, the
aircraft panel as a table). Those need per-component work against the
Angular templates and will follow in a separate pass.
2026-04-17 23:14:59 +03:00
gnezim 38b33aa349 Update board integration test assertions for dateTo = date + 1 day 2026-04-17 22:51:43 +03:00
gnezim 896e6bd83d Switch filter time-selector to Angular compact layout 2026-04-17 15:16:49 +03:00
gnezim 31c6bf1788 Add integration coverage for multi-leg timeline and transfer-bar
Verifies FullRouteTimeline + TransferBar render for MultiLeg fixtures
and stay absent for Direct flights, locking in the B.5 page wiring.
2026-04-17 02:41:31 +03:00