Feature/laser pointer 76#137
Conversation
… trajectory trails (KENZY004#76)
… trajectory trails (KENZY004#76)
|
Someone is attempting to deploy a commit to the MINHA's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
It looks like some testing bypasses were committed with the feature. Please revert the authentication and permission-related changes in |
|
Hi @KENZY004, I have successfully reverted the security bypasses! Fixed the isHost override in Whiteboard.jsx so it properly respects user roles. Reverted auth.js to its original main branch state. Removed the PrivateRoute bypass in App.jsx and re-added the missing imports for the FAQPage and ContactPage. (Note: I noticed there isn't a separate ProtectedRoute.jsx file in the project structure, as the route protection is handled directly via PrivateRoute and AdminRoute wrappers in App.jsx, so I secured those instead). Everything should be properly locked down and ready for your review! 🚀 |
|
Please resolve the merge conflicts so that i can test it out ! |
|
Hi @KENZY004, pls review it |
Hi @KENZY004
I have worked on the Laser Pointer feature for the Whiteboard as per issue #76. The core logic for the laser trajectory and auto-fading is implemented, but I am facing a few local rendering and environment issues that are blocking me from fully testing it. I have pushed the code so you can review the logic and kindly help me resolve the UI bugs.
✨ What has been done:
Laser Tool Logic: Created a new tool state (laser). Used requestAnimationFrame and canvas globalAlpha to create an auto-fading neon trail that disappears after 2.5 seconds.
Socket Integration: Added laser-trail socket emission to broadcast laser coordinates to all peers in real-time without permanently saving them to the database.
Toolbar & UI: Added the FaCrosshairs icon in the toolbar and mapped the 0 key as a keyboard shortcut for the laser tool.
🐛 Issues I am currently facing (Need Help):
White Screen of Death: After modifying Whiteboard.jsx to integrate the final tool logic and shapes menu, the frontend is throwing a blank screen locally. There might be a minor syntax error or infinite render loop that I missed.
Registration / Auth Blocker: While setting up the project locally, I faced a 500 Internal Server Error during user registration because the RESEND_API_KEY is missing in my local .env. The backend was deleting the newly created user upon email failure, which blocked my local testing.
View-Only Mode Lock: When I tried to bypass the login check in App.jsx to directly test the board, the board defaulted to "View Only Mode" and the toolbar remained hidden.
I have pushed the core logic for the laser feature. Could you please review the canvas drawing logic (drawLaserTrail) and guide me on how to fix the blank screen issue?
Looking forward to your feedback!