Add solution (in progress)#141
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because several core requirements are not met and they block the assignment from functioning as specified.
Critical issues to fix:
- Backend: Messages are not scoped per room and lack the required schema. Store messages per room and ensure each message includes
author,time,text, and a room association (e.g.,roomId). Update POST/messagesand WebSocket handling to accept/validate{ author, text, roomId }, addtimeserver-side, and push into the correct room history. Also add uniqueidandmessages: []to rooms, validate inputs, and handle NaN/invalid indexes in PATCH/DELETE. - Backend realtime: SSE
/messagesand/roomsdo not send initial state and miss rename/delete events. On connect, send current rooms and (on room join) the room’s history. Either add listeners forroomUpdated/roomDeletedor emit unified events with atypefield so clients receive all updates. - Frontend: Require a username before showing the dashboard (hide/disable until set). Add
id/namefor the username and message inputs so JS can read them, and send the username to the server on login/WS open. Use consistent fields (author,time,text) when sending/receiving messages and include the room id when sending. - Frontend rooms: Implement create/rename/join/delete UI and wire it to server endpoints; request and render the joined room’s message history.
Minor improvements:
- In index.html, move
<script src="main.js"></script>inside<body>and replace icon-only spans with accessible buttons carryingdata-room-idandaria-labels. Remove the redundant.gitignoreentry.
You have a solid foundation—once these blockers are addressed, the app will align with the requirements. Keep going; you’re close.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
The pull request is closed. Please re-open the pull request.
[CODE: PRC]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
skip-ai