Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "COMPOSITE_MODIFY" websocket message to sync commands editor changes and a client #416

Open
ProjectHSI opened this issue Mar 5, 2025 · 2 comments
Labels
enhancement Something which will improve the user experience. [TOOL] Script Editor This issue applies to the script editor within OpenCAGE.

Comments

@ProjectHSI
Copy link

No description provided.

@ProjectHSI ProjectHSI changed the title Add a "COMPOSITE_MODIFY" command to sync the commands editor and a client Add a "COMPOSITE_MODIFY" websocket message to sync commands editor changes and a client Mar 5, 2025
@MattFiler
Copy link
Owner

this is a nice idea 👍

@MattFiler MattFiler added enhancement Something which will improve the user experience. [TOOL] Script Editor This issue applies to the script editor within OpenCAGE. labels Mar 5, 2025
@ProjectHSI
Copy link
Author

Way I was thinking

The Commands Editor keeps track of every change it has currently made in the session - deletions, modifications, creations, etc.

Once the file is saved, any changes made by Commands Editor do not have to remain in memory - all changes can simply have already been replicated, or a new client can refer to the now-saved updated data.

Case A: Client connects when the Commands Editor has just started/made no changes:
No additional data is synchronised.

Case B: Client connects after the Commands Editor has made a change: The Commands Editor synchronises all changes.

Case C: A change is made while the client is connected: The change is sent over.

This could also be part of an undo-redo system. Synchronised changes can simply be flipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something which will improve the user experience. [TOOL] Script Editor This issue applies to the script editor within OpenCAGE.
Projects
None yet
Development

No branches or pull requests

2 participants