Skip to content

Feature/payment - #166

Merged
Jamie-Poeffel merged 10 commits into
devfrom
feature/payment
Apr 29, 2026
Merged

Jamie-Poeffel merged 10 commits into
devfrom
feature/payment

Conversation

@Jamie-Poeffel

@Jamie-Poeffel Jamie-Poeffel commented Apr 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Integrated in-app purchase system with plan tiers (Free, Basic, Premium, Gold).
    • Added Security settings screen for password management.
    • Enhanced Personal Details editor with bio, photo gallery, and date picker.
    • New No Internet Connection screen.
    • Video call feature with streak celebration screen and improved UI.
  • Improvements

    • Added logout confirmation dialog.
    • Implemented offline network awareness.
    • Improved safe area handling across all screens.
    • Enhanced subscription management UI with active plan visibility.

Jamie-Poeffel and others added 9 commits April 25, 2026 21:13
- Added useActivePlan hook to manage user's active subscription plan
- Integrated subscription plans with dynamic pricing and user entitlements
- Enhanced checkout process with error handling and subscription management
- Updated UI components to reflect active plan status and pricing
- Refactored constants and plans structure for better maintainability

Co-authored-by: Copilot <copilot@github.com>
* [feat] camera flip & delayed icebreaker fade-in #161

* [fix] fix camera flip freeze by forcing RTCView remount #161

* [fix] save video producer ref for replaceTrack on camera flip #161

* [feat] draggable local camera preview #161

* [feat] tap to toggle controls & icebreaker skeleton loader #161

* [feat] smooth fade animation for controls toggle #161

* [fix] sync local preview bottom animation with controls fade #161

