fix(dashboard): Google Play product-sync — region-dedupe, legal IDs, IDR zero-decimal + real error surfacing - #125
Merged
mobilebytesenseicommunity merged 2 commits intoJul 25, 2026
Conversation
…p/api/products/[id]/sync/route.ts dashboard/app/api/products/sync-to-providers/route.ts
|
@therajanmaurya is attempting to deploy a commit to the MobileByteLabs' projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughChangesProvider synchronization
Cloud deployment configuration
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SyncRoute
participant googlePlaySyncProduct
participant GooglePlayAPI
participant SyncReport
SyncRoute->>googlePlaySyncProduct: sync product
googlePlaySyncProduct->>GooglePlayAPI: create or retrieve subscription
googlePlaySyncProduct->>GooglePlayAPI: activate base plan
GooglePlayAPI-->>googlePlaySyncProduct: activation result
googlePlaySyncProduct-->>SyncRoute: return sync status
SyncRoute->>SyncReport: record warning or error
✨ 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 |
….test.ts dashboard/app/api/products/[id]/sync/route.ts dashboard/app/api/products/sync-to-providers/route.ts
mobilebytesenseicommunity
marked this pull request as ready for review
July 25, 2026 09:03
mobilebytesenseicommunity
merged commit Jul 25, 2026
590170f
into
MobileByteLabs:development
7 of 9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Google Play product-sync hardening + deploy-pipeline fixes
Found while live-syncing the Reels Downloader tenant's subscriptions to Google Play. The store-sync UI was live but the Play sync failed on three successive real Play API errors — all fixed here, each with the underlying error now surfaced to the dashboard instead of swallowed.
Sync bug fixes (
dashboard/lib/googleplay-product-sync.ts)400 "Region code DE is duplicated"(duplicate euro-zone rows all → DE).-;pro-monthly→pro_monthly. Fixes400 "Subscription ID is malformed". (Base-plan ids keep hyphens.)ZERO_DECIMAL_CURRENCIESset thatpricing-template.tsstores prices with (was a divergent Stripe-style copy omitting IDR/COP), so whole-unit currencies aren't wrongly ÷100. Fixes400 "Price ... below IDR minimum"(Rp 89,892 was sent as IDR 898.92).Error surfacing (
stripe-route-helper.ts+ both sync routes)Store-sync wrappers now return the real Play / App Store API error to the caller; the dashboard shows it in the banner instead of an unactionable "check server logs".
Tests
New
__tests__/lib/googleplay-product-sync.test.ts(4 cases: region-dedupe, hyphen sanitize, IDR zero-decimal, unmapped-currency skip).Deploy pipeline
deploy-cloud.yml— the dashboard is a standalone Next.js app, not a pnpm workspace; removed the bogus rootpnpm install --frozen-lockfile/--filtersteps (thepnpm-lock.yaml not foundfailure) and deploy from repo root so Vercel builds it remotely..vercelignore— scope CLI uploads todashboard/only (repo root exceeded Vercel's 100 MB limit).Verified end-to-end: queried Play's API directly — all 4 subscriptions now exist on Play with correct regional pricing (in DRAFT, pending an app APK upload on the Play side).
Summary by CodeRabbit
Bug Fixes
Deployment