Skip to content

Enhance collaboration and selection management in IDE#75

Merged
rkvishwa merged 13 commits intorkvishwa:developmentfrom
Praveen-R-2518:file-content
Mar 15, 2026
Merged

Enhance collaboration and selection management in IDE#75
rkvishwa merged 13 commits intorkvishwa:developmentfrom
Praveen-R-2518:file-content

Conversation

@Praveen-R-2518
Copy link
Copy Markdown
Contributor

This pull request introduces several improvements to collaborative editing, file tree refresh logic, and cross-platform path normalization. The most notable changes enhance the reliability and accuracy of real-time collaboration, ensure the file tree updates correctly when triggered, and improve file and tab management across different operating systems.

Collaborative Editing Enhancements

  • Improved synchronization when a new client joins: Existing clients are now prompted to send their full state via an empty SyncStep1 message, and awareness updates are requested, ensuring all participants have the latest document and presence information.
  • Monaco editor binding now uses pushEditOperations instead of setValue to update content, preventing cursor jumps and preserving undo history. Awareness and cursor selection logic is more robust, including proper disposal and clearing of stale selections on binding destroy.
  • Collaborative file save operations are now broadcast to all peers, so saving a file locally triggers automatic saves on other clients in the session.
  • Improved initialization and rebinding of Monaco bindings to Y.Text, distinguishing between new and existing collaborative documents for proper content synchronization.
  • Awareness selection positions now use the optional -1 parameter for compatibility and accuracy.

File Tree Refresh and UI Improvements

  • Added a refreshTrigger prop to the file tree and its nodes, enabling programmatic refreshes of directory contents and closing context menus or creation states after refresh.
  • File tree node activation now normalizes path separators, ensuring correct highlighting and selection across platforms.

Path Normalization and Tab Management

  • All file paths are normalized to use forward slashes, preventing inconsistencies and bugs when managing tabs, opening files, and handling file operations across Windows, macOS, and Linux.
  • When files or directories are deleted, affected tabs are now removed (rather than just marked as deleted), and the active tab switches to the next available tab if the current one is deleted.
  • When a file is deleted, its collaborative content is cleared with an explicit flag to ensure proper synchronization.

Editor Behavior Improvements

  • The Monaco editor now keeps the current model when switching tabs, preventing unnecessary re-creation and improving performance and user experience.
  • End-of-line normalization is enforced for collaborative Monaco models, ensuring consistent line endings.

Miscellaneous

  • The remoteCreatesRef is removed, simplifying file operation tracking logic.
  • Collaborative file content retrieval now returns the content regardless of whether it's empty, improving compatibility with new files.

These changes collectively improve the reliability, usability, and cross-platform compatibility of collaborative editing and file management in the application.

@appwrite
Copy link
Copy Markdown

appwrite bot commented Mar 15, 2026

Exam-IDE

Project ID: 69a964ef003091fbebdf

Sites (1)
Site Status Logs Preview QR
 Sonar-Code-Editor
69b41a9f00321cbe83e4
Queued Queued Authorize Preview URL QR Code

Tip

Roll back Sites deployments instantly by switching between versions

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 15, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d174e455-6f1f-43c2-8e66-211c500509ab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@rkvishwa rkvishwa merged commit bf507f5 into rkvishwa:development Mar 15, 2026
2 of 5 checks passed
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