Skip to content

Conversation

@Shreyanshi210205
Copy link
Contributor

@Shreyanshi210205 Shreyanshi210205 commented Oct 21, 2025

Description

Currently, when users visit the homepage, they are immediately prompted to join a collaboration room before they can start drawing.
This creates a poor user experience. This PR implements a local-first drawing mode where users can begin sketching right away, and choose to collaborate only when they explicitly opt in.

1.Local-First Experience
-Removed the “Join Room” modal from automatically appearing on page load.
-The app now opens directly to a blank canvas ready for drawing.
-No socket connections or events are triggered until collaboration is enabled.
2.Collaborate Button
-Added a new “Collaborate” / “Join Room” button in the toolbar.
-When clicked, this opens the room-joining modal where the user can enter a room ID to start collaborating.
3.Dynamic Collaboration Toggle
-Once a user joins or creates a room:
-WebSocket communication is activated.
-All drawing actions are synchronized in real time across connected clients.
-If not joined, drawing actions stay completely local and are not emitted.
4. Disabled Sockets in Local Mode
-In the default local mode, socket.emit() calls are conditionally blocked (if (joined && socket) checks added).

image image

Semver Changes

  • Patch (bug fix, no new features)
  • Minor (new features, no breaking changes)
  • Major (breaking changes)

Issues

#26

Checklist

@Ayushivam22 Ayushivam22 merged commit bb7ba67 into OPCODE-Open-Spring-Fest:main Oct 22, 2025
6 of 10 checks passed
@Shreyanshi210205 Shreyanshi210205 deleted the shreyanshi_socket branch October 28, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants