Skip to content

feat: sign-up page#110

Merged
waltergalvao merged 2 commits intomainfrom
feat/sign-up-page
Apr 26, 2026
Merged

feat: sign-up page#110
waltergalvao merged 2 commits intomainfrom
feat/sign-up-page

Conversation

@waltergalvao
Copy link
Copy Markdown
Contributor

@waltergalvao waltergalvao commented Apr 26, 2026

Greptile Summary

This PR introduces a new /sign-up page with a GitHub App install CTA and an FAQ accordion, and refactors the login page to a simpler two-button layout. The shared Particles component is extracted to auth/components/particles/ so both pages can use it. The GitHub App URL is now correctly driven by the GITHUB_APP env variable via installGithubAppUrl.

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

Filename Overview
apps/web/src/app/auth/sign-up/page.tsx New sign-up page with GitHub App install CTA, FAQ accordion, and particles background; item.color is declared in FAQ_ITEMS but never forwarded to ThemeIcon.
apps/web/src/app/auth/sign-up/page.module.css New CSS module for sign-up page; contents are identical to login/page.module.css — duplication candidate for extraction.
apps/web/src/app/auth/login/page.tsx Simplified login page — removes DORA benchmarks panel, adds a "Start 14-day free trial" button linking to /sign-up, imports refactored to shared Particles component.
apps/web/src/app/auth/components/particles/particles.tsx Particles component moved to shared location; rAF loop is never cancelled on unmount and circles ref is typed as any[] — both flagged in prior review comments.
apps/web/src/routes.tsx Adds /sign-up route alongside /login in the auth layout; straightforward change.

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 --> G
Loading

Comments Outside Diff (2)

  1. apps/web/src/app/auth/components/particles/particles.tsx, line 37-44 (link)

    P1 Animation loop never cancelled on unmount

    animate() recursively schedules itself via window.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-over circles ref data.

    Store the frame ID and cancel it on cleanup:

      const rafId = useRef<number>(0);
    
      useEffect(() => {
        if (canvasRef.current) {
          context.current = canvasRef.current.getContext("2d");
        }
        initCanvas();
        rafId.current = window.requestAnimationFrame(animate);
        window.addEventListener("resize", initCanvas);
    
        return () => {
          window.removeEventListener("resize", initCanvas);
          window.cancelAnimationFrame(rafId.current);
        };
      }, []);
    

    Also update the animate function body to use rafId.current = window.requestAnimationFrame(animate) instead of the bare call.

  2. apps/web/src/app/auth/components/particles/particles.tsx, line 27 (link)

    P2 any[] type for circles ref

    circles is typed as any[] while the Circle type is already defined within the component. Using the proper type enables compile-time checks when reading or writing circle properties. Moving the Circle type definition outside the component body would make it available at this declaration site.

Reviews (2): Last reviewed commit: "fix: review comments" | Re-trigger Greptile

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

Warning

Rate limit exceeded

@waltergalvao has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 48 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b4bb2d32-dd04-4bf2-9129-07eb1a988b6c

📥 Commits

Reviewing files that changed from the base of the PR and between 6a9a95d and 7919b3c.

📒 Files selected for processing (2)
  • apps/web/src/app/auth/login/page.tsx
  • apps/web/src/app/auth/sign-up/page.tsx

Walkthrough

This 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 /sign-up route in the application router.

Changes

Cohort / File(s) Summary
Particles Component
apps/web/src/app/auth/components/particles/index.ts, apps/web/src/app/auth/components/particles/particles.tsx
Creates index entry point re-exporting Particles; changes Particles from default export to named export (export function Particles).
Authentication Pages
apps/web/src/app/auth/login/page.tsx, apps/web/src/app/auth/sign-up/page.tsx, apps/web/src/app/auth/sign-up/page.module.css
Login page simplified with GitHub button and sign-up redirect; new sign-up page added with GitHub App CTA, FAQ accordion, and particle background; CSS module added for page styling and layout.
Route Configuration
apps/web/src/routes.tsx
New /sign-up route registered within public route group, importing both LoginPage and SignUpPage components.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • sweetrdev
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose, motivation, and key changes of the sign-up page implementation.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: sign-up page' directly and clearly describes the main change: adding a new sign-up page component with related routing and styling updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sign-up-page

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.

sweetrdev
sweetrdev previously approved these changes Apr 26, 2026
Comment on lines +136 to +140
pl={60}
visibleFrom="md"
style={{
borderLeft: "1px solid var(--mantine-color-dark-4)",
flex: 1,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Hardcoded dev GitHub app URL

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.

Suggested change
pl={60}
visibleFrom="md"
style={{
borderLeft: "1px solid var(--mantine-color-dark-4)",
flex: 1,
href="https://github.com/apps/sweetr-dev/installations/new"

Comment on lines +37 to +48
href="https://docs.sweetr.dev/about/data-privacy-and-security"
target="_blank"
>
documentation
</Anchor>{" "}
for more details.
</>
),
},
{
value: "permissions",
icon: IconLock,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
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"
>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are my own websites

coderabbitai[bot]
coderabbitai Bot previously requested changes Apr 26, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf2eee and 6a9a95d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • apps/web/src/app/auth/components/particles/index.ts
  • apps/web/src/app/auth/components/particles/mouse-position.tsx
  • apps/web/src/app/auth/components/particles/particles.tsx
  • apps/web/src/app/auth/login/page.tsx
  • apps/web/src/app/auth/sign-up/page.module.css
  • apps/web/src/app/auth/sign-up/page.tsx
  • apps/web/src/routes.tsx

Comment thread apps/web/src/app/auth/login/page.tsx
Comment thread apps/web/src/app/auth/sign-up/page.tsx
Comment thread apps/web/src/app/auth/sign-up/page.tsx Outdated
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic

];

export const SignUpPage = () => {
document.body.style.backgroundColor = "#141517";
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Fix with Cubic

@waltergalvao waltergalvao merged commit a353c04 into main Apr 26, 2026
10 checks passed
@waltergalvao waltergalvao deleted the feat/sign-up-page branch April 26, 2026 02:59
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.

2 participants