fix(dashboard): hold the hero skeleton for a live candidate's first programme

A live hero slide exists only once its channel has a programme on air.
With a live favorite as the only candidate, the skeleton went away when
history, favorites and recently added had loaded, and the live slide was
inserted when the portal or XMLTV answer arrived, shifting the rails.

DashboardLiveEpgPresenter now reports while a hero candidate awaits its
first portal or XMLTV answer, and the hero keeps its skeleton for that,
at most 2 s from its creation. Once the skeleton has gone it does not
come back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5.5 committed 2026-10-01 21:48:01 +02:00
1 parent 9128a90cfd
commit cea85f50f0
9 files changed
+229 -13

No files matched your search

@@ -313,6 +313,8 @@ describe('DashboardPortalLiveEpgService', () => {
// PWA: the collection resolver is gated on the desktop XMLTV bridge
// and answers nothing, so no request is worth queuing.
supportsEpgProgramLookup = false;
// Callers must not wait for an answer that never comes.
expect(service.answersPortals).toBe(false);
service.sync([entry(1), entry(2)]);
await step(3);
@@ -77,6 +77,13 @@ export class DashboardPortalLiveEpgService implements OnDestroy {
readonly programs = this.programsState.asReadonly();
/** Keys queued or in flight — the cards that may show a placeholder. */
readonly pending = this.pendingState.asReadonly();
/**
* False where portals are never asked (no local XMLTV bridge), so no
* card there ever gets an answer to wait for.
*/
get answersPortals(): boolean {
return this.runtime.supportsEpgProgramLookup;
}
/**
* Replace the wanted set. Keys without a fresh answer are queued; keys no