-
Notifications
You must be signed in to change notification settings - Fork 42
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
Failed replies may disappear from UI #294
Comments
NoteThis issue came up when @heartsucker and I were discussing issue #289, which occurred when we were expecting to have a def send_reply(self, message: str) -> None:
msg_uuid = str(uuid4())
self.conversation.add_reply(msg_uuid, message)
self.controller.send_reply(self.source.uuid, msg_uuid, message) This is the reason we could end up in a situation where a journalist loses the reply that they wrote. What we should do instead is make sure the reply is stored locally first. As far as reordering goes, I personally think it's fine to "reorder." If a journalist is offline, maybe by choice or because of a networking issue, then they should be able to see that their replies have not actually been sent yet (maybe by a
So, yes, I think this is fine. In this scenario J4 is J4-queued which will become J5 after S4 comes in.
This would make sense if J4 was actually sent |
This is the expected behavior, some reordering may be necessary on the client side such that there is consistent ordering between server (what the source sees) and client (what the journalist sees).
This is a legitimate bug, we should store the failed replies persistently somewhere in the local database in order for them to persist in the conversation view (renamed this ticket accordingly). |
When a reply is sent to a source, it is added to the conversation without a corresponding database object (i.e., it is transient). A UUID is attached to that widget so when the reply API call is successful or failed the widget can update accordingly.
Consider this:
self.clear_conversation()
then rebuild the UI from the messages in the database. These are populated from what the server tells us.This means that if the reply the journalist sent was never received by the server, it will disappear from the UI (bug), or that the UI may re-order so the journalist sees a different order of messages in the UI after the sync (possible bug?).
The text was updated successfully, but these errors were encountered: