paddington-eurostar/templates
Edward Betts 453d6244ec Stream results progressively via SSE instead of waiting for full render
The loading page now opens an EventSource to a new ?render=stream endpoint.
The server immediately sends a shell event (full page chrome: nav, filters,
JS — no external fetches needed), then a section event per direction as each
one's NR + Eurostar data arrives, and finally a done event with the summary
and timetable-refresh URL. The client slots each section card into a
placeholder and calls initialiseResultsPage() only after done, so fares and
advance-fare streaming start at the right moment.

Adds results_shell.html (shell template with empty JS data globals and
mergeSectionData/finaliseResults hooks), results_section.html (extracted
section card partial used by both the full and stream render paths), and
helper functions _section_trip_fares() and _build_summary_html() to avoid
duplicating fare-dict assembly between the two paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 21:24:40 +01:00
..
base.html Five UI and data features for return journeys and results page 2026-05-25 14:58:32 +01:00
index.html Five UI and data features for return journeys and results page 2026-05-25 14:58:32 +01:00
results.html Stream results progressively via SSE instead of waiting for full render 2026-05-25 21:24:40 +01:00
results_loading.html Stream results progressively via SSE instead of waiting for full render 2026-05-25 21:24:40 +01:00
results_section.html Stream results progressively via SSE instead of waiting for full render 2026-05-25 21:24:40 +01:00
results_shell.html Stream results progressively via SSE instead of waiting for full render 2026-05-25 21:24:40 +01:00