Repository navigation
fix(mothership): keep any queued send the server may already hold from being edited - #8723
Conversation
…m being edited #8717 blocked edits only for a first message the unmount queued itself. A send handed to another surface, or re-queued after its dispatch got no answer, also carries an earlier attempt's id and was still editable; an edit dropped that id and could send a second message. The queue store now marks every message resuming an earlier attempt as admissionUnknown unless the writer knows the server refused it or never got it (a busy refusal, a superseded 409, a Stop that never settled), which also makes a held message editable again once the server refuses it.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Turn on auto-fix | Re-trigger cubic
|
…op and a reload A Send-now whose Stop did not settle sent nothing, but was treated as proof the server lacked the message, so a resumed message became editable. Only a refusal of its id clears that now; an attempt that never left keeps the earlier uncertainty. Queues saved before the guard are normalized when the session restores them.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Follow-up to #8717.
resumeUserMessageIdasadmissionUnknown, unless the writer says the server is known not to have it. Queues restored from the session go through the same guard, so entries saved before this change are covered too. The existing edit guards (store, hook, Edit button) then apply.Type of Change
Testing
does not let a withdrawn send handed to a busy chat be editeddoes not let a queued follow-up be edited after its send got no answerlets a held message be edited again once the server refuses it as busykeeps a resumed message uneditable when its Send-now Stop does not settletreats any message resuming an earlier attempt as possibly sent, unless told otherwise, and a rehydration test (store.dom.test.ts) for queues saved before the guard.admissionUnknown: false: that entry was never sent and resumed no earlier attempt, so the server can't have it.Checklist