Skip to content

Landing page v2 + CodeRabbit fixes#2

Open
DhakadG wants to merge 5 commits into
mainfrom
claude/elated-euclid-6c3c87
Open

Landing page v2 + CodeRabbit fixes#2
DhakadG wants to merge 5 commits into
mainfrom
claude/elated-euclid-6c3c87

Conversation

@DhakadG

@DhakadG DhakadG commented May 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Full landing page rebuild around real product features (hero, ticker, anatomy, analytics, self-host, CTA)
  • Redesigned Auth pages (Login/Signup) with glassmorphism AuthCard + eyebrow labels
  • All 6 CodeRabbit review issues resolved

CodeRabbit fixes

  • AuthCard.jsx: forward props.onFocus/props.onBlur so consumer handlers fire through the styled focus/blur
  • AuthCard.jsx: password visibility toggle is now keyboard-reachable (removed tabIndex={-1}, added aria-pressed)
  • LandingPage.jsx: Sparkline guards against NaN coordinates on single-element data arrays (Math.max(data.length - 1, 1))
  • LandingPage.jsx + App.jsx: anatomy grid gets .anatomy-grid class with @media(max-width:600px) single-column override
  • Login.jsx / Signup.jsx: r.json() wrapped in try/catch — non-JSON or empty error responses no longer throw and mask the real error message

Test plan

  • Sign up with invalid password — error banner shows correctly (non-JSON response handled)
  • Log in with wrong credentials — error message displays
  • Password toggle reachable via Tab key, aria-pressed updates on toggle
  • Anatomy grid collapses to single column on mobile (<600px)
  • Sparkline renders without NaN when passed a single data point

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a motion library and app-wide animations plus a redesigned landing page with animated hero, interactive mockup, analytics sections, and improved responsive grids.
  • Bug Fixes
    • Authentication flows now handle non-JSON server responses more gracefully.
  • Style
    • Refreshed Auth card visuals (ambient glow, eyebrow), updated inputs/toggles/buttons/labels, and revised footer CTA text.

Review Change Stack

DhakadG and others added 2 commits May 8, 2026 18:56
Replaces the AI-slop landing page with a redesign anchored in actual
product capabilities. The previous hero used a fake "Try It" demo input
that did nothing (the app requires login to shorten links), and the
features section was a generic 3-col emoji grid that didn't reflect the
real surface area of the product.

Changes:
- LandingPage.jsx — full rewrite with five new sections:
  * Hero with realistic LinkCardMockup mirroring the dashboard's
    LinkRow (animated counter, sparkline, feature pills, top
    countries) instead of a fake input
  * Anatomy of a Link — 8-cell grid of every per-link config option
    (slug, password, click limit, expiry, iOS/Android routing, OG
    metadata, QR), pulled from the actual EditModal fields
  * Analytics showcase — hourly chart, device breakdown, UTM source
    bars, bot detection counter; matches AnalyticsPanel's real surfaces
  * Self-host — three numbered steps with real shell commands
    (gh repo fork, wrangler kv namespace create KV, wrangler deploy)
  * Clean two-col CTA replacing the giant centered gradient block
- Framer Motion entrance + scroll-triggered animations replace the
  old CSS keyframe stagger
- Hero H1 reduced to clamp(2.4rem, 3.6vw, 3.6rem) with display:block
  span so the gradient phrase sits cleanly on its own line
- Ticker dot spacing fixed to 24px on both sides (was 16/48 lopsided)

- AuthCard.jsx — redesigned to match landing aesthetic with eyebrow
  label, ambient glow, deeper glassmorphism, Framer Motion entrance
- Login.jsx / Signup.jsx — eyebrow labels, btn-p shimmer button,
  refined divider copy ("OR EMAIL")
- App.jsx — added .hero-grid, .feat-row-grid, .analytics-wide,
  .analytics-narrow, .self-host-grid responsive rules
- frontend/package.json — adds framer-motion@^12

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- AuthCard: forward props.onFocus/onBlur so consumer handlers still fire
- AuthCard: make password toggle keyboard-accessible (remove tabIndex=-1, add aria-pressed)
- LandingPage: guard Sparkline against NaN on single-data-point arrays
- LandingPage: add anatomy-grid className for mobile single-column layout
- App: add @media(max-width:600px) anatomy-grid responsive rule
- Login/Signup: wrap r.json() in try/catch to handle non-JSON error responses

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4362d68d-4ea9-4f6b-b4be-da113058775c

📥 Commits

Reviewing files that changed from the base of the PR and between dbc6b52 and b7b98de.

📒 Files selected for processing (2)
  • frontend/src/pages/Login.jsx
  • frontend/src/pages/Signup.jsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • frontend/src/pages/Signup.jsx
  • frontend/src/pages/Login.jsx

📝 Walkthrough

Walkthrough

This PR redesigns the landing page with Framer Motion: adds the framer-motion dependency, introduces animated primitives (HeroGlow, Sparkline, Counter, SectionHeading), builds a new hero LinkCardMockup and multiple content sections, updates AuthCard (eyebrow + entrance animation), changes Login/Signup to safely parse non-JSON responses and updates their UI, and adds responsive CSS for the layout.

Changes

Landing Page & Animation Redesign

Layer / File(s) Summary
Dependencies
frontend/package.json
Adds framer-motion ^12.38.0 to dependencies.
Responsive Styling
frontend/src/App.jsx
Adds .hero-grid and .feat-row-grid classes and media queries at 960px, 760px, 700px, 600px breakpoints to reflow and hide elements on small screens.
AuthCard / InputField
frontend/src/components/AuthCard.jsx
Imports Framer Motion; AuthCard now uses motion.div, renders an optional eyebrow, includes ambient glow and updated card layout; InputField label and focus/blur behavior updated; password toggle adds aria-pressed.
Animation Primitives
frontend/src/pages/LandingPage.jsx
Adds motion helpers and reusable primitives: HeroGlow, Sparkline (SVG), Counter (motion-driven), and SectionHeading.
Hero Section
frontend/src/pages/LandingPage.jsx
Adds LinkCardMockup (right-side animated mock with Counter, Sparkline, feature pills and country bars) and updates Ticker styling/labels.
Content Sections
frontend/src/pages/LandingPage.jsx
Adds ANATOMY_FEATURES data and sections: AnatomySection, AnalyticsSection (hourly/device/UTM/bot cards), SelfHostSection (3-step commands), and CtaSection (get started CTA).
Landing Page Composition
frontend/src/pages/LandingPage.jsx
Reworks LandingPage to render NavBar, HeroGlow + LinkCardMockup, Ticker, Anatomy, Analytics, SelfHost, Cta, and Footer.
Auth Page Updates
frontend/src/pages/Login.jsx, frontend/src/pages/Signup.jsx
Removes toast prop from component signatures; handleSubmit wraps r.json() in try/catch with {} fallback; updates AuthCard usage (eyebrow/title), divider text, button labels/styling, and footer copy ("Create one →", "Sign in →").

🎯 4 (Complex) | ⏱️ ~45 minutes


🐰 I hopped through code tonight,
glow and motion in my paws,
forms that bloom, counters bright—
links that sparkle without pause,
a tiny rabbit cheers the cause!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 35.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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Landing page v2 + CodeRabbit fixes' accurately summarizes the two main components of this changeset: a comprehensive landing page redesign (v2) and resolution of CodeRabbit review issues across auth pages.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/elated-euclid-6c3c87

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
frontend/src/pages/Login.jsx (1)

9-9: 💤 Low value

Unused toast prop.

The toast prop is received but never used in this component. Consider removing it if not needed, or using it for success/error notifications instead of (or in addition to) the inline error state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/pages/Login.jsx` at line 9, The LoginPage component declares a
toast prop but never uses it; either remove toast from the LoginPage signature
and any prop types/consumers that pass it, or wire it into the existing
error/success handling (replace or augment the local error state usage) by
calling toast.error(...) and toast.success(...) where the component currently
sets error messages or handles successful login. Update the LoginPage function
signature and any places that import/instantiate it (or add toast calls in the
submit/login handlers that set the local error) so the prop is either used or
eliminated.
frontend/src/pages/LandingPage.jsx (1)

62-67: 💤 Low value

Missing dependencies in useEffect.

The dependency array [inView, to] is missing duration and format. While these props are unlikely to change at runtime, adding them would silence React's exhaustive-deps lint warning and prevent potential stale closure issues.

Proposed fix
   useEffect(() => {
     if (!inView) return;
     const controls = animate(count, to, { duration, ease: EASE });
     const unsub = rounded.on('change', (v) => setDisplay(v));
     return () => { controls.stop(); unsub(); };
-  }, [inView, to]);
+  }, [inView, to, duration, format, count, rounded]);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/pages/LandingPage.jsx` around lines 62 - 67, The useEffect that
starts the animation with animate(count, to, { duration, ease: EASE }) and
subscribes to rounded.on('change', v => setDisplay(v)) is missing dependencies;
include duration and format in the dependency array so the effect re-runs if
those props change and to silence exhaustive-deps lint warnings—update the
dependency array for the useEffect containing animate, count, to, duration,
EASE, rounded, setDisplay, and format accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@frontend/src/pages/LandingPage.jsx`:
- Around line 62-67: The useEffect that starts the animation with animate(count,
to, { duration, ease: EASE }) and subscribes to rounded.on('change', v =>
setDisplay(v)) is missing dependencies; include duration and format in the
dependency array so the effect re-runs if those props change and to silence
exhaustive-deps lint warnings—update the dependency array for the useEffect
containing animate, count, to, duration, EASE, rounded, setDisplay, and format
accordingly.

In `@frontend/src/pages/Login.jsx`:
- Line 9: The LoginPage component declares a toast prop but never uses it;
either remove toast from the LoginPage signature and any prop types/consumers
that pass it, or wire it into the existing error/success handling (replace or
augment the local error state usage) by calling toast.error(...) and
toast.success(...) where the component currently sets error messages or handles
successful login. Update the LoginPage function signature and any places that
import/instantiate it (or add toast calls in the submit/login handlers that set
the local error) so the prop is either used or eliminated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5020cfe2-5e5a-4f62-a20e-1a64cfcaaebb

📥 Commits

Reviewing files that changed from the base of the PR and between 2779100 and c0467c6.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • frontend/package.json
  • frontend/src/App.jsx
  • frontend/src/components/AuthCard.jsx
  • frontend/src/pages/LandingPage.jsx
  • frontend/src/pages/Login.jsx
  • frontend/src/pages/Signup.jsx

- Counter useEffect: add duration, format, count, rounded to deps array
- LoginPage/SignupPage: remove unused toast prop from function signatures

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/pages/Login.jsx`:
- Around line 29-32: The response handling doesn't validate that a successful
HTTP response actually contains the expected token and user, so when d is {} (or
partial) you may call login with invalid data; update the success branch that
currently calls login(d.token, d.user) and navigate(from, ...) to first check
that d && typeof d.token === 'string' && d.token.length > 0 && d.user (or more
specific shape you expect) and call setError('Login failed.') and return if
those fields are missing; modify the block around the r.json fallback (variable
d), the r.ok check, and the call sites login(...) and navigate(...) to enforce
this guard before creating a session.

In `@frontend/src/pages/Signup.jsx`:
- Around line 30-33: The success path calls login(d.token, d.user) without
validating the parsed payload, which can be undefined if JSON parsing failed or
the backend returned incomplete data; update the Signup.jsx flow after parsing
(variables r and d) to check that d is an object and contains both d.token and
d.user before calling login, and if either is missing call setError('Signup
failed.') (or a clearer message) and return instead of calling navigate; ensure
the try/catch leaves d in a known state (null/undefined) that your guard
accounts for so you never pass undefined to login.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ea7f457-9abc-4caa-9f8c-dc8220098ad1

📥 Commits

Reviewing files that changed from the base of the PR and between c0467c6 and 2cea8d7.

📒 Files selected for processing (3)
  • frontend/src/pages/LandingPage.jsx
  • frontend/src/pages/Login.jsx
  • frontend/src/pages/Signup.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/pages/LandingPage.jsx

Comment thread frontend/src/pages/Login.jsx
Comment thread frontend/src/pages/Signup.jsx
Prevent calling login() with undefined values when the server returns
a 200 with an unexpected or empty payload.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
frontend/src/pages/Login.jsx (1)

42-52: ⚡ Quick win

Unify and validate OAuth success payload before login(...).

The three onSuccess handlers duplicate logic and currently trust callback shape. A shared guarded handler avoids drift and blocks invalid session writes if a provider returns partial data.

Proposed refactor
+  const handleOAuthSuccess = ({ token, user }) => {
+    if (!token || !user) {
+      setError('Unexpected server response. Please try again.');
+      return;
+    }
+    login(token, user);
+    navigate(from, { replace: true });
+  };

       <div style={{ display: 'flex', gap: 10, marginBottom: 10 }}>
         <GitHubSignInButton
-          onSuccess={({ token, user }) => { login(token, user); navigate(from, { replace: true }); }}
+          onSuccess={handleOAuthSuccess}
           onError={msg => setError(msg)}
         />
         <DiscordSignInButton
-          onSuccess={({ token, user }) => { login(token, user); navigate(from, { replace: true }); }}
+          onSuccess={handleOAuthSuccess}
           onError={msg => setError(msg)}
         />
       </div>
       <GoogleSignInButton
-        onSuccess={({ token, user }) => { login(token, user); navigate(from, { replace: true }); }}
+        onSuccess={handleOAuthSuccess}
         onError={msg => setError(msg)}
       />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/pages/Login.jsx` around lines 42 - 52, Centralize and validate
the OAuth success payload instead of duplicating inline handlers: create a
single guarded handler (e.g., handleOAuthSuccess) that accepts the provider
payload, checks that both token and user exist and are of expected shape, calls
login(token, user) and then navigate(from, { replace: true }) only when valid,
and calls setError(...) with a clear message when missing/invalid; replace each
component's onSuccess (DiscordSignInButton, GoogleSignInButton, and the other
provider's onSuccess) to use this shared handleOAuthSuccess and keep
onError={msg => setError(msg)} as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/pages/Login.jsx`:
- Line 62: The login error div in Login.jsx (the JSX that renders {error}) is
not announced to screen readers; update that element (the div that displays the
error message for the error variable) to be a live region by adding role="alert"
or aria-live="assertive" (and keep existing styling props) so assistive
technology announces login failures immediately; ensure the change is applied to
the same JSX element that renders {error} in the Login component.

---

Nitpick comments:
In `@frontend/src/pages/Login.jsx`:
- Around line 42-52: Centralize and validate the OAuth success payload instead
of duplicating inline handlers: create a single guarded handler (e.g.,
handleOAuthSuccess) that accepts the provider payload, checks that both token
and user exist and are of expected shape, calls login(token, user) and then
navigate(from, { replace: true }) only when valid, and calls setError(...) with
a clear message when missing/invalid; replace each component's onSuccess
(DiscordSignInButton, GoogleSignInButton, and the other provider's onSuccess) to
use this shared handleOAuthSuccess and keep onError={msg => setError(msg)}
as-is.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f31df791-efa3-425c-9638-dce0b186c329

📥 Commits

Reviewing files that changed from the base of the PR and between 2cea8d7 and dbc6b52.

📒 Files selected for processing (2)
  • frontend/src/pages/Login.jsx
  • frontend/src/pages/Signup.jsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/pages/Signup.jsx

Comment thread frontend/src/pages/Login.jsx Outdated
- Add role="alert" aria-live="assertive" to error divs (Login + Signup)
- Extract shared handleOAuthSuccess with token/user guard (Login + Signup)
  replaces three duplicated inline onSuccess handlers per page

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant