Skip to content

Conversation

@AliGates915
Copy link
Contributor

@AliGates915 AliGates915 commented Aug 25, 2025

Resolved Issue #483.

Feedback form Name field validation implemented.

  • Restricted input to allow only alphabets (A–Z, a–z) and spaces.
  • Blocked invalid characters on typing and pasting.
  • Added regex validation at submit-time for extra safety.

Resloved Issue #478

  1. Membership Page → Fixed button text visibility in dark mode.
52 428695144-f118fc04-e648-4480-b3a4-fcd306b59ee7
  1. Navbar → Improved hover contrast for menu items in dark mode.
54 53
  1. Landing Page → Removed/fixed yellow margin between carousel and feedback form in dark mode.
51 50 4. Login Page → Ensured input field values are visible in dark mode. 53

Summary by CodeRabbit

  • New Features

    • Added “Remember Me” option on Login for persistent sessions and smoother sign-in experience.
    • Introduced client-side validation for the Feedback Form’s Name field (letters and spaces only).
  • Bug Fixes

    • Improved dark mode readability for Login inputs with clearer text color.
  • Style

    • Updated hover styles for Membership buttons and Navbar links for better visual feedback.
    • Adjusted spacing in Review Carousel for improved layout.

@vercel
Copy link

vercel bot commented Aug 25, 2025

@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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Walkthrough

Adds “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

Cohort / File(s) Summary of Changes
Auth flow: Remember Me
frontend/src/components/Pages/Login.jsx
Adds rememberMe state and checkbox; includes rememberMe in login payload; sets cookies (user, token) with lifetimes based on rememberMe; adds success/error handling; enforces dark-mode input text color.
Form validation: Feedback
frontend/src/components/ui/FeedbackForm.jsx
Restricts Name field to letters/spaces via onChange regex; prevents invalid paste; whitespace-only formatting elsewhere.
Styling tweaks: Buttons, Navbar, Carousel
frontend/src/components/Membership.jsx, frontend/src/components/Shared/Navbar.jsx, frontend/src/components/ui/ReviewCarousel.jsx
Membership buttons gain hover text colors (light/dark); Navbar links get consistent text/hover/transition classes; ReviewCarousel switches mb-20 to pb-20.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

bug, level2, gssoc-ext

Suggested reviewers

  • RamakrushnaBiswal

Poem

Hop hop! I flip a switch, remember thee—
Cookies keep the door, with careful key.
Navbar gleams, buttons glow bright,
Names stay tidy, letters just right.
I nibble code, content and merry—
Bound for home, sessions carry! 🐇✨

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@github-actions
Copy link
Contributor

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! 😊

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 since fetch returns 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 992fd5f and dd7e587.

📒 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-20 to pb-20 is 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 onChange and onPaste handlers 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-black for light mode and dark:hover:text-yellow-300 for 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 rememberMe preference 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 secure flag for the auth token is a good security practice.


88-88: LGTM! Dark mode text visibility improved.

The addition of dark:text-white to 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 rememberMe state with clear labeling and appropriate styling.

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