Skip to content

Conversation

@ComputelessComputer
Copy link
Collaborator

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Oct 26, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a NotFound page component, introduces a new /auth route with email-OTP and Google OAuth flows, refactors account and header UI/logic, removes the old auth view, updates root route to use the NotFound component, and adds Google font variables to styles.

Changes

Cohort / File(s) Summary
Not Found Page
apps/web/src/components/not-found.tsx
New exported NotFoundDocument component rendering a full 404 page with header (Home, Docs, Blog, Pricing; Get Started, Download) and footer.
Root Route
apps/web/src/routes/__root.tsx
Registers NotFoundDocument as notFoundComponent; consolidates app CSS import to top level.
New Auth Route
apps/web/src/routes/auth.tsx
Adds /auth route with Zod-validated search params; implements email OTP and Google OAuth flows using doAuth, handles success/errors and redirects.
Removed Old Auth View
apps/web/src/routes/_view/auth.tsx
Deleted previous /_view/auth route file.
Account Page Refactor
apps/web/src/routes/_view/app/account.tsx
Replaces tabbed Overview/Billing UI with profile-first layout; removes tab state; introduces AccountSettingsCard, IntegrationsSettingsCard, SignOutSection; refactors billing and sign-out interactions.
Header & Route UI
apps/web/src/routes/_view/route.tsx
Removes client-side sign-out mutation/navigation logic; adds Docs, Blog, Pricing links to header; simplifies HeaderUser to show Account link only.
Homepage Layout
apps/web/src/routes/_view/index.tsx
Updates bottom CTA: adds Hyprnote image block in rounded container, changes CTA stacking and spacing (pt-2 → pt-6), adjusts layout to vertical stacking on small screens.
Styling / Fonts
apps/web/src/styles.css
Adds Google Fonts import (Inter, Lora) and a @theme block with --font-sans and --font-serif CSS variables.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AuthRoute as /auth Route
    participant Server
    participant AppNav as App Navigation

    rect rgb(220,235,255)
    Note over AuthRoute: Email OTP flow
    User->>AuthRoute: Submit email
    AuthRoute->>Server: doAuth(method: "email_otp", flow)
    alt Email sent
        Server-->>AuthRoute: success
        AuthRoute->>User: show success message
    else Error
        Server-->>AuthRoute: error
        AuthRoute->>User: show error
    end
    end

    rect rgb(220,255,230)
    Note over AuthRoute: Google OAuth flow
    User->>AuthRoute: Click "Sign in with Google"
    AuthRoute->>Server: doAuth(method: "oauth", provider: "google", flow)
    alt Redirect URL returned
        Server-->>AuthRoute: { url }
        AuthRoute->>AppNav: navigate to returned url
    else No URL / Error
        Server-->>AuthRoute: error
        AuthRoute->>User: show error
    end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to: apps/web/src/routes/_view/app/account.tsx (new internal components, billing/sign-out flows), apps/web/src/routes/auth.tsx (error/loading/redirect handling), and route changes linking removal of /_view/auth to the new /auth placement.

Possibly related PRs

  • landing-2 #1598 — Overlapping header/navigation changes in apps/web/src/routes/_view/route.tsx.

Suggested reviewers

  • duckduckhero

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 2 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The PR title "landing-3" is a generic label that does not convey meaningful information about the changeset. The changes span multiple files with significant modifications including a new NotFoundDocument component, restructured account and auth routes, header navigation updates, and styling changes, yet the title provides no indication of what these changes accomplish or their scope. The title reads as a branch iteration or work-in-progress marker rather than a descriptive summary that would help teammates understand the primary purpose of the changes when scanning project history.
Description Check ❓ Inconclusive No pull request description was provided by the author. While the check is intentionally lenient and does not require extensive documentation, the complete absence of any description means there is no opportunity to verify whether the changes align with intended objectives or to provide context for reviewers about the motivations behind the modifications.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between de178e8 and f14c348.

⛔ Files ignored due to path filters (1)
  • apps/web/src/routeTree.gen.ts is excluded by !**/*.gen.ts
📒 Files selected for processing (2)
  • apps/web/src/components/not-found.tsx (1 hunks)
  • apps/web/src/routes/_view/app/account.tsx (2 hunks)

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.

Copy link

@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: 5

🧹 Nitpick comments (7)
apps/web/src/routes/_view/route.tsx (1)

25-50: Header updates look good.

Consider:

  • Add <nav aria-label="primary"> for clearer landmarks.
  • Extract a shared Header to avoid duplication with NotFound’s header.

Also applies to: 73-78

apps/web/src/components/not-found.tsx (1)

34-86: Deduplicate Header and Footer across public pages.

This Header/Footer duplicates _view/route.tsx. Extract shared <SiteHeader/> and <SiteFooter/> to prevent drift and ease updates.

Also applies to: 88-108

apps/web/src/routes/_view/index.tsx (1)

311-319: Add explicit image attributes for better perf.

Provide intrinsic size and lazy hints to limit CLS and network priority.

-                <img
-                  src="https://github.com/hyprnote_with_noise.png"
-                  alt="Hyprnote"
-                  className="size-36 mx-auto rounded-[40px] border border-neutral-200"
-                />
+                <img
+                  src="https://github.com/hyprnote_with_noise.png"
+                  alt="Hyprnote"
+                  width="144"
+                  height="144"
+                  loading="lazy"
+                  decoding="async"
+                  fetchpriority="low"
+                  className="size-36 mx-auto rounded-[40px] border border-neutral-200"
+                />
apps/web/src/routes/_view/app/account.tsx (2)

8-11: Guard the account route for signed-out users.

Redirect unauthenticated users before rendering. Prefer beforeLoad for route-level protection.

-export const Route = createFileRoute("/_view/app/account")({
-  component: Component,
-  loader: async ({ context }) => ({ user: context.user }),
-});
+import { redirect } from "@tanstack/react-router";
+export const Route = createFileRoute("/_view/app/account")({
+  beforeLoad: async ({ context }) => {
+    if (!context.user) {
+      throw redirect({ to: "/auth", search: { flow: "web" } });
+    }
+    return { user: context.user };
+  },
+  component: Component,
+  loader: async ({ context }) => ({ user: context.user }),
+});

94-150: Plan controls are stubbed; wire to real state and mutations.

currentPlan and trial handlers are placeholders. Consider deriving plan from loader/context and using mutations for trial/upgrade to avoid a shared loading boolean across actions.

apps/web/src/routes/auth.tsx (2)

55-84: Consider consistent loading state management.

The Google sign-in handler manually resets loading in each error path (lines 70, 76, 82), while the email handler uses a finally block. Although the current code works correctly (success redirects immediately), using a try-finally pattern here would be more maintainable and consistent.

Apply this diff to align the pattern:

   const handleGoogleSignIn = async () => {
     setLoading(true);
     setMessage(null);
 
     try {
       const result = await doAuth({
         data: {
           method: "oauth",
           provider: "google",
           flow,
         },
       });
 
       if (!result) {
         setMessage({ type: "error", text: "No response from server" });
-        setLoading(false);
         return;
       }
 
       if (result.error) {
         setMessage({ type: "error", text: result.message || "Failed to sign in with Google" });
-        setLoading(false);
       } else if (result.url) {
         window.location.href = result.url;
       }
     } catch (error) {
       setMessage({ type: "error", text: "An unexpected error occurred" });
+    } finally {
-      setLoading(false);
+      setLoading(false);
     }
   };

127-137: Consider using cn utility for conditional classes.

Per the coding guidelines, when classNames have conditional logic, prefer using cn from @hypr/utils and pass an array of class segments split by logical grouping.

As per coding guidelines.

Example refactor:

import { cn } from "@hypr/utils";

// In the component:
{message && (
  <div
    className={cn([
      "mt-4 p-3 rounded-lg text-sm",
      message.type === "success" 
        ? ["bg-green-50", "text-green-800", "border", "border-green-200"]
        : ["bg-red-50", "text-red-800", "border", "border-red-200"]
    ])}
  >
    {message.text}
  </div>
)}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf13f55 and de178e8.

⛔ Files ignored due to path filters (2)
  • apps/web/public/hyprnote_with_noise.png is excluded by !**/*.png
  • apps/web/src/routeTree.gen.ts is excluded by !**/*.gen.ts
📒 Files selected for processing (8)
  • apps/web/src/components/not-found.tsx (1 hunks)
  • apps/web/src/routes/__root.tsx (2 hunks)
  • apps/web/src/routes/_view/app/account.tsx (2 hunks)
  • apps/web/src/routes/_view/auth.tsx (0 hunks)
  • apps/web/src/routes/_view/index.tsx (1 hunks)
  • apps/web/src/routes/_view/route.tsx (3 hunks)
  • apps/web/src/routes/auth.tsx (1 hunks)
  • apps/web/src/styles.css (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/web/src/routes/_view/auth.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/simple.mdc)

After a substantial amount of TypeScript changes, run pnpm -r typecheck

Files:

  • apps/web/src/routes/_view/index.tsx
  • apps/web/src/routes/_view/route.tsx
  • apps/web/src/routes/auth.tsx
  • apps/web/src/routes/_view/app/account.tsx
  • apps/web/src/components/not-found.tsx
  • apps/web/src/routes/__root.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/simple.mdc)

**/*.{tsx,jsx}: When many classNames have conditional logic in React components, use cn from @hypr/utils
When using cn, always pass an array of class segments
When using cn, split entries by logical grouping for readability
Use motion/react instead of framer-motion

