Skip to content

add support for user/password#110

Merged
galshubeli merged 14 commits intostagingfrom
user-login
Sep 2, 2025
Merged

add support for user/password#110
galshubeli merged 14 commits intostagingfrom
user-login

Conversation

@gkorland
Copy link
Contributor

@gkorland gkorland commented Aug 22, 2025

Summary by CodeRabbit

  • New Features

    • Added email-based sign up and sign in with validation and session handling.
    • Auth methods (Google, GitHub, Email) are now configurable and reflected in the UI.
    • Introduced separate Login and Signup modals with seamless switching.
    • Added a collapsible left toolbar with a burger toggle; defaults adapt to screen size.
  • Refactor

    • Unified login modal naming and removed legacy routes/flows.
  • Style

    • Mobile UX overhaul: responsive toolbar, improved header controls, refined chat input/layout, and padding tweaks to prevent overflow.

@vercel
Copy link

vercel bot commented Aug 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
queryweaver Ready Ready Preview Comment Aug 22, 2025 8:28pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds environment-toggled email authentication alongside existing Google/GitHub OAuth, including backend routes, password utilities, DB user creation/auth, and session handling. Updates validation and caching to recognize email identities. Overhauls login modals to support email sign-in/sign-up. Introduces a collapsible left toolbar and multiple responsive CSS/layout adjustments. Updates frontend modal logic.

Changes

Cohort / File(s) Summary of changes
Backend Auth Enablement & Email Flow
api/auth/user_management.py, api/routes/auth.py
Adds email as an allowed provider; introduces EMAIL_AUTH/GOOGLE_AUTH/GITHUB_AUTH toggles; implements password hashing/verification; adds email signup/login endpoints and models; creates/authenticates email users in graph DB; validates provider enablement; updates sessions; exposes auth config to templates; guards OAuth routes when disabled.
Auth UI Templates
app/templates/components/login_modal.j2
Replaces Google-only modal with generalized login/signup modals; conditionally renders Google/GitHub/email options; adds email forms and toggles; adds no-auth configured messaging and dividers.
Left Toolbar UI/Behavior
app/templates/components/left_toolbar.j2
Adds burger toggle, collapsible behavior, ARIA/state updates, desktop/mobile defaults, and a small public API (window.__leftToolbar). Removes brand slot; moves theme toggle.
Toolbar & Responsive Styling
app/public/css/buttons.css, app/public/css/responsive.css
Introduces collapsed state for left toolbar with mobile-first behavior and a burger button; replaces prior mobile toolbar rules; adjusts container shifts when toolbar open; reworks mobile header/layout and input sizing; adds transitions and overflow guards.
Auth Modal Styling
app/public/css/modals.css
Renames Google-specific modal selectors to generic ones; adds styles for email auth forms, buttons, divider, and footer links.
Chat Mobile Tweaks
app/public/css/chat-components.css
Adds mobile breakpoint: reduces chat-messages padding; constrains chat-container width/overflow and adds margin-left transition.
Frontend Modal Logic
app/ts/modules/modals.ts
Replaces Google-only flow with login/signup modals; wires email login/signup handlers; adds Escape-key logic and modal switching; posts to new endpoints; manages loading states and reloads on login success.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UI as Browser UI
  participant Srv as Server (Routes)
  participant DB as Graph DB
  participant Sess as Session

  rect rgba(200,230,255,0.3)
  note over UI,Srv: Email Signup
  User->>UI: Open Signup Modal
  UI->>Srv: POST /email-signup {first,last,email,pw}
  Srv->>Srv: Validate fields, hash password
  Srv->>DB: Create Identity(User) if not exists
  DB-->>Srv: OK / Conflict
  Srv-->>UI: 200 Created or 409/400
  UI->>User: Show success, switch to Login
  end

  rect rgba(200,255,200,0.3)
  note over UI,Srv: Email Login
  User->>UI: Submit Login {email,pw}
  UI->>Srv: POST /email-login
  Srv->>DB: Fetch Identity(User)
  Srv->>Srv: Verify password
  Srv->>Sess: Set email_authenticated,user_info,token_validated_at
  Srv-->>UI: 200 OK
  UI->>UI: Reload page
  end

  rect rgba(255,245,200,0.3)
  note over UI,Sess: Validate Session (subsequent requests)
  UI->>Srv: Request protected page
  Srv->>Sess: Check email_authenticated && token_validated_at<1h
  Sess-->>Srv: Valid / Expired
  Srv-->>UI: Proceed / Clear session & require login
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Suggested reviewers

  • galshubeli

Poem

A rabbit taps the login door,
Now email joins the OAuth lore.
A burger hop—toolbar hides,
Then peeks back out with smoother strides.
CSS fields where carrots grow,
Bounce to forms—signup, let’s go!
Thump-thump: credentials in a row. 🥕

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch user-login

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 or @coderabbit 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

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@gkorland gkorland changed the base branch from main to staging August 22, 2025 19:22
@gkorland gkorland changed the title User login add support for user/password Aug 22, 2025
@gkorland gkorland linked an issue Aug 22, 2025 that may be closed by this pull request
@gkorland gkorland requested a review from galshubeli August 22, 2025 19:24
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
galshubeli
galshubeli previously approved these changes Sep 2, 2025
@galshubeli galshubeli merged commit 1147551 into staging Sep 2, 2025
9 checks passed
@galshubeli galshubeli deleted the user-login branch September 2, 2025 15:02
@gkorland gkorland linked an issue Sep 3, 2025 that may be closed by this pull request
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.

Users management Allow users to signup with username and password

2 participants