Commit Graph

225 Commits

Author SHA1 Message Date
gnezim 68f7c239dc Pre-fill schedule form from popular request query params
Add buildSchedulePopularRequestQueryParams to convert Route/RouteWithBack
popular requests into URL search params. ScheduleStartPage now reads
departure/arrival/return from query params to initialize form state, and
the popular request click handler navigates with appropriate params for
both Schedule and Onlineboard request types.
2026-04-16 18:29:56 +03:00
gnezim 1aaebc5176 Wire popular request clicks to pre-fill OnlineBoardFilter via query params
Clicking a popular request now builds URLSearchParams and navigates with
them, so the filter initializes with the correct tab/fields pre-filled.
Schedule-type requests redirect to the schedule feature instead.
2026-04-16 18:24:53 +03:00
gnezim dfe32fdee1 Add Makefile and sync script for flights-front deployment repo 2026-04-16 18:17:42 +03:00
gnezim c1c65faef3 Add popular requests pre-fill implementation plan 2026-04-16 18:17:34 +03:00
gnezim e8cf655abc Add popular requests form pre-fill design spec 2026-04-16 18:15:16 +03:00
gnezim de48e59048 Add visual parity smoke tests for CI regression detection 2026-04-16 17:47:58 +03:00
gnezim 0b3eb08c84 Add comparison pipeline scripts and ignore generated output 2026-04-16 17:47:38 +03:00
gnezim e1882f49bc Add gap analysis script comparing Angular vs React DOM structure per route 2026-04-16 17:46:35 +03:00
gnezim 712d32ac72 Add popular requests behavioral cross-app tests
Adds POPULAR_REQUESTS_PANEL and POPULAR_REQUEST_ITEM selectors with
Angular overrides, and 6 behavioral tests covering panel visibility,
item count, flight/route click navigation, schedule page presence,
and keyboard accessibility.
2026-04-16 17:44:04 +03:00
gnezim 13c4b4b1d5 Remove accidentally added Makefile (not part of comparison pipeline) 2026-04-16 17:42:31 +03:00
gnezim e82289b979 Add interactive HTML report generator for visual parity diffs
Self-contained dark-themed HTML report with summary stats, filter
buttons (pass/warn/fail/error), side-by-side image comparison per
route and viewport, lazy-loaded images, and full-size overlay on click.
The generator script reads report.json, converts absolute paths to
relative, and injects data into the template.
2026-04-16 17:41:47 +03:00
gnezim d634f93700 Add Makefile for dev, build, test, and lint commands 2026-04-16 17:38:57 +03:00
gnezim 1a03d4ae13 Add multi-viewport screenshot diff script for visual parity pipeline
Extends the single-viewport screenshot-diff.ts pattern to capture at
3 viewports (desktop 1440, tablet 768, mobile 375), supports masking
dynamic content via CSS selectors, and outputs structured JSON report
to comparison-report/visual/ for downstream report generation.
2026-04-16 17:37:17 +03:00
gnezim 97c4def0cc Update CLAUDE.md to reflect current project state 2026-04-16 17:35:59 +03:00
gnezim 018208e84f Add implementation plan for Angular/React comparison pipeline 2026-04-16 17:33:55 +03:00
gnezim 1fc1880644 Add Angular→React comparison pipeline design spec
CI / ci (push) Failing after 27s
Deploy / build-and-deploy (push) Failing after 5s
Defines a Playwright-based pipeline for visual screenshot diffing,
behavioral E2E verification, and gap analysis between the Angular
and React implementations. Documents known gaps in flight details,
popular requests logic, and flights map.
2026-04-16 17:25:48 +03:00
gnezim 8f974c2d07 Update Module Federation 2.3.2 → 2.3.3 2026-04-16 17:23:05 +03:00
gnezim 832c76ff2e Fix e2e tests: update for route-default tab, add hydration and calendar tests
CI / ci (push) Failing after 27s
Deploy / build-and-deploy (push) Failing after 5s
- Fix 5 pre-existing failures: default tab is 'route' not 'flight'
- Add test: route search results page hydrates filter from URL params
- Add test (skip): route search form end-to-end (needs live API)
- Add test (skip): calendar strip shows day numbers (needs live API)
- Mark feedback button test as fixme (component not wired in)
2026-04-16 14:06:02 +03:00
gnezim 65ed6c1749 Fix calendar days bitmask parsing and filter hydration from URL params
Calendar days API returns a 31-char bitmask ('1'=available, '0'=unavailable)
starting from baseDate-1. parseCalendarDays now converts this to yyyyMMdd
date strings matching Angular's search-page-base.component.ts logic.

Calendar strip buttons now show formatted day numbers instead of raw dates.

OnlineBoardFilter now accepts initial values from URL params so the
departure/arrival/date fields are populated on search results pages.
2026-04-16 13:56:08 +03:00
gnezim 0da4b5e0a5 Enable React Router v7 future flags to suppress deprecation warning
CI / ci (push) Failing after 28s
Deploy / build-and-deploy (push) Failing after 6s
The v7_startTransition warning appeared because react-router 6.30.3
(bundled by Modern.js 2.70.8) emits future flag warnings by default.

A full Modern.js 2→3 upgrade was investigated but blocked by
@module-federation/modern-js ESM incompatibilities with Rsbuild 2.0
(uses __filename and require.resolve in ESM bundles, and the SSR
plugin calls api.modifyWebpackConfig which no longer exists).

Instead, opt into all v7 future flags via runtime.router config.
This silences the warning and prepares the codebase for an eventual
React Router v7 upgrade when the MF plugin catches up.
2026-04-16 12:46:34 +03:00
gnezim 9f21634c6f Fix schedule flight details 404: use Modern.js $.tsx splat route convention
The [...flights]/page.tsx catch-all generated an incorrect route pattern
(schedule/:/flights) instead of a React Router splat (schedule/*).

Modern.js convention for catch-all routes is $.tsx at the directory level,
not [...param]/page.tsx. Moved to $.tsx and updated param access to use
the "*" splat key.

Fixes: /ru/schedule/SU0012-20220527 and multi-leg URLs now resolve.
2026-04-16 12:11:59 +03:00
gnezim b533124e04 Match Angular bottom-description padding and line-height exactly 2026-04-16 11:57:31 +03:00
gnezim 5f33ef371d Style schedule PrimeReact buttons and swap icon to match Angular 2026-04-16 11:54:35 +03:00
gnezim 63c3705a0c Style PrimeReact dropdown/calendar buttons to match Angular subtle chevrons
Override PrimeReact AutoComplete dropdown button: transparent bg, no border,
gray color, smaller icon — matches Angular's custom city-autocomplete
search-button styling.

Override PrimeReact Calendar trigger button: transparent bg, smaller icon,
blue color — matches Angular's outline calendar icon.

Fix swap button: remove circular border, use Angular's flat white style
with rotate(90deg) on the arrows SVG.
2026-04-16 11:52:27 +03:00
gnezim a2ab4fda16 Match Angular form controls: swap icon, city dropdowns, schedule date range
Online board filter: use Angular sprite SVG for swap button, add dropdown
chevron to city AutoComplete inputs.

Schedule filter: add swap button between cities, replace two separate
date fields with single range Calendar matching Angular. Fix button text
to "Показать расписание", date label to "Показать расписание на".
Add dropdown chevrons to city inputs.
2026-04-16 11:45:40 +03:00
gnezim fabd659b64 Fix type errors in screenshot-diff script that polluted browser console 2026-04-16 10:29:14 +03:00
gnezim d096fbe9e1 Restore date defaults to today so search forms submit correctly
Null dates broke form submission — the handlers bail early when date
is null. Restore initialization to today/+7 days as before. The
Calendar placeholder prop still provides the format hint when cleared.
2026-04-16 09:24:59 +03:00
gnezim 0cdf8c849d Match Angular form controls: time range slider, date placeholders, button colors
Online board filter: replace time input fields with PrimeReact Slider
matching Angular's p-slider range selector. Initialize dates to null
so placeholder "ДД.ММ.ГГГГ" shows instead of today's date.

Schedule filter: same time slider replacement, add missing "Только
прямые рейсы" (direct flights only) checkbox, date placeholders.

Error page: fix "На главную" button to use outlined style (transparent
bg + blue border) matching Angular's blue-home class. Remove max-width
on description text.
2026-04-16 09:20:26 +03:00
gnezim 70b8f04cb3 Add screenshot-diffs/ to gitignore 2026-04-16 09:03:46 +03:00
gnezim 50f50eeae4 Add visual parity screenshot diff tool and mock appSettings in dev server
Add pixelmatch-based screenshot comparison script that captures Angular
(:4200) and React (:8080) at every route and generates pixel diff images.

Dev server: add mock /api/appSettings endpoint so Angular can bootstrap
when WAF blocks the real API.
2026-04-16 09:03:13 +03:00
gnezim 46f6f3ef86 Match Angular pixel-for-pixel: error page, filter default, breadcrumbs, feedback button
Error page: add search input bar, align flex/spacing to Angular SCSS mixins,
match button display and illustration flex.

Online board filter: default to "route" tab expanded (Angular defaults to
route, not flight number).

Start pages: remove extra breadcrumb items — Angular start pages show only
"Главная", not the page title.

PageLayout: hide FeedbackButton — Angular gates it behind
FEEDBACK_BUTTON_AVAILABLE feature flag (off by default).
2026-04-16 09:03:00 +03:00
gnezim bb0353bb40 Match Schedule and Flights Map pages to Angular pixel-for-pixel
CI / ci (push) Failing after 37s
Deploy / build-and-deploy (push) Failing after 6s
Schedule: add SearchHistory below filter, time selector fields (timeFrom/timeTo)
for outbound and return flights, breadcrumbs, and bottom description section.

Flights Map: add FILTER_INFO message in filter panel, disabled states on
toggles when no departure/arrival selected (matching Angular logic), breadcrumbs,
and replace plain "Loading..." text with animated spinner matching Angular
loader-sheet component.
2026-04-16 01:09:04 +03:00
gnezim 797d0699d7 Match Angular Online Board pixel-for-pixel: accordion filter, swap button, breadcrumbs, search history
CI / ci (push) Failing after 38s
Deploy / build-and-deploy (push) Failing after 6s
Replace 4-radio-button filter with PrimeNG-style accordion (2 tabs: Flight Number, Route).
Add swap button between departure/arrival in route filter, clear button on flight number input,
time selector in route filter, flight number validation with error tooltip.
Add SearchHistory component below filter, Breadcrumbs in page header, FeedbackButton stub,
ScrollUpButton for scroll-to-top. SeoHead already wired on start page route.
All tests updated to match new accordion structure.
2026-04-16 00:58:10 +03:00
gnezim 4b87fca973 Remove locale switcher tests — feature not in Angular app
Locale switching is handled by the host site (aeroflot.ru), not the
Angular SPA. Removed 13-locale-switching.spec.ts (entire file, 27 tests)
and locale switcher tests from 01-navigation (5 tests) and
18-advanced-features (4 tests).

Cross-app: 213 passed, 146 skipped, 0 failed.
ru-ru: 15 passed, 0 failed.
2026-04-16 00:44:41 +03:00
gnezim d9bcccc1c5 Fix all e2e failures, sass warnings, and HMR websocket errors
CI / ci (push) Failing after 38s
Deploy / build-and-deploy (push) Failing after 6s
- Restructure OnlineBoardFilter to use radio tabs (flight/departure/
  arrival/route) with dynamic fields matching e2e test expectations
- Fix error page e2e tests to use client-side navigation (SSR renders
  empty outside [lang]/layout) and use specific CSS class locators
- Replace deprecated transparentize() with rgba() in _shadows.scss
- Handle WebSocket upgrades explicitly in dev-server to prevent HMR
  reconnection spam
- Resolve DEP0190 by spawning modern binary directly without shell
- Add tests/e2e-angular to tsconfig excludes
2026-04-16 00:23:10 +03:00
gnezim c6b865b324 Remove React-specific test files from Angular e2e suite
Removed 40 files that were written for the flights-front React project:
- 15 root spec files with hardcoded React ports (3000/3001/3002/5173)
- 8 ru-ru/ tests with React URLs or React Query-specific features
- 8 integration/ tests with React templates
- 3 visual/ regression tests with React screenshots
- 6 integration templates

Kept: 18 cross-app tests (properly use localePath/urlPattern fixtures),
7 clean ru-ru tests, support files, and fixtures.

Result: 230 passed, 173 skipped, 0 failed.
2026-04-16 00:01:03 +03:00
gnezim 94da763f22 Add test:e2e:angular script to package.json
Runs the 18 cross-app Playwright test suites against Angular on port 4203.
Result: 213 passed, 173 skipped (React-only features), 0 failed.
2026-04-15 23:17:46 +03:00
gnezim 375bcfb0fa Add e2e test suite from flights-front with Angular API mocks
Copies Playwright e2e tests (58 specs, 300+ tests) designed for cross-app
testing. Adapts API mocks to match real Aeroflot dictionary format (title
objects with multilingual keys), adds board/schedule/days endpoint mocks,
and provides Angular-specific Playwright config on port 4203.
2026-04-15 23:07:44 +03:00
gnezim de660938ba Remove stray e2e-angular tests and add to gitignore
CI / ci (push) Failing after 37s
Deploy / build-and-deploy (push) Failing after 6s
2026-04-15 23:05:01 +03:00
gnezim 20c19d15f4 Add standalone API proxy via curl (bypasses WAF TLS fingerprinting)
CI / ci (push) Failing after 23s
Deploy / build-and-deploy (push) Failing after 5s
Modern.js SSR intercepts all routes before any Express middleware,
so the API proxy runs as a separate Express server on port 8080.
Modern.js runs on 8081. The proxy uses curl subprocesses which go
through the system HTTPS proxy (GOST) with a proper TLS fingerprint
that the Aeroflot WAF accepts.

Usage: node scripts/dev-server.mjs (replaces pnpm dev for full-stack)

Also: remove stray e2e-angular test directory, fix env default to
same-origin /api.
2026-04-15 23:04:24 +03:00
gnezim 47628c9a15 Fix lint warning and update test assertions for ISO date format
CI / ci (push) Failing after 37s
Deploy / build-and-deploy (push) Failing after 6s
2026-04-15 22:41:08 +03:00
gnezim 71d0c983fd Fix API calls: bind fetch to globalThis, fix date format for calendar
CI / ci (push) Failing after 28s
Deploy / build-and-deploy (push) Failing after 5s
Root cause of search not working: globalThis.fetch stored as a class
field loses its Window binding, causing 'Illegal invocation'. Fixed
with fetch.bind(globalThis).

Also fix calendar days endpoint date format from yyyyMMdd to
yyyy-MM-ddT00:00:00 matching Angular's ApiFormatterService.
2026-04-15 22:32:51 +03:00
gnezim e7c20c3d2d Fix API integration: proxy via Angular, date format, root redirect
CI / ci (push) Failing after 36s
Deploy / build-and-deploy (push) Failing after 5s
- Point API_BASE_URL to localhost:4200 (Angular's dev proxy) which
  correctly forwards to flights.test.aeroflot.ru with proper headers
- Convert URL date format (yyyyMMdd) to API format (yyyy-MM-ddT00:00:00)
  matching Angular's ApiFormatterService behavior
- Add standalone api-proxy.mjs script for running without Angular
- Root page redirect uses both loader and client-side navigate
- SignalR hub URL points to platform.yc.webzavod.ru/tracker/hub
- Remove broken server/modern-js.server.ts (proxy handled externally)
2026-04-15 22:08:54 +03:00
gnezim 5fc67f81bd Wire city autocomplete to dictionary API
CI / ci (push) Failing after 37s
Deploy / build-and-deploy (push) Failing after 6s
useCitySearch hook loads cities from /api/dictionary/1/cities on first
use, then searches in-memory by name prefix and code -- matching the
Angular CitiesSearchService behavior. Wired into OnlineBoardFilter,
ScheduleStartPage, and FlightsMapFilter AutoComplete components.
2026-04-15 21:32:39 +03:00
gnezim f61e050e8c Configure dev proxy to flights.test.aeroflot.ru and fix API endpoint paths
API functions now build the full localized path matching the Angular
EndpointService pattern (/api/flights/{version}/{locale}/{endpoint}).
The dev proxy forwards /api and /flights to the test backend.
2026-04-15 21:32:28 +03:00
gnezim 8df20a9ed9 Fix OnlineBoardSearchPage tests for PageLayout restructuring
CI / ci (push) Failing after 36s
Deploy / build-and-deploy (push) Failing after 5s
Tests failed because PageTabs uses Link from @modern-js/runtime/router
which wasn't included in the router mock. Added Link to the router mock,
added mocks for PageTabs, OnlineBoardFilter, and other transitive deps,
and updated error text assertions to match the new Russian strings.
2026-04-15 21:04:28 +03:00
gnezim 11026cd244 Add graceful API error state with retry on search pages
CI / ci (push) Failing after 37s
Deploy / build-and-deploy (push) Failing after 6s
When the API fetch fails (backend unavailable), show a styled white
error card with a Russian-language message and retry button instead
of barely-visible text on a dark background.
2026-04-15 20:58:07 +03:00
gnezim e8935276a0 Fix SignalR connection error handling for offline hub
Wrap connection.start() in try/catch so that when the SignalR hub is
unreachable the status transitions to "offline" silently instead of
throwing unhandled errors that flood the browser console.
2026-04-15 20:58:01 +03:00
gnezim 8bfd7109ab Remove PrimeReact lara-light-blue theme (custom SCSS handles theming)
CI / ci (push) Failing after 36s
Deploy / build-and-deploy (push) Failing after 6s
The theme imported Inter font causing console warnings. Our ported
_prime-styles.scss (5511 lines from Angular PrimeNG overrides) already
provides complete component theming.
2026-04-15 20:45:09 +03:00
gnezim 130ce1f56b Replace plain inputs with PrimeReact AutoComplete and add i18n to all pages
CI / ci (push) Failing after 39s
Deploy / build-and-deploy (push) Failing after 5s
OnlineBoardFilter and ScheduleStartPage city fields now use PrimeReact
AutoComplete for visual parity with Angular's PrimeNG city-autocomplete.
ScheduleStartPage labels switched from hardcoded English to i18n keys.
PopularRequestsPanel uses stable content-based keys instead of array index.
Error page loads i18n translations on mount and supports all locale strings.
2026-04-15 20:38:46 +03:00