* [fix] videocall fullscreen added (#162)

* [fix] backbutton

---------

Co-authored-by: GRuoss <gregoryruoss@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
- Simplified ProtectedLayout by removing unused imports and offline status handling.
- Updated Stack.Screen options for datePickerModal.
- Deleted InfoScreen component and its associated styles.
- Enhanced Checkout and SubscriptionPlans components to utilize PurchasesContext for better state management.
- Added streak celebration modal to VideoCall component for user engagement.
- Introduced PurchasesContext to manage purchases readiness across the app.
- Reimplemented DatePickerModal in the protected directory.
- Improved server status checking with network connectivity awareness.
…chat, favorites, and personal details screens

Co-authored-by: Copilot <copilot@github.com>
@coderabbitai

coderabbitai Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b3310571-2b6c-4d96-b20f-9ab5bf1eebb0

📥 Commits

Reviewing files that changed from the base of the PR and between 323678c and fa3a3a1.

⛔ Files ignored due to path filters (2)
  • assets/ScreenRecording_04-28-2026 12-48-23_1.MP4 is excluded by !**/*.mp4
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (41)
  • app.json
  • app/(auth)/login/withEmail.tsx
  • app/(auth)/login/withPhoneNumber.tsx
  • app/(auth)/no-internet.tsx
  • app/(protected)/(tabs)/chat.tsx
  • app/(protected)/(tabs)/favorites.tsx
  • app/(protected)/(tabs)/index.tsx
  • app/(protected)/(tabs)/settings.tsx
  • app/(protected)/(tabs)/stats.tsx
  • app/(protected)/_layout.tsx
  • app/(protected)/datePickerModal.tsx
  • app/(protected)/favorites/tipdetail.tsx
  • app/(protected)/info.tsx
  • app/(protected)/settings/_layout.tsx
  • app/(protected)/settings/apperance.tsx
  • app/(protected)/settings/interests.tsx
  • app/(protected)/settings/personaldetails.tsx
  • app/(protected)/settings/security.tsx
  • app/(protected)/subscriptions/checkout.tsx
  • app/(protected)/subscriptions/index.tsx
  • app/(protected)/videocall/(pages)/CallScreen.tsx
  • app/(protected)/videocall/(pages)/ConnectingScreen.tsx
  • app/(protected)/videocall/(pages)/SetupScreen.tsx
  • app/(protected)/videocall/index.tsx
  • app/_layout.tsx
  • components/SafeArea.tsx
  • components/StreakCelebrationModal.tsx
  • components/backwrapper.tsx
  • components/dateInput.tsx
  • components/videocall/InfiniteColumn.tsx
  • components/videocall/Tile.tsx
  • components/videocall/homeConstants.ts
  • components/videocall/homeImages.ts
  • hooks/useActivePlan.ts
  • lib/PurchasesContext.tsx
  • lib/ServerStatusContext.tsx
  • lib/constants.ts
  • lib/plans.ts
  • locales/en.json
  • package.json
  • utils/datePickerCallback.ts

📝 Walkthrough

Walkthrough

This PR introduces comprehensive in-app purchase integration with RevenueCat, adds network connectivity detection, refactors the video call flow into modular components, and enhances user settings management with secure password changes and personal details editing.

Changes

Cohort / File(s) Summary
In-App Purchases Integration
lib/PurchasesContext.tsx, hooks/useActivePlan.ts, app/_layout.tsx
Introduces Purchases SDK initialization with API key configuration, creates context for readiness state, implements hook to track active subscription plan via RevenueCat customer info polling, and gates initialization on network connectivity.
Network Connectivity & Offline Handling
app/_layout.tsx, app/(auth)/no-internet.tsx, lib/ServerStatusContext.tsx, package.json
Adds network reachability detection via expo-network, renders NoInternetScreen when disconnected, gates server polling on connectivity, and adds network packages to dependencies.
Authentication & Purchase Login
app/(auth)/login/withEmail.tsx, app/(auth)/login/withPhoneNumber.tsx
Updates login responses to include userId field, conditionally invokes Purchases.logIn() after successful authentication when SDK is configured.
Video Call Refactoring
app/(protected)/videocall/index.tsx, app/(protected)/videocall/(pages)/SetupScreen.tsx, app/(protected)/videocall/(pages)/ConnectingScreen.tsx, app/(protected)/videocall/(pages)/CallScreen.tsx, components/StreakCelebrationModal.tsx
Decomposes monolithic videocall into separate screen components with setup/connecting/call/streak celebration states; introduces streak tracking and celebration modal with animations; simplifies main component to route between screens.
Video Call UI Components
components/videocall/InfiniteColumn.tsx, components/videocall/Tile.tsx, components/videocall/homeImages.ts, components/videocall/homeConstants.ts
Creates reusable infinite scrolling image column component, tile image renderer with memory-efficient caching, and shared constants/image data for home screen.
Safe Area Management Refactor
components/SafeArea.tsx, app/(protected)/(tabs)/chat.tsx, app/(protected)/(tabs)/favorites.tsx, app/(protected)/(tabs)/index.tsx, app/(protected)/(tabs)/stats.tsx, app/(protected)/settings/apperance.tsx, app/(protected)/settings/interests.tsx
Converts boolean-based safe area control to edge-based model; applies focus-based safe area disabling across multiple tabs and settings screens.
Subscription & Checkout Enhancements
app/(protected)/subscriptions/index.tsx, app/(protected)/subscriptions/checkout.tsx, lib/constants.ts
Replaces PAID plan with BASIC, PREMIUM, GOLD tiers; integrates RevenueCat offerings for dynamic pricing display; detects active subscription plan and shows appropriate UI states (active badge, cancel action, loading states).
Settings Security & Personal Details
app/(protected)/settings/security.tsx, app/(protected)/settings/personaldetails.tsx, app/(protected)/settings/_layout.tsx, utils/datePickerCallback.ts, app/(protected)/datePickerModal.tsx
Adds new password change screen with validation; refactors personal details to fetch/edit user profile with birthday date picker modal, bio with character limit, and photo gallery management; creates callback mechanism for date picker modal communication.
Settings UI & Navigation Updates
app/(protected)/_layout.tsx, app/(protected)/info.tsx, app/(protected)/favorites/tipdetail.tsx, app/(protected)/settings/_layout.tsx, locales/en.json
Removes server status screen and offline banner; renames info modal to datePickerModal; adds security row to settings menu; updates logout to confirmation-based flow; improves header configuration for settings stack.
Configuration & Dependencies
app.json, package.json
Bumps iOS app version to 1.0.0, adds iOS in-app payments entitlement, removes StoreKit config path; adds network connectivity packages (expo-network, @react-native-community/netinfo).
Component Utilities
components/backwrapper.tsx, components/dateInput.tsx
Reformats BackWrapper props for readability; converts DateInput to controlled component accepting value and onChange props.

Sequence Diagram(s)

sequenceDiagram
    participant App as App Root Layout
    participant Network as Network Service
    participant NoInternet as NoInternetScreen
    participant Content as App Content
    
    App->>Network: Check connectivity on mount
    Network-->>App: Network state
    
    alt Connected
        App->>Content: Render protected/auth routes
    else Disconnected
        App->>NoInternet: Render offline screen
    end
    
    Network->>App: Emit connectivity changes
    alt Still Disconnected
        App->>NoInternet: Keep showing offline
    else Reconnected
        App->>Content: Transition to normal flow
    end
Loading
sequenceDiagram
    participant User as User
    participant Login as Login Screen
    participant Backend as Backend API
    participant Purchases as RevenueCat SDK
    participant Router as Navigation Router
    
    User->>Login: Submit login (email/phone)
    Login->>Backend: POST login credentials
    Backend-->>Login: { token, userId }
    Login->>Login: Save token locally
    
    alt Purchases SDK Configured
        Login->>Purchases: Purchases.logIn(userId)
        Purchases-->>Login: Subscription info
    end
    
    Login->>Router: Navigate to protected tabs
Loading
sequenceDiagram
    participant SubscriptionScreen as Subscriptions Screen
    participant Purchases as RevenueCat SDK
    participant PurchaseContext as PurchasesContext
    participant Checkout as Checkout Screen
    
    SubscriptionScreen->>PurchaseContext: Check if purchases ready
    PurchaseContext-->>SubscriptionScreen: Ready status
    
    alt Purchases Ready
        SubscriptionScreen->>Purchases: Fetch offerings
        Purchases-->>SubscriptionScreen: Plan pricing & availability
        SubscriptionScreen->>Purchases: Get customer info
        Purchases-->>SubscriptionScreen: Active entitlements
        SubscriptionScreen->>SubscriptionScreen: Render plans with active status
        
        User->>Checkout: Select plan to purchase
        Checkout->>Purchases: Initiate purchase
        Purchases-->>Checkout: Purchase result
        
        alt Success
            Checkout->>Purchases: Verify entitlement
            Checkout->>Router: Navigate to tabs
        else Failure
            Checkout->>Checkout: Show error message
        end
    else Not Ready
        SubscriptionScreen->>SubscriptionScreen: Show loading indicator
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • Feature/layout videocall #115: Both PRs refactor the video call UI/flow, decomposing the main videocall component into separate screen states with CallScreen and related overlays.
  • Chore/use fetch #140: Both PRs update login authentication files (withEmail.tsx, withPhoneNumber.tsx) to handle userId and integrate RevenueCat Purchases.logIn post-authentication.
  • fix: improve loading state handling in RootLayout component #155: Both PRs implement RevenueCat purchases integration in app root layout, configure iOS entitlements in app.json, and establish PurchasesContext for SDK readiness state management.

Suggested labels

Feature, In-App Purchases, Network Connectivity, Video Call

Suggested reviewers

  • LuisAll12

Poem

🐰 A rabbit hops through networks bold,
With purchases and plans to hold,
Safe areas managed edge by edge,
Calls ring out from ledge to ledge,
Now streaks celebrate in flame so bright! 🔥

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/payment

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

@Jamie-Poeffel
Jamie-Poeffel marked this pull request as ready for review April 29, 2026 07:39

@Kush-Srigiri Kush-Srigiri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

very good but could be better

@Jamie-Poeffel
Jamie-Poeffel merged commit 6c8b633 into dev Apr 29, 2026
1 of 2 checks passed
@Jamie-Poeffel
Jamie-Poeffel deleted the feature/payment branch April 29, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants