Enhance Room/Task API, UI, and Member Management#25
Merged
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
|
Owner
Author
|
@sourcery-ai title |
There was a problem hiding this comment.
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.
Comment on lines
+77
to
+78
| case 'low': | ||
| return 'bg-yellow-200' |
There was a problem hiding this comment.
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.
Suggested change
| case 'low': | |
| return 'bg-yellow-200' | |
| case 'low': | |
| return 'bg-yellow-400' |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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: