Skip to content

Bugfix/make-brands-perfect - #183

Merged
rahul-sinha1908 merged 51 commits into
masterfrom
bugfix/make-brands-perfect
Sep 7, 2025
Merged

rahul-sinha1908 merged 51 commits into
masterfrom
bugfix/make-brands-perfect

Conversation

@rahul-sinha1908

@rahul-sinha1908 rahul-sinha1908 commented Sep 7, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Introduced Discovery experience: database selector, advanced filters (Trendly/Modash), influencer list, stats modal, and guided empty states.
    • Added Influencer credits/limits tags in headers and a Connected Influencers mode with empty state.
    • Global toast notifications integrated.
  • Enhancements

    • Profile locking applied across cards and profile modal.
    • Explore panel updated with segmented controls and CTAs; headers refined with InfluencerConnects; responsive Billing header.
    • Drawer shows PRO-locked items with upgrade badge and new Discovery tab.
  • Changes

    • Collaboration actions now confirm Delete/Stop; proposal filtering updated to explicit statuses.
  • Chores

    • Submodule revisions.

@coderabbitai

coderabbitai Bot commented Sep 7, 2025 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new Discover feature (panels, filters, placeholders, mock data) and credit tags; integrates pro/enterprise gating in drawer and headers; introduces profile-lock logic via BrandContext events; updates explore-influencers to support “connected” mode; revises collaboration actions and status filters; relocates Toast providers; minor header and screen tweaks; bumps submodules.

Changes

Cohort / File(s) Summary
Discover feature (screens, panels, filters, placeholders, mock data)
app/(main)/(drawer)/(secondary)/discover.tsx, components/discover/*, components/discover/..., components/discover/mock/influencers.ts, components/explore-influencers/InfluencerConnects.tsx
Introduces DiscoverInfluencersScreen; adds RightPanelDiscover (DB selection/filters), DiscoverInfluencer list with stats modal, premium tags, and empty states for Trendly/Phyllo/Modash/none; publishes/consumes data via Subjects; includes mock influencers and Modash/Trendly filters; credit tags component added.
Brand context and profile lock propagation
contexts/brand-context.provider.tsx, app/(main)/(drawer)/(secondary)/contract-details/[pageID].tsx, components/collaboration/collaboration-details/*TabContent.tsx, components/card/collaboration-details/invitation-card.tsx, components/card/collaboration-details/application-card.tsx, components/card/profile-modal/application-card.tsx
BrandContext now exposes isProfileLocked and handles unlock/message events; passes lockProfile to ProfileBottomSheet/InfluencerCard in multiple surfaces; updates imports to shared ApplicationActionBar; adds attachments composition.
Explore Influencers connected mode and right panel refactor
app/(main)/(drawer)/(tabs)/explore-influencers.tsx, components/explore-influencers/index.tsx, components/explore-influencers/RightPanel.tsx
Adds connectedInfluencers state/prop flow; short-circuits loading to unlocked IDs; renders empty state when none; RightPanel now controlled via props with segmented control and plan-gated CTAs.
Drawer and header integrations (PRO gating and connects widget)
components/drawer-layout/DrawerMenuContentWeb.tsx, components/drawer-layout/DrawerMenuItem.tsx, app/(main)/(drawer)/(tabs)/_layout.tsx
Adds Discovery tab and PRO gating; DrawerMenuItem shows “Upgrade to Pro” lock badge; tab headers wrap NotificationIcon and add InfluencerConnects (with optional all prop).
Collaboration actions and status filters
components/BottomSheetActions.tsx, components/collaborations/Collaborations.tsx, components/card/collaboration-details/application-action-card.tsx
Replaces immediate actions with confirmation modals; changes status updates to “deleted”/“stopped”; adjusts proposal query to explicit status includes; removes legacy ApplicationActionBar file (moved to shared-uis).
Layout and toast placement
app/_layout.tsx, layouts/app-layout/index.tsx, app/(main)/(drawer)/(secondary)/brand-profile.tsx
Moves BottomSheet/Confirmation providers into RootLayoutStack and mounts Toast there; removes Toast from AppLayout and BrandProfile.
Minor screen/header changes
app/(main)/(drawer)/(secondary)/billing.tsx
Adds ScreenHeader for non-xl viewports; imports useBreakpoints.
Formatting and submodules
constants/App.ts, shared-constants, shared-libs, shared-uis
Leading newline in constants; updates submodule pointers.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Discover as DiscoverInfluencersScreen
  participant Right as RightPanelDiscover
  participant List as DiscoverInfluencer
  participant Bus as Subjects (OpenCurrentSelectedDatabase / DiscoverChannel)

  User->>Discover: Open /discover (xl)
  Discover->>Right: render(selectedDb, setSelectedDb)
  Discover->>List: render(selectedDb)
  Right-->>Right: User selects DB / opens filters
  Right-->>Bus: OpenCurrentSelectedDatabase.next(db)
  Note over Right,List: Filters may publish data (e.g., TrendlyAdvancedFilter)
  Bus-->>List: DiscoverCommuninicationChannel {loading,data}
  List-->>User: Render cards or placeholders
  User->>List: Tap card/stat
  List-->>User: Show InfluencerStatsModal
Loading
sequenceDiagram
  autonumber
  participant UI as ProfileBottomSheet / InfluencerCard
  participant Brand as BrandContextProvider
  participant FS as Firestore/API
  participant Nav as Navigation
  participant Toast as Toaster

  UI->>Brand: ProfileModalUnlockRequest(influencerId, cb)
  alt Has credits
    Brand->>FS: Update unlockedInfluencers & credits
    FS-->>Brand: OK / Error
    Brand-->>UI: cb()
    Toast-->>User: Success/Info
  else No credits
    Brand-->>UI: cb()
    Toast-->>User: Error (exhausted)
  end

  UI->>Brand: ProfileModalSendMessage(influencerId, cb)
  Brand->>FS: Create thread (if monetization)
  FS-->>Brand: OK / Error
  Brand->>Nav: Navigate /messages (on success)
  Brand-->>UI: cb()
  Toast-->>User: Success/Error
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–75 minutes

Possibly related PRs

Suggested reviewers

  • dev-rathore
  • Manan-Sharma-5

Poem

In moonlit repos, I hop with glee,
New trails of “Discover” set data free.
A lock on profiles? I’ve got the key—
Credits counted, pro-gates decree.
Toasts now bubble at the root,
While filters bloom—how cute! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee57015 and 37eee74.

📒 Files selected for processing (38)
  • app/(main)/(drawer)/(secondary)/billing.tsx (1 hunks)
  • app/(main)/(drawer)/(secondary)/brand-profile.tsx (0 hunks)
  • app/(main)/(drawer)/(secondary)/contract-details/[pageID].tsx (2 hunks)
  • app/(main)/(drawer)/(secondary)/discover.tsx (1 hunks)
  • app/(main)/(drawer)/(tabs)/_layout.tsx (6 hunks)
  • app/(main)/(drawer)/(tabs)/explore-influencers.tsx (2 hunks)
  • app/_layout.tsx (3 hunks)
  • components/BottomSheetActions.tsx (4 hunks)
  • components/card/collaboration-details/application-action-card.tsx (0 hunks)
  • components/card/collaboration-details/application-card.tsx (2 hunks)
  • components/card/collaboration-details/invitation-card.tsx (2 hunks)
  • components/card/profile-modal/application-card.tsx (1 hunks)
  • components/collaboration/collaboration-details/ApplicationsTabContent.tsx (2 hunks)
  • components/collaboration/collaboration-details/InvitationsTabContent.tsx (2 hunks)
  • components/collaborations/Collaborations.tsx (1 hunks)
  • components/discover/DiscoverAdPlaceholder.tsx (1 hunks)
  • components/discover/DiscoverInfluencer.tsx (1 hunks)
  • components/discover/InfluencerStatModal.tsx (1 hunks)
  • components/discover/RightPanelDiscover.tsx (1 hunks)
  • components/discover/components/PremiumActionTag.tsx (1 hunks)
  • components/discover/empty-screens/EmptyDiscoverModash.tsx (1 hunks)
  • components/discover/empty-screens/EmptyDiscoverNoDB.tsx (1 hunks)
  • components/discover/empty-screens/EmptyDiscoverPhyllo.tsx (1 hunks)
  • components/discover/empty-screens/EmptyDiscoverTrendly.tsx (1 hunks)
  • components/discover/mock/influencers.ts (1 hunks)
  • components/discover/modash/ModashFilter.tsx (1 hunks)
  • components/discover/trendly/TrendlyAdvancedFilter.tsx (1 hunks)
  • components/drawer-layout/DrawerMenuContentWeb.tsx (4 hunks)
  • components/drawer-layout/DrawerMenuItem.tsx (3 hunks)
  • components/explore-influencers/InfluencerConnects.tsx (1 hunks)
  • components/explore-influencers/RightPanel.tsx (6 hunks)
  • components/explore-influencers/index.tsx (8 hunks)
  • constants/App.ts (1 hunks)
  • contexts/brand-context.provider.tsx (5 hunks)
  • layouts/app-layout/index.tsx (0 hunks)
  • shared-constants (1 hunks)
  • shared-libs (1 hunks)
  • shared-uis (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/make-brands-perfect

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.

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.

1 participant