961 Commits

Author SHA1 Message Date
gnezim 2e13d2d7ef Fix Schedule UI regressions and complete non-RU/EN locale translations
- Duration now sums segments + transfers (last arrival − first departure)
  for multi-leg/connecting in Schedule, matching TZ §4.1.14.3 and Angular.
- Default day auto-expands per TZ §4.1.14: current-week today, future-week
  first valid day, last-valid-day fallback when earlier days are out of
  window.
- Aircraft model no longer leaks into collapsed rows; shown only when
  expanded AND direct, mirroring Angular's
  operator-logo-and-model [showModel]="expanded && direct".
- Week tabs use MONTH-SHORT.* translation table so Russian renders
  "27 апр. - 3 май." instead of genitive "мая" from Intl.
- "Ранее искали" → "Вы искали" across all 9 locales (TZ §4.1.9.5).
- Sort-arrow headers compacted (inline-flex nowrap, zero gap) so labels
  stay on one line next to the chevrons.
- robots.txt allows Yandex/Googlebot/* with no Disallow (TZ §4.1.20).
- 6 non-RU/EN locales (de/es/fr/it/ja/ko) + zh were missing ~45 strings
  each; translated from Angular where present, hand-translated otherwise
  so every locale is down to the two intentional `.undefined` stubs.
2026-04-22 17:02:31 +03:00
gnezim a9dacf0b97 Clear lint backlog so make check runs green
CI / ci (push) Failing after 57s
Deploy / build-and-deploy (push) Failing after 5s
ESLint had 30 findings (13 errors, 17 warnings) that had accumulated
across the codebase. Most came out of --fix; the rest needed small
manual cleanups:

- storage.ts: replace import('zod') type annotations with the already-
  imported ZodSchema type
- CityPickerPopup.tsx: drop a stale jsx-a11y disable directive for a
  rule that isn't in the shared config, and narrow row.city1 so the
  explicit non-null assertions are no longer needed
- keyboardLayoutConverter.ts: guard the per-index reads so we can drop
  the trailing ! from the string indexing
- TimeGroup.tsx: narrow actual via the hasDelay condition and default
  the day-change numbers to 0 instead of asserting non-null
- seo.ts: throw on the unreachable empty-flightIds branch rather than
  fabricating a partial SeoHeadProps
- Various test files: remove captured-but-unused onCity/shouldApply
  refs and stale makeStation/emptyCity locals that drifted during
  earlier refactors

make check now passes typecheck + lint; the one remaining test
failure is the pre-existing OnlineBoardSearchPage timeout test that
flakes under the full suite and passes in isolation.
2026-04-22 15:13:43 +03:00
gnezim 35cae21d92 Fix operator-icon overlap + restore trailing schedule-copy paragraph
CI / ci (push) Failing after 33s
Deploy / build-and-deploy (push) Failing after 5s
- OperatorLogo: moved &--round after per-carrier width rules so the
  round variant wins the cascade. Previously .operator-logo--FV
  (90×15) outranked --round (36×36) for FV flights and the second
  logo on a multi-leg schedule row spilled across the time column.
  Also added a tablet-viewport shrink for --round to 30×30.
- FlightCard now emits the flight-card--schedule modifier when
  direction='schedule' so the 80px/120px/100px/... grid actually
  applies. The default board grid was active on schedule rows, giving
  a too-narrow flight-number column and misaligned logos.
- i18n: replaced single-quoted HTML attributes with double quotes in
  every common.json. i18next-icu parses single quotes as ICU literal
  delimiters and silently drops the closing apostrophe in
  href='…booking'>…, truncating everything after <a ...> inside the
  rendered innerHTML. The schedule start-page bottom-description lost
  its 'онлайн-сервисом' link paragraph as a result.
2026-04-22 14:57:41 +03:00
gnezim 08f06ff1f4 Board time-slider now filters, day-tabs stop blocking (TIRREDESIGN-8 + 11)
CI / ci (push) Has been cancelled
Deploy / build-and-deploy (push) Has been cancelled
TIRREDESIGN-11: the board + schedule endpoints ignore the raw 4-digit
HHMM query values the slider produces and only honour HH:MM:SS (Angular
formats via ApiFormatterService.formatTime). Normalise both at the API
layer so the slider actually narrows results; '2400' collapses to
'23:59:59' since midnight-of-next-day isn't representable.

TIRREDESIGN-8: the 31-day availability bitmask is always anchored to
today (Angular parity — updateCalendar() uses new Date() - 1). We were
passing params.date as the anchor, which shifted the window forward
every time the user picked a future day and caused earlier DayTabs to
fall outside the returned bitmask, grey-listing days that still have
flights.
2026-04-22 14:44:44 +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 7cc0327a12 Show all active transition blocks inline + gate on isActual (TIRREDESIGN-7)
The inline expanded flight card used to pick one of boarding /
deboarding based on the search direction and show just that block.
Angular's board-flight-body renders registration, boarding and
deboarding side-by-side, each gated on the API payload's isActual flag
— TIRREDESIGN-7 expects the same so a flight mid-boarding can still
show that its registration already finished.

- FlightCard now iterates registration/boarding/deboarding and renders
  each row when its isActual flag is set. Gate + dispatch still come
  from depStation on boarding, gate + bag-belt from arrStation on
  deboarding.
- shared.shouldShowTransition swaps 'status != Scheduled' for the
  isActual flag to match Angular's same-payload semantics on the
  details accordion. The Schedule/Cancelled short-circuits stand.
- Test fixture makeFlightWithBoarding scopes its transition to the
  direction under test so the two blocks don't collide on testids.
2026-04-22 13:55:53 +03:00
gnezim 31751d0e84 'Купить билет' hover link + anchor semantics (TIRREDESIGN-6)
The Buy action is now an <a href> instead of a <button> that opens a
window, so users can inspect / middle-click / right-click it like any
normal link. The inline per-row link on the schedule results list only
appears on hover (desktop) — touch devices still navigate via the
details card's Buy button. Copy updated to 'Купить билет' / 'Buy a
ticket' per §4.1.14.4.4.

ScheduleFlightBody, DayGroupedFlightList, ScheduleSearchPage and
ScheduleDetailsPage thread a buyUrlFor → buyUrl URL instead of an
onBuy callback. FlightList/FlightCard gain an inlineBuyUrl prop plus
overlay CSS so the 8-column grid stays intact.
2026-04-22 13:45:40 +03:00
gnezim 8bde3904e1 Per-section history cap (8) + rename 'Вы искали' → 'Ранее искали' (TIRREDESIGN-5)
Angular keeps up to 8 items in each sidebar section (board / schedule
/ flight-number). We were capping the union at 10, which let a burst of
flight-number lookups evict board-route entries. Split the cap by
section so each bucket is independent.

Label also moves from 'Вы искали' → 'Ранее искали' (en: 'Previous
searches') per the redesign copy. Tests cover both the single-section
cap and the independence invariant.
2026-04-22 13:45:30 +03:00
gnezim a26adad895 Schedule row click opens flight details (TIRREDESIGN-4)
FlightList on direction=schedule now wires a row-level onClick so the
entire row navigates to the details page instead of expanding inline.
Matches Angular's schedule-search-result behaviour where each flight
row is a link to the details card.
2026-04-22 13:45:21 +03:00
gnezim 99d86fba29 Show full date-range placeholder in Schedule filter
The schedule calendar input had `padding-right: 2rem` left over from
the era when the calendar icon sat inside the <input> as a background
image. The trigger icon now lives in a sibling `.p-datepicker-trigger`
button (also 2rem wide), so the input was reserving an extra 32 px on
top of that — which truncated 'ДД.ММ.ГГГГ - ДД.ММ.ГГГГ' to
'ДД.ММ.ГГГГ - ДД.ММ....' in the narrow left-column layout. Drop the
redundant override; the input now uses the shared 15 px horizontal
padding from `_prime-calendar.scss` and the full placeholder fits.
2026-04-22 12:27:37 +03:00
gnezim a1089e07dd Port Angular time-range slider styling to the filter sidebars
Angular's `page-time-selector.scss` paints the whole filter slider in
brand blues — pale $blue-light2 track, solid $blue-light range, and
solid $blue-light thumbs with a 2px white ring — and thickens the
horizontal track from PrimeReact's 4px default to 6px. React carried
the stock gray/white PrimeReact theme, which read as a dead, low-
contrast control next to the blue chevrons and calendar icon.

Add the same overrides scoped under `.wrapper--time-selector` so both
OnlineBoard and Schedule (the two sidebars that render the range
slider) pick them up.
2026-04-22 12:13:43 +03:00
gnezim aad94636c7 Use Angular's outlined calendar SVG in the datepicker trigger
PrimeReact ships a solid filled-calendar glyph; Angular's filter calendar
uses a thinner outlined glyph with six "row" tiles drawn in the brand
blue (#418fde). Replace the default icon by hiding PrimeReact's <svg> +
painting `/assets/img/calendar.svg` as a background on
.p-datepicker-trigger, scoped to the three filter-sidebar roots.

Consolidate the per-page .p-datepicker-trigger styling — the three
filter SCSS files each carried their own background/border/color
overrides that kept drifting. Now only the width override lives per
page, everything else is shared in styles/_prime-calendar.scss.
2026-04-22 12:01:21 +03:00
gnezim d7a0d715b7 Stack breadcrumbs above the page H1 on all layout pages
CI / ci (push) Failing after 32s
Deploy / build-and-deploy (push) Failing after 6s
Angular's page-layout template renders the breadcrumb trail and the
page title as separate rows (page-layout.component.html:7-8). React
wrapped both in a single block div, so the inline-flex breadcrumb pill
sat next to the <h1> instead of above it. Flip the wrapper to
`display: flex; flex-direction: column; align-items: flex-start` so the
pill sits on its own row above the heading, keeping its content-sized
width.
2026-04-22 11:44:55 +03:00
gnezim 8feb5de70e Dev-server: fall back between direct and HTTPS_PROXY transports
The local WAF is unpredictable: some windows the gost VPN tunnel at
127.0.0.1:8888 is 503-ing (direct must work), other windows the direct IP
is throttled to 403 by Ngenix (VPN must be used). The previous hardcoded
`--noproxy '*'` survived one of those states only, which is why the
dictionary load surfaced as console 403s as soon as the state flipped.

Try direct first (faster when it works, simpler cookie jar), fall back
through the system HTTPS_PROXY on 4xx/5xx or curl failure, keep a
separate cookie jar per transport so the Ngenix cookies don't cross-
contaminate edge nodes.
2026-04-22 11:44:46 +03:00
gnezim 1d3f0efc5f Align filter-sidebar label + datepicker styling across all 3 pages
OnlineBoard, Schedule and FlightsMap filter sidebars drifted visually:
ScheduleFilter used $light-gray + 4px gutter for .label--filter while the
other two used $gray + $label-margin-bottom (10px). CityAutocomplete's own
__label also defaulted to $light-gray, making city labels a different tone
from the date/time labels alongside them.

Angular's canonical is $gray + $label-margin-bottom everywhere on the
filter sidebar — align both rules to that.

Also fix the datepicker's internal seam: PrimeReact's p-calendar-w-btn
put the 1px border on the input, leaving the trigger icon visibly outside
the bordered area. Angular renders the whole control as a single pill.
Promote the border to the outer .p-calendar wrapper and strip the inner
input's border + shadow, scoped to the three filter-panel roots.
2026-04-22 11:28:56 +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 408afa6ab5 Resolve IATA to city names in search-page <title>
Deep-linked search pages rendered `Расписание по маршруту: MOW-MMK`
in the document title because the route page called the SEO builder
synchronously with the raw URL params, before the dictionary was
available. The on-page H1 resolved correctly via `useDictionaries`
inside the child component, but the parent never re-rendered so the
title stayed frozen on IATA codes. Wire `useCityName` into the 5 deep-
link route pages (schedule one-way / round-trip, onlineboard route /
departure / arrival) so the SEO title reflects city names once the
dictionary loads — per TZ §4.1.14.1.
2026-04-22 09:41:16 +03:00
gnezim a4e8d87688 Fix dev-server proxy so API forwarding survives WAF cookie challenge
curl was inheriting HTTPS_PROXY=127.0.0.1:8888 (a local gost tunnel whose
upstream VPN intermittently 503s), making the app fail to load dictionaries
in dev. Upstream Ngenix WAF also newly requires a 307-to-self cookie
handshake (ngenix_valid) before issuing JSON. Bypass the system proxy
directly and keep a per-session cookie jar so the handshake only runs once.
2026-04-22 09:41:03 +03:00
gnezim 678cde3ed2 Fix city-input + date-picker styling + remove extra Schedule section
Live-report issues (user-driven smoke test):

1. Schedule city input shown with a thick default PrimeReact border
   (no such border on Board). Root cause: CityAutocomplete's outer
   wrapper carries the border via box-shadow, but the inner .p-inputtext
   still had PrimeReact's 'border: 1px solid #a6a6a6' from the shared
   prime-styles.scss. Angular silences it with a global 'city-autocomplete
   input.p-inputtext { border: none; box-shadow: none }' rule. Added
   the same reset to our shared CityAutocomplete.scss + killed the
   PrimeReact focus shadow so only one border remains.

2. Clear-X button hidden on Board + Map (visible only on Schedule).
   Root cause: a legacy Angular-port rule in _layout.scss
   '.p-accordion .p-accordion-content button.button-clear { display: none }'
   beat our '.city-autocomplete__input--has-value .button-clear { display: block }'
   on specificity — Board's CityAutocomplete sits inside the accordion
   filter. Removed the legacy rule (it targeted an Angular-only close
   affordance that doesn't exist in the React app); if we re-add such
   an element later it'll need a distinct class.

3. Date-picker placeholder 'ДД.ММ.ГГГГ - ДД.ММ.ГГГГ' truncated because
   the ScheduleStartPage inherits 16px font. Stepped calendar font down
   to 14px (matches Angular's base body .p-inputtext) + added right
   padding so the trigger icon doesn't sit on top of the placeholder.

4. Schedule start page showed a 'Возможности расписания' info section
   (TZ Table 9 Title5+Title6) that the Angular reference
   (ClientApp/.../schedule-start-page.component.html) has commented out.
   Followed Angular — removed the block. Kept i18n keys for future work.
   Updated the two corresponding assertion tests to check the block is
   NOT rendered (parity with Angular).

Also during the same session, there was a sub-bug introduced in the
first SCSS edit (I accidentally nested .button-clear inside
:focus-within, inverting display state). Fixed by moving the rule back
under __input directly.

2044 unit tests pass, typecheck clean. Live retest across all three
sections (Board / Schedule / Map): X appears only when city is filled,
inner input shows single clean border, Schedule calendar placeholder
fits, 'Возможности расписания' no longer renders.
2026-04-22 03:53:11 +03:00
gnezim c18b4b212e Fix popular-flight Search-button no-op when today is mid-week
User report: clicking a 'Расписание туда' popular tile on /onlineboard
filled the Schedule form but clicking Search did nothing.

Two bugs:
1. OnlineBoardStartPage's Schedule-bound popular-click handler wrote
   only { departure, arrival, withReturn } to the transient prefill —
   it skipped dateFrom/dateTo entirely. The Schedule calendar rendered
   empty, and on submit the form defaulted to today..today+7 (acceptable
   but TZ §4.1.5 mandates current-week prefill).
2. currentWeekBounds() returned the raw Monday of the ISO week. When
   today is mid-week (Tue-Sun), that Monday is N days in the past, so
   the Schedule route guard (§4.1.2, -1/+330 window) rejected the URL
   and silently redirected back to /schedule — user saw 'Search does
   nothing'.

Fix: populate dateFrom/dateTo (and returnDateFrom/returnDateTo for
RouteWithBack) in the Schedule prefill from both handlers, and clamp
the `from` end of currentWeekBounds() to max(Mon, today-1) so the
prefilled range is always inside the window. nextWeekBounds now derives
from the raw Monday (not the clamped `from`) so next-week is always
the true next ISO week.

Live retest: popular 'Москва — Мурманск' → Schedule prefilled with
cities + '21.04.2026 - 26.04.2026' → Search navigates to
/schedule/route/MOW-MMK-20260421-20260426. 0 console errors.
2044 tests pass, typecheck clean.
2026-04-22 03:26:46 +03:00
gnezim b5b5131eee Emit document title on error pages (404/500) per TZ 4.1.21
Previously the 404/500 React ErrorPage set the page content but not
document.title, so the browser tab showed the URL path instead of
a localized title. Added <title> element + imperative document.title
assignment (pattern from SeoHead.tsx) so both SSR and client set
the tab title to "<code> — <localized-title>", e.g. "404 — Страница
не найдена".
2026-04-22 03:07:55 +03:00
gnezim 06b1aba530 Revert map marker permanent label to city name (not IATA code)
Earlier §4.1.24.3 R24 fix (commit 0bb6bf2) set the permanent on-map
label to the IATA city code. That mis-read the TZ: §4.1.24.3 describes
the hover tooltip (всплывающая подсказка) as showing the airport
code, not the always-visible marker label. Angular reference + the
user-facing baseline render the permanent label as the localized
city name.

- FlightsMapStartPage: label = city.name (localized via dictionary).
- Updated two test assertions that had codified the previous IATA-
  based form.

Live retest: map now shows "Москва", "Санкт-Петербург", "Сочи", etc.
on its markers. 2044 tests pass, typecheck clean.
2026-04-22 02:56:45 +03:00
gnezim 26d116f18e Fix browser-runtime TZ-compliance gaps found during live smoke test
Three gaps found by navigating the running app with Playwright:

1. parseFlightUrlParams did not zero-pad flight numbers. Deep-link URLs
   like /onlineboard/flight/SU100-20260422 produced API calls with
   flightNumber=SU100 (3 digits) and backend replied 400. Per TZ
   4.1.2-R4, the canonical form is 4-digit zero-padded. Padding moved
   into the parser so every downstream consumer sees SU0100.
2. SEO.SCHEDULE.MAIN.TITLE was the long SEO variant
   ("Расписание прямых и стыковочных рейсов авиакомпании Аэрофлот").
   Per TZ Table 6 row 9 the target is the short form "Расписание";
   fixed ru + en locales.
3. SEO.SCHEDULE.SEARCH.TITLE was "Расписание рейсов {dep} - {arr}
   | Аэрофлот"; per TZ Table 6 row 10 the target is "Расписание по
   маршруту: {dep}-{arr}"; fixed ru + en locales.

Three existing url.test.ts cases asserted the unpadded form; updated
them to match TZ and annotated with rule ID. Full suite 2044 pass,
typecheck clean. Live retest confirms 0 console errors / 0 warnings
on start pages, results pages, details pages.
2026-04-22 02:48:48 +03:00
gnezim 2f386cbaf0 Mark P6 rules Done + project-complete summary in TZ audit spec
CI / ci (push) Failing after 35s
Deploy / build-and-deploy (push) Failing after 5s
2026-04-22 02:21:57 +03:00
gnezim e433c0dc13 Fix noUncheckedIndexedAccess errors in ErrorPage.test.tsx 2026-04-22 02:13:15 +03:00
gnezim 83a9edb44e §4.1.24: assertion tests for all 6 sub-subsection clusters
Adds 48 new rule-tagged tests across 7 test files covering:
- §4.1.24.1/.2: filter disabled states (R13/R14/R16), swap button (R11),
  no-collapse (R8), hint text (R19), IATA tooltip label (R24)
- §4.1.24.3: arc style (R25), rendering mode (R21/R27/R28/R29),
  domestic/intl/connecting filters (R32-R35), zoom tiers (R23)
- §4.1.24.4: click sequence first/second/third (R36/R37/R39/R41)
- §4.1.24.5: API endpoint contract, bit-string parsing (R44/R45)
- §4.1.24.6: CTA URL format, new-tab intent, date-omit (R46/R47/R48)

Total: 175 tests, all passing.
2026-04-22 02:09:06 +03:00
gnezim 41d229a197 §4.1.24.6 R48: omit date segment in SB URL when Дата рейса not set
TZ §4.1.24.6: "Если Дата рейса не известна, то переход в SB должен
выполнятся без даты." buildBuyTicketUrl now accepts date as
string | undefined; when undefined the route triple is {dep}.{arr}
instead of {dep}.{YYYYMMDD}.{arr}. FlightsMapStartPage passes
filterState.date directly (possibly undefined) instead of defaulting
to today.
2026-04-22 02:08:56 +03:00
gnezim 0bb6bf2032 §4.1.24.3 R24: map marker tooltip label = IATA code, not city name
TZ §4.1.24.3 line 3098: "всплывающая подсказка с кодом аэропорта".
The marker `label` now uses `city.code` (IATA city code) instead of the
human-readable city name. On hover, Leaflet's tooltip shows the code.
2026-04-22 02:08:49 +03:00
gnezim f5dfa14eab §4.1.24.1/.2: filter label hidden on mobile; date locked until departure set
- Hide `.flights-map-filter-header` on mobile via `@include screen.mobile`
  so the "Найдите свой маршрут" label is absent on phone (R7).
- Disable the PrimeReact Calendar and DayQuickPick when `Город вылета` is
  empty; date picker must not be selectable without a departure city (R16).
- Add `disabled?` prop to DayQuickPick so callers can block the quick-day
  buttons on mobile (R16 mobile quick-day parity).
2026-04-22 02:08:43 +03:00
gnezim a94b01cee9 Audit 404 + 500 error pages per TZ §4.1.21
Gaps closed:
- noindex meta: ErrorPage now emits <meta name="robots" content="noindex,nofollow"> (R6)
- 500 refresh CTA: add PAGE500.REFRESH i18n key (9 locales) and a reload button (R5)
- SSR HTTP status: $.tsx converted to $/page.tsx+error.tsx; loader throws Response(404)
  so Modern.js emits the correct status code; same pattern for error/[code]/page.tsx (R8)
- Add error.tsx error-elements so the branded page renders after the loader throws

Pre-existing (already compliant): URL preservation, root link, all 9 locales, support link.
Tests: 34 new assertions cover R4–R8 (noindex, root link, refresh, i18n keys, loader status).
2026-04-22 01:56:53 +03:00
gnezim 5286049420 Audit OpenGraph + canonical + hreflang per TZ 4.1.19/20 (assertion tests)
All three feature seo builders already emitted the full OG set (title,
description, url, image, type, locale, site_name), canonical with no
query params, and hreflang for all 9 locales + x-default. No builder
gaps found. Added explicit §4.1.19/20 requirement-ID test cases to each
seo.test.ts so the contractual coverage is machine-verifiable.
2026-04-22 01:48:00 +03:00
gnezim 944015d658 Add JSON-LD microdata builders per TZ 4.1.19 + CLAUDE.md #6
WebSite JSON-LD now emitted on Online Board and Schedule start pages
via buildWebsiteJsonLd in the shared jsonLdBuilders module. Flight Map
already had WebPage JSON-LD; Online Board/Schedule search and details
pages already rendered Flight/ItemList JSON-LD directly in components.
2026-04-22 01:45:32 +03:00
gnezim 4904ba31c9 Audit caching behavior per TZ 4.1.18 (all 3 rules backend-responsibility)
Client makes no stale-serving assumptions: every Online-Board and Schedule
search triggers a fresh upstream fetch; dictionaries are loaded once per
session. Cache-Control TTLs (≤1 min board, ≤10 min schedule) and ETag/304
for dictionary endpoints are set by the backend HTTP layer. CachedApiClient
/ ServerLruCache infrastructure exists in src/shared/api/ for future SSR
caching if needed. All three 4.1.18 rules marked Out-of-scope (backend) in
the spec; coverage counters updated (13 → 16 out-of-scope, TBD −3).
2026-04-22 01:40:42 +03:00
gnezim 187977a39f Close C5 TZ 4.1.1-R22 typo conflict (Flight-Map placeholder uses ДД.ММ.ГГГГ) 2026-04-22 01:37:16 +03:00
gnezim fcf48348d5 Populate rule rows for P6 subsections 4.1.18/19/20/21/24 in TZ audit spec 2026-04-22 01:35:53 +03:00
gnezim f961a1d394 Add P6 implementation plan: SEO + errors + cache + flight map 2026-04-22 01:28:38 +03:00
gnezim 21f7bcc57c Mark P5 (flight cards + timeline + icons + Уточняется) rules Done in TZ audit spec
- §4.1.15.1–.11: ~28 Done + ~70 Implemented across structure, mini-list,
  day-tabs, direct flight, multi-segment, intermediate landing, timeline
  time/status, previous-flight, meals, services
- §4.1.16.1–.8: ~16 Done + ~37 Implemented; 4 TBD(backlog): three-date-group
  mini-list UI (R10/R11/R14/R15) and full §4.1.16.3.1 nav algorithm (R28–R31)
- §4.1.17-R4 Implemented (per-type badge independence fixed 63fc606)
- §4.1.22-R1–R10 Done (operatorIcon.ts + 35-carrier table + 7-range fallback)
- §4.1.23-R1–R6 Done (tbd.ts helper + orange .tbd-text + 9 locales)
- Conflicts C9/C10/C11 registered and resolved
- Coverage: 381 Done + ~308 Implemented + 7 Partial + ~143 TBD ≈ 853 total
- Merge log row added for P5 (27fd4ac..67504aa)
2026-04-22 01:22:59 +03:00
gnezim 67504aa4d6 Fix P5 Task 13 typecheck errors (exactOptionalPropertyTypes, union narrowing, unused props) 2026-04-22 01:07:25 +03:00
gnezim 896dea9297 Audit details page structure + mini-list + day tabs per TZ 4.1.15.1-3 + 4.1.16.1-3
- FlightsMiniListItem: SVO/VKO airport names rendered as role=link spans that
  open external sites in a new tab (R19, R20) — avoids <a> nesting inside Link
- ScheduleDetailsPage: wire FlightsMiniList into contentLeft and DayTabs into
  stickyContent (schedule window [-1, +330]) per §4.1.16.1 R2/R3 and §4.1.16.3 R22
- Add navigation handler for schedule day-tab clicks (simple date URL swap;
  full §4.1.16.3.1 re-search algorithm is deferred)
- Tests: 72 tests across four files covering R12/R13/R16/R17/R22 (mini-list),
  R23/R27/R28 (day-tabs), R3/R5/R6/R7 (page structure), R2/R4/R22 (schedule)
2026-04-22 00:59:59 +03:00
gnezim 0485a3b0ac Lock in execution-days algorithm per TZ 4.1.16.8 (assertion tests)
Add targeted assertions covering every rendering rule in §4.1.16.8:
- DaysOfWeekStrip: Mon/Wed/Fri, weekend-only, single-day patterns;
  explicit bit-index contract (0=Mon … 6=Sun)
- weekDateRange: Mon–Sun ISO week, 6-day span invariant, leading-zero
  dd.MM.yyyy format, Sat input resolves to same week as Mon
- FlightSchedule: daysOfWeek.flight (not .current) drives active days;
  accordion collapses on click; week note anchored to dep-local date
2026-04-22 00:47:27 +03:00
gnezim c0c2d7d748 Audit intermediate landing + transfer per TZ 4.1.15.6 + 4.1.16.7
Three concrete gaps fixed:

1. TransferBar (Online-Board §4.1.15.6): duration now uses actual/estimated
   UTC times when viewType=Onlineboard instead of always scheduled UTC.
   Adds isIntermediateLanding prop (default true) so the label can switch
   between "Промежуточная посадка" and "Пересадка" based on flight-number
   identity rather than being hardcoded. StationChange now always rendered
   (not only when separated) so city/airport/terminal are always shown.

2. ScheduleFlightBody (§4.1.16.7): transferDuration previously computed
   ground time from .local strings ("HH:MM:SS" without timezone), making
   new Date() result timezone-dependent and often NaN. Switched to .utc
   (ISO 8601 with Z suffix) for a correct, deterministic diff.

Tests: 53 pass (8 TransferBar + 32+3 ScheduleFlightBody + 10 computeTransferTime).
New test cases: isIntermediateLanding=false label, StationChange always-on,
--separated class, UTC-based 90-min duration, label distinction per TZ.
2026-04-22 00:44:07 +03:00
gnezim c49a2a8525 Audit connecting flight details per TZ §4.1.16.6
Three fixes:
- Transfer box: use IATA cityCode (not display text) for city-level
  station change detection (TZ §4.1.16.6 rule 12), catching cases where
  city codes differ even if airport codes are the same.
- Transfer box: add terminal-change case — same airport but different
  arrival/departure terminals now renders both codes separated by →
  (TZ §4.1.16.6 rule 14).
- ScheduleDetailsPage title: show all connecting flight numbers in the
  page <h1> and title string (TZ §4.1.16.6 Table 60 header rule 1+5).

Also fixes a pre-existing flaky test in ScheduleFlightBody: todayUtc()
now always returns UTC noon of today to avoid day-boundary races.
2026-04-22 00:39:23 +03:00
gnezim 7fcb844b82 Audit multi-segment flight details per TZ 4.1.15.5 + 4.1.16.5
Gap found and fixed: Timeline route bar (Маршрут section) was rendering
departure/arrival times without day-change badges. TZ §4.1.15.5 rows 3
and 9 require +X/-X indicators whenever a leg crosses midnight.

Added TimeCell component to Timeline that emits the badge when
dayChange != 0, with priority to actual times when canChange=true
(Online Board) and fallback to scheduled (Schedule). Added 9 new
assertion tests covering: no badge when 0, +1/+2/-1 on arrival, badge
on departure, actual-takes-priority, and multi-badge (3 badges when 3
of 4 time cells carry non-zero day offsets).

All other multi-segment rules (routeChanged/returnToAirport from any
leg, codesharing in header, StationChange detection, TransferBar,
per-leg LegRoute with its own arrival day-change badge, ScheduleFlightBody
per-leg TimeGroup) were verified as already implemented. Per-segment
collapse/expand accordion (rows 7 of §4.1.15.5) deferred to Task 13.
2026-04-22 00:32:06 +03:00
gnezim 21b6c90d0f Audit direct flight details per TZ §4.1.15.4/.10/.11
Gaps found and closed:
- Departure gate (§4.1.15.4): rendered in boarding accordion row body,
  sourced from leg.departure.gate (Angular parity: flight-details-boarding L21)
- Departure transfer type / dispatch (§4.1.15.4): rendered in boarding row body
  from leg.departure.dispatch (Angular parity: flight-details-boarding L17)
- Aircraft tail number (§4.1.15.4): rendered in AircraftPanel from
  aircraft.registration field; AIRPLANE.TAIL-NUMBER added to all 9 locales
- BoardingPanel accepts optional departure prop for gate/dispatch display;
  legacy hidden panel keeps existing testids without duplication
- §4.1.15.10 meals + §4.1.15.11 services already implemented (assertion tests
  already cover icon rendering, links, fallback icon)

Tests added: 4 in BoardingPanel, 2 in AircraftPanel, 3 in FlightDetailsAccordion
2026-04-22 00:26:39 +03:00
gnezim 1740af682c Render previous-flight chip as link per TZ §4.1.15.9
Angular rule: show the previous-flight identifier as a clickable link
opening the prior flight's details in a new browser tab, gated on the
flight's scheduled departure being > today − 2 days old. Outside that
window it falls back to plain text to avoid stale cross-links.

Threads locale + departureDateLocal from OnlineBoardDetailsPage through
FlightLegs → FlightDetailsAccordion → AircraftPanel. URL is built with
the existing buildFlightUrlParams helper using previousFlight.localDate,
matching Angular's dateToSearchBy = new Date(prevFlight.localDate).
2026-04-22 00:17:43 +03:00
gnezim e33c8c4b24 Audit timeline status display per TZ 4.1.15.8
Two gaps: Delayed fell into center--progress (blue) instead of
orange; Sent was excluded from the isInFlight branch despite the
Angular FlightStatusLegacy.inFlight contract. Fixed both and added
8 per-status assertions covering all 8 FlightStatus enum values.
2026-04-22 00:09:49 +03:00
gnezim 877cd87162 Add timeline time-calculation algorithm per TZ §4.1.15.7
Creates timelineTime.ts with computeTimelineCalc (R94–R97: total/elapsed/
remaining minutes + aircraft position %) and formatTimelineDuration (R98:
omit zero leading units — «45мин.» not «0ч. 45мин.»).

Wires into OnlineBoardDetailsPage: arrival time now uses actual > estimated
> scheduled priority (R94), and В пути / До прилета labels use the new
formatter. 24 unit tests cover all branches.
2026-04-22 00:06:21 +03:00
gnezim 63fc6060f2 Verify day-change algorithm per TZ 4.1.17 (per-time-type badges, query-date baseline)
R4 gap fixed: TimeGroup now accepts scheduledDayChange + actualDayChange props
separately so each time type renders its own independent badge. FlightCard
updated to pass them independently (scheduled vs actual/estimated); expanded
row time block also now shows per-type badges.

R5 tooltip fixed: dayChangeBadgeTooltip() uses string-based date extraction
(no TZ reprojection via new Date()) — avoids viewer-TZ shift for SSR and
cross-TZ correctness. Returns "День" for ±1, DD.MM.YYYY for ±2+.

New shared helper dayChange.ts exports computeDayChange(), dayChangeBadgeTooltip(),
formatDayChangeBadge(). 27 unit tests cover +0/+1/+2/-1/-2, null, malformed
input, month/year boundaries, and per-time-type independence (R4).

R1–R3, R6 confirmed correct (API supplies dayChange per ITimesSet; badge
adjacent to time; hidden when 0). R8 (mobile tooltip suppression) deferred.
2026-04-22 00:01:30 +03:00
gnezim 5d31f4389e Add operator icon mapping helper per TZ §4.1.22
Extracts the 35-carrier logo path table from OperatorLogo into a shared
pure module (src/shared/operatorIcon.ts) so the mapping can be tested and
reused independently. Adds the 7-range SU flight-number fallback that the
TZ requires when OperatingBy is null — SU5000-5399 shows Pobeda (DP),
SU5400-5799 shows Aurora (HZ), SU6000-6999 shows Rossiya (FV), and the
3000-4999 / 5800-5999 bands explicitly render no logo.

63 table-driven tests lock in every range boundary and carrier entry.
FlightCard and ScheduleFlightBody both apply the range resolution before
falling back to the flight's own carrier code.
2026-04-21 23:54:00 +03:00
gnezim b43c341fcb Add "Уточняется" fallback helper + orange styling per TZ 4.1.23 2026-04-21 23:49:10 +03:00