Skip to content

feat(settings): read overlay config from v2 - #368

Merged
Quick104 merged 1 commit into
mainfrom
apiv2-stack/20-overlay-config-v2
Sep 23, 2026
Merged

Quick104 merged 1 commit into
mainfrom
apiv2-stack/20-overlay-config-v2

Conversation

@Quick104

Copy link
Copy Markdown
Contributor

The card overlay store now reads the admin overlay config from GET /api/v2/settings/overlay-config and 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). Its OverlayConfigResponse model decoded only enabled and defaults. The v2 OverlayConfig schema also requires quick_actions_enabled and quick_actions_default.

Solution

  • APIv2Client.overlayConfig(expectedIdentity:) in APIv2Client+Settings.swift calls getOverlayConfig through the shared settingsRead. 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.
  • The new APIv2OverlayConfig in APIv2SettingsModels.swift decodes all four members and treats the two quick-action members as required. A reply without them fails, and OverlayPrefsStore handles 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 in SiloAPI+Settings.swift and forwards to the shared client. OverlayPrefsStore still calls it and behaves the same.
  • Deleted the v1 SiloAPI.overlayConfig() path and the OverlayConfigResponse model.

This is a read, so it needs no failure-outcome table.

Validation

  • iOS, tvOS and macOS builds passed.
  • iOS tests (SiloTests/OverlayPrefsStoreTests SiloTests/SettingValuesAPITests) passed: 75 tests, 0 failures. The same classes under SiloTVTests passed: 75 tests, 0 failures.
  • scripts/ci/check-no-api-v1.sh passed.
  • OverlayPrefsStoreTests now 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.
  • The completed stack passed the full iOS suite (1981 tests) and tvOS suite (1792 tests) with 0 failures, built for macOS and passed the v1 path guard. Every branch in the stack builds on its own.

Risks and follow-ups

  • If a server omits the quick-action members, which the contract requires, the config read now fails. The cached kill switch and baseline stay in place, or the defaults apply when nothing is cached.
  • The plan lists no open-PR conflicts for this change.

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

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 3 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: ee7bbd06-fda0-4364-a581-3c9339ece96c

📥 Commits

Reviewing files that changed from the base of the PR and between 997d706 and a3b7150.

📒 Files selected for processing (6)
  • iosApp/Tests/OverlayPrefsStoreTests.swift
  • iosApp/iosApp/Networking/APIv2/APIv2Client+Settings.swift
  • iosApp/iosApp/Networking/APIv2/APIv2SettingsModels.swift
  • iosApp/iosApp/Networking/Models.swift
  • iosApp/iosApp/Networking/SiloAPI+Settings.swift
  • iosApp/iosApp/Networking/SiloAPI.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:40:57.497902Z a3b7150 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: 2d85bb64 (apiv2-stack/20-overlay-config-v2).

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/20-overlay-config-v2 branch from 2d85bb6 to ac2291a Compare September 23, 2026 13:19
@Quick104
Quick104 force-pushed the apiv2-stack/19-track-preferences-v2 branch 2 times, most recently from a678385 to a4c472a Compare September 23, 2026 13:37
Base automatically changed from apiv2-stack/19-track-preferences-v2 to main September 23, 2026 13:37
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]>
@Quick104
Quick104 force-pushed the apiv2-stack/20-overlay-config-v2 branch from ac2291a to a3b7150 Compare September 23, 2026 13:37
@Quick104
Quick104 merged commit 3cef393 into main Sep 23, 2026
3 of 6 checks passed
@Quick104
Quick104 deleted the apiv2-stack/20-overlay-config-v2 branch September 23, 2026 13:38
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