Skip to content

fix(prompt-input): preserve draft edits during async submission - #522

Open
NicolasMilliard wants to merge 1 commit into
vercel:mainfrom
NicolasMilliard:fix/prompt-input-preserve-draft-on-async-submit
Open

NicolasMilliard wants to merge 1 commit into
vercel:mainfrom
NicolasMilliard:fix/prompt-input-preserve-draft-on-async-submit

Conversation

@NicolasMilliard

Copy link
Copy Markdown

Summary

Fixes #518.

When PromptInput uses PromptInputProvider, the textarea remains editable while an async submission is pending. A successful submission previously cleared the current draft, including text entered after submission started.

The provider now clears its text only if it still matches the submitted text. Tests cover edits made during a pending submission, an unchanged draft after success, and a failed submission.

Validation

  • pnpm test — 961 tests passed
  • pnpm build --filter ai-elements --filter docs — passed
  • Direct Oxlint and Oxfmt checks on both changed files — passed

@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@NicolasMilliard is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PromptInput: successful async submit clears text typed while the submit was pending

1 participant