Files:

  • apps/web/src/routes/_view/index.tsx
  • apps/web/src/routes/_view/route.tsx
  • apps/web/src/routes/auth.tsx
  • apps/web/src/routes/_view/app/account.tsx
  • apps/web/src/components/not-found.tsx
  • apps/web/src/routes/__root.tsx
🧬 Code graph analysis (3)
apps/web/src/routes/auth.tsx (1)
apps/web/src/functions/auth.ts (1)
  • doAuth (11-52)
apps/web/src/routes/_view/app/account.tsx (2)
apps/web/src/routes/__root.tsx (1)
  • Route (14-31)
apps/web/src/functions/auth.ts (1)
  • signOutFn (67-76)
apps/web/src/routes/__root.tsx (1)
apps/web/src/components/not-found.tsx (1)
  • NotFoundDocument (3-32)
🔇 Additional comments (4)
apps/web/src/routes/_view/app/account.tsx (1)

214-246: Sign out flow looks solid.

Mutation, pending disable, and navigation on success/error are handled cleanly. ✓ Integration route /_view/app/integration confirmed to exist.

apps/web/src/routes/__root.tsx (1)

1-1: Typecheck verification requires manual execution in your development environment.

The sandbox environment lacks the necessary tools (deno, installed dependencies) to run pnpm -r typecheck. The code changes appear structurally sound, but please run the typecheck locally in your repository to ensure type safety across the refactored imports and NotFound component integration:

pnpm -r typecheck
apps/web/src/routes/auth.tsx (2)

23-53: Email sign-in handler looks solid.

The error handling is comprehensive with try-catch-finally ensuring the loading state is always reset. The defensive null check on line 37 is appropriate given the server function's implementation.


92-92: Verify custom Tailwind configuration for rounded-4xl.

The class rounded-4xl is not part of standard Tailwind CSS (which maxes out at rounded-3xl). Ensure your Tailwind config extends the theme with this value, or use a standard class.

@yujonglee yujonglee merged commit 855b0be into main Oct 26, 2025
3 of 4 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 26, 2025
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.

3 participants