feat: implement File Lock & Edit Access Request System#145
feat: implement File Lock & Edit Access Request System#145Shivangi1515 wants to merge 7 commits into
Conversation
|
Hi @suresh1319 Kindly review the PR for the task #137 |
Confidence Score: 3/5 - Review RecommendedReview recommended — this PR implements a File Lock & Edit Access Request System with reasonable structure, but contains a correctness issue in Key Findings:
Files requiring special attention
|
EntelligenceAI PR SummaryFixes a structural/formatting issue in the
Confidence Score: 5/5 - Safe to MergeSafe to merge — this PR makes a straightforward structural cleanup in Key Findings:
Files requiring special attention
|
|
Hi @suresh1319 Kindly review the PR |
|
@Shivangi1515 please fix this File: server.js MAJOR CORRECTNESS Leave activity broadcast reaches disconnecting socket, causing self-notification on drop During the 'disconnecting' event the socket is still a member of its rooms. logAndBroadcastActivity calls io.to(roomId).emit, which delivers the leave event back to the disconnecting socket. EditorPage.js:371-373 then increments unreadActivityCount and appends the self-leave to the activity feed on the still-mounted component (connection-drop case). |
|
Hi @suresh1319 |
Closes #137
Description
What
Implemented a new ** File Lock & Edit Access Request System** for the CollabCE real-time collaborative code editor. This feature enables users to lock individual files they are actively editing, preventing other users from overwriting or making conflicting edits, while providing a real-time workflow to request edit access.
Why
Currently, all collaborators can edit any file concurrently, which often leads to:
This feature ensures editing safety and improves team collaboration by providing a structured, real-time lock-and-request flow.
Demo
Screen.Recording.2026-05-28.221746.mp4
How
src/Actions.js): Defined event names for lock/unlock transitions, edit access requests, approval, rejection, active editor tracking, and state syncs.server.js):fileLocksandactiveEditorsmaps inside the room state.src/pages/EditorPage.js):hasFileEditPermission) to disable editing on locked files.FileExplorer.js&FileTabs.js: Rendered closed locks, owner tooltips, and highlights (fs-node-locked,fs-node-locked-by-me) for locked files.Editor.js: Added "Lock/Unlock" action buttons, lock labels, and aCurrently editing: [Username]banner to track active editors.RequestAccessModal.js: Added dynamic props to reuse it for file access requests.App.css: Added styling for glowing rows, colored locks, request buttons, and warning overlays.Pull Request Checklist
npm run devstarts successfully with your changes