Repository navigation
Empty a box in the turn its words go on the page - #787
Merged
Merged
Conversation
Adding an option left the reader's words on screen twice: once as the option the press had just drawn, and once still sitting in the add field, until the log answered and cleared it. The two senders in the draft store were split on whether the log alone could supply the gesture's result, and that distinction had stopped being true — every dispatch paints its projected outcome before its delivery resolves, so both senders draw their result before they are answered. `lf-draft` covered for it by closing its editor first; the add field had nothing covering for it. So the mask `sendMessage` kept for itself moves into `standGesture`, which both senders now stage through: the generation is masked in this document at the gesture, the record stands in the store until the log settles it, and a refusal withdraws the result and gives the words back. That also stops a pick made mid-send from stranding the option it was sending. Each pick rewrites the add field's draft, so one made while the send was open minted a new attempt over the generation that send owned; its answer then settled nothing and the words stayed in the box for good. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 18, 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.
Adding an option to an Ask left the reader's words on screen twice: once as the option the press had just drawn, and once still sitting in the add field, until the log answered and cleared it. (There is only one add form — the new option is inserted above it, so the form looks like a second box that appeared below.)
The two senders in the draft store were split on whether the log alone could supply the gesture's result. That distinction had stopped being true: every dispatch paints its projected outcome synchronously before returning the delivery promise, so both senders draw their result before they are answered.
lf-draftcovered for it by closing its editor first, because the open editor also defers projection; the add field had nothing covering for it. It also broke the rule inskills/leaf/assets/CLAUDE.mdthat where the page can produce the result itself, it produces it in the gesture — the page produced it and left the before-state beside it.So the mask
sendMessagekept for itself moves intostandGesture, which both senders now stage through: the generation is masked in this document at the gesture, the record stands in the store until the log settles it, and a refusal withdraws the result and gives the words back.That also stops a pick made mid-send from stranding the option it was sending. Each pick rewrites the add field's draft, because the choice that draft would submit has changed, so one made while the send was open minted a new attempt over the generation that send owned; its answer then settled nothing and the words stayed in the box for good.
Two tests in
tests/test_render_options_addition.pycover the hand-over and the mid-send pick, and both fail against the reverted fix. Alongside the suite I drove the three delivery outcomes in a real browser on a throttled POST: acceptance, a final 400 (option withdrawn, words returned), and a transient failure the outbox retries (mask holds, then settles).