Skip to content

Feature/laser pointer 76#137

Open
aarushii25 wants to merge 6 commits into
KENZY004:mainfrom
aarushii25:feature/laser-pointer-76
Open

Feature/laser pointer 76#137
aarushii25 wants to merge 6 commits into
KENZY004:mainfrom
aarushii25:feature/laser-pointer-76

Conversation

@aarushii25

Copy link
Copy Markdown
Contributor

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!

@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

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.

@KENZY004

KENZY004 commented Jun 2, 2026

Copy link
Copy Markdown
Owner

It looks like some testing bypasses were committed with the feature. Please revert the authentication and permission-related changes in ProtectedRoute.jsx, auth.js, and Whiteboard.jsx. I can't merge code with security bypasses enabled. Once updated, I'll review it again.

@aarushii25

Copy link
Copy Markdown
Contributor Author

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! 🚀

@KENZY004

KENZY004 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Please resolve the merge conflicts so that i can test it out !

@aarushii25

Copy link
Copy Markdown
Contributor Author

Hi @KENZY004, pls review it

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