Skip to content

Add solution (in progress)#141

Closed
dminikulin wants to merge 2 commits into
mate-academy:masterfrom
dminikulin:develop
Closed

Add solution (in progress)#141
dminikulin wants to merge 2 commits into
mate-academy:masterfrom
dminikulin:develop

Conversation

@dminikulin

Copy link
Copy Markdown

skip-ai

@dminikulin dminikulin marked this pull request as draft October 22, 2025 08:31
@dminikulin dminikulin closed this Oct 22, 2025

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /messages and WebSocket handling to accept/validate { author, text, roomId }, add time server-side, and push into the correct room history. Also add unique id and messages: [] to rooms, validate inputs, and handle NaN/invalid indexes in PATCH/DELETE.
  • Backend realtime: SSE /messages and /rooms do 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 for roomUpdated/roomDeleted or emit unified events with a type field so clients receive all updates.
  • Frontend: Require a username before showing the dashboard (hide/disable until set). Add id/name for 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 carrying data-room-id and aria-labels. Remove the redundant .gitignore entry.

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants