Repository navigation
feat(settings): read overlay config from v2 - #368
Conversation
|
Warning Review limit reachedNext included review available in 3 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 (6)
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 ( |
2d85bb6 to
ac2291a
Compare
a678385 to
a4c472a
Compare
The card overlay store read the admin kill switch and baseline from GET /api/v1/settings/overlay-config, and its model knew only `enabled` and `defaults`. The store now reads GET /api/v2/settings/overlay-config through the shared APIv2Client's settings read, which gates on the probe verdict and fences the reply to the owner captured at send. The new APIv2OverlayConfig decodes the contract's required quick_actions_enabled and quick_actions_default members, so a reply without them is a failed read that keeps the cached kill switch. The v1 method and OverlayConfigResponse are deleted. Stack-PR: W4-D Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ac2291a to
a3b7150
Compare
The card overlay store now reads the admin overlay config from
GET /api/v2/settings/overlay-configand decodes the contract's required quick-action members.Problem
The card overlay store still read the admin overlay kill switch and baseline document from
GET /api/v1/settings/overlay-config(inventory row 37). ItsOverlayConfigResponsemodel decoded onlyenabledanddefaults. The v2OverlayConfigschema also requiresquick_actions_enabledandquick_actions_default.Solution
APIv2Client.overlayConfig(expectedIdentity:)inAPIv2Client+Settings.swiftcallsgetOverlayConfigthrough the sharedsettingsRead. That read gates on the v2 probe verdict, sends no profile when none is selected (the operation's profile is optional), and fences the reply to the owner captured at send. Any status other than 200 is a failed read.APIv2OverlayConfiginAPIv2SettingsModels.swiftdecodes all four members and treats the two quick-action members as required. A reply without them fails, andOverlayPrefsStorehandles that failure like any other config read error: it keeps the cached kill switch and baseline, and it does not mark a first hydration complete. Apple does not render card quick actions yet, so nothing reads these two values, and there was nothing to check by hand.SiloAPI.overlayConfig()now lives inSiloAPI+Settings.swiftand forwards to the shared client.OverlayPrefsStorestill calls it and behaves the same.SiloAPI.overlayConfig()path and theOverlayConfigResponsemodel.This is a read, so it needs no failure-outcome table.
Validation
SiloTests/OverlayPrefsStoreTests SiloTests/SettingValuesAPITests) passed: 75 tests, 0 failures. The same classes underSiloTVTestspassed: 75 tests, 0 failures.scripts/ci/check-no-api-v1.shpassed.OverlayPrefsStoreTestsnow route the exact v2 path with contract-shaped replies. A new test covers a config reply without the required quick-action members. It checks that the reply reports an error, keeps an earlier "disabled" kill switch, and sends exactly two GETs to/api/v2/settings/overlay-config.Risks and follow-ups
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 20 of 50 in the Apple API v2 stack. Base:
apiv2-stack/19-track-preferences-v2. Merge in order from the bottom of the stack. The plan and full index are in PR 01.🤖 Generated with Claude Code