File Locking¶
File locking is a collaboration feature that prevents multiple users from editing the same file simultaneously in multi-user projects. This ensures data integrity and prevents accidental overwrites when multiple team members are working on the same project.
Overview¶
When multiple users are assigned to a project, file locking becomes active to coordinate file access. In single-user projects, the locking mechanism is disable and doesn't affect the user experience.
How It Works¶
When multiple users work on the same project, you must unlock a file before editing it. Other users will see the file is locked and cannot edit it until you unlock it.
Unlocking a File¶
- Click the lock button (π) next to the file you want to edit
- The file becomes editable and lock button became open lock
- Other users see the file is locked
Locking a File¶
- You need to save before lock otherwise your change maybe reverse
- Click the open lock button when you're finished editing
- The file becomes lock (π)
What Happens When a File is Locked¶
For Other Users¶
- File opens in read-only mode - you can view but not edit
- Lock owner's name is displayed when hover to π icon
- Rename/delete options are disabled
For You (Lock Owner)¶
- File is fully editable - you can make changes normally
- All operations are available (rename, delete, edit)
Taking Over a Lock¶
If you need to edit a file that's locked by someone else:
- Click the lock button
- A warning dialog appears explaining the consequences
- Click "Take over" to steal the lock
- The previous user's unsaved changes will be lost
β οΈ Important: Lock stealing will permanently delete any unsaved changes made by the previous user.
Notifications¶
You'll receive notifications when: - Successfully locking/unlocking a file - Someone takes over your lock
Best Practices¶
For Smooth Collaboration¶
- Lock files only when you need to edit
- Save before lock a file
- Unlock files promptly when finished
- Communicate with teammates before stealing locks
When to Steal a Lock¶
- Only when necessary and after checking with the lock owner
- When the lock owner is unavailable and you need urgent access
- After confirming the other user's work won't be lost
Troubleshooting¶
File Won't Unlock¶
- Check your internet connection - locks require WebSocket connection
- Wait for automatic timeout - locks expire after 5 minutes
- Refresh the page if the lock status seems stuck
Can't Edit a File¶
- Check if the file is locked by another user
- Look for the lock icon (π) in the file tree
- Try unlocking the file first before editing
- Contact the lock owner if you need access