Skip to content

feat(downloads): show titles and progress for downloads the server is preparing - #599

Merged
Quick104 merged 13 commits into
feat/download-quality-pickerfrom
feat/download-preparing-rows
Oct 4, 2026
Merged

Quick104 merged 13 commits into
feat/download-quality-pickerfrom
feat/download-preparing-rows

Conversation

@Quick104

@Quick104 Quick104 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #598, which is stacked on #597: review those first. This PR's diff is against #598's branch.

Problem

A season, series, or monitor download arrives from the server with no title or artwork; the app read them from the download's manifest only once the file was ready. For a download the server has to convert first, that can take an hour, so the Downloading list showed rows labelled with a raw content id ("series-tvdb-446831"), a blank poster, and "Preparing on server…" with a spinner. Nothing said whether the server was converting the file or still had ten jobs ahead of it.

Solution

  • Titles and posters right away. After a download is registered or the list refreshes, the app reads the manifest of each untitled download still in progress and keeps only its display fields: episode title, "S1 · E3", series title, and the series poster's thumbhash. The server builds manifests for preparing downloads too. Nothing the transfer depends on (quality, size, integrity) is taken from this early read. One pass runs at a time, results are saved in one write, a pass stops at the first connection failure, and a download whose read fails is not retried until the profile or server changes.
  • Preparation progress. On a server that reports preparation_progress, a preparing row shows where its file is: "Waiting to prepare · 3rd in line", or "Preparing · 35% · 6 min left" with a dimmed progress ring. The list already refreshes every 15 seconds while anything is preparing. Without the field, the row keeps "Preparing on server…".

Related issue: N/A
Validation tasks: changes #319 C1 (download and manage flow); not run yet. No passed case is affected.

Validation

  • xcodebuild test, scheme Silo, iOS 27 simulator: the full SiloTests suite, 2,452 tests, 0 failures, 2 skipped. New tests cover the status copy for each preparation state, decoding preparation, and that the early read fills display fields without touching the requested quality or the expected size.
  • Builds: Silo, SiloTV including its test bundle, and SiloMac.
  • On an iPhone against a development server: after installing, the server logged one successful manifest read for each of 13 preparing downloads.
  • After feat(downloads): report preparation progress on listed downloads silo-server#1881 was deployed to that server, its API listed a preparing download with {"state":"queued","queue_position":5}. The row on the device and a running encode's percentage were not observed; the tests cover them.

Risks and follow-up

AI Disclosure

  • Harness: Claude Code (Claude Agent SDK) in T3 Code
  • Tool(s): Claude Code, including its review subagent
  • Model(s): claude-opus-5-5[1m]
  • Involvement: AI-assisted
  • Adversarial review: the review agent described in feat(downloads): show monitored series and simplify the series Download sheet #597 found that a download deleted during a pass was still requested, that a download whose read kept failing was requested again on every 15-second refresh, and that each result rewrote the store separately. All three are fixed here. On the PR, Codex found that a connection failure or busy server still marked a download as not to be read again; only a refusal does now (426dd07).

🤖 Generated with Claude Code

Note

Show titles, queue position, and encode progress for server-preparing downloads

  • Adds a DownloadPreparation value type that formats queued position, retrying, percentage, and remaining-time status lines (DownloadModels.swift)
  • Adds a serialized background pass in DownloadManager.fillMissingDisplay that fetches manifests for active untitled records via the authenticated v2 client and fills only absent display fields (title, poster, series, season, episode, subtitle), leaving transfer-owned fields like quality and byte counts untouched; failures within a scope are suppressed until the scope changes, and requests arriving mid-pass trigger a follow-up pass (DownloadManager.swift)
  • Preparing rows now show the preparation status line with a non-interactive encode-progress ring, falling back to the generic server-preparation label when metadata is absent (DownloadManagerRows.swift)
  • DownloadRecord persists optional preparation metadata, and APIv2DownloadEntry decodes it from server responses; registry reconciliation stores it only while server status is preparing
  • Behavioral Change: preparing rows no longer offer pause/resume controls when encode progress is present; records rejected as unusable during the fill pass are not retried until the scope changes

Macroscope summarized 344244a.

… preparing

- Season, series, and monitor downloads arrive without a title or artwork,
  and their manifest was read only once the file was ready. The app now
  reads each untitled download's manifest right away for its title,
  episode number, and series poster.
- A preparing row shows the server's queue position or encode progress and
  time left, on servers that report preparation_progress.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 359359b5-1089-493d-a1de-bf16a51d3a48

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T17:07:01.581889Z a1fa2b3 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 4245870657

ℹ️ 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".

Quick104 and others added 3 commits October 4, 2026 01:52
Only a refusal of a download (a 4xx other than a timeout or rate limit)
stops its manifest being read again this session. A connection failure,
timeout, or busy server ends the pass, and the next pass retries.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@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: 8f731b6396

ℹ️ 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".

@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: 83b7384e23

ℹ️ 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".

Quick104 and others added 7 commits October 4, 2026 11:55
Pages of a season registered while a display pass runs now get their own
pass once it finishes, instead of waiting for an unrelated trigger.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ay pass

A manifest the app can't use is now a lasting failure for that download,
like a refusal, so later downloads still get their titles and artwork.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@Quick104
Quick104 merged commit 2fe2d30 into feat/download-quality-picker Oct 4, 2026
6 checks passed
@Quick104
Quick104 deleted the feat/download-preparing-rows branch October 4, 2026 17:37
Quick104 added a commit that referenced this pull request Oct 4, 2026
…598)

* feat(downloads): choose a quality for season downloads and monitors

- The series Download sheet has a Quality row for one-time downloads and
  monitors. It starts at the quality set in Settings, and an existing
  monitor opens with its own.
- Season and series downloads send the chosen quality, and monitors store
  it, on servers that report bulk_quality and monitor_quality. Older servers
  keep original quality, and the sheet says so.
- A monitor at a lower quality shows it in the Monitored list.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): describe season and monitor quality in Settings

The download quality footer says the setting is the default for every
download and monitor when the server takes a quality for seasons, and keeps
"original quality" for seasons only on servers that don't.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): drop quality choices the server stops offering

A one-time or new-monitor quality the server no longer offers falls back to
the Settings default when the presets change, so the menu never shows a
quality the request wouldn't use. Only an existing monitor's stored quality
stays listed when it isn't offered.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): mention monitors in the quality note only when they take one

On a server that takes a quality for seasons but not for monitors, the
Settings note says monitored series download in original quality.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* feat(downloads): show titles and progress for downloads the server is preparing (#599)

* feat(downloads): show titles and progress for downloads the server is preparing

- Season, series, and monitor downloads arrive without a title or artwork,
  and their manifest was read only once the file was ready. The app now
  reads each untitled download's manifest right away for its title,
  episode number, and series poster.
- A preparing row shows the server's queue position or encode progress and
  time left, on servers that report preparation_progress.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): retry display reads after connection failures

Only a refusal of a download (a 4xx other than a timeout or rate limit)
stops its manifest being read again this session. A connection failure,
timeout, or busy server ends the pass, and the next pass retries.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): run another display pass for records added during one

Pages of a season registered while a display pass runs now get their own
pass once it finishes, instead of waiting for an unrelated trigger.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): skip an unusable manifest instead of ending the display pass

A manifest the app can't use is now a lasting failure for that download,
like a refusal, so later downloads still get their titles and artwork.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Quick104 added a commit that referenced this pull request Oct 4, 2026
…ad sheet (#597)

* feat(downloads): show monitored series and simplify the series Download sheet

- A Monitored list in Downloads shows each monitored series, its rule, and
  what downloads next, using the airing calendar for upcoming episodes.
- The series page's Download action opens one sheet: One Time (this episode,
  a season, or all episodes) or Monitor (All Episodes, Future Episodes, or
  Last Season), with delete-after-watching and a storage limit.
- A banner on a monitored series' page says what downloads next.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): keep monitor choices to what the server offers

- A new monitor starts on the first rule the server advertises instead of
  a hidden Future Episodes.
- An existing monitor's tab stays reachable when the server stops offering
  monitoring, so it can still be stopped; saving is disabled there.
- A calendar refresh after a profile switch no longer waits on the old
  profile's load and keeps nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): keep the shown episode version and existing monitor rules

- The Download sheet downloads the episode version the series page shows,
  including an automatic pick, rather than leaving it to the server.
- An existing monitor's rule stays listed when the server stops
  advertising it, and is not resent unless the user changes it.
- Monitored series load their titles and posters four at a time.
- A failed download no longer hides its episode from "next episode".

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): don't call a monitor up to date before its calendar loads

- An idle monitor shows "Monitoring" until the airing calendar has loaded
  for the profile, instead of "Up to date".
- The Download sheet treats an episode whose download request is still in
  flight as on its way, so it isn't offered again.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): back off series detail reads that failed

A monitored series whose title and poster read failed isn't read again
until the calendar refresh interval passes, instead of on every view
appearance.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): fence the monitor schedule by scope and load

- A schedule loaded for another server or profile reads as empty and not
  loaded, so a switched profile shows "Monitoring" until its own loads.
- Each calendar load carries a token; only the current one publishes or
  clears the in-flight slot.
- The Monitor tab is hidden for a new monitor when the server advertises no
  rule the sheet offers, such as specific seasons only.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): scope monitored series titles and posters to the profile

Series titles and posters are read through a scope-checked accessor, and a
details load after a profile switch first drops the previous profile's
data instead of storing alongside it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): mention monitoring on the empty Downloads screen

When the server offers monitoring, the empty Downloads screen also says how
to start one, since the Monitored list is reached from Downloads only once
something is downloaded or monitored.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* feat(downloads): choose a quality for season downloads and monitors (#598)

* feat(downloads): choose a quality for season downloads and monitors

- The series Download sheet has a Quality row for one-time downloads and
  monitors. It starts at the quality set in Settings, and an existing
  monitor opens with its own.
- Season and series downloads send the chosen quality, and monitors store
  it, on servers that report bulk_quality and monitor_quality. Older servers
  keep original quality, and the sheet says so.
- A monitor at a lower quality shows it in the Monitored list.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): describe season and monitor quality in Settings

The download quality footer says the setting is the default for every
download and monitor when the server takes a quality for seasons, and keeps
"original quality" for seasons only on servers that don't.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): drop quality choices the server stops offering

A one-time or new-monitor quality the server no longer offers falls back to
the Settings default when the presets change, so the menu never shows a
quality the request wouldn't use. Only an existing monitor's stored quality
stays listed when it isn't offered.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): mention monitors in the quality note only when they take one

On a server that takes a quality for seasons but not for monitors, the
Settings note says monitored series download in original quality.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* feat(downloads): show titles and progress for downloads the server is preparing (#599)

* feat(downloads): show titles and progress for downloads the server is preparing

- Season, series, and monitor downloads arrive without a title or artwork,
  and their manifest was read only once the file was ready. The app now
  reads each untitled download's manifest right away for its title,
  episode number, and series poster.
- A preparing row shows the server's queue position or encode progress and
  time left, on servers that report preparation_progress.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): retry display reads after connection failures

Only a refusal of a download (a 4xx other than a timeout or rate limit)
stops its manifest being read again this session. A connection failure,
timeout, or busy server ends the pass, and the next pass retries.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): run another display pass for records added during one

Pages of a season registered while a display pass runs now get their own
pass once it finishes, instead of waiting for an unrelated trigger.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): skip an unusable manifest instead of ending the display pass

A manifest the app can't use is now a lasting failure for that download,
like a refusal, so later downloads still get their titles and artwork.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): don't record a display failure from an outdated scope

A manifest read that fails after the server or profile changed no longer
adds its download to the new scope's skip list.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): read display manifests four at a time and retry after outages

- Untitled downloads' manifests are read four at a time instead of one by
  one.
- A pass that a connection failure, timeout, or busy server ends schedules
  another, waiting 15 seconds and doubling up to five minutes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* feat(downloads): show when a download's preparation is paused

A preparing download whose server job an administrator paused reads
"Preparation paused on the server" (Silo-Server/silo-server#1925).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): drop a display retry when the scope changes

A pending display-fill retry is cancelled when the server or profile
changes, and a retry only runs in the scope that scheduled it, so the
previous scope's backoff can't hold back the new scope's retries.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): keep long quality values on one line in the Download sheet

The Quality and Storage limit menus shared the row width with their
label, so a preset like "1 Mbps · up to 480p" wrapped out of the row.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): keep the monitor banner and display-fill retries reachable

Show the series banner for an existing monitor even when the server no
longer offers monitoring, as the Monitored list does, so it can still be
stopped from the series page.

A display-fill retry that woke after its scope was gone returned without
clearing itself, so if that scope came back the finished task blocked
every later retry. It now clears itself before checking the scope.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* fix(downloads): cancel the display-fill retry on deactivation

Deactivation already cancels the poll and scope-load tasks; the retry
now goes with them instead of waking later to find its scope gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.

1 participant