Skip to content

Repurpose messaging screen - #53

Merged
dev-rathore merged 11 commits into
devfrom
repurpose-messaging-screen
Jan 7, 2025
Merged

dev-rathore merged 11 commits into
devfrom
repurpose-messaging-screen

Conversation

@dev-rathore

@dev-rathore dev-rathore commented Jan 2, 2025 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a dynamic chat message topbar with phase-specific interactions.
    • Added new components for managing collaboration phases.
    • Enhanced password reset functionality with a new interactive form.
  • User Interface

    • Replaced member addition functionality with profile access.
    • Enhanced chat interface with contextual messaging stages.
  • Improvements

    • Streamlined channel component interactions.
    • Added descriptive messaging for collaboration phases.
    • Updated navigation methods for improved user experience across authentication screens.

@dev-rathore dev-rathore self-assigned this Jan 2, 2025
@coderabbitai

coderabbitai Bot commented Jan 2, 2025 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@dev-rathore has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 49 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c91d5d3 and d8a7a32.

📒 Files selected for processing (15)
  • app/_layout.tsx (2 hunks)
  • components/InfluencerCard.tsx (0 hunks)
  • components/channel/channel.tsx (2 hunks)
  • components/channel/chat-message-topbar.tsx (1 hunks)
  • components/channel/message-topbar/first-phase.tsx (1 hunks)
  • components/channel/message-topbar/second-phase.tsx (1 hunks)
  • components/channel/message-topbar/third-phase.tsx (1 hunks)
  • contexts/auth-context.provider.tsx (6 hunks)
  • contexts/chat-context.provider.native.tsx (2 hunks)
  • contexts/chat-context.provider.web.tsx (2 hunks)
  • contexts/contract-context.provider.tsx (1 hunks)
  • contexts/index.ts (1 hunks)
  • shared-libs (1 hunks)
  • shared-uis (1 hunks)
  • types/Contract.ts (1 hunks)

Walkthrough

This pull request introduces significant changes to the channel and collaboration components, focusing on enhancing the chat interface and collaboration workflow. The changes include the removal of the AddMember component, the introduction of a new ChatMessageTopbar component with multiple phase-specific variations, and updates to the data structure in hooks and components. The modifications aim to streamline the user interaction flow for collaboration, with new components providing more structured guidance through different stages of communication.

Changes

File Change Summary
components/channel/channel.tsx Removed AddMember component, added ChatMessageTopbar, replaced member addition modal with ProfileIcon
components/channel/chat-message-topbar.tsx New component with conditional rendering of phase-specific topbars based on status
components/channel/message-topbar/* Added new phase-specific components: FirstPhase, SecondPhase, ThirdPhase, FourthPhase
constants/ChatMessageTopbar.ts Added CHAT_MESSAGE_TOPBAR_DESCRIPTION constant with phase-specific messages
hooks/request/use-applications.tsx Updated UseApplicationsProps interface with more structured data type
components/collaboration/collaboration-details/ApplicationsTabContent.tsx Modified data passing to useApplications hook
app/(auth)/_layout.tsx Updated screen names for "signup" and "forget-password"
app/(auth)/create-new-account.tsx Changed navigation from navigate to replace for login screen
app/(auth)/forget-password.tsx Removed ForgotPasswordScreen component
app/(auth)/forgot-password.tsx Overhauled ForgotPassword component to ForgotPasswordScreen with enhanced UI
app/(auth)/login.tsx Updated navigation methods for "create new account" and "forgot password" links
app/(auth)/signup.tsx Removed Signup component
app/(onboarding)/onboarding-get-started.tsx Modified user session handling and navigation logic
app/(onboarding)/onboarding-your-brand.tsx Updated navigation method and parameters in handleCreateBrand function
components/collaboration/collaboration-details/InvitationsTabContent.tsx Changed invitation handling from addDoc to setDoc in Firestore
components/drawer-layout/DrawerMenuContent.tsx Modified router.push method to use an object for pathname
contexts/auth-context.provider.tsx Updated authentication methods and navigation logic in AuthContext
utils/router.ts Introduced resetAndNavigate function for managing navigation stack

Sequence Diagram

sequenceDiagram
    participant User
    participant ChatInterface
    participant ChatMessageTopbar
    participant Phases

    User->>ChatInterface: Enters Channel
    ChatInterface->>ChatMessageTopbar: Render with status
    ChatMessageTopbar->>Phases: Select Appropriate Phase
    Phases-->>ChatInterface: Display Phase-Specific Content
    User->>Phases: Interact with Phase Actions
Loading

Possibly related PRs

  • Redesign application and invitation cards #51: Redesign of application and invitation cards, which may relate to the overall user interface and interaction aspects of the ChannelNative component, particularly in how members are managed and displayed.
  • pushed new contract screens #52: This PR introduces new contract screens, which could be relevant as the changes in the main PR also involve user interaction elements and the overall chat interface, potentially impacting how contracts are presented within the chat context.

Suggested reviewers

  • Manan-Sharma-5

Poem

🐰 Hop, hop, through channels bright,
Code transforms with rabbit's might!
Topbars dance, phases unfold,
A collaboration story told!
Coding magic, smooth and light! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
components/channel/channel.tsx (3)

57-65: Implement the user icon's intended behavior.
You've noted the TODO to open the contract linked with the message. Currently, there's no handler or press event on the ProfileIcon. Would you like help setting up navigation or rendering the contract details upon tapping the icon?


67-94: Avoid commented-out code for essential features.
Lines 94-101 suggest that a feedback button was previously used. Keeping it commented out may confuse future maintainers about whether this feature is needed. If you plan to use it later, add a clarifying comment or track it with a TODO. Otherwise, remove it to maintain a clean codebase.


80-81: Handle contract status and system messages.
For “Start Collaboration” and “Ask to Revise Quote,” remember to implement the corresponding actions. Currently, these are placeholders with a TODO comment. If you need assistance creating system messages or updating contract statuses, just let me know.

Also applies to: 88-90

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3094cb1 and ac61e63.

📒 Files selected for processing (3)
  • components/channel/channel.tsx (2 hunks)
  • constants/ChatMessageBar.ts (1 hunks)
  • shared-uis (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • shared-uis
  • constants/ChatMessageBar.ts
🔇 Additional comments (3)
components/channel/channel.tsx (3)

4-8: Imports look consistent and well-organized.
No immediate concerns here; the added imports align with the new feature requirements.


67-105: Confirm the purpose of the close icon Pressable.
The Pressable currently has no onPress action. Ensure there's a user-facing effect, such as dismissing the chat bar or performing a relevant close action. If the icon is intentional placeholder UI, add a comment to clarify.


114-125: FeedbackModal usage aligns well with existing patterns.
The feedback modal integration is straightforward, storing user input and controlling visibility via state. Overall, the design appears consistent and maintainable.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (8)
components/channel/message-topbar/fourth-phase.tsx (1)

4-10: Consider adding a prop interface or docstring.
Although this component is straightforward, establishing a prop interface or a JSDoc comment now would make it easier to extend functionality later.

components/channel/chat-message-topbar.tsx (1)

6-8: Consider using an enum or union type for status.
Rather than a numerical type, using a descriptive enum or union type (e.g., 'first' | 'second' | 'third' | 'fourth') can improve readability and type safety.

-interface ChatMessageTopbarProps {
-  status: number;
+type StatusType = 0 | 1 | 2 | 3;

+interface ChatMessageTopbarProps {
+  status: StatusType;
 }
components/channel/message-topbar/second-phase.tsx (1)

10-12: Consider future extensibility.
If we plan to handle specialized user interactions or pass props, defining them now might ease future updates.

components/channel/message-topbar/first-phase.tsx (1)

6-6: Highlight future extension.
If you intend to pass dynamic props or external callbacks, consider a prop interface or a more modular design for easier updates.

components/channel/message-topbar/third-phase.tsx (3)

1-3: Consider grouping or reorganizing imports.
The code imports from multiple locations. While there's no explicit error, you might consider grouping related imports or using absolute imports consistently to maintain clarity and consistency.


10-11: Ensure naming clarity for “ThirdPhase”.
A name like ThirdPhase may not convey this is a feedback or final step unless developers already know the context. Renaming it to something more descriptive, such as FeedbackPhase, improves readability.


16-35: Check user experience for feedback button.
Currently, upon clicking “Give Feedback,” a modal opens but no pre-validation or guidance is provided. Consider adding an on-screen prompt or a tooltip to let users know what kind of feedback is expected.

Would you like me to propose UI/UX enhancements or open a feature request for additional user guidance?

components/channel/channel.tsx (1)

47-55: Use a pressable component for user icon.
The ProfileIcon is rendered but isn’t wrapped in a clickable element. As indicated by the TODO, you may want to open the user’s contract or profile when tapping the icon. Ensure you add a press handler to improve discoverability.

<View
  style={{
    marginRight: 18,
    marginLeft: 12,
  }}
>
- <ProfileIcon />
+ <Pressable onPress={() => openContract()}>
+   <ProfileIcon />
+ </Pressable>
</View>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac61e63 and e5a468a.

📒 Files selected for processing (9)
  • components/channel/channel.tsx (2 hunks)
  • components/channel/chat-message-topbar.tsx (1 hunks)
  • components/channel/message-topbar/first-phase.tsx (1 hunks)
  • components/channel/message-topbar/fourth-phase.tsx (1 hunks)
  • components/channel/message-topbar/second-phase.tsx (1 hunks)
  • components/channel/message-topbar/third-phase.tsx (1 hunks)
  • components/collaboration/collaboration-details/ApplicationsTabContent.tsx (1 hunks)
  • constants/ChatMessageTopbar.ts (1 hunks)
  • hooks/request/use-applications.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • constants/ChatMessageTopbar.ts
🔇 Additional comments (11)
components/channel/message-topbar/fourth-phase.tsx (2)

1-2: Imports look good.
No issues identified here.


12-12: Export usage is fine.
If preferred, we could use a named export, but a default export is acceptable in this context.

components/channel/chat-message-topbar.tsx (1)

10-24: Conditional rendering is clear.
The branching logic is straightforward, and each phase is well-isolated in its own component. This promotes maintainability.

components/channel/message-topbar/second-phase.tsx (3)

1-9: Imports are consistent.
Dependencies are properly declared and used. No immediate concerns here.


13-26: Unused Pressable handler.
Currently, this Pressable has no onPress event. Confirm if this is intentional or if you plan to add functionality in a future iteration.


29-29: Export looks fine.
No issues identified.

components/channel/message-topbar/first-phase.tsx (3)

1-5: Imports are correct.
No refactoring needed here.


7-39: Action handlers need implementation.
There are TODO comments in the onPress handlers. If these tasks are necessary before release, ensure they’re tracked via an issue or integrated in this PR.


42-42: Default export is acceptable.
No issues identified.

hooks/request/use-applications.tsx (1)

13-19: Great improvement in type safety.

Defining data with a dedicated collaboration object clarifies the expected shape, reducing errors during integration. Ensure any other references to data in the codebase have been updated accordingly.

✅ Verification successful

Let me gather more information to verify the references to data in the codebase.


Let me try a different approach to verify the references to data structure.


Let me check one more thing to verify all references to the data structure.


Based on the search results, I can now provide the final response:

Type changes are properly aligned across the codebase

The data.collaboration structure is consistently used across the codebase:

  • In hooks/request/use-applications.tsx where it's defined
  • In components/BottomSheetActions.tsx for creating groups and notifications
  • In components/NotificationCard.tsx for handling collaboration IDs

All references to the data structure with collaboration property are using the same shape, accessing the expected fields like id and name. The changes to improve type safety have been properly propagated across dependent components.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all references to `data` in the codebase match the new structure.

rg -A 5 $'data:' 

Length of output: 71649


Script:

#!/bin/bash
# Search for data object references with collaboration property
ast-grep --pattern $'data: {
  collaboration: {
    $$$
  }
}'

Length of output: 63


Script:

#!/bin/bash
# Search for references to data.collaboration
rg -A 3 "data\.collaboration" 

Length of output: 1914


Script:

#!/bin/bash
# Search for type definitions and interfaces related to data structure
rg -A 5 "interface.*\{|type.*\{" hooks/request/use-applications.tsx

Length of output: 198

components/collaboration/collaboration-details/ApplicationsTabContent.tsx (1)

76-78: Consistent usage with the new interface.

Wrapping collaboration under data aligns perfectly with the updated UseApplicationsProps signature. This better enforces the typed contract between components and the hook.

Comment on lines +36 to +47
<FeedbackModal
onSubmit={(
rating: number,
feedback: string,
) => {
console.log(rating, feedback);
setFeedbackModalVisible(false);
}}
isVisible={feedbackModalVisible}
setIsVisible={setFeedbackModalVisible}
theme={theme}
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Protect feedback from being casually logged.
Logging user feedback and rating with console.log might inadvertently leak sensitive or personal user content. If the feedback is meant to be stored or processed, consider using a secure or legitimate API endpoint for data handling.

- console.log(rating, feedback);
+ // e.g. pass rating & feedback to a secure endpoint
+ handleSubmitFeedback(rating, feedback);

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +58 to +60
<ChatMessageTopbar
status={0}
/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Clarify or elevate the “status” prop usage.
Passing a plain numeric literal (status={0}) makes the code’s intent unclear. If statuses exist as an enum or dictionary, referencing them can prevent confusion and bugs.

- <ChatMessageTopbar
-   status={0}
- />
+ <ChatMessageTopbar
+   status={CHAT_STATUS.INITIAL} /* or another descriptive constant */
+ />

Committable suggestion skipped: line range outside the PR's diff.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (10)
components/collaboration/collaboration-details/InvitationsTabContent.tsx (1)

98-98: Naming consistency suggestion.
Consider renaming invitationColRef to something more descriptive (e.g. invitationsCollectionRef) to reflect its purpose and maintain clarity in naming.

utils/router.ts (1)

1-2: Cleanup import usage if not needed.
If the ExpoRouter import doesn't provide any additional types or references beyond what's used in line 4, consider removing line 2 to keep imports concise.

app/(auth)/forgot-password.tsx (3)

21-22: Avoid native alerts in production flows.
Using alert() for form validation feedback can feel intrusive and less consistent across platforms. Consider a non-blocking UI notification mechanism.


26-34: Handle error messages more securely.
While Toaster.error is convenient, ensure sensitive error details (like raw server messages) aren’t leaked to end users. In production, consider mapping or sanitizing the error message.


37-77: Enhance accessibility and design.
Add accessible labels, placeholders, and test for color contrast. For instance, ensure that the displayed text and background colors meet WCAG guidelines.

app/(onboarding)/onboarding-your-brand.tsx (1)

92-97: Consider using booleans for firstBrand.
You're comparing "true" as a string, which might lead to confusion if the value isn't exactly "true".

A more robust approach would parse firstBrand into a boolean, avoiding string checks:

- firstBrand: firstBrand === "true" ? "true" : "false",
+ firstBrand: firstBrand === "true",
app/(onboarding)/onboarding-get-started.tsx (2)

52-52: Extra line.
This empty line is fine but not strictly necessary. Keep it for clarity if you prefer separation of concerns.


58-58: Error handling.
Adding a try/catch block is great for robust error handling. Consider adding a custom message for more detail if the document update fails.

contexts/auth-context.provider.tsx (2)

50-50: Consider throwing an error if setSession is called outside the provider.

Using a no-op outside the provider might cause silent failures if accidentally invoked in the wrong scope. For improved DX, throwing an error can alert developers.

- setSession: () => null,
+ setSession: () => {
+   throw new Error("setSession called outside AuthContext provider.");
+ },

143-143: Use consistent async/await instead of mixing .then() in signUp.

Replace the promise chain with a pure async/await approach to enhance clarity and reduce nested callbacks.

- await createUserWithEmailAndPassword(AuthApp, email, password)
-   .then(async (userCredential) => {
-     ...
-   })
-   .catch((error) => {
-     ...
-   });
+ try {
+   const userCredential = await createUserWithEmailAndPassword(
+     AuthApp,
+     email,
+     password
+   );
+   // ... rest of your logic here
+ } catch (error) {
+   // ... handle error
+ }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5a468a and 0e4d882.

📒 Files selected for processing (12)
  • app/(auth)/_layout.tsx (1 hunks)
  • app/(auth)/create-new-account.tsx (1 hunks)
  • app/(auth)/forget-password.tsx (0 hunks)
  • app/(auth)/forgot-password.tsx (1 hunks)
  • app/(auth)/login.tsx (1 hunks)
  • app/(auth)/signup.tsx (0 hunks)
  • app/(onboarding)/onboarding-get-started.tsx (6 hunks)
  • app/(onboarding)/onboarding-your-brand.tsx (1 hunks)
  • components/collaboration/collaboration-details/InvitationsTabContent.tsx (4 hunks)
  • components/drawer-layout/DrawerMenuContent.tsx (1 hunks)
  • contexts/auth-context.provider.tsx (5 hunks)
  • utils/router.ts (1 hunks)
💤 Files with no reviewable changes (2)
  • app/(auth)/forget-password.tsx
  • app/(auth)/signup.tsx
🔇 Additional comments (25)
components/collaboration/collaboration-details/InvitationsTabContent.tsx (3)

16-16: Use of setDoc import is consistent with the updated logic.
No issues spotted. This import lines up well with your transition from addDoc to setDoc.


228-230: Arrow function usage in button press handler.
Wrapping the function call in an arrow function is a fine approach for clarity. No functional issues here.


113-115: Validate overwriting vs merging behavior.
Using setDoc(...) without merge options can overwrite existing data at this doc ID if it already exists. If partial updates are desired, you could pass an options parameter like { merge: true }. Please verify if the current behavior aligns with your desired outcome.

You can apply the following diff to enable merging:

-await setDoc(invitationDocRef, invitationPayload).then(() => {
+await setDoc(invitationDocRef, invitationPayload, { merge: true }).then(() => {
✅ Verification successful

Current behavior of overwriting the document is correct
The code creates a complete invitation document with all required fields. Using setDoc without merge ensures each influencer can only have one active invitation and prevents stale data from previous invitations from persisting. No changes needed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Error: No shell scripts found


Script:

#!/bin/bash
# Find the invitationPayload construction and surrounding context
rg -B 10 -A 5 "invitationPayload" components/collaboration/collaboration-details/InvitationsTabContent.tsx

# Look for other Firestore operations on invitation documents
rg "invitationColRef|invitationDocRef" components/collaboration/collaboration-details/InvitationsTabContent.tsx

# Find similar setDoc patterns in the codebase
ast-grep --pattern 'setDoc($_, $_, { merge: true })'
ast-grep --pattern 'setDoc($_, $_)'

Length of output: 2556

utils/router.ts (1)

4-10: Confirm multi-stack dismissal logic.
Using router.canGoBack() followed by router.dismissAll() can be desirable to clear multiple stack screens. Ensure this behavior is intended, as it may prevent users from returning to previous screens.

app/(auth)/_layout.tsx (2)

26-26: Consistent naming for signup route.
Renaming the screen to "create-new-account" clearly communicates the action to the user. This change aligns well with readable, descriptive routing.


32-32: Route clarity improvement for forgot password.
Changing "forget-password" to "forgot-password" is more natural and user-friendly.

app/(auth)/login.tsx (2)

71-71: Evaluate replace vs. navigate.
Switching from router.navigate to router.replace removes the screen history. Confirm that this is desirable, as users may not be able to tap back to return to Login after sign-up.


79-79: Ensure consistent UX for “forgot-password” route.
Using router.replace ensures a fresh path forward, but double-check if the original navigation stack is needed for a backward flow.

app/(auth)/forgot-password.tsx (2)

29-29: Evaluate replacing the router stack.
Redirecting users back to login with router.replace("/(auth)/login") prevents them from returning to this screen via back navigation. Verify that this is the desired flow after a password reset email is sent.


82-82: Export name aligned with component identity.
Renaming the component default export to ForgotPasswordScreen is a clear improvement in code readability.

app/(auth)/create-new-account.tsx (1)

104-104: Validate the navigation flow for user experience.
Switching from router.navigate to router.replace means the user can't go back to the sign-up screen.

Do you want to confirm that this is the desired behavior (preventing back navigation after sign-up)?

components/drawer-layout/DrawerMenuContent.tsx (1)

244-246: Leverage object-based navigation to pass more route parameters.
Switching to an object argument is good for future extensibility. If you need to pass query params or other data, adding them to the object now becomes simpler.

app/(onboarding)/onboarding-get-started.tsx (9)

15-15: Helpful addition.
Importing Toaster is a good step, ensuring users receive prompt feedback.


21-21: Session management approach.
Replacing firebaseSignIn with setSession is a clearer pattern for session handling.


38-41: Destructure local search params.
Retrieving brandId and firstBrand directly enhances readability.


69-69: Potential merge conflict.
If another part of the app modifies the same survey field, merging is safe, but watch out for deeper nested object merges.


78-79: Consistent navigation approach.
Calling router.replace("/explore-influencers") aligns with your broader shift away from router.navigate. This helps maintain a uniform stack pattern.


95-95: "Skip" usage.
Confirm that skipping the survey is allowed if there's incomplete brand data. You might want to ensure minimal brand setup first.


222-222: Button event clarity.
The handleSubmit call is clearly bound to the “Take me in” or “Submit” button. No issues spotted.


228-228: Button label matches context.
Dynamically changing the text to “Take me in” or “Submit” is helpful for a customized user flow.


47-51: Check user session validity.
handleSkip sets the session to the current user’s UID and immediately navigates away. Ensure AuthApp.currentUser is non-null.

Generate a quick script to scan for calls to handleSkip to ensure user context is always available:

contexts/auth-context.provider.tsx (4)

30-30: Great introduction of resetAndNavigate.

This helps unify navigation logic in a single utility function, improving code organization.


36-36: setSession addition looks good.

Encapsulating session updates in a single method improves maintainability and reduces duplication.


264-264: Returning setSession from the provider is consistent.

This ensures the updated session state is properly exposed to consumers of AuthContext.


174-179: Confirm correct handling of parameters in resetAndNavigate.

Using a string literal "true" might work for route parameters. However, if it's intended as a boolean, ensure the destination route logic aligns with string-based checks.

✅ Verification successful

Parameter handling in resetAndNavigate is correctly implemented

The firstBrand parameter is consistently handled as a string with proper string-based comparisons (=== "true") throughout the codebase, including the destination route.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify usage of the 'firstBrand' param
rg -A 5 'firstBrand'

Length of output: 3439

@dev-rathore
dev-rathore merged commit e8f4328 into dev Jan 7, 2025
dev-rathore added a commit that referenced this pull request Jan 7, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
dev-rathore added a commit that referenced this pull request Jan 10, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

* ui fix

* Redirection fixes (#59)

* fix: initial redirections

* scheme change

* router navigate fix

* router navigate fix

* Redirection changes (#61)

* redirection changes

* redirection changes

* image component and other fixes

* No brands protected screen implementation (#64)

* added no brands protected screen and shimmer ui

* shimmer ui update

* added loading indicator

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
dev-rathore added a commit that referenced this pull request Jan 15, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

* ui fix

* Redirection fixes (#59)

* fix: initial redirections

* scheme change

* router navigate fix

* router navigate fix

* Redirection changes (#61)

* redirection changes

* redirection changes

* image component and other fixes

* No brands protected screen implementation (#64)

* added no brands protected screen and shimmer ui

* shimmer ui update

* added loading indicator

* brand protected screen bug fix

* shared-uis conflict

* shared-uis conflict

* fix: build

* pushed ui fixes

* social button change

* Bug fixes (#68)

* bug fixes

* bug fixes

* message screen fix

* pushed ui fix

* pushed icons

* Bug fixes (#69)

* bug fixes

* render html, location address, and rating section

* refactored code

* refactor

* refactor

* location address changes

* messages icons changes

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
dev-rathore added a commit that referenced this pull request Jan 23, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

* ui fix

* Redirection fixes (#59)

* fix: initial redirections

* scheme change

* router navigate fix

* router navigate fix

* Redirection changes (#61)

* redirection changes

* redirection changes

* image component and other fixes

* No brands protected screen implementation (#64)

* added no brands protected screen and shimmer ui

* shimmer ui update

* added loading indicator

* brand protected screen bug fix

* shared-uis conflict

* shared-uis conflict

* fix: build

* pushed ui fixes

* social button change

* Bug fixes (#68)

* bug fixes

* bug fixes

* message screen fix

* pushed ui fix

* pushed icons

* Bug fixes (#69)

* bug fixes

* render html, location address, and rating section

* refactored code

* refactor

* refactor

* location address changes

* messages icons changes

* pushed new icons

* pushed brand modal fixes

* pushed changes

* Icons changes (#73)

* icons changes

* icons changes

* email verification

* changed icon

* pushed slight change to dev for a slight route change

* merge conflict

* refactor code (#75)

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
@coderabbitai coderabbitai Bot mentioned this pull request Jan 27, 2025
dev-rathore added a commit that referenced this pull request Jan 27, 2025
* pushed new contract screens

* fixed member container

* Redesign application and invitation cards (#51)

* redesign application and invitation cards

* added keyboard view

* fixes

* added underline in file attachment

* ui-feedback

* added work

* minor changes

* Repurpose messaging screen (#53)

* repurpose messaging screen

* accept application changes

* added phases

* invitationId as influencerId

* fixed signup signin

* fix: bug on brand creation

* minor changes

* minor changes

* minor changes

* minor changes

* pushed a minor change

* fix: accept application (#56)

* fix: accept application

* fix: managerId

* ui fix

* Redirection fixes (#59)

* fix: initial redirections

* scheme change

* router navigate fix

* router navigate fix

* Redirection changes (#61)

* redirection changes

* redirection changes

* image component and other fixes

* No brands protected screen implementation (#64)

* added no brands protected screen and shimmer ui

* shimmer ui update

* added loading indicator

* brand protected screen bug fix

* shared-uis conflict

* shared-uis conflict

* fix: build

* pushed ui fixes

* social button change

* Bug fixes (#68)

* bug fixes

* bug fixes

* message screen fix

* pushed ui fix

* pushed icons

* Bug fixes (#69)

* bug fixes

* render html, location address, and rating section

* refactored code

* refactor

* refactor

* location address changes

* messages icons changes

* pushed new icons

* pushed brand modal fixes

* pushed changes

* Icons changes (#73)

* icons changes

* icons changes

* email verification

* changed icon

* pushed slight change to dev for a slight route change

* merge conflict

* refactor code (#75)

* feedbacks resolved (#77)

* pushed changes

* Feedbacks resolved (#79)

* feedbacks resolved

* max width refactor

* removed unused imports

* reusable component fix

---------

Co-authored-by: Manan Sharma <112090668+Manan-Sharma-5@users.noreply.github.com>
@coderabbitai coderabbitai Bot mentioned this pull request Jan 31, 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.

2 participants