mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 23:55:51 +03:00
[GH-ISSUE #486] Assets: add screenshot size catalog command and local dimension validation #138
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rudrankriyam on GitHub (Feb 10, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/486
Summary
Add
asc assets screenshots sizesand local screenshot dimension validation so unsupported image sizes are caught before upload.Why this matters
"Unsupported screenshot size" errors are high-frequency and currently appear after upload attempts.
We can fail fast locally with a clearer message and provide an always-current size catalog.
Current state (verified)
assets screenshots uploadvalidates file safety and display-type enum only.ValidateImageFileininternal/asc/assets_upload.gocurrently checks file existence/size, not pixel dimensions.internal/asc/assets.go, which can drift from Apple schema updates.Proposed UX
New command
Output should include:
width x height), including landscape/portraitAPP_*vsIMESSAGE_*)Upload-time validation
Enhance
asc assets screenshots uploadto:asc assets screenshots sizesValidation timing guarantee
Dimension validation must happen before any network side effects:
CreateAppScreenshotSet/CreateAppScreenshotDetailed implementation plan
AssetsScreenshotsSizesCommand()ininternal/cli/assets/assets_screenshots.go.internal/asc/screenshot_sizes.go.docs/openapi/latest.jsonand add a test to detect drift.ValidateImageFile(or add a dedicated helper) to return dimensions using image config decode.CreateAppScreenshotand before any upload operation is requested.README.mdassets documentation.Acceptance criteria
asc assets screenshots sizeslists current supported display types and dimensions.make testpasses with new assets coverage.@rudrankriyam commented on GitHub (Feb 11, 2026):
@cursor Please implement this issue end-to-end.
What to build
Add a screenshot size catalog command and local dimension validator for
asc assets screenshots upload, with strict pre-network validation.Implementation plan
internal/cli/assets/assets_screenshots.gosizessubcommand:asc assets screenshots sizesinternal/asc/screenshot_sizes.gowith display-type -> valid dimensions mapping.docs/openapi/latest.jsonenum.ValidateImageFile(or add dedicated helper) to decode dimensions.asc assets screenshots sizes.CreateAppScreenshotSetCreateAppScreenshotNew tests to write
A) Assets unit tests
B) Command tests (
internal/cli/cmdtest)sizescommand output coverageC) Schema drift tests
How to test locally
Run exactly:
make formatmake lintmake testTargeted tests:
go test ./internal/asc -run 'Screenshot.*Size|ValidateImage'go test ./internal/cli/cmdtest -run 'assets screenshots'Done criteria
asc assets screenshots sizeslists valid sizes.format,lint,test).@cursor[bot] commented on GitHub (Feb 11, 2026):
Summary:
asc assets screenshots sizescommand (JSON/table/markdown with optional display-type filter), wired local dimension validation ahead of any network calls for screenshot uploads, and added a schema drift test against the OpenAPI enum. I also updated README assets docs.Tests run:
go test ./internal/asc -run 'Screenshot.*Size|ValidateImage'go test ./internal/cli/cmdtest -run 'assets screenshots'(no tests matched)go test ./internal/cli/cmdtest -run 'AssetsScreenshots'make toolsmake formatmake lintmake testWalkthrough artifact:
screenshot_sizes_command_json_pretty_demo/recording_demo.mp4(showsasc assets screenshots sizes --display-type APP_IPHONE_65 --output json --prettyand the expected JSON output)@rudrankriyam commented on GitHub (Feb 11, 2026):
Resolved by PR #490 (https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/490), which is merged into main.