-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat(stably): navigate to magic link url on main #282
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
❌ Changes requested. Reviewed everything up to 73e6e8f in 2 minutes and 20 seconds
More details
- Looked at
37
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
7
drafted comments based on config settings.
1. apps/app-config/constants.ts:50
- Draft comment:
Using includes() on getServerUrl(null) may be brittle for environment detection. Consider a more robust check for the main preview URL. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
The new code follows the exact same pattern as the existing isProd check. The getServerUrl function seems to handle various environments robustly. While string matching with includes() isn't perfect, it's a common pattern in Next.js apps for environment detection. The comment doesn't provide a specific better alternative. The code seems reasonable given the context.
The comment raises a valid point that string matching can be fragile. A more explicit environment variable check could be more reliable.
However, this is a common pattern in Next.js, the code follows existing conventions in the file, and without a specific better alternative, the comment isn't actionable enough to be useful.
The comment should be removed as it's not actionable enough and the code follows established patterns in the codebase.
2. apps/web/app/dashboard/(authenticated)/connect/page.tsx:161
- Draft comment:
Redirecting via window.location.href bypasses the copyToClipboard logic and still triggers a toast message. Consider adjusting the user feedback or handling to avoid confusion. - Reason this comment was not posted:
Marked as duplicate.
3. apps/app-config/constants.ts:50
- Draft comment:
Avoid hard-coding the preview domain. Consider parameterizing the main preview URL via an env variable for flexibility. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50%
The comment has merit since hardcoding URLs can be inflexible. However, this appears to be a Vercel-specific preview URL pattern that's likely stable. The code already handles environment variables in getServerUrl(), so the author likely made a deliberate choice here. The comment isn't pointing out a clear problem that needs fixing - it's more of a preference or hypothetical improvement.
The suggestion could make the code more configurable for different environments. The current hardcoded approach might cause issues if the preview URL pattern changes.
While more flexibility could be useful, there's no clear immediate need for it. The preview URL appears to be a stable Vercel-specific pattern, and the code already handles various environment configurations where needed.
Delete the comment. It suggests a hypothetical improvement without demonstrating a clear need, and the current implementation appears to be a deliberate choice given the existing environment handling in the codebase.
4. apps/web/app/dashboard/(authenticated)/connect/page.tsx:161
- Draft comment:
Redirecting with window.location.href may interrupt further execution. Confirm that any additional side effects (like cleanup) are not needed in the redirect branch. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
5. apps/web/app/dashboard/(authenticated)/connect/page.tsx:70
- Draft comment:
Typo: Consider changing 'What to call user by' to 'What to call the user' for clarity. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. apps/web/app/dashboard/(authenticated)/connect/page.tsx:105
- Draft comment:
Typo: Replace 'comma separated' with 'comma-separated' in the description for connector names. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. apps/web/app/dashboard/(authenticated)/connect/page.tsx:114
- Draft comment:
Typo: Replace 'comma separated' with 'comma-separated' in the description for integration IDs. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_sBJqKOB7TRRS3YS3
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
window.location.href = data.url | ||
} else { | ||
await copyToClipboard(data.url) | ||
} | ||
toast({ | ||
title: 'Magic link copied to clipboard', |
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.
The success toast always says 'Magic link copied to clipboard', even when redirecting via window.location.href. Consider updating or conditionally showing a more appropriate message.
title: 'Magic link copied to clipboard', | |
title: isMainPreview ? 'Redirecting to magic link' : 'Magic link copied to clipboard', |
✨ No issues found! Your code is sparkling clean! ✨ |
Important
Navigate to magic link URL in
MagicLinkPage
ifisMainPreview
is true, otherwise copy to clipboard.MagicLinkPage
, ifisMainPreview
is true, navigate todata.url
instead of copying it to clipboard.isMainPreview
toconstants.ts
to check if the server URL includes 'openint-git-main-openint-dev.vercel.app'.This description was created by
for 73e6e8f. It will automatically update as commits are pushed.