Conversation
Selecting an option for a pending user-input question replaced the custom answer with an empty string, so anything the user had typed into the composer while the question was active was discarded. The typed text now moves into the thread draft and comes back once the question resolves. The composer also resyncs its shared prompt ref from the thread draft when the question clears; before, Send read the stale answer text instead of the draft shown in the editor. Fixes pingdotgg#12569. Done with Claude Code, model Claude Fable 5.1. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Owner
Author
|
Superseded by pingdotgg#12575. |
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.
What Changed
Clicking an option in a pending user-input question no longer discards text typed into the composer.
pendingUserInput.ts: new pure helpercarryDisplacedCustomAnswerIntoPromptwith tests.ChatView.tsx:onSelectActivePendingUserInputOptionmoves a non-empty custom answer into the thread draft before the option replaces it.ChatComposer.tsx: when the question clears, the shared prompt ref is resynced from the thread draft.Why
While a question is active the composer edits the question's custom answer. Selecting an option rebuilds that answer with
customAnswer: "", because a custom answer outranks selected options. Anything the user typed in the meantime is gone: not in the answer, not in the draft, not in any message. Fixes pingdotgg#12569.The second change closes a related gap: after the question resolved, the composer showed the thread draft but the prompt ref still held the last answer text, so Send without further typing read the wrong value.
Text moved into the draft comes back in the composer once the question resolves and is sent as the next message, same as text typed before the question arrived. Mobile keeps the answer in its own input on the question card and is not affected.
UI Changes
No visual change. Interaction: type while a question is open, click an option, the text stays in the draft and reappears when the question clears.
Checklist
Validation:
dfbb11bdd: type while a single-choice question is open, click an option. The composer empties and the text is not in the draft, the answer, or any message.typecheckforapps/web, targeted lint with only pre-existing warnings.Tests cover the new helper only. There is no regression test that fails on
main: the drop happens inside theChatViewhandler, and a test there costs more than the fix. We chose to skip it on purpose for now, not sure yet whether it would be overengineering for a change this size. Feedback welcome.lovely composed in pair with Claude Fable 5.1 in Claude Code