You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inbox: a Send is refused when another tab saved the same answers in between #4107
What happens
I answer a thread's questions in one tab while the same thread is open in another tab (or on my phone), and both save the same answers. When I press Send, the reply comes back question_revision_conflict and the window stops with "changed since you read it". The answers on screen are exactly the answers the Inbox holds, but nothing is sent and the window does not try again.
Cause
A reply names each question it answers by the revision the window read, and the store refuses whenever that revision is no longer the saved one (record.revision !== entry.revision in packages/shared/inbox/store.ts). Another client's save of the same answer moves the revision on. The reply carries no answer, only the revision, so the store cannot tell a save of the same answer from a different one. The window's Send (sendReply.mutateAsync in Thread.tsx) sends once and shows the refusal.
Fix
On question_revision_conflict, the window reads the thread again. If every question it sends is still picked with the answer it shows, it sends once more at the Inbox's revisions; otherwise the refusal stands. The server stays as it is, so every other client keeps today's behaviour.
Activity