feat(kit): automate ASC review submissions#246
Conversation
Add a private project-level PNG/JPEG review screenshot slot with full server-side decoding, replacement, pruning, and cascade cleanup.\n\nPrepare current IAP and subscription review versions, honor multipart ASC asset uploads, and submit bounded eligible batches with exact first-product/group manual fallbacks. Preserve resumability across cancellation, deadlines, ambiguous responses, and multi-run Ready rows while keeping dry-run and dashboard results truthful.
Document the secure project-level screenshot reuse policy, version-based submission steps, dry-run behavior, first-product and group manual actions, ambiguous network fallback, and bounded cancellation semantics.
Add the compressed local IAPKit documentation preview fallback for the pull request attachment.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds project-level Apple App Review screenshot validation and management, a version-based App Store Connect review submission workflow, finer-grained product-sync cancellation, bounded sync results with manual actions, updated result UI, tests, and documentation. ChangesApple App Review screenshot storage and validation
ASC review-version workflow
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/kit/src/pages/auth/organization/project/products.tsx`:
- Around line 1155-1182: Update the result banner near the existing failures
count to render each persisted entry in job.result.failures, including its
product identifier and failure reason using the established list styling
pattern. Keep the current failure count and failuresTruncated notice intact, and
conditionally omit the list when there are no failures.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3acf5059-9d48-4bb6-8a56-2a235f387e1a
⛔ Files ignored due to path filters (1)
.github/pr-previews/iapkit-asc-review-submission.jpgis excluded by!**/*.jpg
📒 Files selected for processing (30)
packages/docs/src/pages/docs/kit-backend.tsxpackages/kit/convex.jsonpackages/kit/convex/files/action.tspackages/kit/convex/files/internal.tspackages/kit/convex/files/mutation.tspackages/kit/convex/files/query.tspackages/kit/convex/files/review-screenshot.test.tspackages/kit/convex/files/validation.test.tspackages/kit/convex/files/validation.tspackages/kit/convex/products/asc.test.tspackages/kit/convex/products/asc.tspackages/kit/convex/products/ascReview.test.tspackages/kit/convex/products/ascReview.tspackages/kit/convex/products/jobs.test.tspackages/kit/convex/products/jobs.tspackages/kit/convex/products/sync.test.tspackages/kit/convex/products/sync.tspackages/kit/convex/products/syncResult.tspackages/kit/convex/projects/helpers.test.tspackages/kit/convex/projects/project-child-pending-deletion.test.tspackages/kit/convex/schema.tspackages/kit/convex/utils/concurrency.test.tspackages/kit/convex/utils/concurrency.tspackages/kit/server/api/v1/products.tspackages/kit/src/pages/auth/organization/project/product-sync-result.test.tspackages/kit/src/pages/auth/organization/project/product-sync-result.tspackages/kit/src/pages/auth/organization/project/products.tsxpackages/kit/src/pages/auth/organization/project/settings.test.tsxpackages/kit/src/pages/auth/organization/project/settings.tsxpackages/kit/src/pages/docs/sections/products.tsx
There was a problem hiding this comment.
Pull request overview
Adds end-to-end automation for Apple App Review submissions in IAPKit (Kit), including a secure project-level screenshot slot, server-side validation + lifecycle cleanup, and ASC version-based submission orchestration. This extends the existing iOS push-sync pipeline so eligible Draft/Ready rows can progress from metadata → screenshot upload → review submission, while safely surfacing non-retryable/ambiguous cases as durable manual actions.
Changes:
- Introduces a private, admin/owner-managed “App Review screenshot” upload slot (PNG/JPEG, ≤10MB) with strict client/server validation and reliable blob reclamation.
- Implements ASC “version-based review” workflow helpers (reserve screenshot, multipart upload ops, checksum commit, delivery polling, bounded submission batches, manual-action classification).
- Improves job UX semantics (persisted manual actions, clearer sync summaries, terminal result visibility across reloads, tighter cancellation/deadline checks).
Reviewed changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/kit/src/pages/docs/sections/products.tsx | Documents ASC review submission behavior, screenshot slot policy, and manual-action outcomes. |
| packages/kit/src/pages/auth/organization/project/settings.tsx | Adds UI + client-side pre-validation for uploading/removing the project App Review screenshot. |
| packages/kit/src/pages/auth/organization/project/settings.test.tsx | Extends settings tests to cover screenshot validation, upload flow ordering, and error surfacing. |
| packages/kit/src/pages/auth/organization/project/products.tsx | Updates sync toasts/result banner behavior and surfaces manual actions and persisted failures. |
| packages/kit/src/pages/auth/organization/project/product-sync-result.ts | Adds helpers for consistent sync summaries and result-visibility rules across reloads. |
| packages/kit/src/pages/auth/organization/project/product-sync-result.test.ts | Tests the new sync summary and result-visibility helper behavior. |
| packages/kit/src/pages/auth/organization/project/product-sync-failure-list.tsx | Adds a UI component to render persisted per-product failures for completed jobs. |
| packages/kit/src/pages/auth/organization/project/product-sync-failure-list.test.tsx | Tests persisted failure list rendering/omission behavior. |
| packages/kit/server/api/v1/products.ts | Updates cancel endpoint documentation to reflect finer-grained cancellation checks. |
| packages/kit/convex/utils/concurrency.ts | Enhances bounded concurrency mapper to stop scheduling new work after a failure. |
| packages/kit/convex/utils/concurrency.test.ts | Adds coverage asserting failure stops new work while allowing in-flight cleanup. |
| packages/kit/convex/schema.ts | Adds new file purpose + reservation validation markers and new job result fields (manualActions). |
| packages/kit/convex/projects/project-child-pending-deletion.test.ts | Ensures abandoned validated/claimed screenshot blobs are reclaimed by reservation pruning. |
| packages/kit/convex/projects/helpers.test.ts | Ensures project deletion reclaims screenshot storage alongside other project files. |
| packages/kit/convex/products/syncResult.ts | Introduces caps + truncation helpers and deadline safety window logic for jobs/results. |
| packages/kit/convex/products/sync.ts | Tracks handled screenshot identity and allows Ready-row resumption when screenshot changes. |
| packages/kit/convex/products/sync.test.ts | Tests Ready-row resumption logic and persistence of handled screenshot identity. |
| packages/kit/convex/products/jobs.ts | Wires truncation + manual actions into job persistence; strengthens cancellation semantics. |
| packages/kit/convex/products/jobs.test.ts | Adds tests for truncation, deadline safety, and deadline persistence in job rows. |
| packages/kit/convex/products/ascReview.ts | New ASC helpers for screenshot upload ops, delivery polling, version planning, and submission workflow. |
| packages/kit/convex/products/asc.ts | Integrates review screenshot + version-based submission into the iOS push-sync pipeline. |
| packages/kit/convex/products/asc.test.ts | Adds tests for eligibility loader laziness/caching and review disposition/product-type mapping. |
| packages/kit/convex/files/validation.ts | Adds strict validation rules for the new screenshot file purpose and server-side content checks. |
| packages/kit/convex/files/validation.test.ts | Adds coverage for screenshot metadata/content validation rules. |
| packages/kit/convex/files/review-screenshot.test.ts | Adds comprehensive tests for screenshot private storage, validation, replacement, and internal reads. |
| packages/kit/convex/files/query.ts | Includes the new screenshot purpose in list/count queries. |
| packages/kit/convex/files/mutation.ts | Enforces screenshot slot semantics (internal-only, role restrictions, validated-blob requirement) and adds internal mutations for validation state. |
| packages/kit/convex/files/internal.ts | Adds internal queries for validation inputs + private screenshot lookup and expands reservation pruning for claimed blobs. |
| packages/kit/convex/files/action.ts | Adds Sharp-based decode validation and a Node action to validate uploaded screenshot blobs before persistence. |
| packages/kit/convex.json | Allows Sharp as an external Node package for Convex actions. |
| packages/docs/src/pages/docs/kit-backend.tsx | Updates public docs to describe screenshot-gated review submission and manualActions semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Changes
Secure screenshot storage
App Store Connect review workflow
uploadOperationrange/header/method, commits the MD5 checksum, and polls deliveryJob and dashboard behavior
Preview
Test plan
bun audit:docsbun audit:paritybun audit:release-stategit diff --checkCloses #242
Summary by CodeRabbit