Commit Graph

235 Commits

Author SHA1 Message Date
gnezim 79fcf2bdc1 Fix onlineboard empty results and flights-map polyline zoom hazard
Online board: the /board endpoint treats dateFrom/dateTo as a half-open
interval, so sending the same date for both yielded zero rows on routes
that obviously have flights (e.g. SVO-LED). Mirror Angular's
OnlineBoardApiService.getFlightsByRoute and use dateTo = date + 1 day.

Flights map: two stacked problems made arcs disappear on zoom.
 - syncPolylines gated endpoints on map.hasLayer(marker); when
   syncVisibility removed a zoom-tier layer, its arc went with it.
 - The zoomend and toggle effects both called syncPolylines, which
   captured a stale closure from the first render (polylines = []) and
   wiped the layer. Polyline coords are geographic — Leaflet rescales
   them on zoom — so the rebuild was never necessary.
Arcs now render once per polylines prop change and stay put through
zoom and filter toggles.
2026-04-17 22:48:18 +03:00
gnezim 18ab969e1c Keep flights-map arcs visible when zoom tier layers are removed
syncPolylines filtered endpoints by map.hasLayer(marker), which drops
polylines whose endpoint's zoom-tier layer was just removed by
syncVisibility. Result: in spider mode, arcs to small/distant cities
vanished when the user zoomed out.

Arc coordinates are fixed by the city's lat/lng; render them as long as
the markers exist in the index. User-level filtering (domestic /
international) already happens upstream in filterRoutes, so the
hasLayer gate was both incorrect and redundant.
2026-04-17 22:40:46 +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 b54746c74c Fix flights-map tile URL to Angular parity /map/api/tile/{z}/{x}/{y}.jpeg
The tile URL was built as `${env.API_BASE_URL}/tiles/{z}/{x}/{y}.png`,
which has three problems on a real deployment:

1. Wrong path segment: the backend serves tiles under /map/api/tile/
   (singular), not /tiles/.
2. Wrong extension: the backend emits .jpeg, not .png.
3. Wrong base: API_BASE_URL may be empty or point at the JSON API host.
   Tiles are served by a dedicated upstream behind the same reverse
   proxy that fronts the React SSR, so they must be same-origin and
   relative (matches Angular environment.mapApiUrl).

With this fix, the map renders its base tiles on the deployed site
instead of issuing doomed requests and showing a blank canvas behind
the markers. The Leaflet marker layer was already rendering; only the
tile layer was missing.
2026-04-17 18:40:52 +03:00
gnezim 7ec76486ec Clean up build warnings: MF DTS, autoprefixer color-adjust, dev CORS
Three non-fatal warnings surfaced by the Jenkins build log, fixed in
the config layer:

- module-federation.config.ts: dts: false. The @module-federation/
  dts-plugin fails under our strict tsconfig and logs TYPE-001 every
  build. Remote types are not needed at runtime; consumers generate
  their own via their dev toolchain.

- src/styles/_layout.scss: color-adjust → print-color-adjust. The
  unprefixed color-adjust shorthand is deprecated; the standard name
  is print-color-adjust. Matches the -webkit- prefixed sibling.

- modern.config.ts: tools.devServer.headers explicitly set. MF warns
  when devServer.headers is empty and auto-assigns '*'. Providing an
  explicit allowlist silences the banner in dev builds; production
  behavior is unaffected (real reverse proxy manages CORS).
2026-04-17 18:11:04 +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 896e6bd83d Switch filter time-selector to Angular compact layout 2026-04-17 15:16:49 +03:00
gnezim 373f049e90 Use CityAutocomplete for FlightsMapFilter with geolocate on departure 2026-04-17 15:13:20 +03:00
gnezim b8d5de6ca7 Use CityAutocomplete for OnlineBoardFilter Route tab departure + arrival 2026-04-17 15:11:47 +03:00
gnezim ba302c6b03 Add CityAutocomplete composite with clear and regional-picker trigger 2026-04-17 15:06:46 +03:00
gnezim 419b4b8df1 Add CityPickerPopup with regional tabs and country/city grid 2026-04-17 15:03:39 +03:00
gnezim 6820a11e83 Add buildCountryCityRows helper for regional picker grid 2026-04-17 15:02:04 +03:00
gnezim c4ae1ef7aa Invoke useGeolocationDefault on FlightsMapStartPage mount 2026-04-17 12:22:29 +03:00
gnezim 0c65755553 Test FlightsMapFilter Calendar min/max/disabledDates + snap effect 2026-04-17 12:21:13 +03:00
gnezim 78b3e86418 Wire availableDays into FlightsMapFilter Calendar with snap-to-nearest 2026-04-17 12:20:37 +03:00
gnezim 73a3d03469 Add useGeolocationDefault hook for flights-map departure pre-fill 2026-04-17 12:17:11 +03:00
gnezim ef04c19e13 Add calendarRange helpers for flights-map date picker window and snapping 2026-04-17 12:16:22 +03:00
gnezim f4b96b8248 Test FlightsMapStartPage filterRoutes + popups + auto-fallback wiring 2026-04-17 11:06:16 +03:00
gnezim 4e92e79a99 Wire filterRoutes, auto-fallback, and buy-ticket popups into Flights Map
routesToPolylines + intermediateCityIds now normalize airport codes to city
codes via the dictionaries so API responses resolve correctly. The page adds
effectiveConnections state + two effects for Angular-parity fallback
(retry connections=1 on empty direct-route result, then flip the UI toggle),
a filterRoutes memo feeding polylines and intermediateIds, and a popups memo
rendering departure + arrival buy-ticket popups in route mode only.
2026-04-17 11:00:40 +03:00
gnezim 77272423c1 Add buildBuyTicketUrl + escapeHtml helpers for popup content 2026-04-17 10:52:32 +03:00
gnezim 40f170f87a Add filterRoutes pure helper with airport-code normalization 2026-04-17 10:52:27 +03:00
gnezim 76e9270f5e Test FlightsMapStartPage polyline + intermediateIds wiring 2026-04-17 10:14:06 +03:00
gnezim 4e103d8073 Drive polylines and intermediateIds from useFlightsMapSearch routes 2026-04-17 10:12:15 +03:00
gnezim a9ed92466f Draw routes as city-code polylines and force-open intermediate tooltips
- routesToPolylines + intermediateCityIds pure helpers with unit coverage.
- IMapPolyline reshaped from points to cityIds for Angular-parity drawing.
- MapCanvas resolves coords via markerIndex, filters invisible cities on
  every zoom/toggle change, and runs a second tooltip pass that keeps
  intermediate-city tooltips open regardless of zoom/highlight rules.
2026-04-17 10:08:44 +03:00
gnezim a9b47036b5 Test FlightsMapStartPage marker construction from dictionaries 2026-04-17 08:46:43 +03:00
gnezim 1f24ee7159 Populate FlightsMapStartPage markers from dictionaries with zoom tiers 2026-04-17 08:44:40 +03:00
gnezim 725a048315 Add categorized rendering to MapCanvas: zoom-tier layers, highlight layer, tooltip rules 2026-04-17 08:41:42 +03:00
gnezim 54f9282a99 Extend IMapMarker with zoomLevel, countryType, highlighted fields 2026-04-17 08:35:27 +03:00
gnezim a61457bc90 Port Angular CityCategoryService to feature-local cityCategory module 2026-04-17 08:35:01 +03:00
gnezim 9a7fcba6ff Test FlightsMapStartPage dictionaries loading/error wiring 2026-04-17 03:21:39 +03:00
gnezim cfc6e12dc9 Wire useDictionaries into FlightsMapStartPage loading/error states 2026-04-17 03:20:01 +03:00
gnezim 03a720179c Expose dictionaries module barrel 2026-04-17 03:18:35 +03:00
gnezim 715b09fd18 Add useDictionaries hook wiring api + transform 2026-04-17 03:16:42 +03:00
gnezim e575c1baa1 Add dictionary lookup helpers and findCityByCoord 2026-04-17 03:14:28 +03:00
gnezim 64dd5421e2 Cover enrichment, lookup-map, and region ordering in transform tests 2026-04-17 03:13:46 +03:00
gnezim e5b49acecf Add dictionaries transform with filtering and partitioning rules 2026-04-17 03:13:18 +03:00
gnezim dc373553d2 Add fetchDictionaries parallel-fetch layer 2026-04-17 03:10:26 +03:00
gnezim da605f0576 Add Flights Map dictionaries type module 2026-04-17 03:09:39 +03:00
gnezim 6805b8fe4d Wire FullRouteTimeline and TransferBar into OnlineBoardDetailsPage
Multi-leg flights now render a full-route timeline header and interleave
a transfer-bar between consecutive legs, surfacing station change and
intermediate-landing duration inline with the leg details.
2026-04-17 02:38:24 +03:00
gnezim 4c87a3b362 Add FullRouteTimeline wrapper component 2026-04-17 02:33:52 +03:00
gnezim b8197b2db5 Add Timeline component with 2-leg carousel for multi-leg flights 2026-04-17 02:32:42 +03:00
gnezim dd43ea6905 Add TransferBar component for multi-leg transfer info 2026-04-17 02:31:42 +03:00
gnezim 01b2981407 Add TransferTime component for layover duration display 2026-04-17 02:30:16 +03:00
gnezim 391db7c948 Add StationChange component for multi-leg timeline 2026-04-17 02:29:43 +03:00
gnezim 2d01e1a37e Add Station component for multi-leg timeline 2026-04-17 02:28:59 +03:00
gnezim 81d04bdc49 Add computeTransferMinutes and formatMinutesAsDuration helpers 2026-04-17 02:26:33 +03:00
gnezim 6854d93344 Add detectStationChange helper for multi-leg timeline 2026-04-17 02:26:33 +03:00
gnezim 009c6a3aa1 Extend IFlightLeg with optional estimatedDuration/scheduledDuration 2026-04-17 02:25:20 +03:00