Skip to content

ui: show submit button instead of mic and stop buttons when the input has content - #31324

Merged
ggerganov merged 1 commit into
masterfrom
allozaur/fix/chat-submit-button-visibility
Oct 29, 2026
Merged

ggerganov merged 1 commit into
masterfrom
allozaur/fix/chat-submit-button-visibility

Conversation

@allozaur

@allozaur allozaur commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Overview

When the chat input had text, the form kept showing the microphone button (with audio input available) or the stop and skip-reasoning buttons (while a response was streaming) instead of the submit button. ChatFormActions checked a canSubmit prop that ChatForm never passed, so it was always false. It now uses canSend, so the submit button shows whenever there is something to send, including mid-stream where the message is queued or injected as steering.

Demo

Demo

Recorded at ddc3bb6; click the preview for the full video.

Additional information

Demo script
test('demo', async ({ demo, page }) => {
	const input = page.getByRole('textbox', { name: 'Type a message...' });
	const stop = page.getByRole('button', { exact: true, name: 'Stop' });
	const send = page.getByRole('button', { exact: true, name: 'Send' });

	await demo.type(input, 'Write a long story about a lighthouse keeper', 300);
	await demo.press('Enter', 300);
	await expect(stop).toBeVisible({ timeout: 120_000 });
	await demo.caption('While a response streams, the form shows the stop button', 1600);

	await demo.type(input, 'Make it funny', 300);
	await expect(send).toBeVisible();
	await demo.caption('Typing a message brings the send button back, to queue or steer it', 2000);

	await demo.press('ControlOrMeta+a', 100);
	await demo.press('Backspace', 300);
	await expect(stop).toBeVisible();
	await demo.caption('Clearing the input shows stop again', 1600);

	await demo.click(stop, 800);
});

Requirements

ChatFormActions gated the mic and stop buttons on a `canSubmit` prop that
ChatForm never passed, so it was always false and typing text did not swap
them for the submit button. Use `canSend` instead and also hide the
skip-reasoning button while there is content to send.

Assisted-by: Claude (Opus 5.5 Medium)
@ddh0

ddh0 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Thank you!

@allozaur
allozaur marked this pull request as ready for review October 28, 2026 22:29
@allozaur
allozaur requested a review from a team as a code owner October 28, 2026 22:29
Copilot AI balanced review requested due to automatic review settings October 28, 2026 22:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@allozaur allozaur added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Oct 29, 2026
@ggerganov
ggerganov merged commit f5d4d75 into master Oct 29, 2026
7 checks passed
@allozaur allozaur added the video demo PR features a video demo recorded with the UI demo pipeline label Oct 29, 2026
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 30, 2026
ChatFormActions gated the mic and stop buttons on a `canSubmit` prop that
ChatForm never passed, so it was always false and typing text did not swap
them for the submit button. Use `canSend` instead and also hide the
skip-reasoning button while there is content to send.

Assisted-by: Claude (Opus 5.5 Medium)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. server/ui video demo PR features a video demo recorded with the UI demo pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants