[GH-ISSUE #729] screenshots: add missing ASC dimensions (1206x2622 and 1668x2420) with TDD coverage #196

Closed
opened 2026-02-26 21:33:58 +03:00 by kerem · 2 comments
Owner

Originally created by @cursor[bot] on GitHub (Feb 22, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/729

Summary

Add missing App Store Connect screenshot dimensions to the internal screenshot-size registry:

  • APP_IPHONE_67: add 1206x2622 (+ landscape 2622x1206)
  • APP_IPAD_PRO_3GEN_11: add 1668x2420 (+ landscape 2420x1668)

These should be accepted by local screenshot validation and visible in asc screenshots sizes output.

Why

Recent ASC screenshot specs include these sizes, but the current registry does not fully cover them. This causes local validation mismatch and upload friction for modern devices.

External context:

Current gap in code

internal/asc/screenshot_sizes.go currently includes:

  • iPhone 6.7" group values like 1260x2736, 1290x2796, 1320x2868, 1284x2778
  • iPad 11" only 1668x2388

It does not include 1206x2622 (6.3") and 1668x2420 (11").

Proposed change

  1. Update internal/asc/screenshot_sizes.go:

    • Extend iphone67Dimensions to include portraitLandscape(1206, 2622)
    • Extend ipadPro11Dimensions to include portraitLandscape(1668, 2420)
  2. Keep existing dimensions (do not remove legacy-supported entries).

Testing (must follow current repo testing discipline)

Follow TDD and current testing patterns from AGENTS.md + docs/TESTING.md:

  • Add failing tests first (RED), then implement (GREEN).
  • Use table-driven tests where multiple dimensions are asserted.
  • Parse JSON outputs in CLI tests (avoid fragile string-only checks).
  • Keep tests hermetic (ASC_BYPASS_KEYCHAIN=1, no host keychain dependence).

Required test updates

Unit tests (internal/asc/screenshot_sizes_test.go)

  • Add coverage that ValidateScreenshotDimensions accepts:
    • 1206x2622 and 2622x1206 for APP_IPHONE_67
    • 1668x2420 and 2420x1668 for APP_IPAD_PRO_3GEN_11
  • Add/extend catalog-entry assertions to confirm these dimensions appear in ScreenshotSizeEntryForDisplayType(...).

CLI-level tests (internal/cli/cmdtest/assets_screenshots_sizes_test.go)

  • Add/extend tests to verify screenshots sizes --output json contains the new dimensions for:
    • APP_IPHONE_67
    • APP_IPAD_PRO_3GEN_11
  • Add/extend upload preflight/local-validation tests to ensure the new sizes pass local dimension checks before network failure stubs.

Validation commands (expected in PR handoff)

Run targeted tests first, then full gate:

  • ASC_BYPASS_KEYCHAIN=1 go test ./internal/asc -run ScreenshotSizes
  • ASC_BYPASS_KEYCHAIN=1 go test ./internal/cli/cmdtest -run AssetsScreenshots
  • make format
  • make lint
  • ASC_BYPASS_KEYCHAIN=1 make test

Acceptance criteria

  • asc accepts both new dimension pairs in local validation paths.
  • asc screenshots sizes surfaces these dimensions for the correct display types.
  • Existing supported sizes continue to pass unchanged.
  • New/updated tests are present and passing.
Originally created by @cursor[bot] on GitHub (Feb 22, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/729 ## Summary Add missing App Store Connect screenshot dimensions to the internal screenshot-size registry: - `APP_IPHONE_67`: add `1206x2622` (+ landscape `2622x1206`) - `APP_IPAD_PRO_3GEN_11`: add `1668x2420` (+ landscape `2420x1668`) These should be accepted by local screenshot validation and visible in `asc screenshots sizes` output. ## Why Recent ASC screenshot specs include these sizes, but the current registry does not fully cover them. This causes local validation mismatch and upload friction for modern devices. External context: - Fastlane issue reporting this pain: https://github.com/fastlane/fastlane/issues/29735 - Apple ASC screenshot specs reference: https://developer.apple.com/help/app-store-connect/reference/app-information/screenshot-specifications/ ## Current gap in code `internal/asc/screenshot_sizes.go` currently includes: - iPhone 6.7" group values like `1260x2736`, `1290x2796`, `1320x2868`, `1284x2778` - iPad 11" only `1668x2388` It does not include `1206x2622` (6.3") and `1668x2420` (11"). ## Proposed change 1. Update `internal/asc/screenshot_sizes.go`: - Extend `iphone67Dimensions` to include `portraitLandscape(1206, 2622)` - Extend `ipadPro11Dimensions` to include `portraitLandscape(1668, 2420)` 2. Keep existing dimensions (do not remove legacy-supported entries). ## Testing (must follow current repo testing discipline) Follow TDD and current testing patterns from `AGENTS.md` + `docs/TESTING.md`: - Add failing tests first (RED), then implement (GREEN). - Use table-driven tests where multiple dimensions are asserted. - Parse JSON outputs in CLI tests (avoid fragile string-only checks). - Keep tests hermetic (`ASC_BYPASS_KEYCHAIN=1`, no host keychain dependence). ### Required test updates #### Unit tests (`internal/asc/screenshot_sizes_test.go`) - Add coverage that `ValidateScreenshotDimensions` accepts: - `1206x2622` and `2622x1206` for `APP_IPHONE_67` - `1668x2420` and `2420x1668` for `APP_IPAD_PRO_3GEN_11` - Add/extend catalog-entry assertions to confirm these dimensions appear in `ScreenshotSizeEntryForDisplayType(...)`. #### CLI-level tests (`internal/cli/cmdtest/assets_screenshots_sizes_test.go`) - Add/extend tests to verify `screenshots sizes --output json` contains the new dimensions for: - `APP_IPHONE_67` - `APP_IPAD_PRO_3GEN_11` - Add/extend upload preflight/local-validation tests to ensure the new sizes pass local dimension checks before network failure stubs. ## Validation commands (expected in PR handoff) Run targeted tests first, then full gate: - `ASC_BYPASS_KEYCHAIN=1 go test ./internal/asc -run ScreenshotSizes` - `ASC_BYPASS_KEYCHAIN=1 go test ./internal/cli/cmdtest -run AssetsScreenshots` - `make format` - `make lint` - `ASC_BYPASS_KEYCHAIN=1 make test` ## Acceptance criteria - `asc` accepts both new dimension pairs in local validation paths. - `asc screenshots sizes` surfaces these dimensions for the correct display types. - Existing supported sizes continue to pass unchanged. - New/updated tests are present and passing.
kerem closed this issue 2026-02-26 21:33:58 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Feb 22, 2026):

@cursor please implement

<!-- gh-comment-id:3940443630 --> @rudrankriyam commented on GitHub (Feb 22, 2026): @cursor please implement
Author
Owner

@cursor[bot] commented on GitHub (Feb 22, 2026):

Implemented end-to-end with TDD on cursor/asc-screenshot-dimensions-5f95 and pushed to origin. I added the missing ASC screenshot dimensions in the registry and expanded coverage in both unit and CLI tests.

  • Updated internal/asc/screenshot_sizes.go:
    • APP_IPHONE_67 now includes 1206x2622 + 2622x1206
    • APP_IPAD_PRO_3GEN_11 now includes 1668x2420 + 2420x1668
  • Updated internal/asc/screenshot_sizes_test.go:
    • Added validation acceptance tests for the new iPhone/iPad dimensions (portrait + landscape)
    • Added catalog-entry assertions via ScreenshotSizeEntryForDisplayType(...) for both display types
  • Updated internal/cli/cmdtest/assets_screenshots_sizes_test.go:
    • Added JSON-output assertions that screenshots sizes --output json includes the new dimensions
    • Added upload preflight/local-validation tests confirming new sizes pass local dimension checks and proceed to network stub failure

Validation I ran:

  • RED phase (failing first) for new tests in internal/asc and internal/cli/cmdtest
  • GREEN phase:
    • ASC_BYPASS_KEYCHAIN=1 go test ./internal/asc -run 'TestValidateScreenshotDimensionsAcceptsLatestLargeIPhoneSizes|TestValidateScreenshotDimensionsAcceptsIPadPro11LatestSizes|TestScreenshotSizeEntryIncludesLatestLargeIPhoneDimensions|TestScreenshotSizeEntryIncludesIPadPro11Dimensions'
    • ASC_BYPASS_KEYCHAIN=1 go test ./internal/cli/cmdtest -run 'TestAssetsScreenshotsSizesOutputIncludesLatestIPhone67AndIPad11Dimensions|TestAssetsScreenshotsUploadAcceptsLatestIPhone67AndIPad11Dimensions'
  • Requested commands:
    • ASC_BYPASS_KEYCHAIN=1 go test ./internal/asc -run ScreenshotSizes (passes; no matching tests)
    • ASC_BYPASS_KEYCHAIN=1 go test ./internal/cli/cmdtest -run AssetsScreenshots
  • Full gate:
    • make format
    • make lint
    • ASC_BYPASS_KEYCHAIN=1 make test

Commits pushed:

  • 95f9c91 — screenshots: add missing 6.7 and iPad 11 dimensions
  • a3c8f5a — style: apply gofumpt alignment in screenshot sizes

Walkthrough artifact:

View PR

Open in Web Open in Cursor 

<!-- gh-comment-id:3940443695 --> @cursor[bot] commented on GitHub (Feb 22, 2026): Implemented end-to-end with TDD on `cursor/asc-screenshot-dimensions-5f95` and pushed to origin. I added the missing ASC screenshot dimensions in the registry and expanded coverage in both unit and CLI tests. - Updated `internal/asc/screenshot_sizes.go`: - `APP_IPHONE_67` now includes `1206x2622` + `2622x1206` - `APP_IPAD_PRO_3GEN_11` now includes `1668x2420` + `2420x1668` - Updated `internal/asc/screenshot_sizes_test.go`: - Added validation acceptance tests for the new iPhone/iPad dimensions (portrait + landscape) - Added catalog-entry assertions via `ScreenshotSizeEntryForDisplayType(...)` for both display types - Updated `internal/cli/cmdtest/assets_screenshots_sizes_test.go`: - Added JSON-output assertions that `screenshots sizes --output json` includes the new dimensions - Added upload preflight/local-validation tests confirming new sizes pass local dimension checks and proceed to network stub failure Validation I ran: - RED phase (failing first) for new tests in `internal/asc` and `internal/cli/cmdtest` - GREEN phase: - `ASC_BYPASS_KEYCHAIN=1 go test ./internal/asc -run 'TestValidateScreenshotDimensionsAcceptsLatestLargeIPhoneSizes|TestValidateScreenshotDimensionsAcceptsIPadPro11LatestSizes|TestScreenshotSizeEntryIncludesLatestLargeIPhoneDimensions|TestScreenshotSizeEntryIncludesIPadPro11Dimensions'` - `ASC_BYPASS_KEYCHAIN=1 go test ./internal/cli/cmdtest -run 'TestAssetsScreenshotsSizesOutputIncludesLatestIPhone67AndIPad11Dimensions|TestAssetsScreenshotsUploadAcceptsLatestIPhone67AndIPad11Dimensions'` - Requested commands: - `ASC_BYPASS_KEYCHAIN=1 go test ./internal/asc -run ScreenshotSizes` (passes; no matching tests) - `ASC_BYPASS_KEYCHAIN=1 go test ./internal/cli/cmdtest -run AssetsScreenshots` - Full gate: - `make format` - `make lint` - `ASC_BYPASS_KEYCHAIN=1 make test` Commits pushed: - `95f9c91` — screenshots: add missing 6.7 and iPad 11 dimensions - `a3c8f5a` — style: apply gofumpt alignment in screenshot sizes Walkthrough artifact: <artifact path="/opt/cursor/artifacts/screenshot_dimensions_test_results.txt" /> <p><a href="https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/730"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-pr-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-pr-light.png"><img alt="View PR" width="86" height="28" src="https://cursor.com/assets/images/view-pr-light.png"></picture></a></p> <p><a href="https://cursor.com/agents?id=bc-ce16be37-6f58-4505-a44f-654e0c8fcd6a"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-ce16be37-6f58-4505-a44f-654e0c8fcd6a"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</p>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#196
No description provided.