From b8240b75ab0b9f233bbe39fabbc48721397ee35a Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 3 Oct 2026 17:38:51 +0200 Subject: [PATCH] fix(dashboard): keep a series' season marker when no episode badge names it The hero stripped a trailing season marker from every series title, so a favorite or newly added series without a playback row lost its only visible season identity. The marker now goes only when the episode badge carries the season. Co-Authored-By: Claude Fable 5.1 --- .../dashboard-hero-slides.presenter.spec.ts | 13 +++++++++++++ .../rails/dashboard-hero-slides.presenter.ts | 19 +++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/libs/workspace/dashboard/feature/src/lib/rails/dashboard-hero-slides.presenter.spec.ts b/libs/workspace/dashboard/feature/src/lib/rails/dashboard-hero-slides.presenter.spec.ts index 91c68ea53..39bee05e0 100644 --- a/libs/workspace/dashboard/feature/src/lib/rails/dashboard-hero-slides.presenter.spec.ts +++ b/libs/workspace/dashboard/feature/src/lib/rails/dashboard-hero-slides.presenter.spec.ts @@ -249,6 +249,19 @@ describe('DashboardHeroSlidesPresenter', () => { expect(titles).toContain('Sport S01'); }); + it('keeps the season marker of a series that no episode badge describes', () => { + // A favorite with no playback row: the marker is the only thing + // telling two per-season catalog entries of the show apart. + recentItems.set([]); + favorites.set([{ ...favoriteFilm, title: 'Burnley (2 сезон)' }]); + addedItems.set([]); + candidates.set([]); + const [slide] = create().slides(); + + expect(slide.episodeBadge).toBeNull(); + expect(slide.title).toBe('Burnley (2 сезон)'); + }); + it('resumes an unfinished series and offers a detail-only way in', () => { const [resume] = create().slides(); diff --git a/libs/workspace/dashboard/feature/src/lib/rails/dashboard-hero-slides.presenter.ts b/libs/workspace/dashboard/feature/src/lib/rails/dashboard-hero-slides.presenter.ts index a6f4b889c..bbc15e4d0 100644 --- a/libs/workspace/dashboard/feature/src/lib/rails/dashboard-hero-slides.presenter.ts +++ b/libs/workspace/dashboard/feature/src/lib/rails/dashboard-hero-slides.presenter.ts @@ -230,24 +230,27 @@ export class DashboardHeroSlidesPresenter { const watchKind = isLive ? 'live' : (resolvePortalActivityWatchKind(item) ?? item.type); + const episodeBadge = buildDashboardEpisodeBadge( + item, + position, + (key, params) => this.translate.instant(key, params) + ); return { ...artwork, id: `${source.kind}:${dashboardHeroItemKey(item)}`, kind: source.kind, contentType: item.type, - // "Большая фарма (1 сезон)" → "Большая фарма": the episode badge - // already names the season. A movie keeps its name as is. + // "Большая фарма (1 сезон)" → "Большая фарма" only while the + // episode badge names the season; without a badge the marker is + // the sole season identity of a per-season catalog entry. A movie + // keeps its name as is. title: - watchKind === 'series' + watchKind === 'series' && episodeBadge ? splitSeasonSuffix(item.title).title : item.title, typeLabelKey: TYPE_LABEL_KEYS[watchKind], reasonLabelKey: this.reasonLabelKey(source), - episodeBadge: buildDashboardEpisodeBadge( - item, - position, - (key, params) => this.translate.instant(key, params) - ), + episodeBadge, rating: extras?.rating ?? null, genres: extras?.genres ?? [], year: extras?.year ?? item.release_year ?? null,