Repository navigation
refactor(api): delete dead v1 reads and the unrouted timeline client - #352
Conversation
|
Warning Review limit reachedNext included review available in 11 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
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. Comment |
There was a problem hiding this comment.
Quick104 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Code review summaryReviewed head: 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 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 ( |
43c7772 to
9fff17c
Compare
ae7d6e1 to
ea49de8
Compare
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]>
9fff17c to
1231237
Compare
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) andSiloAPI.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. TheeffectiveSubtitleAppearanceproperties onPlayerSettingsandSettingsViewModelare unrelated properties with the same name. The history screen reads throughhistoryCatalog.APIv2PlaybackTimeline.swiftdefinesAPIv2Client.playbackManifest, which callsGET /api/v2/playback/timelines/{fileID}. That route is not in the v2 OpenAPI contract at server84ed9e596. Thebound_client_timelinefeature is not advertised, and Android also documents the route as missing from the server.APIv2PlaybackDecision.progressTimelinecame from the same abandoned design. The contract has noprogress_timelinefield, and no code reads it.Solution
SiloAPImethods and the models that only they used:EffectiveSubtitleAppearanceResponse,EffectiveSettingResponseandEffectiveSettingsResponseinSubtitleAppearance.swift.APIv2PlaybackTimeline.swift(APIv2PlaybackManifest,APIv2ProgressTimeline,playbackManifest) and theprogressTimelinefield onAPIv2PlaybackDecision. The field was the only other user ofAPIv2ProgressTimeline, so the field and the type are removed together.effectiveSettingsfrom the doc comment inSiloAPI+Settings.swiftthat listed the legacy string-registry methods.playbackControlRequestand theAPIv2PlaybackControl*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
SiloTests/PlaybackProtocolV3Tests SiloTests/SettingValuesAPITests SiloTests/SystemCaptionAppearanceTests): PASS, 163 tests, 0 failures.SiloTVTests: PASS, 163 tests, 0 failures.scripts/ci/check-no-api-v1.sh: ok. This PR removes three v1 path literals fromSiloAPI.swift, which lowers that file's count below its ceiling.Risks and follow-ups
APIv2PlaybackDecisionstill decodes a response that contains an extraprogress_timelinekey, becauseCodableignores unknown keys.timelineIdonAPIv2PlaybackStartBody, andtimelineId/itemPositiononPlaybackSequencedSample.validateReceiptwas their only consumer in this file.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