Skip to content

feat(xtream): catch-up badge for live channels with archive - #1341

Merged
4gray merged 7 commits into
masterfrom
claude/iptvnator-issue-1128-6e341a
Aug 9, 2026
Merged

feat(xtream): catch-up badge for live channels with archive#1341
4gray merged 7 commits into
masterfrom
claude/iptvnator-issue-1128-6e341a

Conversation

@4gray

@4gray 4gray commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Closes #1128

Live channels with provider catch-up (tv_archive === 1 with a positive tv_archive_duration) now show a small history badge:

  • Sidebar channel list: badge next to the channel name, tooltip shows the archive window ("Catchup available — N days").
  • All-channels grid (live grids only): dark pill badge on the card, same tooltip. VOD/series grids never render it.
  • Favorites and recently-viewed lists (portal tabs and global favorites): same badge on Xtream rows.

Follow-ups from @WolfganP's testing feedback (thanks!):

  • Programme-info (i) button is now in the Xtream and Stalker live sidebars too — previously it existed only in favorites lists.
  • Row actions stack vertically: favorite on top, (i) below. The stacked column is narrower than the previous single-button row (28px vs 32px), so the extra button costs no horizontal space — channel names actually gain a few pixels.
  • No layout jumps: the (i) slot is reserved (inert and invisible) while a row's EPG programme hasn't loaded, so the star never shifts.
  • Accessibility: the badge status is exposed as visually-hidden text (the icon itself is aria-hidden), and the empty info slot is disabled + aria-hidden.

Implementation

  • Pure helpers isXtreamCatchupAvailable / getXtreamCatchupDays in @iptvnator/portal/shared/util mirror the existing playback-side gates: flag and positive window required. String field values from lenient panels are handled.
  • ChannelListItemComponent gains optional catchupAvailable/catchupDays inputs (default off) and the reworked action column; UnifiedFavoriteChannel carries tvArchive/tvArchiveDuration through to the shared favorites list.
  • Data flows unchanged: both the Electron SQLite path and the PWA API path already carry the archive fields.
  • i18n: CHANNELS.CATCHUP_AVAILABLE / CHANNELS.CATCHUP_AVAILABLE_DAYS added to all 19 locales; the (i) button reuses the existing tooltip key.

Tests

  • Helper spec (flag/window/string/negative cases); badge render on/off, action order, and reserved-slot inertness in channel-list-item.component.spec.ts; three grid cases in grid-list.component.spec.ts; favorites badge + archive passthrough in global-favorites-list / unified-live-tab specs.
  • E2E: badge visibility asserted on the sidebar row in xtream-epg.e2e.ts, green locally in both timezone variants.
  • Release notes: .changes/xtream-catchup-indicator.md + .changes/ui-live-row-vertical-actions.md.

The badge reflects the provider's declaration only — no probing of whether the archive actually plays.

🤖 Generated with Claude Code

Live channels whose provider declares playable catch-up (tv_archive=1
with a positive tv_archive_duration) now show a small history badge in
the channel sidebar next to the name and on the all-channels grid cards,
with the archive window (days) in the tooltip.

Closes #1128

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Aug 2, 2026

Copy link
Copy Markdown

Greptile Summary

The PR surfaces provider-declared Xtream catch-up availability across live-channel sidebars, grids, favorites, and recent collections while adding stable programme-info actions to Xtream and Stalker sidebars.

  • Adds shared helpers for normalizing archive flags and durations from numeric or string provider values.
  • Carries archive metadata through unified collection and global-favorites mappings.
  • Adds accessible catch-up badges and localized tooltip text across supported locales.
  • Reserves programme-info action space until EPG data becomes available, preventing row layout shifts.
  • Adds focused unit and Electron E2E coverage plus release notes.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
libs/portal/shared/util/src/lib/xtream-catchup.util.ts Introduces a pure, defensive normalization and availability gate for provider archive metadata.
libs/ui/components/src/lib/channel-list-container/channel-list-item/channel-list-item.component.html Adds the accessible catch-up indicator and a reserved, inert programme-info action slot.
libs/ui/components/src/lib/channel-list-container/channel-list-item/channel-list-item.component.ts Adds signal inputs and guarded programme-info interaction for the shared channel row.
libs/portal/shared/ui/src/lib/components/grid-list/grid-list.component.ts Restricts catch-up badges to live-style grids and derives their localized labels through shared helpers.
libs/portal/shared/ui/src/lib/components/unified-collection/unified-live-tab.component.ts Preserves Xtream archive metadata when mapping unified live items into shared list rows.
libs/workspace/shell/feature/src/lib/global-favorites/global-favorites.service.ts Carries persisted Xtream archive fields into the global-favorites presentation model.
libs/portal/xtream/feature/src/lib/portal-channels-list/portal-channels-list.component.html Connects catch-up metadata and programme-info actions to Xtream sidebar rows.
libs/portal/stalker/feature/src/lib/stalker-live-stream-layout/stalker-live-stream-layout.component.html Enables the shared programme-info action in the Stalker live sidebar.
apps/electron-backend-e2e/src/xtream-epg.e2e.ts Extends the existing Xtream EPG workflow to assert the provider catch-up badge.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Xtream live-channel metadata] --> B[Catch-up normalization helpers]
    B --> C[Portal channel sidebar]
    A --> D[Unified collection mapping]
    D --> E[Favorites and recent rows]
    A --> F[Live grid cards]
    C --> G[Accessible history badge and day tooltip]
    E --> G
    F --> G
Loading

Reviews (2): Last reviewed commit: "fix(ui): constrain Material touch target..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1b18adf503

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The mat-icon is aria-hidden and the tooltip is pointer-only, so the
badge status was invisible to keyboard and screen-reader users. Both
badge surfaces now also render the translated status as visually-hidden
text (Codex review, P2).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@4gray

4gray commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 1c3218b792

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@WolfganP

WolfganP commented Aug 2, 2026

Copy link
Copy Markdown

Thx for the quick implementation @4gray
I run the appimage for this branch and it seems to work as expected. Thanks!

Couple of comments thou:

  • The (i) extra pgm info icon seems to have disappeared from the items in Live Tab (it shows in Favorites thou). Is that intended?

  • The catch-up indicator icon doesn't appear in Favorites (I thought you unified the presentation of live channels strips both in the Live tab and Favorites, probably a wrong assumption from my part).

Currently (i) appears beside the (*) icon, but it seems the item strip has enough vertical space to stack both symbols on the right, and save some horizontal space.
As an idea, you may also combine (i) and replace it with (c) -the catch-up icon- when available, but retaining the same action (extra pgm info)

Anyways, thanks again for all the improvements!

Carries tvArchive/tvArchiveDuration through UnifiedFavoriteChannel so
the shared favorites list (portal favorites/recent tabs and global
favorites) renders the same catch-up badge as the live sidebar.
Requested in PR feedback by the issue author.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@WolfganP

WolfganP commented Aug 8, 2026

Copy link
Copy Markdown

Thanks @4gray for the newer patch.
I tested the CI https://github.com/4gray/iptvnator/actions/runs/31244989877

Now the (c) symbol shows both in the Live Tab listings and Favorites accurately (in the sample of channels I compared at both tabs) Success, thanks!

What I don't know if it's intended, is that the (i) icon (addit pgm info via popup) only shows in the Favorites tab

Thx again

…vertically

Adds the (i) programme-info button to the Xtream and Stalker live
sidebars and reworks the row action column: buttons stack vertically
(favorite on top, info below), so the second button costs no horizontal
space — the column is actually narrower than the previous single-button
row. The info slot is reserved (inert, visibility:hidden) while the row
has no programme, so the star never shifts when EPG data arrives.
Requested by the issue author in PR feedback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@4gray

4gray commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@WolfganP Thanks again for testing! 🙏 Both of your points were improved:

  • the catch-up badge now shows in Favorites and Recents too
  • and you were right about stacking, the (i) button is now in the Live tab as well (and the Stalker sidebar), with the actions stacked vertically: star and (i). The stacked column is actually narrower than the old single-button row, so channel names got a bit more room.
image

@4gray

4gray commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8376c187e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 250 to +252
button {
width: 32px;
height: 32px;
width: 28px;
height: 28px;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prevent Material touch targets from overlapping stacked actions

When both favorite and programme-info actions are visible, these 28px buttons are stacked with no gap, but Angular Material's mat-icon-button retains a 48px .mat-mdc-button-touch-target. The targets therefore overlap by 20px, and because the info button is the later sibling, clicks or taps on the lower portion of the favorite button can open programme details instead of toggling the favorite. Constrain the Material touch-target size to the button bounds or provide non-overlapping spacing.

Useful? React with 👍 / 👎.

4gray and others added 2 commits August 9, 2026 09:30
…file

CI lints the merge with master, where unified-live-tab.component.spec.ts
grew (#1374) to one line under the 1200 max-lines test budget — the
archive passthrough test added here tipped the merged result over. The
test moves to a focused template-less spec (plus a null-normalisation
case), leaving the main spec at master's size.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mat-icon-button keeps a 48px touch target; stacked 28px buttons
overlapped by 20px and the later sibling (programme info) stole clicks
from the lower third of the favorite star. Verified via
document.elementFromPoint before/after: the star's visual bounds now hit
the star, and clicks left of the column reach the row again instead of
the button's oversized target (Codex review).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@4gray

4gray commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 6439cb7a35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@4gray

4gray commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@4gray

4gray commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

@greptileai review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6439cb7a35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@4gray
4gray merged commit d5f84fb into master Aug 9, 2026
20 checks passed
@4gray
4gray deleted the claude/iptvnator-issue-1128-6e341a branch August 9, 2026 08:48
@WolfganP

WolfganP commented Aug 9, 2026

Copy link
Copy Markdown

@4gray tested on master and works as expected. Thx a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add a "Catch-up available" indicator for live channels that have them (XC)

2 participants