Repository navigation
Inbox: a Send survives another tab's save of the same answers - #4109
Merged
Merged
Conversation
A reply names each question by the revision the window read. When another tab or device saved the same answer in between, the reply was refused with question_revision_conflict and the Send stopped, although nothing on screen had changed. The Send now reads the thread again and, when every question it sends still holds the answer the window shows, sends once more at the Inbox's revisions. A different answer, a cleared pick or a question sent elsewhere keeps the refusal.
Owner
|
Merged, thank you. An independent read went through the retry specifically for the ways it could go wrong, and found none: it retries once, only on a revision conflict, only when a fresh read shows every named question still unsent and saying exactly what the window's copy says, and the retry carries no answer, only revisions, so it cannot send something different, send twice, or overwrite a newer answer from the other tab. It will ship in the next release. The same refusal still shows in Decision mode and the picks-only reply; we'll look at giving those the same treatment. |
This was referenced Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4107
A reply names each question it answers by the revision the window read, and the server sends what is saved at that revision. When another tab or device saves the same answer between the window's last save and its Send, the revision moves on and the reply comes back
question_revision_conflict. The window does not retry, so the Send stops with "changed since you read it", even though the answer on screen is the answer the Inbox holds.Changes:
sendOverSameAnswers(new,packages/inbox/data/actions/sendSameAnswers.ts): onquestion_revision_conflictit reads the thread again. If every question the reply sends is still picked with the answer the window shows, it sends once more at the Inbox's revisions. A different answer, a cleared pick, or a question sent from elsewhere keeps the refusal.useSendReplytakes an optionalshownthread; the thread pane's Send passes it (one line inThread.tsx).docs/agent-guides/inbox-messages.mddescribes the rule.The server is unchanged. A reply carries no answer, only a revision, so the store cannot tell a same-answer save from a different one; a stale revision still refuses for every other client.
Tests
packages/inbox/replySameAnswers.test.tsx(new, DOM, against a real Inbox): another client saves the same answer just before the reply goes, so the Send goes again once and writes one reply with no refusal shown. A second case saves a different answer: the refusal stands and nothing is sent. The first fails on main (one reply, refused) and passes here.bun run test:sandbox packages/inbox/replySameAnswers.test.tsx: 2 pass, 0 fail.bun run test:sandbox tests/inbox-structure.test.ts scripts/dom-test-allowlist.test.ts packages/inbox/pickConflict.test.ts packages/inbox/data/actions/sendLanded.test.ts packages/inbox/skipNote.test.tsx packages/inbox/wordsOnlyTwoAsks.test.tsx packages/inbox/replyFeedback.test.tsx: 44 pass, 0 fail.bun run typecheck: passes.e2e: