Add cheapest-night date-range scan to the Travelodge finder
Deploy with Docker Compose / deploy (push) Successful in 52s
Deploy with Docker Compose / deploy (push) Successful in 52s
A second "Cheapest night" tab on /hotels scans every candidate check-in between two dates (filtered by weekday, 1-7 nights, up to ~3 months), keeps the N cheapest hotels per night, and prices TfL transport once per unique hotel so the whole range fits in the streaming window. Backend - travelodge.py: extract _shortlist/_make_row/_price_hotels/_apply_transport from run_search; add a 30-minute per-(location, dates, rooms) Travelodge result cache, a deadline on page fetches, and run_scan (parallel date fetches with per-date failure isolation, one TfL lookup per hotel). - main.py: HotelRequestBase shared by search and scan requests, HotelScanRequest with weekday/range validation, scan event models, _guarded slot wrapper, POST /hotels/scan/stream (NDJSON). - nginx: the streaming location now matches /py/hotels/(search|scan). Frontend - Split CheapHotels.vue into SingleStayPanel, CheapestNightPanel, SharedFields, HotelRows, a shared form composable, stream/format helpers and hotels-shared.css; shared fields keep their values across tabs. - Vite dev server proxies /py to the Python API. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01H5P3C1HbbEwLZEYsjwr7uV
This commit is contained in:
@@ -28,6 +28,7 @@ Everything visual is defined in three places:
|
||||
| `src/assets/styles.css` | Fonts, **design tokens**, default element styles (dark theme), reusable classes (`bdr-1`, `bdr-2`, `page-a4`, `halftone`), the `slide` and `fade` transitions, print rules |
|
||||
| `src/layouts/CVLayout.vue` | The **light theme** for `/cv` and `/cv/jobs`: re-points the colour tokens to ink-on-paper values and holds the shared `.cv-btn` styles |
|
||||
| `src/views/CV/cv-shared.css` | Typography and page layout for the CV templates (`.cv-template`, `.cv-page`, `--cv-*` size variables) |
|
||||
| `src/views/hotels/hotels-shared.css` | Panels, forms, tables and tab strip for `/hotels`, shared by the single-stay and cheapest-night panels; every selector is prefixed with the page's `.hotels` root class |
|
||||
|
||||
### Tokens
|
||||
|
||||
|
||||
Reference in New Issue
Block a user