feat: restore session check on landing page#95
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. WalkthroughReplaced manual session state/effect with authClient.useSession(), deriving hasSession from the hook. Removed the useEffect-based getSession() call and related error handling. Existing logic (star count fetch, header/CTA) now consumes the derived hasSession. No exported/public API changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PageComponent as Page Component
participant AuthClient as authClient
participant GitHubAPI as Star Count API
rect rgb(240,248,255)
note over PageComponent: Render
PageComponent->>AuthClient: useSession()
AuthClient-->>PageComponent: session (reactive)
alt session.user exists
PageComponent->>PageComponent: hasSession = true
PageComponent->>GitHubAPI: fetch star count
GitHubAPI-->>PageComponent: star count
else no session
PageComponent->>PageComponent: hasSession = false
note right of PageComponent: Gate CTA / routing based on hasSession
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary
authClient.useSessionTesting
pnpm --filter @saru/app lintpnpm test(fails: No tests found)https://chatgpt.com/codex/tasks/task_e_68b82c06d39c8325abb207de90f87da4
Summary by CodeRabbit
Bug Fixes
Refactor