Commit Graph

10 Commits

Author SHA1 Message Date
gnezim 06ab9b6ea3 chore: add .last-run.json to .gitignore
ci-deploy / build-deploy-test (push) Successful in 1m12s
- Add test-results/.last-run.json to .gitignore
- Remove from git tracking
- Update Makefile dev target port (8080, not 8081)
- Add debug logging to dev-server.mjs API proxy
2026-04-29 20:34:59 +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 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 5551cb1821 Fix flights-map date format and dev proxy empty-body status parsing
Upstream /destinations and /days endpoints expect yyyy-MM-DD (dashed),
matching Angular's ApiFormatterService.formatDateOnly output. React was
sending the internal compact yyyyMMdd, triggering silent 400s.

Also fix dev-server.mjs status-code parsing: empty-body curl responses
start with the appended "\n%{http_code}" separator at index 0, so
`lastNewline > 0` mis-treated the status as body and defaulted to 200,
hiding real upstream 4xx/5xx responses. Changed to `>= 0`.
2026-04-17 22:25:48 +03:00
gnezim c8d0caa9cf Fix five console-level issues surfaced by live-deploy Playwright audit
1. FlightsMap tiles didn't render: MapCanvas inline height:100% resolved
   to 0 against min-height parents. Hand sizing to consumer CSS so
   .flights-map-start__map height:500px wins.

2. FlightsMap /map/api/tile/{z}/{x}/{y}.jpeg requests fell through to
   Modern.js SSR (HTML body). Dev proxy now forwards /map/* to the
   test env via curl with image headers and binary-safe piping.

3. PopularRequestsPanel duplicate React key (Route-SVO-LED appears
   twice in upstream). Suffix the key with the visible index.

4. OnlineBoardDetailsPage /onlineboard/details 400. Upstream expects
   an ISO datetime (yyyy-MM-DDTHH:mm:ss), matching Angular's
   ApiFormatterService.formatDate. Append T00:00:00.

5. Browser-level SignalR CORS errors on every details page: the
   default SIGNALR_HUB_URL pointed at an unreachable placeholder.
   Default to empty + skip the connection in useLiveFlights when
   blank. Also configureLogging(LogLevel.None) so SignalR stops
   writing its own negotiation failures to console. Live updates
   re-enable by setting SIGNALR_HUB_URL on a deployment.
2026-04-17 21:55:44 +03:00
gnezim 10dfc8609d Revert API_BASE_URL default: keep same-origin proxy for client-side CORS
Commit e20ef94 set the default to https://flights.test.aeroflot.ru/api,
which broke the browser client (no CORS headers on the test env;
scripts/dev-server.mjs is the only layer that can bypass it).

Keep PROD_ORIGIN pointing at the test env for SEO, but restore
API_BASE_URL default to http://localhost:8080/api with a comment
explaining the proxy chain: dev → Express+curl → flights.test.aeroflot.ru.
Production deployments continue to set API_BASE_URL explicitly.
2026-04-17 15:46:34 +03:00
gnezim e20ef940f8 Default API_BASE_URL and PROD_ORIGIN to the test environment
Previously API_BASE_URL defaulted to http://localhost:8080/api, which
only works inside the dev server proxy. For standalone/SSR runs without
the proxy, the default now points to https://flights.test.aeroflot.ru.

Dev continues to use the same-origin proxy because scripts/dev-server.mjs
explicitly injects API_BASE_URL=http://localhost:8080/api into the
Modern.js child process env, keeping browser fetches CORS/WAF safe.
2026-04-17 15:31:03 +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 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 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