perf(dashboard): stop idle dashboard ticks that have nothing to update

Three timers kept an idle dashboard busy (plan D3 audit):

- The portal live-EPG presenter ran a 30 s interval even with no portal
  card wanted, so every dashboard paid a full change-detection pass per
  tick. A component-provided DashboardLiveEpgClock now drives both live-EPG
  presenters and every progress bar. It runs only while one of them has a
  live card and only while the document is visible, and reads the clock at
  once when it starts again.
- The XMLTV presenter re-asked every scope and emitted a new Map on each
  tick. It now re-asks only after a programme on air has ended or while a
  key has no programme, and drops unchanged answers. Progress still moves
  on each tick because details read the clock signal.
- The source-expiry badges polled the clock every minute and rebuilt the
  sources rail. createSourceExpiryClock arms one timer for the next day
  boundary (nextSourceExpiryChangeMs), capped at an hour, and none when no
  badge can change.

The rail rebuilt its scroll position and IntersectionObserver targets on
every new items array; it now does so only when card ids or order change,
which also stops a user-scrolled rail from snapping back each tick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5.5 committed 2026-09-29 20:48:55 +02:00
1 parent 963a431bb7
commit 4e512c1fd9
16 files changed
+647 -61

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
---
type: perf
area: dashboard
---
A dashboard left open does less work: it only refreshes live programmes while
live channels are shown and the window is visible, asks the guide again only
when a programme ends, and no longer snaps a scrolled rail back to the start.