yorkie-team / codepair

Build your own AI-powered collaborative markdown editor in just 5 minutes
https://codepair.yorkie.dev
Apache License 2.0
49 stars 19 forks source link

Set client key when activating clients in frontend #373

Open window9u opened 1 month ago

window9u commented 1 month ago

What would you like to be added: Currently, when activating a client in the Codepair frontend, we don't specify a key for the client. This leads to the creation of a new client each time using Yorkie. If a key is not provided, a random client key is automatically generated.

I propose adding an option in the Codepair frontend to allow users to set their own keys as UUIDs during the activation process. This can be implemented using the key option in the ClientOptions interface (link).

Why is this needed: This enhancement could have several benefits:

Current Scenario (as-is):

Currently, a single user can connect simultaneously to a document as if they are multiple users.

Proposed Scenario (to-be): Implementing this feature would likely restrict a single user to one active connection per document, improving the integrity of document edits and user sessions. link