Home: Add Sign In CTA, Chat History; fix signed-out generation flow#95
Home: Add Sign In CTA, Chat History; fix signed-out generation flow#95Jackson57279 merged 4 commits intoopen-lovablefrom
Conversation
…r generation. Adds Clerk modal on home/Toast, guards generation redirect behind keys, and surfaces Convex user chats as project history.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded@otdoges has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 50 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (6)
WalkthroughAdds CI workflows for linting/typechecking and PR size labeling. Introduces Clerk-aware guards: conditionally redirect on generation page, adds ChatHistory section to home page with signed-in flow, and updates sign-in button styles. New ChatHistory component fetches and displays recent projects with links. Minor UI adjustments and auth prompts integrated. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Home as Home Page
participant ChatHistory as ChatHistory
participant Clerk as Clerk Hooks
participant API as Chats API
User->>Home: Visit /
Home->>ChatHistory: Render component
ChatHistory->>Clerk: hasClerkKeys() & useSafeUser()
alt No Clerk keys
ChatHistory-->>Home: Render null
else Clerk keys present
alt User not signed in
ChatHistory-->>User: Show SignInButton (modal)
else Signed in
ChatHistory->>API: getUserChats(limit=10)
alt Loading
ChatHistory-->>User: "Loading your projects..."
else No chats
ChatHistory-->>User: "No projects yet" + CTA
else Chats available
ChatHistory-->>User: Grid of project cards (Continue/Open preview)
end
end
end
sequenceDiagram
autonumber
actor User
participant Gen as /generation Page
participant Clerk as Clerk Hooks
User->>Gen: Navigate to /generation
Gen->>Clerk: hasClerkKeys() & useSafeUser()
alt Clerk keys present AND user not signed in
Gen-->>User: Redirect to sign-in
else Otherwise
Gen-->>User: Render sandbox page
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
✨ 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. Comment |
…hatHistory; isolate Convex useQuery in mounted child component.
…improve code reviews.
…below-hero CTA so primary Sign In lives in header corner; update toast and ChatHistory sign-in styles.
Summary
Adds a clear Sign In path on the home page, fixes the signed-out generation flow, and surfaces a chat/project history using Convex so users can continue work. Clerk and Convex remain integrated via the existing providers and middleware.
Changes
chats.getUserChats) with title, updated time, optional screenshot, and Continue link/sign-inonly when Clerk keys are present, preventing dead-end navigation in environments without Clerk configuredFiles
hasClerkKeys()Why
Impact
How to test
Configuration
Ensure these env vars are configured in your deployment:
Notes
₍ᐢ•(ܫ)•ᐢ₎ Generated by Capy (view task)
Summary by CodeRabbit
New Features
Improvements
Style
Chores