Files
iptvnator/libs
4grayandClaude Opus 4.8 29e964d736 fix(epg): keep the ribbon mounted when scrolling across a gap day
`renderState` only renders the ribbon when the centred day has programmes, and
`onRibbonScroll` commits whichever day is centred. So in a multi-day window with
a gap day (e.g. programmes Mon + Wed, none Tue), scrolling across the gap made
`viewDayKey` a day with no programmes → state flipped to `empty-day` → the
`@switch` unmounted the ribbon mid-scroll, stranding the user before the later
programmes (stepper-only recovery). Flagged by Codex.

Guard the scroll commit with a `hasProgramsForDay` predicate: skip gap days so
the last populated day stays centred and the ribbon stays mounted until the user
scrolls into another day that actually has content. Explicit date navigation
(stepper / jump-to-nearest / controlled `selectedDate`) still shows `empty-day`
as before — only the continuous-scroll path is affected.

Tests: new onRibbonScroll specs assert a populated day commits and a gap day does
not. ui-epg 82 green, lint clean, component 400 lines.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 18:42:28 +02:00
..