Closed satoren closed 1 week ago
The changes in this pull request introduce a new state management feature to the Yex.Sync.SharedDoc
module, specifically through the addition of an origin_client_map
to track clients based on their origin. This update affects the handling of client awareness, with modifications to various handle_call
functions to manage this new state. The Yex.DocServer.Worker
module has also been updated to process awareness messages synchronously. Additionally, the Yex.Sync.SharedDocTest
module has been enhanced to include new tests for awareness functionality and persistence behavior.
File | Change Summary |
---|---|
lib/protocols/shared_doc.ex |
- Added origin_client_map in init/2 - Introduced remove_awareness_clients_by_origin/2 - Introduced update_origin_client_map/3 |
lib/server/doc_server_worker.ex |
- Updated handle_cast for :document_update and :awareness_update for immediate processing- Added new handle_info clauses for awareness and document updates- Introduced handle_update_v1_immediately/1 and handle_awareness_change_immediately/1 |
test/protocols/shared_doc_test.exs |
- Added Awareness alias- Restructured tests for observing and unobserving documents - Introduced new persistence tests with PersistenceTest and PersistenceFileWriteTest |
Yex.Awareness
module regarding the origin
parameter are related to the main PR's introduction of the origin_client_map
, as both involve managing client origins in the context of awareness updates.Yex.Sync.SharedDoc
module to improve the handling of awareness updates, aligning with the main PR's changes focusing on managing client awareness through the origin_client_map
.Yex.DocServer
module for managing document updates and awareness changes is relevant as it complements the new state management features in the Yex.Sync.SharedDoc
module.Yex.Sync.SharedDoc
module to use Yex.DocServer
indicates a significant change in how document synchronization and awareness are managed, which is closely related to the new state management features introduced in the main PR.Yex.DocServer
, which is relevant to the main PR since it involves the same module that is being modified in the main PR, ensuring clarity in the documentation of related functionalities.π° In the meadow where we hop and play,
New maps of clients lead the way.
With awareness bright, we track with glee,
Each change and update, as clear as can be.
So letβs celebrate with a joyful cheer,
For shared documents now hold us near! πβ¨
[!WARNING]
Rate limit exceeded
@satoren has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 27 seconds before requesting another review.
β How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.π¦ How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information.π₯ Commits
Reviewing files that changed from the base of the PR and between 541ef5ebf66de14d08f5ecdc2ec43b1027abe190 and 8a285fde13ab7b6dce06687fabeaa16001143a3a.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Tests