OpenCAGE icon indicating copy to clipboard operation
OpenCAGE copied to clipboard

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

Open ProjectHSI opened this issue 9 months ago • 2 comments

ProjectHSI avatar Mar 05 '25 08:03 ProjectHSI

this is a nice idea 👍

MattFiler avatar Mar 05 '25 19:03 MattFiler

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.

ProjectHSI avatar Mar 06 '25 06:03 ProjectHSI