Repository navigation
feat(asset-placements): place assets on custom product pages - #41
Conversation
`asc asset-placements list|create|reorder` accept `--custom-product-page-localization-id`, so screenshots, previews and header / search results assets can go on a custom product page. Its placements point back there (CLI affordances + REST _links), and REST serves /api/v1/custom-product-page-localizations/:id/placements (+ /reorder). The SDK adapter already handled the surface. Docs: asset-library README gains a header and search results workflow and a custom product pages section. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 35 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Placement surface selection Sources/Domain/Apps/AssetLibrary/Placements/AssetPlacement.swift, Sources/ASCCommand/Commands/AssetLibrary/AssetPlacementsCommand.swift, Tests/ASCCommandTests/Commands/AssetLibrary/AssetPlacementsCommandTests.swift |
The CLI accepts custom product page localization IDs for placement selection. Validation requires exactly one surface or asset ID. Tests cover create, list, and invalid combinations. |
REST route registration and behavior Sources/Domain/Apps/AssetLibrary/AssetLibrary+RESTRoutes.swift, Sources/ASCCommand/Commands/Web/Controllers/AssetLibraryController.swift, Tests/ASCCommandTests/Commands/Web/Controllers/CustomProductPagePlacementRoutesTests.swift, Tests/DomainTests/Apps/AssetLibrary/Placements/AssetPlacementTests.swift, Package.swift |
REST routes support custom product page localization placements. Tests cover create and list requests, route links, and placement affordances. The test target adds Hummingbird testing products. |
Placement documentation CHANGELOG.md, docs/README.md, docs/commands.md, docs/features/asset-library/README.md |
The changelog and documentation describe the CLI options, REST route, and custom product page placement workflow for header and search-results assets. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Feature
Possibly related PRs
- tddworks/asc-cli#38: Adds repository support for listing placements on custom product page localizations, which this PR exposes through the CLI and REST routes.
Merge Risk: 
Minimal · previous review 15d36
-
Custom product page placement support is ready to merge after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "feat(asset-placements): place assets on custom product pages" matches the main change. The changeset adds custom product page localization support to the asc asset-placements list, create, and reorder commands, plus REST routes and docs. The title is short, specific, and uses a conventional-commit prefix.
Full details: Description check
-
Explanation
The description follows the repository template. It has Why, What changed, How it was verified, and Checklist sections. The Why section explains the problem and gives the motivation. The What changed section lists the CLI flag, REST routes, docs, and a known limitation. The How it was verified section covers the test-first approach, the test counts, the test scope, and a live read-only check. All checklist items are ticked. One gap remains: the Why section does not include the 'Fixes #' issue link from the template, so no linked issue is visible.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 8 files. (4 skipped: 4 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #41 +/- ##
==========================================
- Coverage 84.39% 84.27% -0.12%
==========================================
Files 526 526
Lines 15895 15901 +6
==========================================
- Hits 13415 13401 -14
- Misses 2480 2500 +20
🚀 New features to boost your workflow:
|
Why
App Store Connect's product page has Header and Search Results assets. asc could already place them on a version localization, but that wasn't documented, and asc couldn't place anything on a custom product page.
What changed
asc asset-placements list|create|reorder --custom-product-page-localization-id <id>place screenshots, previews and header / search results assets on a custom product page. Each command still takes exactly one localization flag.listPlacementsandreorderGroupon the CLI,_linksover REST.GET/POST /api/v1/custom-product-page-localizations/:id/placementsand/reorder.CREATIVE_ASSETS→ place inDEFAULT_PROFILE) and a custom product pages section.How it was verified
apiLinks, CLI create and list with exact JSON, validation of the flag against other localization flags, and REST create and list over HTTP (HummingbirdTesting). All of them failed before the change.swift testpasses: 666 + 1430 + 769.asset-placement-groups listshowsDEFAULT_PROFILE(max 1) for both header (5244×2950, 3840×1646) and search results (5244×2950, 1920×1280). The new REST route returned 200 on the live server, versus 404 for an unrouted path.HummingbirdTestingdependency toPackage.swiftas test(screenshots): cover the REST delete routes over HTTP #40, so whichever merges second won't conflict.Checklist
swift testpassesasc web-server## [Unreleased]inCHANGELOG.mdmake docs && make check-docspasses.p8, issuer ID or Apple ID session in the diff, output or screenshots🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation