Skip to content

refactor(api): delete dead v1 reads and the unrouted timeline client - #352

Merged
Quick104 merged 1 commit into
mainfrom
apiv2-stack/04-delete-dead-v1-reads
Sep 23, 2026
Merged

Quick104 merged 1 commit into
mainfrom
apiv2-stack/04-delete-dead-v1-reads

Conversation

@Quick104

Copy link
Copy Markdown
Contributor

This PR deletes three v1 reads that nothing calls, plus a v2 playback timeline client for a route the server does not have. Runtime behavior does not change.

Problem

  • SiloAPI.effectiveSettings(keys:) (GET /api/v1/settings/effective), SiloAPI.effectiveSubtitleAppearance() (GET /api/v1/settings/subtitle_appearance/effective) and SiloAPI.history(offset:limit:) (GET /api/v1/history) have no callers in the app or tests. They keep v1 paths in the source for no reason. The effectiveSubtitleAppearance properties on PlayerSettings and SettingsViewModel are unrelated properties with the same name. The history screen reads through historyCatalog.
  • APIv2PlaybackTimeline.swift defines APIv2Client.playbackManifest, which calls GET /api/v2/playback/timelines/{fileID}. That route is not in the v2 OpenAPI contract at server 84ed9e596. The bound_client_timeline feature is not advertised, and Android also documents the route as missing from the server. APIv2PlaybackDecision.progressTimeline came from the same abandoned design. The contract has no progress_timeline field, and no code reads it.

Solution

  • Delete the three SiloAPI methods and the models that only they used: EffectiveSubtitleAppearanceResponse, EffectiveSettingResponse and EffectiveSettingsResponse in SubtitleAppearance.swift.
  • Delete APIv2PlaybackTimeline.swift (APIv2PlaybackManifest, APIv2ProgressTimeline, playbackManifest) and the progressTimeline field on APIv2PlaybackDecision. The field was the only other user of APIv2ProgressTimeline, so the field and the type are removed together.
  • Remove effectiveSettings from the doc comment in SiloAPI+Settings.swift that listed the legacy string-registry methods.
  • playbackControlRequest and the APIv2PlaybackControl* models stay. The control-socket PR wires them.

Before each deletion, I searched iosApp/ (app, Top Shelf and tests) for direct, inferred-member, trailing-closure and #if-guarded uses of every deleted symbol. The search found none.

Validation

  • iOS, tvOS and macOS builds: all PASS.
  • iOS tests (SiloTests/PlaybackProtocolV3Tests SiloTests/SettingValuesAPITests SiloTests/SystemCaptionAppearanceTests): PASS, 163 tests, 0 failures.
  • tvOS tests on the same three classes in SiloTVTests: PASS, 163 tests, 0 failures.
  • scripts/ci/check-no-api-v1.sh: ok. This PR removes three v1 path literals from SiloAPI.swift, which lowers that file's count below its ceiling.
  • Final stack: with all 50 PRs applied, the full iOS suite (1981 tests) and tvOS suite (1792 tests) passed with 0 failures, the macOS build passed, and the v1 path guard passed. Every branch in the stack, this one included, builds on its own.

Risks and follow-ups

  • Low risk. The PR only deletes code that nothing calls. APIv2PlaybackDecision still decodes a response that contains an extra progress_timeline key, because Codable ignores unknown keys.
  • The remaining parts of the abandoned timeline design are left for their owning PRs: timelineId on APIv2PlaybackStartBody, and timelineId/itemPosition on PlaybackSequencedSample. validateReceipt was their only consumer in this file.
  • There are no expected conflicts with the open PRs.

AI disclosure

Code and description written by Claude Opus 5.5 (claude-opus-5-5) agents in Claude Code (T3 Code), orchestrated by a Claude Code workflow.


Part 4 of 50 in the Apple API v2 stack. Base: apiv2-stack/03-guard-api-v1-paths. Merge in order from the bottom of the stack. The plan and full index are in PR 01.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1c0f6e0a-c738-4728-ad02-8a41fc7d89ef

📥 Commits

Reviewing files that changed from the base of the PR and between 9fade54 and 1231237.

📒 Files selected for processing (5)
  • iosApp/iosApp/Networking/APIv2/APIv2PlaybackModels.swift
  • iosApp/iosApp/Networking/APIv2/APIv2PlaybackTimeline.swift
  • iosApp/iosApp/Networking/SiloAPI+Settings.swift
  • iosApp/iosApp/Networking/SiloAPI.swift
  • iosApp/iosApp/Screens/Player/Subtitles/SubtitleAppearance.swift

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.

@greptile-apps greptile-apps 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.

Quick104 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 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-09-23T13:32:30.498390Z 1231237 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.

@Quick104

Copy link
Copy Markdown
Contributor Author

Code review summary

Reviewed head: 43c7772a (apiv2-stack/04-delete-dead-v1-reads).

Process: an adversarial review of this PR's diff with each candidate finding independently verified before any fix, a simplify pass for medium and larger PRs, and a whole-stack review across contract conformance, authority and failure handling, data integrity, user-visible behavior and cross-PR integration.

Verified findings: none.

Validation: this branch builds on its own for iOS, tvOS and macOS, and its focused tests passed. The completed stack passed the full iOS suite (1981 tests) and tvOS suite (1792 tests) with 0 failures, the macOS build and the v1 path guard. The final stack was also exercised on iOS and tvOS simulators against a v1/v2 bridge server: sign-in (password and QR), restore, browse, search, detail, favorites and watchlist, playback (direct play, transcode, subtitles, stop), audiobooks, downloads with offline playback, settings, requests, profiles, push registration and diagnostics. Server logs showed no /api/v1 request from the new builds except the retained health probe.

Remaining: no open verified findings. Merge in stack order.

Mergeability: 8/10 — conditional. The approach holds up and every verified finding is fixed. Conditions: this PR's CI must pass (it was pending at review time), and the owner still plans a physical-device check of the completed stack.

Review by Claude Opus 5.5 (claude-opus-5-5) agents in Claude Code (T3 Code).

@Quick104
Quick104 force-pushed the apiv2-stack/04-delete-dead-v1-reads branch from 43c7772 to 9fff17c Compare September 23, 2026 13:19
@Quick104
Quick104 force-pushed the apiv2-stack/03-guard-api-v1-paths branch 2 times, most recently from ae7d6e1 to ea49de8 Compare September 23, 2026 13:29
Base automatically changed from apiv2-stack/03-guard-api-v1-paths to main September 23, 2026 13:29
SiloAPI still carried three v1 reads that nothing calls:
effectiveSettings(keys:), effectiveSubtitleAppearance() and
history(offset:limit:). APIv2PlaybackTimeline.swift added a
playbackManifest client for GET /api/v2/playback/timelines/{id}, a route
the server contract does not have, plus a progressTimeline field on
APIv2PlaybackDecision that the server never sends.

Delete the three SiloAPI methods and the response models only they used
(EffectiveSubtitleAppearanceResponse, EffectiveSettingResponse,
EffectiveSettingsResponse). Delete APIv2PlaybackTimeline.swift
(APIv2PlaybackManifest, APIv2ProgressTimeline, playbackManifest) and the
progressTimeline field. playbackControlRequest and the
APIv2PlaybackControl models stay for the control socket work.

Stack-PR: F3

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@Quick104
Quick104 force-pushed the apiv2-stack/04-delete-dead-v1-reads branch from 9fff17c to 1231237 Compare September 23, 2026 13:29
@Quick104
Quick104 merged commit fc31513 into main Sep 23, 2026
3 of 6 checks passed
@Quick104
Quick104 deleted the apiv2-stack/04-delete-dead-v1-reads branch September 23, 2026 13:29
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