Skip to content

fix(artwork): resolve URLs against their supplying server - #296

Merged
Quick104 merged 3 commits into
mainfrom
codex/fix-artwork-server-relative
Sep 16, 2026
Merged

Quick104 merged 3 commits into
mainfrom
codex/fix-artwork-server-relative

Conversation

@Quick104

@Quick104 Quick104 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Server-relative artwork could not load or prefetch because image consumers received paths without an origin. Cached content also needed to retain the server that supplied its artwork after a server switch.

Resolve explicitly marked artwork fields while decoding the response, using its captured URL. Signed paths and queries remain intact, absolute object-storage URLs remain unchanged, and views, prefetchers, and Top Shelf receive the same absolute URLs. Top Shelf now reads the v2 endpoints and season envelope. The session capability probe retains optional storage/delivery fields on every platform and accepts the current v2 capability shape as well as the older size contract. Failed probes are retried on lifecycle refreshes instead of every artwork request; Top Shelf uses the same opaque ID encoding as the main catalog client.

Closes #291. Related: Silo-Server/silo-server#935.

Validation:

  • Signed iOS and tvOS simulator builds, installation, and launch passed.
  • 61 focused iOS tests passed across artwork, capabilities, catalog ownership, and collections.
  • 21 focused tvOS tests passed, including rendered CachedAsyncImage loading and Top Shelf response decoding.
  • Rendered tests load distinct artwork for two server origins and direct object storage, with screenshots retained in XCTest results. Network responses use controlled URLProtocol fixtures.
  • Regression coverage preserves encoded signatures, origin-relative paths under configured base paths, absent capability fields, and download-manifest asset ownership.

The simulator checks do not establish physical Apple TV Home Screen behavior or an end-to-end run against deployed local-storage and S3 servers. Apple regression CI passed the full iOS/tvOS suites and macOS compilation on 3764b5ba. Codex and CodeRabbit completed their latest reviews without further actionable findings; all three reported defects were fixed and their threads resolved.

AI disclosure: Implemented and tested with OpenAI gpt-6-astra in the Codex desktop agent harness. Repository automation also runs Codex GitHub, CodeRabbit, and Macroscope reviews.

@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 16, 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-16T20:34:25.257513Z 3764b5b Manual request
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c553814a-8acb-4879-890a-d369208ca8c7

📥 Commits

Reviewing files that changed from the base of the PR and between 143b0da and 3764b5b.

📒 Files selected for processing (18)
  • iosApp/Tests/ArtworkURLTests.swift
  • iosApp/Tests/ImageSizeCapabilityTests.swift
  • iosApp/TopShelf/TopShelfHTTPClient.swift
  • iosApp/iosApp/Networking/APIv2/APIv2CatalogModels.swift
  • iosApp/iosApp/Networking/APIv2/APIv2CatalogReadModels.swift
  • iosApp/iosApp/Networking/APIv2/APIv2CatalogReadProjection.swift
  • iosApp/iosApp/Networking/APIv2/APIv2Client.swift
  • iosApp/iosApp/Networking/APIv2/APIv2Models.swift
  • iosApp/iosApp/Networking/HTTPClient.swift
  • iosApp/iosApp/Networking/ImageSizeCapability.swift
  • iosApp/iosApp/Networking/Models.swift
  • iosApp/iosApp/Networking/SiloAPI.swift
  • iosApp/iosApp/Networking/WireFormatModels.swift
  • iosApp/iosApp/Screens/Calendar/CalendarModels.swift
  • iosApp/iosApp/Shared/ArtworkURL.swift
  • iosApp/iosApp/Shared/CatalogPathSegment.swift
  • iosApp/iosApp/Shared/ImageSizeSelection.swift
  • iosApp/iosApp/Shared/TopShelfModels.swift

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The iOS app now resolves server-relative artwork URLs against response origins. Artwork-bearing models use property wrappers, API v2 routes use encoded catalog segments, HTTP decoding retains response URLs, and image capability probing supports retry and reset behavior.

Changes

Artwork URL contracts and model decoding

Layer / File(s) Summary
Artwork URL resolution and capability contracts
iosApp/iosApp/Shared/ArtworkURL.swift, iosApp/iosApp/Shared/CatalogPathSegment.swift, iosApp/iosApp/Shared/ImageSizeSelection.swift
Added artwork URL wrappers and origin-based resolution. Added catalog path-segment encoding. Extended image capability response fields and acceptance rules.
Artwork-bearing model adoption
iosApp/iosApp/Networking/Models.swift, iosApp/iosApp/Networking/APIv2/*, iosApp/iosApp/Networking/WireFormatModels.swift, iosApp/iosApp/Screens/Calendar/CalendarModels.swift, iosApp/iosApp/Shared/TopShelfModels.swift
Applied artwork URL wrappers across catalog, profile, library, calendar, and Top Shelf models. Updated Top Shelf season decoding to read the API v2 items field. Projection assignments were reordered without changing values.

Response handling and API v2 integration

Layer / File(s) Summary
Response-origin decoding
iosApp/iosApp/Networking/HTTPClient.swift, iosApp/iosApp/Networking/APIv2/APIv2Client.swift, iosApp/TopShelf/TopShelfHTTPClient.swift
Propagated response URLs through raw responses and seeded JSON decoders with the response origin.
API v2 routes and capability probing
iosApp/iosApp/Networking/ImageSizeCapability.swift, iosApp/iosApp/Networking/SiloAPI.swift, iosApp/TopShelf/TopShelfHTTPClient.swift
Switched image, home, catalog, and Top Shelf requests to API v2 routes. Encoded catalog identifiers. Added failed-probe caching, retry control, and reset behavior.

Validation

Layer / File(s) Summary
Artwork and capability validation
iosApp/Tests/ArtworkURLTests.swift, iosApp/Tests/ImageSizeCapabilityTests.swift
Added coverage for relative and absolute URLs, signed paths, offline paths, server switching, cache separation, image loading, Top Shelf decoding, API v2 capability fields, retries, and reset behavior.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant SiloServer
  participant HTTPClient
  participant JSONDecoder
  participant ArtworkURLResolver
  participant ImageLoader
  SiloServer-->>HTTPClient: return artwork response and URL
  HTTPClient->>JSONDecoder: provide response origin
  JSONDecoder->>ArtworkURLResolver: resolve relative artwork path
  ArtworkURLResolver-->>JSONDecoder: return absolute or unchanged URL
  JSONDecoder-->>ImageLoader: provide artwork URL
  ImageLoader->>SiloServer: request artwork
Loading

Merge Risk: ⚪ Minimal · up to 3764b

No actionable regression remains. The capability handling supports the documented legacy and current response shapes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 57 functions across 18 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR implements the coding requirements in #291. ArtworkURLResolver resolves root-relative paths from the response origin and preserves encoded paths and queries. It leaves absolute and offline UR…
Out of Scope Changes check ✅ Passed The changes remain connected to #291. Top Shelf v2 endpoint updates support the required Top Shelf artwork flow. Catalog ID segment encoding protects the updated Top Shelf paths. Capability probing, l…
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the primary change: resolving artwork URLs against the server that supplied them.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-artwork-server-relative

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.

@macroscopeapp

macroscopeapp Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This change affects artwork URL handling across many production response models and migrates the Top Shelf extension to new v2 endpoints with capability probing and image-size behavior. The broad runtime and API-contract impact warrants human review despite strong regression coverage.

You can add or adjust custom eligibility rules. Learn more.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d2805a7887

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Quick104

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8a2b46a9f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Quick104

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 3764b5ba63

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Quick104
Quick104 merged commit e50197e into main Sep 16, 2026
6 checks passed
@Quick104
Quick104 deleted the codex/fix-artwork-server-relative branch September 16, 2026 20:48
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.

fix(artwork): resolve server-relative artwork URLs

1 participant