Skip to content

feat(asset-placements): place assets on custom product pages - #41

Merged
hanrw merged 3 commits into
mainfrom
feat/custom-product-page-placements
Nov 1, 2026
Merged

hanrw merged 3 commits into
mainfrom
feat/custom-product-page-placements

Conversation

@hanrw

@hanrw hanrw commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

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.
  • Placements on a custom product page point back to it: listPlacements and reorderGroup on the CLI, _links over REST.
  • REST: GET/POST /api/v1/custom-product-page-localizations/:id/placements and /reorder.
  • Docs: the asset-library README gains a "Header and search results assets" workflow (sizes → upload as CREATIVE_ASSETS → place in DEFAULT_PROFILE) and a custom product pages section.
  • The SDK adapter already supported custom product pages; this adds the CLI flag, affordances and REST routes.
  • Not yet supported: asc can't list custom product pages, so the localization ID comes from App Store Connect or the API.

How it was verified

  • Test-first: domain affordance and 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 test passes: 666 + 1430 + 769.
  • One existing test used custom product pages as its example of "a surface asc can't list"; it now uses in-app events, which asc still can't list.
  • Live (read-only): asset-placement-groups list shows DEFAULT_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.
  • Merge note: this branch adds the same two-line HummingbirdTesting dependency to Package.swift as test(screenshots): cover the REST delete routes over HTTP #40, so whichever merges second won't conflict.

Checklist

  • A failing test came first; swift test passes
  • A command that returns data is also served by asc web-server
  • User-visible change: one line under ## [Unreleased] in CHANGELOG.md
  • make docs && make check-docs passes
  • No API key, .p8, issuer ID or Apple ID session in the diff, output or screenshots

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Create, list, and reorder asset placements for custom product page localizations using the command-line interface or REST API.
    • Place header and search-results assets on custom product pages, alongside screenshots and previews.
  • Documentation

    • Updated command and feature guides with custom product page placement options, examples, and guidance for managing header and search-results assets.

`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]>
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9326fc0f-45b1-433d-bb7e-8a4e75da2bdf
Commits

Reviewing files that changed from the base of the PR and between 15d36fa and ac4db65.

Files selected for processing: 3
  • CHANGELOG.md
  • docs/README.md
  • docs/commands.md

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e3f2c6ed-ae52-43f2-b459-6b8cdd4dcc9a
Commits

Reviewing files that changed from the base of the PR and between d2ffc20 and 15d36fa.

Files selected for processing: 12
  • CHANGELOG.md
  • Package.swift
  • Sources/ASCCommand/Commands/AssetLibrary/AssetPlacementsCommand.swift
  • Sources/ASCCommand/Commands/Web/Controllers/AssetLibraryController.swift
  • Sources/Domain/Apps/AssetLibrary/AssetLibrary+RESTRoutes.swift
  • Sources/Domain/Apps/AssetLibrary/Placements/AssetPlacement.swift
  • Tests/ASCCommandTests/Commands/AssetLibrary/AssetPlacementsCommandTests.swift
  • Tests/ASCCommandTests/Commands/Web/Controllers/CustomProductPagePlacementRoutesTests.swift
  • Tests/DomainTests/Apps/AssetLibrary/Placements/AssetPlacementTests.swift
  • docs/README.md
  • docs/commands.md
  • docs/features/asset-library/README.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Walkthrough

The asset-placement CLI and REST routes now accept custom product page localization IDs. CLI surface validation includes this localization alongside existing surfaces. Tests cover CLI parsing, REST create and list responses, and placement affordances. Documentation describes the commands, REST route, and header and search-results asset workflow.

Changes: Custom Product Page Placements

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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning 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. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed 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, …
Description check Passed 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 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
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.

Share

@codecov

codecov Bot commented Nov 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.27%. Comparing base (c6baef2) to head (ac4db65).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
...Commands/AssetLibrary/AssetPlacementsCommand.swift 82.08% <100.00%> (+1.13%) ⬆️
...in/Apps/AssetLibrary/AssetLibrary+RESTRoutes.swift 100.00% <100.00%> (ø)
.../Apps/AssetLibrary/Placements/AssetPlacement.swift 83.09% <100.00%> (+0.24%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hanrw
hanrw merged commit d7279ff into main Nov 1, 2026
5 checks passed
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