Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 33 minutes and 48 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR introduces a new sign-up page with GitHub App integration and FAQ section, refactors the Particles component with index re-export and named export, simplifies the login page UI by removing marketing content, and registers the new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
| pl={60} | ||
| visibleFrom="md" | ||
| style={{ | ||
| borderLeft: "1px solid var(--mantine-color-dark-4)", | ||
| flex: 1, |
There was a problem hiding this comment.
The installation URL contains dev-sweetr-dev, which looks like a development/staging app name rather than the production GitHub App. Users clicking "Install GitHub App" would land on the wrong app and fail to sign up.
If this intentionally varies between environments, it should be driven by an env variable (e.g. VITE_GITHUB_APP_URL) rather than hardcoded.
| pl={60} | |
| visibleFrom="md" | |
| style={{ | |
| borderLeft: "1px solid var(--mantine-color-dark-4)", | |
| flex: 1, | |
| href="https://github.com/apps/sweetr-dev/installations/new" |
| href="https://docs.sweetr.dev/about/data-privacy-and-security" | ||
| target="_blank" | ||
| > | ||
| documentation | ||
| </Anchor>{" "} | ||
| for more details. | ||
| </> | ||
| ), | ||
| }, | ||
| { | ||
| value: "permissions", | ||
| icon: IconLock, |
There was a problem hiding this comment.
Missing
rel="noopener noreferrer" on target="_blank" anchors
Both Anchor components in the FAQ open target="_blank" but omit rel="noopener noreferrer". While modern browsers default to noopener for blank targets, noreferrer is still needed to avoid leaking the Referer header to third-party docs links. The same fix should be applied to the second Anchor around line 65.
| href="https://docs.sweetr.dev/about/data-privacy-and-security" | |
| target="_blank" | |
| > | |
| documentation | |
| </Anchor>{" "} | |
| for more details. | |
| </> | |
| ), | |
| }, | |
| { | |
| value: "permissions", | |
| icon: IconLock, | |
| <Anchor | |
| href="https://docs.sweetr.dev/about/data-privacy-and-security" | |
| target="_blank" | |
| rel="noopener noreferrer" | |
| > |
There was a problem hiding this comment.
These are my own websites
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/web/src/app/auth/login/page.tsx`:
- Around line 68-79: The Start 14-day free trial Button is incorrectly bound to
the auth provider query loading state (useAuthProviderQuery) via the loading
prop (loading={isLoading}), which disables and shows a spinner for a control
that only navigates to /sign-up; remove the loading={isLoading} binding from the
Button (or only set loading when the button actually triggers behavior depending
on data?.authProvider.redirectUrl) so the Button/Link (component={Link},
to="/sign-up") remains clickable regardless of the auth provider fetch.
In `@apps/web/src/app/auth/sign-up/page.tsx`:
- Around line 31-44: The FAQ answer string in the JSX (the answer prop in the
question object) has incorrect verb agreement and a missing preposition; update
the sentence in the answer JSX (inside the fragment used for the "Does the
GitHub app have access to my source code?" entry) to read something like: "No.
Sweetr only asks for access to metadata about organization members and their
pull requests. You can check the documentation for more details." Ensure the
Anchor component and surrounding punctuation remain unchanged.
- Line 122: Replace the hardcoded GitHub App install URL on the sign-up page
with the env-driven constant: import and use the installGithubAppUrl constant
(the same one used by navbar-user) instead of the literal
"https://github.com/apps/dev-sweetr-dev/installations/new"; update the href to
href={installGithubAppUrl} and ensure the import for installGithubAppUrl is
added where the sign-up page component is defined.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b666bcbd-9ce0-441a-8b1f-9301c744920e
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (7)
apps/web/src/app/auth/components/particles/index.tsapps/web/src/app/auth/components/particles/mouse-position.tsxapps/web/src/app/auth/components/particles/particles.tsxapps/web/src/app/auth/login/page.tsxapps/web/src/app/auth/sign-up/page.module.cssapps/web/src/app/auth/sign-up/page.tsxapps/web/src/routes.tsx
There was a problem hiding this comment.
2 issues found across 8 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/web/src/app/auth/sign-up/page.tsx">
<violation number="1" location="apps/web/src/app/auth/sign-up/page.tsx:38">
P2: Add `rel="noopener noreferrer"` to external links that use `target="_blank"`.</violation>
<violation number="2" location="apps/web/src/app/auth/sign-up/page.tsx:84">
P2: Avoid mutating `document.body` in the render path; move this into an effect with cleanup so the background is restored on unmount.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| @@ -0,0 +1,196 @@ | |||
| import { | |||
There was a problem hiding this comment.
P2: Add rel="noopener noreferrer" to external links that use target="_blank".
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/src/app/auth/sign-up/page.tsx, line 38:
<comment>Add `rel="noopener noreferrer"` to external links that use `target="_blank"`.</comment>
<file context>
@@ -0,0 +1,196 @@
+ their pull requests. You can check the{" "}
+ <Anchor
+ href="https://docs.sweetr.dev/about/data-privacy-and-security"
+ target="_blank"
+ >
+ documentation
</file context>
| ]; | ||
|
|
||
| export const SignUpPage = () => { | ||
| document.body.style.backgroundColor = "#141517"; |
There was a problem hiding this comment.
P2: Avoid mutating document.body in the render path; move this into an effect with cleanup so the background is restored on unmount.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/src/app/auth/sign-up/page.tsx, line 84:
<comment>Avoid mutating `document.body` in the render path; move this into an effect with cleanup so the background is restored on unmount.</comment>
<file context>
@@ -0,0 +1,196 @@
+];
+
+export const SignUpPage = () => {
+ document.body.style.backgroundColor = "#141517";
+
+ return (
</file context>
Greptile Summary
This PR introduces a new
/sign-uppage with a GitHub App install CTA and an FAQ accordion, and refactors the login page to a simpler two-button layout. The sharedParticlescomponent is extracted toauth/components/particles/so both pages can use it. The GitHub App URL is now correctly driven by theGITHUB_APPenv variable viainstallGithubAppUrl.Confidence Score: 5/5
Safe to merge; findings are P2 style/cosmetic issues only.
No P0 or P1 issues introduced. The two findings are a missing color prop on ThemeIcon (visual-only) and duplicated CSS — neither affects functionality or security.
apps/web/src/app/auth/components/particles/particles.tsx — the rAF leak and
any[]type issues from prior review rounds are still unresolved.Important Files Changed
item.coloris declared in FAQ_ITEMS but never forwarded to ThemeIcon.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["User visits /login"] --> B{Has account?} B -- Yes --> C["Login with GitHub\nOAuth redirect"] B -- No --> D["Start 14-day free trial\nLink to /sign-up"] D --> E["SignUpPage"] E --> F["Install GitHub App\nhref = installGithubAppUrl"] F --> G["GitHub OAuth callback\n/auth/callback"] G --> H["Workspace setup\n/github/install"] E --> I["Back to login"] C --> GComments Outside Diff (2)
apps/web/src/app/auth/components/particles/particles.tsx, line 37-44 (link)animate()recursively schedules itself viawindow.requestAnimationFrame(animate)but the cleanup function only removes the resize listener. When the component unmounts (e.g. user navigates away from login/sign-up), the loop keeps running indefinitely, leaking CPU and the closed-overcirclesref data.Store the frame ID and cancel it on cleanup:
Also update the
animatefunction body to userafId.current = window.requestAnimationFrame(animate)instead of the bare call.apps/web/src/app/auth/components/particles/particles.tsx, line 27 (link)any[]type forcirclesrefcirclesis typed asany[]while theCircletype is already defined within the component. Using the proper type enables compile-time checks when reading or writing circle properties. Moving theCircletype definition outside the component body would make it available at this declaration site.Reviews (2): Last reviewed commit: "fix: review comments" | Re-trigger Greptile