Skip to content

feat: restore session check on landing page#96

Closed
will-lp1 wants to merge 1 commit intomainfrom
codex/add-session-check-to-landing-page-ny91wt
Closed

feat: restore session check on landing page#96
will-lp1 wants to merge 1 commit intomainfrom
codex/add-session-check-to-landing-page-ny91wt

Conversation

@will-lp1
Copy link
Copy Markdown
Owner

@will-lp1 will-lp1 commented Sep 3, 2025

Summary

  • derive landing page session state with authClient.useSession
  • ensure "Open" CTA displays when a session exists
  • streamline social proof: smaller label, single-row logos + people, and centered avatar pills with tighter padding
  • reduce Vercel logo size
  • balance testimonial copy with text-balance

Testing

  • pnpm --filter @saru/app lint
  • pnpm test (fails: No tests found)

https://chatgpt.com/codex/tasks/task_e_68b82c06d39c8325abb207de90f87da4

Summary by CodeRabbit

  • Refactor
    • Simplified login state handling for a smoother, more responsive session display.
  • Style
    • Redesigned “Used by” section to a responsive, wrap-enabled horizontal layout with refined spacing and a subtle divider.
    • Adjusted logo sizes for better visual balance; updated Vercel logo dimensions.
    • Replaced author/link blocks with uniform, center-aligned pill-style links.
    • Improved testimonial readability with balanced text alignment and updated blockquote styling.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 3, 2025

Walkthrough

Replaced manual session fetching with authClient.useSession-derived state. Restructured the Social Proof section to a responsive horizontal layout, adjusted logo sizes and separators, tweaked alignment classes, and added text-balance to testimonial styling. Updated div structure accordingly. No exported API changes; default export remains unchanged.

Changes

Cohort / File(s) Summary
Session handling refactor
apps/saru/app/page.tsx
Removed local hasSession state and router-dependent useEffect. Now derives session state via authClient.useSession() and computes hasSession from session?.user.
Social Proof layout and styling
apps/saru/app/page.tsx
Reworked “Used by” into a responsive, wrap-enabled horizontal layout; added vertical separator; adjusted logo dimensions (incl. Vercel); unified author/link pills with center justification; minor wrapper div adjustments.
Testimonial styling
apps/saru/app/page.tsx
Added text-balance to blockquote for improved alignment; minor visual tweaks.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant H as Home(Page)
  participant A as authClient
  participant UI as UI

  U->>H: Navigate to page
  H->>A: useSession()
  A-->>H: { session | null }
  H->>H: hasSession = Boolean(session?.user)
  alt hasSession
    H->>UI: Render authenticated view
  else no session
    H->>UI: Render unauthenticated view
  end

  note over H,UI: Social Proof and Testimonials rendered with updated layout and styling
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibbled through hooks and state with cheer,
Swapped a fetch for useSession here.
Logos line up, tidy and bright,
Testimonials balanced just right.
Thump-thump! says the rabbit dev—
Clean flows, crisp UI, onward we rev. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/add-session-check-to-landing-page-ny91wt

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cursorforwriting-wkur Error Error Sep 3, 2025 1:19pm

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: 0

🧹 Nitpick comments (2)
apps/saru/app/page.tsx (2)

153-153: Mark the visual separator as decorative for screen readers.
Add aria-hidden so it isn’t announced as empty content.

-              <span className="h-6 md:h-8 w-px bg-border" />
+              <span aria-hidden="true" className="h-6 md:h-8 w-px bg-border" />

155-170: Use native anchors for external URLs (or set prefetch={false}) and add aria-labels.
next/link offers no prefetch benefit for external sites; anchors are simpler and avoid subtle warnings. Add an aria-label for better SR context.

-                <Link
-                  href="https://x.com/leerob"
-                  target="_blank"
-                  rel="noopener noreferrer"
-                  className="group flex items-center gap-1.5 rounded-full border border-border bg-background pl-2 md:pl-3 pr-3 md:pr-4 h-8 md:h-10 w-36 md:w-48 justify-center text-xs whitespace-nowrap hover:bg-accent hover:text-accent-foreground transition-colors"
-                >
+                <a
+                  href="https://x.com/leerob"
+                  target="_blank"
+                  rel="noopener noreferrer"
+                  aria-label="Lee Robinson (@leerob) — VP DX, Cursor"
+                  className="group flex items-center gap-1.5 rounded-full border border-border bg-background pl-2 md:pl-3 pr-3 md:pr-4 h-8 md:h-10 w-36 md:w-48 justify-center text-xs whitespace-nowrap hover:bg-accent hover:text-accent-foreground transition-colors"
+                >
                   <Image
                     src="/images/leerob.jpg"
                     alt="Lee Robinson"
                     width={24}
                     height={24}
                     className="size-6 rounded-full object-cover shrink-0"
                   />
                   <span className="font-medium">@leerob</span>
                   <span className="hidden md:inline text-muted-foreground/60">VP DX, Cursor</span>
-                </Link>
+                </a>
-                <Link
-                  href="https://x.com/dps"
-                  target="_blank"
-                  rel="noopener noreferrer"
-                  className="group flex items-center gap-1.5 rounded-full border border-border bg-background pl-2 md:pl-3 pr-3 md:pr-4 h-8 md:h-10 w-36 md:w-48 justify-center text-xs whitespace-nowrap hover:bg-accent hover:text-accent-foreground transition-colors"
-                >
+                <a
+                  href="https://x.com/dps"
+                  target="_blank"
+                  rel="noopener noreferrer"
+                  aria-label="David Singleton (@dps) — ex-CTO, Stripe"
+                  className="group flex items-center gap-1.5 rounded-full border border-border bg-background pl-2 md:pl-3 pr-3 md:pr-4 h-8 md:h-10 w-36 md:w-48 justify-center text-xs whitespace-nowrap hover:bg-accent hover:text-accent-foreground transition-colors"
+                >
                   <Image
                     src="/images/dps.jpg"
                     alt="David Singleton"
                     width={24}
                     height={24}
                     className="size-6 rounded-full object-cover shrink-0"
                   />
                   <span className="font-medium">@dps</span>
                   <span className="hidden md:inline text-muted-foreground/60">ex-CTO, Stripe</span>
-                </Link>
+                </a>

Also applies to: 172-187

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 65b4523 and 9994ffc.

📒 Files selected for processing (1)
  • apps/saru/app/page.tsx (5 hunks)
🔇 Additional comments (4)
apps/saru/app/page.tsx (4)

128-130: Compact “Used by” label looks good.
Clear, unobtrusive, and reads well next to the logos.


141-144: Logo size tweak is balanced.
The reduced Vercel dimensions align better with adjacent marks.


234-234: Nice touch with text-balance.
Improves ragging for multi-line quotes.


24-25: I'll inspect the hook’s signature and authClient import/definition to confirm which loading flag is exposed.

@will-lp1 will-lp1 closed this Oct 19, 2025
@will-lp1 will-lp1 deleted the codex/add-session-check-to-landing-page-ny91wt branch October 24, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant