Skip to content

fix(android): extract basePlanId from ProductDetails for subs#39

Merged
hyochan merged 4 commits intomainfrom
fix/android-basePlanId
Nov 12, 2025
Merged

fix(android): extract basePlanId from ProductDetails for subs#39
hyochan merged 4 commits intomainfrom
fix/android-basePlanId

Conversation

@hyochan
Copy link
Member

@hyochan hyochan commented Nov 12, 2025

Purchase objects don't expose basePlanId directly. Extract it from ProductDetails cache and populate basePlanIdAndroid/currentPlanId fields in getActiveSubscriptions() and getAvailablePurchases().

  • Cache basePlanId during purchase flow
  • Extract from ProductDetails in onPurchasesUpdated
  • Update both Play and Horizon flavors

Summary by CodeRabbit

  • Bug Fixes

    • Improved subscription plan tracking so active subscriptions consistently reflect base/current plan IDs, and transaction/token fields are correctly populated.
  • Refactor

    • Billing conversion and purchase handling updated to preserve plan identifiers across flows and when resolving offers.
  • Chores

    • Standardized logging across billing and purchase processing.
  • Documentation

    • Added a Debugging & Logging section (including enable-logging guidance and common warnings) to the API docs and search catalog.

Purchase objects don't expose basePlanId directly. Extract it from
ProductDetails cache and populate basePlanIdAndroid/currentPlanId
fields in getActiveSubscriptions() and getAvailablePurchases().

- Cache basePlanId during purchase flow
- Extract from ProductDetails in onPurchasesUpdated
- Update both Play and Horizon flavors
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

Propagates optional basePlanId/currentPlanId and purchaseTokenAndroid through Horizon and Play billing converters, updates OpenIapModule to extract/cache basePlanId from ProductDetails and pass it into conversions, replaces Android Log calls with OpenIapLog, and adds/duplicates debugging docs entries.

Changes

Cohort / File(s) Summary
Horizon billing conversion
packages/google/openiap/src/horizon/java/dev/hyo/openiap/utils/BillingConverters.kt
Added fun HorizonPurchase.toPurchase(basePlanId: String? = null): PurchaseAndroid; sets PurchaseAndroid.currentPlanId from parameter; toActiveSubscription now includes basePlanIdAndroid = null, currentPlanId = null, and purchaseTokenAndroid adjustments.
Play billing conversion
packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt
Updated BillingPurchase.toPurchase(productType: String, basePlanId: String? = null) to accept basePlanId and set PurchaseAndroid.currentPlanId; PurchaseAndroid.toActiveSubscription maps basePlanIdAndroid = currentPlanId, currentPlanId = currentPlanId, adds purchaseTokenAndroid, and uses id for transactionId.
OpenIap module (Horizon & Play) — logging, caching, mapping
packages/google/openiap/src/horizon/java/dev/hyo/openiap/OpenIapModule.kt, packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
Replaced direct Log calls with OpenIapLog. When mapping subscription purchases, extract basePlanId from cached ProductDetails (use first subscriptionOfferDetails), warn on multiple offers, cache/lookup basePlanId per offerToken, and pass basePlanId into toPurchase(...) conversions.
Docs — search modal & API page
packages/docs/src/components/SearchModal.tsx, packages/docs/src/pages/docs/apis.tsx
Added three new API documentation items under "Debugging & Logging" to apiData and introduced a new Debugging & Logging section (duplicated) in apis.tsx with platform-specific examples and common warnings.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Client
    participant OpenIap as OpenIapModule
    participant Cache as offerTokenToBasePlanIdCache
    participant Product as ProductDetails cache
    participant Converters as BillingConverters
    participant Purchase as PurchaseAndroid

    Client->>OpenIap: onPurchasesUpdated / request active subscriptions
    OpenIap->>Product: lookup ProductDetails (productId)
    Product-->>OpenIap: ProductDetails (with subscriptionOfferDetails)
    OpenIap->>OpenIap: extract basePlanId from first offer (warn if multiple)
    OpenIap->>Cache: cache[offerToken] = basePlanId
    OpenIap->>Converters: toPurchase(purchase, basePlanId)
    Converters->>Purchase: create PurchaseAndroid(currentPlanId=basePlanId, purchaseTokenAndroid=...)
    Purchase-->>OpenIap: enriched PurchaseAndroid
    OpenIap-->>Client: ActiveSubscription (basePlanId/currentPlanId populated)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Areas needing extra attention:
    • OpenIapModule: correctness of basePlanId extraction logic and behavior when multiple offers exist.
    • Cache lifecycle and concurrency/thread-safety of offerToken→basePlanId mapping.
    • Converters: ensure token/transaction id mapping changes (purchaseTokenAndroid, transactionId = id) align with consumers.
    • Logging replacements: confirm parity and retained diagnostic context.

Possibly related PRs

Poem

🐰 I found a plan under a token's hat,

I cached a hop and mapped it just like that,
Tokens now carry where subscriptions came,
Logs are clearer and fields have a name,
A tiny rabbit dance — billing neat and flat!

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: extracting basePlanId from ProductDetails for subscriptions on Android. It accurately reflects the primary objective of the PR.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/android-basePlanId

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@hyochan hyochan changed the title fix(android): extract basePlanId from ProductDetails for subscriptions fix(android): extract basePlanId from ProductDetails for subs Nov 12, 2025
@hyochan hyochan added 🛠 bugfix All kinds of bug fixes 🤖 android Related to android labels Nov 12, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/google/openiap/src/horizon/java/dev/hyo/openiap/utils/BillingConverters.kt (1)

98-148: Add missing BillingPurchase.toActiveSubscription() function to Play flavor for parity with Horizon.

The Play flavor is missing the intermediate conversion function that exists in the Horizon flavor. While Play has BillingPurchase.toPurchase(productType: String, basePlanId: String?) with the basePlanId parameter, it lacks BillingPurchase.toActiveSubscription(). This creates an asymmetry in the two billing implementations—Horizon provides three conversion functions while Play provides only two.

Add the equivalent conversion in packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt:

fun BillingPurchase.toActiveSubscription(): ActiveSubscription = ActiveSubscription(
    autoRenewingAndroid = isAutoRenewing,
    basePlanIdAndroid = null,
    currentPlanId = null,
    isActive = true,
    productId = products.firstOrNull().orEmpty(),
    purchaseToken = purchaseToken,
    purchaseTokenAndroid = purchaseToken,
    transactionDate = purchaseTime.toDouble(),
    transactionId = orderId ?: purchaseToken
)
🧹 Nitpick comments (1)
packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt (1)

564-570: Caching logic is correct but cache is not utilized.

The basePlanId is correctly cached here during the purchase flow. However, as noted in the comment for lines 106-108, this cache cannot be queried in onPurchasesUpdated because BillingPurchase does not expose the offerToken. Consider restructuring the cache to use purchaseToken as the key instead, or removing this caching logic if it serves no purpose.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aec5855 and 8cfc34c.

