-
Notifications
You must be signed in to change notification settings - Fork 0
Fix user model comments and align frontend preferences #36
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
Conversation
✅ Deploy Preview for colab-flow ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR addresses a bug in the user model by converting the comment field to an array of Comment ObjectIds and synchronizes the frontend type definitions by renaming the notification property to notifications in user preferences. Entity Relationship diagram for updated User model 'comment' fielderDiagram
USER {
ObjectId id
String name
...
ObjectId[] comment
}
COMMENT {
ObjectId id
String text
...
}
USER ||--|{ COMMENT : "has comments"
Class diagram for updated Preference interface in frontendclassDiagram
class NotificationProps {
// properties as defined elsewhere
}
class Preference {
NotificationProps notifications
LanguageType language
ThemeType theme
}
Preference --> NotificationProps
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `frontend/src/types/user.ts:22` </location>
<code_context>
type LanguageType = "fr" | "en" | "es";
type ThemeType = "light" | "dark" | "system";
export interface Preference {
- notification?: NotificationProps;
+ notifications?: NotificationProps;
language?: LanguageType;
theme: ThemeType;
</code_context>
<issue_to_address>
**suggestion:** Check for consistency in naming: 'notifications' is now plural, but the type remains singular.
If 'notifications' refers to multiple items, update its type to NotificationProps[]. Otherwise, align the property name with the data structure.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| type LanguageType = "fr" | "en" | "es"; | ||
| type ThemeType = "light" | "dark" | "system"; | ||
| export interface Preference { | ||
| notification?: NotificationProps; |
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.
suggestion: Check for consistency in naming: 'notifications' is now plural, but the type remains singular.
If 'notifications' refers to multiple items, update its type to NotificationProps[]. Otherwise, align the property name with the data structure.
|
@sourcery-ai title |
Summary by Sourcery
Fix user model and frontend type definitions to properly handle multiple comments and align preference field naming
Bug Fixes: