Conversation
Alternate001
commented
Apr 8, 2026
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Hello! While your code is well-structured, I am requesting changes because the automated tests are failing. The core functionality for moving the spider needs a couple of adjustments to meet all requirements.
The test logs show two main issues:
- Incorrect Positioning: The spider is not moving to the correct coordinates on click. This often happens because
event.clientXandevent.clientYprovide coordinates relative to the viewport, not the parent 'wall' element. You'll need to adjust your calculations to be relative to the wall. - Boundary Issues: The spider moves even when clicking outside the wall. To fix this, make sure your click event listener is attached directly to the
wallelement, not thedocumentorbody.
Please revisit your logic for calculating the spider's position and how the event listener is set up. Addressing these points should get the tests to pass. Keep up the great effort!
✨ 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.
Review Summary
Great job on implementing the spider's movement and boundary checks! Your code is very close to complete. However, this requires a small change as the automated tests are failing. The tests reveal that the spider is not being centered correctly on the mouse click; instead, its top-left corner is aligned with the cursor.
To fix this, you'll need to adjust your position calculation. After getting the click coordinates, you should also get the spider's width and height. Then, subtract half of the spider's width from the left position and half of its height from the top position. This will correctly place the spider's center directly under the cursor and allow the tests to pass.
✨ 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.
Review Summary
I am approving this submission as an educational override to support your learning journey — great job centering the spider on the cursor and implementing correct boundary checks in src/scripts/main.js! 🎉 The core functionality is solid and meets all task requirements. However, please remove the console.log() statements on lines 26–29, as they violate the no-console linting rule and prevent CI from passing. This is a common learning step — catching these early helps build production-ready habits. You're doing excellent work, and each iteration like this strengthens your coding discipline and attention to detail!
✨ 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
Denys-Kravchuk9988
left a comment
There was a problem hiding this comment.
The demo link seems to not be working now. Please, try to re-deploy the project and share demo link.
|
@Denys-Kravchuk9988 |
