-
Notifications
You must be signed in to change notification settings - Fork 153
fix: new infinite signup redirect for staging and development #1133
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: develop
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
WalkthroughModified the development HOME URL from a root path to a subdomain-based configuration using existing environment variables, and augmented LoginService redirect logic to prevent redirects when users are on the '/new-signup' path, allowing them to complete signup without being redirected away. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
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: 1
🤖 Fix all issues with AI agents
In `@app/services/login.js`:
- Around line 35-43: The code reads window.location.pathname and calls
window.location.replace() unguarded; wrap those accesses with the FastBoot guard
already injected on the service by checking this.fastboot.isFastBoot (or its
negation) before touching window. Concretely, only compute currentPath from
window.location.pathname and call window.location.replace(AUTH.SIGN_UP) when
this.fastboot.isFastBoot is false (and keep the existing conditions
user.incompleteUserDetails and !this.featureFlag.isDevMode); alternatively wrap
the entire redirect block (the currentPath variable, the conditional using
featureFlag.isDevMode, and the call to window.location.replace) in a
not-FastBoot check so server-side rendering won’t access window.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
app/constants/urls.jsapp/services/login.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build (18.x)
🔇 Additional comments (1)
app/constants/urls.js (1)
36-36: LGTM, but note the mixed URL pattern in development config.The change to use
https://dev.realdevsquad.comfor HOME aligns with the PR objective. This ensuresAUTH.SIGN_UPresolves to a full URL, which is necessary forwindow.location.replace()to work correctly in the login service.However, note that other development URLs (GOTO, EVENTS, PROFILE, IDENTITY, MY_STATUS) remain as relative paths while HOME is now absolute. This inconsistency is acceptable if intentional, but consider documenting this pattern or aligning all URLs for consistency in a future refactor.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Deploying www-rds with
|
| Latest commit: |
8ffe062
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://628a7e32.www-rds.pages.dev |
| Branch Preview URL: | https://fix-login-redirect.www-rds.pages.dev |
| import { setupTest } from 'website-www/tests/helpers'; | ||
| import { visit } from '@ember/test-helpers'; | ||
| import Service from '@ember/service'; | ||
|
|
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.
this login stub is required to prevent flaky behaviour for tests with login redirect and from browser timeout issues
| user.incompleteUserDetails && | ||
| !this.featureFlag.isDevMode && | ||
| !this.fastboot.isFastBoot && | ||
| window.location.pathname !== '/new-signup' |
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.
what is the logic behind this change?
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.
stopping redirection if user is already on new-signup route
(it was earlier causing infinite redirection loop on new signup page for new users)
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.
What was the reason for the loop?
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.
What was the reason for the loop?
issue #1132
I am facing the same thing
| if ( | ||
| user.incompleteUserDetails && | ||
| !this.featureFlag.isDevMode && | ||
| !this.fastboot.isFastBoot && | ||
| window.location.pathname !== '/new-signup' | ||
| ) { | ||
| window.location.replace(AUTH.SIGN_UP); | ||
| } |
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.
Quick question, why is the window.location being used for route transition?
Why not use ember router service?
Date: 15-01-26
Developer Name: @MayankBansal12
Issue Ticket Number:-
Description:
/new-signupHOMEvariable in development environment to usedev.realdevsquad.comIs Under Feature Flag
Database changes
Breaking changes (If your feature is breaking/missing something please mention pending tickets)
Is Development Tested?
Tested in staging?
Add relevant Screenshot below ( e.g test coverage etc. )
screencast
Screencast.from.2026-01-15.02-31-37.mp4