-
-
Notifications
You must be signed in to change notification settings - Fork 13
Display user writing notification when editing a message #208
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR! Just curious: I thought we already only allow a user to update their own messages. What is the motivation for this PR?
As long as a user can only update their own messages, I don't see a use-case for only letting a user update one message at a time. I think it makes sense to allow users to have the "edit message" UI open for multiple messages, even if it doesn't make sense. Figuring out a way to do this will probably be easier than managing the canEdit
state correctly 100% of the time.
We also don't need to broadcast the ID of the message being edited through the awareness layer to lock it, because users should never be editing the same message anyways. As long as we have frontend controls for ensuring users only update their own messages, that should be sufficient.
Great E2E testing BTW. We really need to catch up with you all in Jupyter AI. 😅
Before this PR, the input model was created in the message component itself. The model was not aware of this new input model, and could not listen to it to update the awareness. Indeed, currently it allows only one message edition at the time, to avoid multiple input models. |
This PR improves the handling of the writers, by sending also the message being edited.
Related to #202, see #202 (comment) for context (only the last change was required by #202).
Changes
=> only one message can be edited at the same time