fix(ui): address Greptile review — real fallback asset, untracked overflow measure

default-episode.png never existed (pre-existing in the grid card, copied
into the list thumbs) — both onerror handlers now fall back to the real
default-poster.png. The expandable-text and content-hero measuring
effects read the expanded signal via untracked so toggling show
more/less no longer rebuilds their ResizeObservers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-07-04 21:04:49 +02:00
1 parent da8eb03ca7
commit 41ab7353fa
3 files changed
+18 -6

No files matched your search

@@ -7,6 +7,7 @@ import {
input,
output,
signal,
untracked,
viewChild,
ElementRef,
} from '@angular/core';
@@ -53,8 +54,13 @@ export class ContentHeroComponent {
const el = this.descriptionEl()?.nativeElement;
if (!el) return;
this.measureOverflow(el);
this.observeOverflow(el);
// untracked: measureOverflow reads isDescriptionExpanded();
// tracking it would re-run this effect (and rebuild the
// ResizeObserver) on every expand/collapse click.
untracked(() => {
this.measureOverflow(el);
this.observeOverflow(el);
});
});
this.destroyRef.onDestroy(() => this.resizeObserver?.disconnect());
@@ -6,6 +6,7 @@ import {
inject,
input,
signal,
untracked,
viewChild,
} from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
@@ -113,8 +114,13 @@ export class ExpandableTextComponent {
const el = this.textEl()?.nativeElement;
if (!el) return;
this.measureOverflow(el);
this.observeOverflow(el);
// untracked: measureOverflow reads isExpanded(); tracking it
// would re-run this effect (and rebuild the ResizeObserver) on
// every toggle click.
untracked(() => {
this.measureOverflow(el);
this.observeOverflow(el);
});
});
this.destroyRef.onDestroy(() => this.resizeObserver?.disconnect());
@@ -108,7 +108,7 @@
[src]="episodeInfo?.movie_image ?? ''"
(error)="
$event.target.src =
'./assets/images/default-episode.png'
'./assets/images/default-poster.png'
"
alt="Episode thumbnail"
loading="lazy"
@@ -305,7 +305,7 @@
"
(error)="
$event.target.src =
'./assets/images/default-episode.png'
'./assets/images/default-poster.png'
"
alt="Episode thumbnail"
loading="lazy"