Skip to content

Conversation

@sosweetham
Copy link
Member

@sosweetham sosweetham commented Jan 22, 2026

Description of change

makes the redirects go to root page instead of non existent login page

Issue Number

Closes #630

Type of change

  • Fix (a change which fixes an issue)

How the change has been tested

n/a

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

  • Bug Fixes
    • Updated authentication error handling to redirect users to the home page when session expires or unauthorized access is detected, providing a streamlined and consistent experience across the platform.

✏️ Tip: You can customize this high-level summary in your review settings.

@sosweetham sosweetham requested a review from coodos as a code owner January 22, 2026 08:35
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

The PR updates unauthorized error handling redirects across multiple client components and the API client. When a 401 error occurs, instead of redirecting to login-specific routes ("/api/login" or "/login"), users are now redirected to the root page ("/"). This change addresses the issue where login redirects were causing 404 errors.

Changes

Cohort / File(s) Summary
Modal components
add-wishlist-modal.tsx, find-matches-modal.tsx, group-card.tsx, user-card.tsx
Updated unauthorized error handlers to redirect to "/" instead of "/api/login" following login prompts (4 instances total)
API client
lib/apiClient.ts
Changed 401 response redirect destination from "/login" to "/" while maintaining token cleanup behavior

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • fix: charter login redirect #380: Both PRs modify login redirect behavior to point to the root ("/") instead of dedicated login routes, addressing similar redirect issues.

Suggested reviewers

  • coodos

Poem

🐰 Hops with glee through the root of the site,
No more "/login" causing a fright,
Just "/" now, so clean and so neat,
The redirect adventure is finally complete! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: fixing dreamsync login redirects from non-existent endpoints to the root page.
Description check ✅ Passed The description covers all required template sections with relevant information: explains the change, references the issue, marks type as Fix, completes the checklist, though testing details are minimal.
Linked Issues check ✅ Passed The changes successfully address issue #630 by redirecting unauthorized login attempts from /login (404) to root /, fixing the broken redirect path across all affected components and API client.
Out of Scope Changes check ✅ Passed All five file modifications (add-wishlist-modal, find-matches-modal, group-card, user-card, apiClient) consistently update redirect paths from /api/login or /login to /, directly addressing the issue scope.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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

Comment @coderabbitai help to get the list of available commands and usage tips.

@coodos coodos merged commit bc4243a into main Jan 22, 2026
4 checks passed
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.

[Bug] Dreamsync loging adds /login to return url

3 participants