-
Notifications
You must be signed in to change notification settings - Fork 324
feat(opensource): implement AI contribution coach, handle stream errors, and fix recommended repos endpoint (#957) #1453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Sachinchaurasiya360
merged 3 commits into
Sachinchaurasiya360:main
from
Rajal-ui:feat/ai-contribution-coach-sidebar
Jun 6, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
b15a49c
feat(opensource): harden coach store state and prevent render-loop si…
Rajal-ui 443f8ea
feat(opensource): resolve shadow db drift, add coach error boundaries…
Rajal-ui 38ad349
fix: resolve AI coach routes conflict, add /recommended route
Sachinchaurasiya360 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
client/src/module/student/opensource/CoachFloatingButton.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { motion } from "framer-motion"; | ||
| import { Sparkles } from "lucide-react"; | ||
| import { useCoachStore } from "./stores/coach.store"; | ||
|
|
||
| /** | ||
| * Floating button visible on all open-source section pages. | ||
| * Clicking it toggles the coach panel open/closed. | ||
| */ | ||
| export default function CoachFloatingButton() { | ||
| const { toggle, isOpen } = useCoachStore(); | ||
|
|
||
| if (isOpen) return null; | ||
|
|
||
| return ( | ||
| <motion.button | ||
| initial={{ scale: 0, opacity: 0 }} | ||
| animate={{ scale: 1, opacity: 1 }} | ||
| transition={{ delay: 0.5, type: "spring", stiffness: 300, damping: 20 }} | ||
| onClick={toggle} | ||
| title="Open Contribution Coach" | ||
| className="fixed bottom-6 right-6 z-30 w-12 h-12 rounded-xl bg-lime-400 text-stone-950 shadow-lg shadow-lime-500/25 hover:bg-lime-300 hover:shadow-xl hover:shadow-lime-500/30 transition-all flex items-center justify-center border-0 cursor-pointer group" | ||
| > | ||
| <Sparkles className="w-5 h-5 group-hover:scale-110 transition-transform" /> | ||
| </motion.button> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win
Use the shared
Buttoncomponent for the floating action button.All new buttons should use the reusable
Buttoncomponent fromclient/src/components/ui/button.tsxwith appropriate variants, modes, and sizes. The Button component supports composition with Framer Motion via theasChildprop (Radix Slot pattern).♻️ Refactor to use Button component
As per coding guidelines: Use the reusable
Buttoncomponent fromclient/src/components/ui/button.tsxfor all new buttons; supports variants (primary, secondary, mono, ghost, danger), modes (button, icon, link), and sizes (sm, md, lg). UseasChildprop (Radix Slot) when composing Button with other elements.🤖 Prompt for AI Agents