fix: preserve composer drafts during pending user input#1082
fix: preserve composer drafts during pending user input#1082Githubguy132010 wants to merge 3 commits intopingdotgg:mainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What Changed
Why
Pending custom answers were reusing the main composer state, which caused the user's normal draft to be replaced while answering follow-up questions. This change isolates those two editing flows so plan-mode responses remain predictable and the original draft is restored afterward.
Screenshots
Checklist
Note
Preserve composer drafts during pending user input in ChatView
resolveComposerDraftTextin ChatView.logic.ts to select between a pending custom answer and the main prompt as the visible composer value.applyPromptReplacementthrough the active visible value so edits target the correct state (custom answer vs. main prompt).onPromptChangeandreadComposerSnapshotnow route mutations to either the custom answer state or the main prompt store depending on whether a pending user input is active.Macroscope summarized 49a1884.