-
Notifications
You must be signed in to change notification settings - Fork 0
Enhance Room/Task API, UI, and Member Management #25
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
Reviewer's GuideThis PR completes the MVP by wiring up task population on the backend, refining room and task UI behavior, standardizing component loading and button semantics, and adding success toasts and safe defaults across forms and lists. Sequence diagram for room data population with tasks and assigneessequenceDiagram
participant Frontend
participant Backend
participant DB
Frontend->>Backend: GET /room (fetch rooms)
Backend->>DB: Find rooms for user
DB-->>Backend: Rooms with admin/members
Backend->>DB: Populate tasks for each room
DB-->>Backend: Tasks with assignees
Backend-->>Frontend: Rooms with populated tasks and assignees
ER diagram for Room, Task, and User relationships after MVP changeserDiagram
ROOM {
string room_name
string description
objectId admin
objectId[] members
objectId[] tasks
}
TASK {
string title
string description
string status
string priority
date dueDate
objectId[] assignees
}
USER {
string userName
string email
string avatar
objectId[] rooms
}
ROOM ||--o{ USER : has_members
ROOM ||--o{ TASK : has_tasks
TASK }o--o{ USER : has_assignees
USER }o--o{ ROOM : member_of
Class diagram for updated Room and Task modelsclassDiagram
class Room {
- members: [User]
- tasks: [Task] (default: [])
- admin: User
- room_name: string
- description: string
}
class Task {
- title: string
- description: string
- status: string
- priority: string
- dueDate: Date
- assignees: [User]
}
class User {
- userName: string
- email: string
- avatar: string
- rooms: [Room]
}
Room "1" -- "*" Task : tasks
Room "1" -- "*" User : members
Room "1" -- "1" User : admin
Task "*" -- "*" User : assignees
User "1" -- "*" Room : rooms
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@sourcery-ai title |
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/tasks/src/pages/RoomId.tsx:77` </location>
<code_context>
const getPriorityColor = (priority: string) => {
switch (priority) {
+ case 'low':
+ return 'bg-yellow-200'
case 'high':
return 'bg-red-500';
</code_context>
<issue_to_address>
The color for 'low' priority is very light and may reduce readability on light backgrounds.
Using a darker yellow shade will improve contrast and accessibility for users on light backgrounds.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
case 'low':
return 'bg-yellow-200'
=======
case 'low':
return 'bg-yellow-400'
>>>>>>> REPLACE
</suggested_fix>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| case 'low': | ||
| return 'bg-yellow-200' |
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: The color for 'low' priority is very light and may reduce readability on light backgrounds.
Using a darker yellow shade will improve contrast and accessibility for users on light backgrounds.
| case 'low': | |
| return 'bg-yellow-200' | |
| case 'low': | |
| return 'bg-yellow-400' |
Summary
Finalize the core room and task MVP by improving API data population, refining member addition logic, enhancing task status/priority handling, and bolstering the UI with loaders, navigation links, and toast notifications
New Features:
Enhancements:
Chores: