Skip to content

Bugfix/make-brands-perfect - #137

Merged
rahul-sinha1908 merged 13 commits into
masterfrom
bugfix/make-brands-perfect
Jun 14, 2025
Merged

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

Conversation

@rahul-sinha1908

@rahul-sinha1908 rahul-sinha1908 commented Jun 14, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added a new onboarding screen for users to choose between joining as a brand/agency or influencer.
    • Introduced a dedicated screen to guide users who are on the wrong app, with options to access the correct app or web version.
    • Unread message count badges are now displayed on the messages tab and in the drawer menu.
    • Centralized confirmation modal is now used for logout actions.
  • Enhancements

    • Improved input validation for adding members, including email format and minimum name length checks.
    • Brand selection and loading states are now managed centrally, improving reliability and consistency.
    • Real-time unread message tracking and notifications added to the chat context.
    • Loading indicators and redirects on protected brand screens now use centralized context state.
  • Bug Fixes

    • Replaced icon placeholders with shimmer effects in influencer explore shimmer screens for improved visual consistency.
  • Chores

    • Updated app version to 1.1.0.
    • Updated npm scripts for iOS to specify a custom port.
    • Upgraded shared subproject dependencies to latest commits.
  • Refactor

    • Removed brand search from the drawer menu for a simplified user experience.
    • Improved async handling and state management in brand and chat context providers.

@coderabbitai

coderabbitai Bot commented Jun 14, 2025 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces new onboarding and error screens, enhances chat functionality with real-time unread message tracking and notifications, and refactors brand and chat context providers to expose loading and unread count states. UI components are updated for badge display, input validation, and centralized confirmation modals. Subproject references and app metadata are also updated.

Changes

File(s) / Group Change Summary
app/(auth)/lets-start.tsx, app/(auth)/wrong-app.tsx Added new onboarding and error screens for user entry flow and wrong app detection.
app/(main)/(drawer)/(tabs)/_layout.tsx, components/drawer-layout/DrawerMenuItem.tsx, components/drawer-layout/DrawerMenuContent.tsx Enhanced tab and drawer UI to display unread message badges; removed brand search from drawer; added unread count prop.
app/_layout.tsx Added a commented navigation line suggesting alternative onboarding route.
components/channel/channel.tsx Wrapped JSX in a flex container and adjusted avatar styling.
components/menu/index.tsx Replaced local logout modal with centralized confirmation modal; improved sign-out logic.
components/shimmers/explore-influencer-shimmer.tsx Replaced header icons with shimmer placeholders for loading state.
components/ui/modal/MembersModal.tsx Added email and name validation for member addition; improved input UX.
contexts/brand-context.provider.tsx Added and exposed loading state; refactored async brand selection and snapshot handling.
contexts/chat-context.provider.tsx Introduced unread message count state and real-time notification logic; exposed deregisterTokens.
layouts/protected/brand-protected-screen.tsx Refactored to rely on brand context for loading and selected brand state; removed local fetching logic.
app.json Updated app version from 1.0.0 to 1.1.0.
package.json Set iOS Expo run scripts to use port 8082.
shared-constants, shared-libs, shared-uis Updated subproject commit references to newer versions.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant LetsStartScreen
    participant Router
    participant WrongAppScreen
    participant ExternalBrowser

    User->>LetsStartScreen: Loads onboarding screen
    LetsStartScreen->>User: Shows options (Brand/Agency or Influencer)
    User->>LetsStartScreen: Tap "Join as Brand / Agency"
    LetsStartScreen->>Router: Navigate to /pre-signin

    User->>LetsStartScreen: Tap "Join as Influencer"
    alt Platform is Web
        LetsStartScreen->>ExternalBrowser: Open influencer web URL
    else Non-Web
        LetsStartScreen->>Router: Navigate to /wrong-app
    end
Loading
sequenceDiagram
    participant App
    participant ChatContext
    participant StreamClient
    participant UI

    App->>ChatContext: Initialize
    ChatContext->>StreamClient: Connect user
    StreamClient-->>ChatContext: Connection success
    ChatContext->>StreamClient: Listen for message events
    StreamClient-->>ChatContext: New message / read event
    ChatContext->>UI: Update unreadCount
    UI->>User: Show unread badge in tab/drawer
Loading

Possibly related PRs

  • idivarts/trendly-brands#64: Refactors and builds upon the initial implementation of BrandProtectedScreen by moving from direct Firestore fetching to using the brand context.
  • idivarts/trendly-brands#66: Introduces the original BrandProtectedScreen component, which is now refactored in this PR to use context.
  • idivarts/trendly-brands#65: Involves the same component and file, indicating a direct connection as both PRs focus on BrandProtectedScreen.

Suggested reviewers

  • Manan-Sharma-5
  • dev-rathore

Poem

In the garden of code where new features sprout,
Badges now gleam and unread counts shout.
Brands load with care, onboarding feels bright,
Shimmers replace icons, all sparkling in light.
With context and modals, the flow’s never wrong—
This bunny hops forward, the app growing strong!
🐇✨


📜 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 4d2340c and 387b4a8.

⛔ Files ignored due to path filters (2)
  • assets/images/splash-dark.png is excluded by !**/*.png
  • assets/images/splash.png is excluded by !**/*.png
📒 Files selected for processing (18)
  • app.json (1 hunks)
  • app/(auth)/lets-start.tsx (1 hunks)
  • app/(auth)/wrong-app.tsx (1 hunks)
  • app/(main)/(drawer)/(tabs)/_layout.tsx (3 hunks)
  • app/_layout.tsx (1 hunks)
  • components/channel/channel.tsx (1 hunks)
  • components/drawer-layout/DrawerMenuContent.tsx (3 hunks)
  • components/drawer-layout/DrawerMenuItem.tsx (4 hunks)
  • components/menu/index.tsx (4 hunks)
  • components/shimmers/explore-influencer-shimmer.tsx (2 hunks)
  • components/ui/modal/MembersModal.tsx (2 hunks)
  • contexts/brand-context.provider.tsx (5 hunks)
  • contexts/chat-context.provider.tsx (5 hunks)
  • layouts/protected/brand-protected-screen.tsx (1 hunks)
  • package.json (1 hunks)
  • shared-constants (1 hunks)
  • shared-libs (1 hunks)
  • shared-uis (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@rahul-sinha1908
rahul-sinha1908 merged commit ef2de21 into master Jun 14, 2025
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