📒 Files selected for processing (3)
  • packages/google/openiap/src/horizon/java/dev/hyo/openiap/utils/BillingConverters.kt (2 hunks)
  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt (4 hunks)
  • packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt (2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: hyochan
Repo: hyodotdev/openiap PR: 17
File: packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt:620-629
Timestamp: 2025-10-18T05:46:51.596Z
Learning: In packages/google/openiap/src/main/java/**/*.kt (Android-only package): DO NOT add Android suffix to function names, even for Android-specific APIs. Exception: Only use Android suffix for cross-platform API types (e.g., ProductAndroid, PurchaseAndroid) that contrast with iOS types. Examples of correct naming: isHorizonEnvironment(context: Context), buildModule(context: Context), acknowledgePurchase(), consumePurchase().
📚 Learning: 2025-10-18T05:46:51.596Z
Learnt from: hyochan
Repo: hyodotdev/openiap PR: 17
File: packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt:620-629
Timestamp: 2025-10-18T05:46:51.596Z
Learning: In packages/google/openiap/src/main/java/**/*.kt (Android-only package): DO NOT add Android suffix to function names, even for Android-specific APIs. Exception: Only use Android suffix for cross-platform API types (e.g., ProductAndroid, PurchaseAndroid) that contrast with iOS types. Examples of correct naming: isHorizonEnvironment(context: Context), buildModule(context: Context), acknowledgePurchase(), consumePurchase().

Applied to files:

  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
  • packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt
  • packages/google/openiap/src/horizon/java/dev/hyo/openiap/utils/BillingConverters.kt
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/google/openiap/src/main/**/*.kt : In Android-only package, do not add Android suffix to function names (e.g., acknowledgePurchase, not acknowledgePurchaseAndroid)

Applied to files:

  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
  • packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt
  • packages/google/openiap/src/horizon/java/dev/hyo/openiap/utils/BillingConverters.kt
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/google/openiap/src/main/**/*.kt : Only use Android suffix for types that are part of a cross-platform API (e.g., ProductAndroid, PurchaseAndroid)

Applied to files:

  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
  • packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt
  • packages/google/openiap/src/horizon/java/dev/hyo/openiap/utils/BillingConverters.kt
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/google/openiap/src/main/java/dev/hyo/openiap/utils/**/*.kt : Place reusable Kotlin helpers in openiap/src/main/java/dev/hyo/openiap/utils/

Applied to files:

  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/google/openiap/src/main/Types.kt : Do not edit generated file openiap/src/main/Types.kt in Android package

Applied to files:

  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
  • packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/apple/Sources/Models/**/*.swift : Keep official OpenIAP types in Sources/Models/ matching openiap.dev/docs/types naming (e.g., Product.swift, Purchase.swift, ActiveSubscription.swift)

Applied to files:

  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
  • packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt
🧬 Code graph analysis (2)
packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt (1)
packages/gql/src/generated/types.ts (1)
  • PurchaseAndroid (424-444)
packages/google/openiap/src/horizon/java/dev/hyo/openiap/utils/BillingConverters.kt (1)
packages/gql/src/generated/types.ts (2)
  • PurchaseAndroid (424-444)
  • ActiveSubscription (6-32)
🔇 Additional comments (5)
packages/google/openiap/src/horizon/java/dev/hyo/openiap/utils/BillingConverters.kt (2)

138-148: LGTM! Field mappings are correct and consistent.

The mappings properly align currentPlanId to both basePlanIdAndroid and currentPlanId in the resulting ActiveSubscription, which is correct per the type definitions (both should contain the basePlanId on Android). The addition of purchaseTokenAndroid alongside purchaseToken ensures all required fields for subscription management are populated.


126-136: ****

The review references HorizonPurchase.toActiveSubscription() as part of an active dual conversion strategy, but this function is never called in the codebase. The actual conversion flow is: HorizonPurchasetoPurchase()PurchaseAndroidtoActiveSubscription()ActiveSubscription. The HorizonPurchase.toActiveSubscription() function (lines 126-136) is dead code and not part of any active conversion path.

Likely an incorrect or invalid review comment.

packages/google/openiap/src/play/java/dev/hyo/openiap/utils/BillingConverters.kt (3)

100-100: LGTM! Signature updated to accept optional basePlanId.

The addition of the optional basePlanId parameter allows callers to provide base plan information when available, which is then propagated to PurchaseAndroid.currentPlanId.


134-144: Consistent mapping from currentPlanId to basePlanIdAndroid.

The mapping correctly propagates currentPlanId to both basePlanIdAndroid and currentPlanId in ActiveSubscription. The addition of purchaseTokenAndroid on line 141 appears unrelated to the basePlanId feature but aligns the Android-specific field with the common purchaseToken field.


104-104: The mapping is correct; the review comment is based on a misunderstanding of the domain model.

basePlanId is the standard Google Play identifier for a subscription base plan, and currentPlanId is not a standard Google Play Developer API field. The codebase uses currentPlanId as a unified domain model field that represents the currently active plan identifier across platforms:

  • Android: currentPlanId is populated from Google's basePlanId (e.g., "premium")
  • iOS: currentPlanId is populated from the productId

The documentation explicitly clarifies this semantic: "On Android, this is the basePlanId (e.g., 'premium', 'premium-year')." The naming difference is intentional for cross-platform consistency, not a semantic distinction. The mapping at line 104 is correct.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt (1)

215-232: basePlanId extraction logic is duplicated.

This basePlanId extraction logic (with warning for multiple offers) is identical to:

  • Lines 886-890 in this file (onPurchasesUpdated)
  • Lines 719-723 in the Horizon module

Refer to the review comment on the Horizon module for a suggested shared utility function to eliminate this duplication.

🧹 Nitpick comments (1)
packages/google/openiap/src/horizon/java/dev/hyo/openiap/OpenIapModule.kt (1)

717-730: basePlanId limitation is now documented; consider extracting duplicate logic.

The code appropriately warns when multiple offers exist and acknowledges the basePlanId may be inaccurate. This limitation is now documented in the new "Multiple Subscription Offers" section added to the documentation.

However, this exact logic (extracting basePlanId with a warning for multiple offers) is duplicated in the Play module at lines 219-223 and 886-890. Consider extracting this to a shared utility function to maintain consistency.

Example utility function:

// In packages/google/openiap/src/main/java/dev/hyo/openiap/utils/SubscriptionUtils.kt
fun extractBasePlanId(
    productDetails: ProductDetails?,
    productId: String?,
    tag: String
): String? {
    val offers = productDetails?.subscriptionOfferDetails.orEmpty()
    if (offers.size > 1) {
        OpenIapLog.w(
            "Multiple offers (${offers.size}) found for ${productId}, using first basePlanId (may be inaccurate)",
            tag
        )
    }
    return offers.firstOrNull()?.basePlanId
}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6cf1f66 and 7d0e464.

📒 Files selected for processing (4)
  • packages/docs/src/components/SearchModal.tsx (1 hunks)
  • packages/docs/src/pages/docs/apis.tsx (1 hunks)
  • packages/google/openiap/src/horizon/java/dev/hyo/openiap/OpenIapModule.kt (1 hunks)
  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt (5 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
packages/docs/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

packages/docs/src/**/*.{ts,tsx}: Platform suffixes in function names for documentation site examples: iOS-only functions end with IOS; Android-only functions end with Android; cross-platform functions have no suffix
Use kebab-case for search modal IDs in docs (e.g., id: 'request-products')
Trigger opening modals from pages/components by calling openAuthModal from the signals module
Components must not overflow parent boundaries: ensure children fit; use overflow-hidden on parents as needed; apply break-words for long text; use whitespace-nowrap for nav items
Delete unused components, functions, imports; avoid commented-out code; remove unused variables/parameters
Wrap any Promise-returning function used in a void context (e.g., React event handlers) with the void operator

Files:

  • packages/docs/src/components/SearchModal.tsx
  • packages/docs/src/pages/docs/apis.tsx
packages/docs/src/**/*.{md,mdx,ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Respect deprecations in documentation: replace buy-promoted-product-ios with requestPurchaseOnPromotedProductIOS; requestProducts with fetchProducts; get-storefront-ios with getStorefront

Files:

  • packages/docs/src/components/SearchModal.tsx
  • packages/docs/src/pages/docs/apis.tsx
packages/docs/src/components/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Place reusable shared components under src/components/; co-locate components used only once with their parent

Files:

  • packages/docs/src/components/SearchModal.tsx
packages/docs/src/components/**

📄 CodeRabbit inference engine (CLAUDE.md)

Use scoped component folder pattern when a component has internal-only subcomponents (e.g., src/components/AuthModal/ with index.tsx and internal files)

Files:

  • packages/docs/src/components/SearchModal.tsx
🧠 Learnings (10)
📓 Common learnings
Learnt from: hyochan
Repo: hyodotdev/openiap PR: 17
File: packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt:620-629
Timestamp: 2025-10-18T05:46:51.596Z
Learning: In packages/google/openiap/src/main/java/**/*.kt (Android-only package): DO NOT add Android suffix to function names, even for Android-specific APIs. Exception: Only use Android suffix for cross-platform API types (e.g., ProductAndroid, PurchaseAndroid) that contrast with iOS types. Examples of correct naming: isHorizonEnvironment(context: Context), buildModule(context: Context), acknowledgePurchase(), consumePurchase().
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/google/openiap/src/main/**/*.kt : In Android-only package, do not add Android suffix to function names (e.g., acknowledgePurchase, not acknowledgePurchaseAndroid)
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/docs/src/**/*.{ts,tsx} : Use kebab-case for search modal IDs in docs (e.g., id: 'request-products')

Applied to files:

  • packages/docs/src/components/SearchModal.tsx
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/docs/src/**/*.{ts,tsx} : Trigger opening modals from pages/components by calling openAuthModal from the signals module

Applied to files:

  • packages/docs/src/components/SearchModal.tsx
📚 Learning: 2025-10-18T05:46:51.596Z
Learnt from: hyochan
Repo: hyodotdev/openiap PR: 17
File: packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt:620-629
Timestamp: 2025-10-18T05:46:51.596Z
Learning: In packages/google/openiap/src/main/java/**/*.kt (Android-only package): DO NOT add Android suffix to function names, even for Android-specific APIs. Exception: Only use Android suffix for cross-platform API types (e.g., ProductAndroid, PurchaseAndroid) that contrast with iOS types. Examples of correct naming: isHorizonEnvironment(context: Context), buildModule(context: Context), acknowledgePurchase(), consumePurchase().

Applied to files:

  • packages/google/openiap/src/horizon/java/dev/hyo/openiap/OpenIapModule.kt
  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/google/openiap/src/main/**/*.kt : In Android-only package, do not add Android suffix to function names (e.g., acknowledgePurchase, not acknowledgePurchaseAndroid)

Applied to files:

  • packages/google/openiap/src/horizon/java/dev/hyo/openiap/OpenIapModule.kt
  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/google/openiap/src/main/**/*.kt : Only use Android suffix for types that are part of a cross-platform API (e.g., ProductAndroid, PurchaseAndroid)

Applied to files:

  • packages/google/openiap/src/horizon/java/dev/hyo/openiap/OpenIapModule.kt
  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/docs/src/**/*.{ts,tsx} : Platform suffixes in function names for documentation site examples: iOS-only functions end with IOS; Android-only functions end with Android; cross-platform functions have no suffix

Applied to files:

  • packages/docs/src/pages/docs/apis.tsx
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/docs/src/**/*.{md,mdx,ts,tsx} : Respect deprecations in documentation: replace buy-promoted-product-ios with requestPurchaseOnPromotedProductIOS; requestProducts with fetchProducts; get-storefront-ios with getStorefront

Applied to files:

  • packages/docs/src/pages/docs/apis.tsx
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/docs/src/**/*.{ts,tsx} : Delete unused components, functions, imports; avoid commented-out code; remove unused variables/parameters

Applied to files:

  • packages/docs/src/pages/docs/apis.tsx
📚 Learning: 2025-10-18T05:54:54.802Z
Learnt from: CR
Repo: hyodotdev/openiap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-10-18T05:54:54.802Z
Learning: Applies to packages/google/openiap/src/main/java/dev/hyo/openiap/utils/**/*.kt : Place reusable Kotlin helpers in openiap/src/main/java/dev/hyo/openiap/utils/

Applied to files:

  • packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Test Android
🔇 Additional comments (3)
packages/docs/src/components/SearchModal.tsx (1)

409-437: LGTM! Search entries align with new documentation.

The three new API documentation items follow the kebab-case convention for IDs and correctly reference the new Debugging & Logging section added to the documentation.

packages/google/openiap/src/play/java/dev/hyo/openiap/OpenIapModule.kt (1)

859-864: Good migration to OpenIapLog for consistent logging.

The replacement of Android Log calls with OpenIapLog provides consistent, controlled logging across the module. This aligns with the PR's goal of enhancing debugging capabilities.

Also applies to: 907-907, 1079-1079

packages/docs/src/pages/docs/apis.tsx (1)

1193-1316: No duplication exists—the review comment concern is unfounded.

The verification search found only a single instance of "Debugging & Logging" at lines 1194–1195. The original review comment's concern that this section is "added twice" is not supported by the codebase. The section appears once in the file and does not require correction.

Likely an incorrect or invalid review comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 android Related to android 🛠 bugfix All kinds of bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant