yatt-ai / yattie

A tool to help testers test.
GNU General Public License v3.0
59 stars 10 forks source link

Feature/ws #177

Closed Zubs closed 1 month ago

Zubs commented 3 months ago

Pull Request type

Please check the type of change your PR introduces:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

-

-

Does this introduce a breaking change?

Does this introduce UI changes? If so, have they been tested on both dark and light modes?

Other information

dacoaster commented 3 months ago

@Zubs - I took a look at this and had a few thoughts that may be helpful…..

How I would imagine this working is very similar to how it would work with a regular REST API. Essentially whenever the state gets updated, that gets converted to yjs and sent to the backend via a sockets based storage service. You can see the roughly implemented REST API service here: https://github.com/yatt-ai/yattie/blob/ok/integration/src/services/storage-options/restApiService.js and I think that sockets will eventually replace this service when they are ready.

Then whenever the state is updated it is also set to the socket.

People will still be able to use the app locally without the backend connection if they choose so we have to keep in mind that the sockets connection will be optional when running in Electron. but it will not be optional when running in the browser.

for now it may make your job easier to just implement it to only work in the browser and we can add Electron support later.

Let me know what you think and if you have any questions.