Skip to content

Priority downloads, YouTubeKit pin, TestFlight scheme - #145

Merged
sanylax2 merged 4 commits into
mainfrom
feat/open-prs-priority-downloads
Sep 11, 2026
Merged

sanylax2 merged 4 commits into
mainfrom
feat/open-prs-priority-downloads

Conversation

@sanylax0

Copy link
Copy Markdown
Collaborator

Summary

  • Pin YouTubeKit to exact: "0.4.9" and declare the shared Continuity scheme so playlist imports stop 403ing after the first chunk and TestFlight archives can find -scheme Continuity.
  • Add Download First for songs and playlists/albums (context menus, playlist header, Up Next, Downloads) so prioritized tracks jump the ingest waiter list without cancelling in-flight work.
  • Add a Downloads screen (library toolbar) with queued / downloading (%) / analyzing progress, and restore the last song before the launch resume pass so a large unfinished import does not block the first frame.

Test plan

  • Device build + install on physical iPhone (sp17) succeeds after ingestJobs internal(set) fix
  • Cold launch with a large unfinished import: first frame appears, then downloads resume
  • Import a playlist, open Downloads, confirm rows move queued → downloading (%) → analyzing → gone
  • Download First on one song and on a whole playlist; those rows jump ahead of the rest
  • Import still produces full audio files (not 403-after-1MB)
  • TestFlight / xcodebuild -scheme Continuity archive finds the scheme

Made with Cursor

Jaasthi Santosh Naidu Lakshman Senna and others added 4 commits September 11, 2026 14:28
Every imported track resolved, then every ranged download got HTTP 403 →
IngestError.streamURLExpired → re-resolve → 403 again → scheduleRetry kept
the row .pending through 5 whole-track attempts (minutes of spinner) →
.failed (orange retry badge). Reproduced on the iOS Simulator with a live
probe: 0/8 tracks ready, every attempt "prep failed … streamURLExpired".

Root cause: Packages/ContinuityKit/Package.resolved pinned YouTubeKit at
7cc8190 (2026-07-05), whose stream URLs come from the ANDROID_VR InnerTube
client. Since mid-August 2026 YouTube serves only the first ~1 MB of those
URLs and 403s the rest, so the app's 1 MiB ranged downloader dies on chunk
("Update YouTube Changes (August 2026)") switches to the visionOS/web
clients plus an embed fallback; its URLs return 206 for every chunk.

- Package.swift: depend on YouTubeKit `exact: "0.4.9"` instead of floating
  on `branch: "main"` (which resolved differently per machine and let the
  app silently fall behind).
- Package.resolved: 0.4.9 / e5b7d03.
- Tests/IngestTests/LiveIngestProbeTests.swift: opt-in live-network probe
  (skipped unless CONTINUITY_LIVE_PROBE=1) that drives the real
  PreparationQueue and prints the failing stage/error per track — the tool
  that found this. With 0.4.9: 8/8 and 6/6 tracks ready on the simulator.
- AGENTS.md / CLAUDE.md: record the gotcha and the diagnosis recipe.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Every TestFlight run since PR #127 died in the Archive step after ~30s with
xcodebuild exit 65: "The project named "Continuity" does not contain a
scheme named "Continuity"". project.yml declared no schemes, and XcodeGen
only emits schemes a target asks for; the runs had been relying on
xcodebuild auto-creating one, which Xcode 26.x no longer does (same
XcodeGen 2.46.0 + Xcode 26.6 locally reproduces the failure, and the
declared scheme makes `xcodebuild archive -scheme Continuity` succeed).

Records the scheme gotcha in AGENTS.md / CLAUDE.md so it isn't
rediscovered.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Let songs and playlists jump the ingest queue, surface byte-level progress, and restore playback before the launch resume pass so a large library doesn't block the first frame.

Co-authored-by: Cursor <cursoragent@cursor.com>
private(set) is file-scoped, so the Jobs extension could not update the Downloads list and the device build failed.

Co-authored-by: Cursor <cursoragent@cursor.com>

@sanylax2 sanylax2 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@sanylax2
sanylax2 merged commit 8856d3a into main Sep 11, 2026
4 checks passed
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.

2 participants