Skip to content

PCIOS-712: Inconsistent episode count display on Android and iOS#4462

Open
pocketcasts wants to merge 8 commits into
trunkfrom
pcios-712/pcios-712-up-next-episode-count
Open

PCIOS-712: Inconsistent episode count display on Android and iOS#4462
pocketcasts wants to merge 8 commits into
trunkfrom
pcios-712/pcios-712-up-next-episode-count

Conversation

@pocketcasts

Copy link
Copy Markdown
Contributor

Resolves PCIOS-712

Summary

Updates the Up Next queue header on iOS to display the episode count alongside the time remaining, matching Android's existing behavior (e.g. "5 episodes · 3h 58m left").

Changes

  • Added two new localization strings: queue_up_next_header_one_episode ("1 episode · %1$@") and queue_up_next_header_plural ("%1$@ episodes · %2$@")
  • Added corresponding SwiftGen L10n accessor functions in Strings+Generated.swift
  • Updated updateTimeRemainingLabel() in UpNextViewController.swift to include the episode count from upNextCount() (which already excludes the currently-playing episode), with a fallback to the existing time-only format when the queue is empty

Verification

  • Lint: PASS — make format ran clean
  • Tests: Pre-existing build failure in CarPlaySceneDelegate+Convert.swift (unrelated CPPlaybackConfiguration scope error) — not caused by these changes
  • Diff review: PASS — confirmed only 3 files changed, no unintended changes, no debug statements or hardcoded values
  • Secret scan: PASS — no secrets in diff

Confidence

HIGH — The change is a straightforward label format update. The episode count (upNextCount()) and time calculation already existed and are well-tested. The new strings follow established patterns in the codebase (playlist_detail_description). The existing notification observers already trigger updateTimeRemainingLabel() on queue and playback changes.

Known Issues

  • Pre-existing build failure in CarPlaySceneDelegate+Convert.swift referencing CPPlaybackConfiguration — this error exists on trunk and is unrelated to this PR.

This PR was created autonomously by linear-solver.
Triage complexity: simple | Linear issue

@joashrajin joashrajin self-assigned this Jun 3, 2026
@joashrajin joashrajin marked this pull request as ready for review June 3, 2026 17:31
@joashrajin joashrajin requested a review from a team as a code owner June 3, 2026 17:31
@joashrajin joashrajin requested review from SergioEstevao and Copilot and removed request for a team and Copilot June 3, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the iOS Up Next queue header to include an episode count alongside the remaining time, aiming to match the Android presentation.

Changes:

  • Updates UpNextViewController.updateTimeRemainingLabel() to format the header differently for 0/1/plural Up Next episode counts.
  • Adds two new localized string keys for the Up Next header (singular/plural forms).
  • Regenerates/updates SwiftGen L10n accessors to expose the new strings.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
podcasts/UpNextViewController.swift Builds the new “episode count + time” header text using upNextCount() and existing time formatting.
podcasts/Strings+Generated.swift Adds SwiftGen accessors for the new Up Next header localization keys.
podcasts/en.lproj/Localizable.strings Introduces the new English localization entries for the Up Next header (singular/plural).

Comment thread podcasts/UpNextViewController.swift
Comment thread podcasts/en.lproj/Localizable.strings Outdated
Comment on lines +2197 to +2201
/* Up Next header showing episode count and time remaining for a single episode. '%1$@' is a placeholder for the total time remaining. */
"queue_up_next_header_one_episode" = "1 episode · %1$@";

/* Up Next header showing episode count and time remaining for multiple episodes. '%1$@' is a placeholder for the episode count. '%2$@' is a placeholder for the total time remaining. */
"queue_up_next_header_plural" = "%1$@ episodes · %2$@";

@joashrajin joashrajin Jun 3, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure if this is needed here since we use GlotPress, where en.lproj/Localizable.strings is the source of truth. Feature PRs add keys to en.lproj only (and Strings+Generated.swift); the other 14 .lproj files are populated automatically by the release bot ("Update localization files with up-to-date values from GlotPress"). MANUALLY_MAINTAINED_STRINGS_FILES in the Fastfile lists only en.lproj, and no CI check enforces locale parity. Hand-adding English copies to the other locales would be overwritten and could clobber translations already in GlotPress, so the English fallback until the next sync is expected/by design.

@joashrajin joashrajin added Up Next issues related to the Up Next feature [Priority] Medium An issue that is not urgent but should be prioritised soon. labels Jun 3, 2026
Pass the count through .localized() instead of string-interpolating it,
so digits and grouping respect the user's locale, matching the project's
established plural call sites (e.g. episodeCountPluralFormat). Addresses
Copilot review feedback.
@SergioEstevao SergioEstevao added this to the 8.14 milestone Jun 5, 2026

@SergioEstevao SergioEstevao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While it's now showing the total of episodes too, I think there is still some inconsistencies comparing to Android:

  • When there is only the current playing episode

    • iOS shows 10m total time remaining
    • Android shows 10m left
  • When there is one episode on the upnext quee

    • iOS shows 1 episode 10m
    • Android shows 1 episode 10m left
  • When there is mored episode on the upnext quee

    • iOS shows 2 episodes 10m
    • Android shows 2 episodes 10m left

Do we want iOS to use left as Android?

@joashrajin

Copy link
Copy Markdown
Contributor

While it's now showing the total of episodes too, I think there is still some inconsistencies comparing to Android:

  • When there is only the current playing episode

    • iOS shows 10m total time remaining
    • Android shows 10m left
  • When there is one episode on the upnext quee

    • iOS shows 1 episode 10m
    • Android shows 1 episode 10m left
  • When there is mored episode on the upnext quee

    • iOS shows 2 episodes 10m
    • Android shows 2 episodes 10m left

Do we want iOS to use left as Android?

I would say we make iOS follow the same wording as Android, as per the feedback we had from the design team. I will add the changes

Addresses PR review feedback on PCIOS-712: iOS now matches Android's
wording in all three Up Next header states —

  0 queued   -> 10m left
  1 queued   -> 1 episode · 10m left
  2+ queued  -> 2 episodes · 10m left

Adds a dedicated queue_up_next_header_time_left ("%1$@ left") for the
empty-queue case and removes the now-unused queue_total_time_remaining.
Keeps the middle-dot separator per design.
@joashrajin

Copy link
Copy Markdown
Contributor

Updated in 015bd0b to match Android's wording — all three states now end with left:

Up Next state iOS now Android
Only current episode playing 10m left 10m left
1 episode queued 1 episode · 10m left 1 episode - 10m left
2+ episodes queued 2 episodes · 10m left 2 episodes - 10m left

The empty-queue case now uses a new queue_up_next_header_time_left (%1$@ left) instead of "total time remaining", and I removed the now-unused queue_total_time_remaining. I kept the middle-dot · separator (Android uses a hyphen) since that's the existing iOS style — happy to switch to a hyphen if you'd prefer exact parity.

@joashrajin

joashrajin commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

One more thing I noticed while making this consistent with Android, @SergioEstevao: the now-playing row inside Up Next still reads X remaining (via the queue_time_remaining string), whereas Android shows X left there too (its time_left string). So after this change the header reads … left but the now-playing row right below it still reads … remaining.

Do you want me to align that row to left as well (keeps it consistent with both the new header and Android), or keep this PR scoped to just the header and handle the row separately?

@joashrajin

Copy link
Copy Markdown
Contributor

@copilot review again

Copilot AI commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@copilot review again

Reviewed the latest changes. The header wording now matches the agreed Android phrasing (left) across 0/1/plural states, and I don’t see any further issues to address in this PR.

Copilot AI requested a review from joashrajin June 5, 2026 21:07
@pocketcasts pocketcasts modified the milestones: 8.14, 8.15 Jun 8, 2026
@pocketcasts

Copy link
Copy Markdown
Contributor Author

Version 8.14 has now entered code-freeze, so the milestone of this PR has been updated to 8.15.

@SergioEstevao SergioEstevao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good, if you want this on 8.14 please retarget the branch, or if you are happy with 8.15 then you need to change the changelog.

Regarding the top cell, if we are aligning with Android it makes sense to update that string too

@joashrajin

Copy link
Copy Markdown
Contributor

Thank you so much, @SergioEstevao

Changes have been made

@joashrajin

Copy link
Copy Markdown
Contributor

Thanks @SergioEstevao! Addressed both:

  • 8.15: kept the branch on trunk, merged latest, and moved the CHANGELOG entry to the 8.15 section (8.14's already cut). As part of the merge the branch also picked up the change that stops tracking Strings+Generated.swift, so the new L10n accessors are now generated at build time rather than hand-edited.
  • Top cell: updated the now-playing cell's queue_time_remaining string to "%1$@ left" so it matches Android's wording (previously "remaining").

@SergioEstevao SergioEstevao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

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

Labels

[Priority] Medium An issue that is not urgent but should be prioritised soon. Up Next issues related to the Up Next feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants