-
-
Notifications
You must be signed in to change notification settings - Fork 104
Issue #481 and Issue #478 Reslove. #484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@AliGates915 is attempting to deploy a commit to the bunty's projects Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughAdds “Remember Me” logic and cookie handling to Login, enforces name-only input in FeedbackForm, and applies styling tweaks (hover states, colors, spacing) to Membership buttons, Navbar links, and ReviewCarousel. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant L as Login Form
participant A as Auth API
participant C as Cookies
participant R as Router
U->>L: Submit credentials (+ Remember Me)
L->>A: POST /login { email, password, rememberMe }
A-->>L: { user, token } or error
alt Success
L->>C: Set authenticatedUser (1 day)
L->>C: Set authToken (7 days if rememberMe, else 1 hour)
L->>U: Show success message
L->>R: Navigate to "/"
else Error
L->>U: Show error message
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
There was a problem hiding this 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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/components/Pages/Login.jsx (1)
37-38: Fix response validation logic.The condition
if (!response)will never be true sincefetchreturns a Response object. This should check for response success status instead.- if (!response) { + if (!response.ok) { throw new Error(result.message || 'Login failed'); }
🧹 Nitpick comments (2)
frontend/src/components/ui/FeedbackForm.jsx (1)
138-138: Remove unnecessary empty line.There's an extra blank line that should be removed for consistent formatting.
-frontend/src/components/Membership.jsx (1)
132-132: Remove unnecessary empty line.There's an extra blank line that should be removed for consistent formatting.
-
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (5)
frontend/src/components/Membership.jsx(1 hunks)frontend/src/components/Pages/Login.jsx(2 hunks)frontend/src/components/Shared/Navbar.jsx(1 hunks)frontend/src/components/ui/FeedbackForm.jsx(2 hunks)frontend/src/components/ui/ReviewCarousel.jsx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
frontend/src/components/Membership.jsx (2)
frontend/src/components/Pages/Login.jsx (1)
navigate(15-15)frontend/src/components/Shared/Navbar.jsx (1)
navigate(15-15)
🔇 Additional comments (9)
frontend/src/components/ui/ReviewCarousel.jsx (1)
95-95: LGTM! Spacing adjustment improves layout.The change from
mb-20topb-20is appropriate as it moves the spacing from an external margin to internal padding, which provides better layout control and prevents margin collapse issues.frontend/src/components/Shared/Navbar.jsx (1)
117-121: LGTM! Improved dark mode navigation styling.The added className provides consistent text colors and hover effects for both light and dark modes. The multi-line formatting improves readability and the transition effects enhance user experience.
frontend/src/components/ui/FeedbackForm.jsx (1)
121-134: Excellent input validation implementation.The name field validation correctly restricts input to alphabets and spaces only, with both
onChangeandonPastehandlers for comprehensive protection. The regex/^[a-zA-Z\s]*$/properly matches the requirement mentioned in the PR objectives.frontend/src/components/Membership.jsx (1)
109-114: LGTM! Enhanced button hover states for better UX.The hover text color changes (
hover:text-blackfor light mode anddark:hover:text-yellow-300for dark mode) provide better visual feedback. The multi-line className formatting improves code readability.Also applies to: 121-126
frontend/src/components/Pages/Login.jsx (5)
14-14: LGTM! Remember Me functionality added.The new state variable is properly initialized and will be used for persistent login sessions.
32-32: LGTM! Remember Me included in login payload.The login request now properly includes the
rememberMepreference in the request body.
42-48: LGTM! Cookie handling with Remember Me support.The cookie implementation correctly:
- Sets user data cookie with 1-day expiry
- Sets auth token with conditional expiry (7 days if Remember Me, 1 hour otherwise)
- Applies appropriate security flags (
secure,sameSite)The environment-based
secureflag for the auth token is a good security practice.
88-88: LGTM! Dark mode text visibility improved.The addition of
dark:text-whiteto both email and password input fields ensures text is visible in dark mode, addressing the issue mentioned in the PR objectives.Also applies to: 97-97
114-121: LGTM! Remember Me UI implementation.The checkbox is properly wired to the
rememberMestate with clear labeling and appropriate styling.
Resolved Issue #483.
Feedback form Name field validation implemented.
Resloved Issue #478
Summary by CodeRabbit
New Features
Bug Fixes
Style