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
S
Description
No description provided
6.7 GiB
Languages
TypeScript 62.7%
HTML 23.6%
SCSS 11%
JavaScript 1.1%
C# 0.9%
Other 0.6%