Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(agents): remove Send next from the agent queue (#9455)

Wolf Mermelsteina28c64b685ab
diff --git a/apps/web/src/components/ui/components/SendButton.tsx b/apps/web/src/components/ui/components/SendButton.tsx
index d76b34dc40..27b4454dfa 100644
--- a/apps/web/src/components/ui/components/SendButton.tsx
+++ b/apps/web/src/components/ui/components/SendButton.tsx
@@ -9,11 +9,6 @@ export type SendButtonProps = Omit<
'size' | 'variant' | 'appearance'
> & {
appearance?: 'default' | 'composer';
- /**
- * Empty composer with a queue waiting: the same send control, ringed so it
- * reads as flushing that queue rather than sending a new message.
- */
- intent?: 'send' | 'flush';
/** Show a spinner instead of the arrow (e.g. while a send mutation is in-flight). */
pending?: boolean;
/** Drop the button from the layout — used to hide on mobile when the input is empty. */
@@ -32,7 +27,6 @@ export function SendButton(props: SendButtonProps) {
'aria-label',
'tooltip',
'actionLabel',
- 'intent',
]);
const resolved = children(() => local.children);
@@ -41,18 +35,10 @@ export function SendButton(props: SendButtonProps) {
variant="primary"
size="icon-md"
draggable={false}
- aria-label={
- local['aria-label'] ??
- (local.intent === 'flush' ? 'Flush queued messages' : 'Send')
- }
- tooltip={
- local.tooltip ??
- (local.intent === 'flush' ? 'Flush queued messages' : 'Send')
- }
- data-intent={local.intent === 'flush' ? 'flush' : undefined}
+ aria-label={local['aria-label'] ?? 'Send'}
+ tooltip={local.tooltip ?? 'Send'}
class={cn(
'border-0',
- local.intent === 'flush' && 'ring-2 ring-accent/60',
local.appearance === 'composer' &&
local.actionLabel &&
'not-touch:w-auto! not-touch:aspect-auto! not-touch:px-3 not-touch:gap-1.5',
diff --git a/apps/web/src/features/agents-view/components/ChatComposer.test.tsx b/apps/web/src/features/agents-view/components/ChatComposer.test.tsx
index afb3437067..88eda045f3 100644
--- a/apps/web/src/features/agents-view/components/ChatComposer.test.tsx
+++ b/apps/web/src/features/agents-view/components/ChatComposer.test.tsx
@@ -339,18 +339,16 @@ describe('Chat session input', () => {
expect(send).toHaveBeenCalledWith('Next request', []);
});
- it('advances a queued prompt with Enter only when the draft is empty', () => {
+ it('never stops the turn from Enter on an empty draft', () => {
const send = vi.fn();
const stop = vi.fn();
- render(() => (
- <ChatSessionInput busy hasQueuedMessages onSend={send} onStop={stop} />
- ));
+ render(() => <ChatSessionInput busy onSend={send} onStop={stop} />);
editor.enter?.(undefined, '');
- expect(stop).toHaveBeenCalledOnce();
+ expect(stop).not.toHaveBeenCalled();
type('Another request');
editor.enter?.(undefined, editor.text);
expect(send).toHaveBeenCalledWith('Another request', []);
- expect(stop).toHaveBeenCalledOnce();
+ expect(stop).not.toHaveBeenCalled();
});
describe('on a touch device', () => {
@@ -372,24 +370,6 @@ describe('Chat session input', () => {
expect(hapticImpact).toHaveBeenCalledExactlyOnceWith('light');
});
- it('does not advance the queue from Enter either', () => {
- const stop = vi.fn();
- render(() => (
- <ChatSessionInput
- busy
- hasQueuedMessages
- onSend={vi.fn()}
- onStop={stop}
- />
- ));
- expect(editor.enter?.(undefined, '')).toBe(false);
- expect(stop).not.toHaveBeenCalled();
- fireEvent.click(
- screen.getByRole('button', { name: 'Flush queued messages' })
- );
- expect(stop).toHaveBeenCalledOnce();
- });
-
it('applies to a new conversation as well', () => {
const send = vi.fn();
render(() => (
@@ -586,7 +566,6 @@ describe('attachments in the shared composer', () => {
render(() => (
<ChatSessionInput
busy
- hasQueuedMessages
onSend={send}
onStop={stop}
attachments={attachments()}
diff --git a/apps/web/src/features/agents-view/components/ChatComposer.tsx b/apps/web/src/features/agents-view/components/ChatComposer.tsx
index d150e04dcc..85148e04ef 100644
--- a/apps/web/src/features/agents-view/components/ChatComposer.tsx
+++ b/apps/web/src/features/agents-view/components/ChatComposer.tsx
@@ -115,11 +115,6 @@ export function ChatComposer(props: {
const drawerOpen = () => props.drawerOpen && !collapsed();
useTouchOutsideToDismissKeyboard(() => container);
const disabled = () => !!props.blockedReason || props.session?.disabled;
- const canSendNext = () =>
- !hasContent() &&
- props.session?.hasQueuedMessages &&
- props.session.onStop &&
- !disabled();
const editor = buildConfig('chat')
.withAppLinkResolver(useMacroMentionLinkResolver())
.namespace('agents-chat-composer')
@@ -144,7 +139,6 @@ export function ChatComposer(props: {
// button is the only way to submit.
if (isTouchDevice()) return false;
if (markdown.trim() || attachments().length > 0) send(markdown);
- else if (canSendNext()) sendNext();
return true;
})
.onFocusLeave({
@@ -226,10 +220,6 @@ export function ChatComposer(props: {
props.onSend(prompt, attached);
};
- const sendNext = () => {
- if (canSendNext()) (props.session?.onSendNext ?? props.session?.onStop)?.();
- };
-
const focusEditor = (event: Event) => {
const target = event.target as HTMLElement | null;
if (
@@ -465,8 +455,8 @@ export function ChatComposer(props: {
</div>
<Show
when={
- (props.session?.busy || canSendNext()) &&
- props.session?.onStop &&
+ props.session?.busy &&
+ props.session.onStop &&
!hasContent()
}
fallback={
@@ -485,34 +475,17 @@ export function ChatComposer(props: {
/>
}
>
- <Show
- when={canSendNext()}
- fallback={
- <Button
- aria-label="Stop"
- tooltip="Stop"
- variant="secondary"
- class="touch:glass touch:bg-chrome touch:text-ink touch:data-disabled:bg-chrome"
- size="icon-md"
- disabled={disabled()}
- onClick={() => props.session?.onStop?.()}
- >
- <div class="size-3.5 rounded-sm bg-current" />
- </Button>
- }
+ <Button
+ aria-label="Stop"
+ tooltip="Stop"
+ variant="secondary"
+ class="touch:glass touch:bg-chrome touch:text-ink touch:data-disabled:bg-chrome"
+ size="icon-md"
+ disabled={disabled()}
+ onClick={() => props.session?.onStop?.()}
>
- <SendButton
- appearance="composer"
- class="touch:bg-transparent touch:text-ink touch:data-disabled:bg-transparent"
- intent="flush"
- aria-label="Flush queued messages"
- tooltip={{
- content: 'Flush queued messages',
- shortcut: 'Enter',
- }}
- onClick={sendNext}
- />
- </Show>
+ <div class="size-3.5 rounded-sm bg-current" />
+ </Button>
</Show>
</div>
</div>
diff --git a/apps/web/src/features/block-agent/agent-session-provider.tsx b/apps/web/src/features/block-agent/agent-session-provider.tsx
index 5524a78bad..c09df96e08 100644
--- a/apps/web/src/features/block-agent/agent-session-provider.tsx
+++ b/apps/web/src/features/block-agent/agent-session-provider.tsx
@@ -189,7 +189,6 @@ export function AgentSessionProvider(
turn,
issue: live.issue,
selectModel: live.selectModel,
- sendNext: steering.sendNext,
steer: steering.steer,
steerFailed: steering.failed,
interactions,
diff --git a/apps/web/src/features/block-agent/component/AgentComposer.test.tsx b/apps/web/src/features/block-agent/component/AgentComposer.test.tsx
index 1a7740d5e8..331a9d25b8 100644
--- a/apps/web/src/features/block-agent/component/AgentComposer.test.tsx
+++ b/apps/web/src/features/block-agent/component/AgentComposer.test.tsx
@@ -1,5 +1,5 @@
import type { TurnState } from '@service-agent-fold/generated/types';
-import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';
+import { cleanup, render } from '@solidjs/testing-library';
import { createSignal } from 'solid-js';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import type { AgentInputProps } from '../ui/AgentInput';
@@ -12,7 +12,6 @@ const mocks = vi.hoisted(() => ({
turn: () => 'idle' as TurnState,
issue: vi.fn(),
selectModel: vi.fn(),
- sendNext: vi.fn(),
steer: vi.fn(),
editQueued: vi.fn(),
removeQueued: vi.fn(),
@@ -61,7 +60,6 @@ vi.mock('../context/AgentSessionContext', () => ({
remove: mocks.removeQueued,
steer: mocks.steerQueued,
},
- sendNext: mocks.sendNext,
steer: mocks.steer,
steerFailed: () => new Set(),
turn: () => mocks.turn(),
@@ -116,7 +114,6 @@ describe('view-only session controls', () => {
mocks.input?.onSend('A new prompt', []);
mocks.input?.onStop?.();
- mocks.input?.onSendNext?.();
mocks.input?.onAttachFiles?.([new File(['text'], 'note.txt')]);
mocks.model?.onSelect('new-model');
mocks.queued?.onEdit('queued-1', 'Edited prompt');
@@ -124,7 +121,6 @@ describe('view-only session controls', () => {
expect(mocks.issue).not.toHaveBeenCalled();
expect(mocks.selectModel).not.toHaveBeenCalled();
- expect(mocks.sendNext).not.toHaveBeenCalled();
expect(mocks.upload).not.toHaveBeenCalled();
expect(mocks.consumeNotes).not.toHaveBeenCalled();
mocks.queued?.onSteer?.('queued-1');
@@ -179,23 +175,16 @@ describe('view-only session controls', () => {
);
});
-it('keeps force-sending the queue head while the turn transitions', () => {
+it('keeps steering queued messages while the turn transitions', () => {
const [turn, setTurn] = createSignal<TurnState>('running');
mocks.turn = turn;
mocks.session = () => ({ canEdit: true });
render(() => <AgentComposer />);
expect(mocks.queued?.onSteer).toEqual(expect.any(Function));
- const sendNext = screen.getByRole('button', {
- name: 'Send next queued message now',
- });
- fireEvent.click(sendNext);
- expect(mocks.sendNext).toHaveBeenCalledTimes(1);
for (const next of ['stopping', 'starting'] as const) {
setTurn(next);
expect(mocks.queued?.onSteer).toEqual(expect.any(Function));
- fireEvent.click(sendNext);
}
- expect(mocks.sendNext).toHaveBeenCalledTimes(3);
});
it('retains an unsent draft when speed configuration is rejected', async () => {
diff --git a/apps/web/src/features/block-agent/component/AgentComposer.tsx b/apps/web/src/features/block-agent/component/AgentComposer.tsx
index e0c79901d0..04493bb099 100644
--- a/apps/web/src/features/block-agent/component/AgentComposer.tsx
+++ b/apps/web/src/features/block-agent/component/AgentComposer.tsx
@@ -5,8 +5,6 @@ import {
speedForModel,
} from '@core/component/AI/constant/speed';
import { fastModeEnabled } from '@core/component/AI/signal/speed';
-import ArrowUp from '@icon/system/regular/arrow-up.svg';
-import { Button } from '@ui';
/**
* The block's composer container: reads the session from context and drives
* the dumb `AgentInput` with derived props. Every in-flight state it shows
@@ -79,7 +77,6 @@ export function AgentComposer(props: {
metadata,
pending,
queue,
- sendNext,
steer,
steerFailed,
turn,
@@ -248,23 +245,8 @@ export function AgentComposer(props: {
<>
<Show when={queuedItems().length > 0}>
<div class="pb-1.5">
- <div class="mb-1 flex items-center justify-between gap-2 px-1">
- <span class="text-xs text-ink-muted">
- {queuedItems().length} queued
- </span>
- <Button
- variant="secondary"
- size="sm"
- class="touch:min-h-11"
- aria-label="Send next queued message now"
- disabled={readOnly() || loadFailed() || pending()}
- onClick={() => {
- if (!readOnly()) sendNext();
- }}
- >
- <ArrowUp class="size-4" />
- Send next
- </Button>
+ <div class="mb-1 px-1 text-xs text-ink-muted">
+ {queuedItems().length} queued
</div>
<div class="max-h-[25dvh] overflow-y-auto overscroll-contain">
<QueuedPrompts
@@ -329,7 +311,6 @@ export function AgentComposer(props: {
readOnly={readOnly()}
autofocus={props.autofocus}
busy={busy()}
- hasQueuedMessages={queuedItems().length > 0}
// Prompts go straight to the service, so sending needs a session to
// post to — a block whose create is still on the wire can be typed
// into, but not sent from, until the id lands.
@@ -344,9 +325,6 @@ export function AgentComposer(props: {
'agent-composer'
)
}
- onSendNext={() => {
- if (!readOnly()) sendNext();
- }}
modelName={modelLabel(
metadata()?.model ?? undefined,
metadata()?.supportedModels.find(
diff --git a/apps/web/src/features/block-agent/context/AgentSessionContext.tsx b/apps/web/src/features/block-agent/context/AgentSessionContext.tsx
index 4d4ac70c23..d695cd0c44 100644
--- a/apps/web/src/features/block-agent/context/AgentSessionContext.tsx
+++ b/apps/web/src/features/block-agent/context/AgentSessionContext.tsx
@@ -73,11 +73,6 @@ export type AgentSessionState = {
issue: (action: AgentAction) => Promise<IssueResult> | undefined;
/** Resolve only after the runtime confirms the selected model and effort. */
selectModel: (model: string, effort?: EffortSelection) => Promise<void>;
- /**
- * Force-send the oldest queued message: the same as {@link steer} on the
- * queue head. No-op with nothing queued.
- */
- sendNext: () => void;
/**
* Force-send one queued message: show it as sent at once, move it to the
* front of the queue, and cancel the turn in flight so it runs next.
diff --git a/apps/web/src/features/block-agent/context/steer.test.ts b/apps/web/src/features/block-agent/context/steer.test.ts
index cf221a1ca5..44bd767dfa 100644
--- a/apps/web/src/features/block-agent/context/steer.test.ts
+++ b/apps/web/src/features/block-agent/context/steer.test.ts
@@ -71,7 +71,7 @@ describe('createSteering', () => {
steering.steer('first');
steering.steer('second');
- steering.sendNext();
+ steering.steer('third');
steering.steer('first');
expect(expectAction.mock.calls).toEqual([
diff --git a/apps/web/src/features/block-agent/context/steer.ts b/apps/web/src/features/block-agent/context/steer.ts
index b10f071bfa..26eb0ea459 100644
--- a/apps/web/src/features/block-agent/context/steer.ts
+++ b/apps/web/src/features/block-agent/context/steer.ts
@@ -1,8 +1,7 @@
/**
- * Force-sending queued messages: Steer on a row, and Send next for the
- * oldest one. Each press shows its message as sent at once and asks the
- * server to run it next - the server moves that entry to the front and
- * cancels the turn in flight. The dispatched row arrives under the same id
+ * Force-sending queued messages with Steer on a row. Each press shows its
+ * message as sent at once and asks the server to run it next - the server
+ * moves that entry to the front and cancels the turn in flight. The dispatched row arrives under the same id
* and promotes the speculation in place.
*
* Presses never wait on each other in the UI, but their steers go out one
@@ -32,8 +31,6 @@ export function actionForQueuedEntry(
export type Steering = {
/** Force-send this queued entry. */
steer: (actionId: string) => void;
- /** Force-send the oldest entry the composer still shows as queued. */
- sendNext: () => void;
/** Entries whose last force-send the server refused; they stay queued. */
failed: Accessor<ReadonlySet<string>>;
};
@@ -101,12 +98,5 @@ export function createSteering(session: {
setBacklog((current) => [...current, actionId]);
};
- return {
- steer,
- sendNext: () => {
- const head = session.entries()[0];
- if (head) steer(head.actionId);
- },
- failed,
- };
+ return { steer, failed };
}
diff --git a/apps/web/src/features/block-agent/debug/Gallery.tsx b/apps/web/src/features/block-agent/debug/Gallery.tsx
index 66fa71e22d..78ff973b2b 100644
--- a/apps/web/src/features/block-agent/debug/Gallery.tsx
+++ b/apps/web/src/features/block-agent/debug/Gallery.tsx
@@ -255,13 +255,9 @@ function QueuedInFlightDemo() {
/>
<AgentInput
busy
- hasQueuedMessages={items().length > 0}
onSend={() => setNote('Typed text still sends as a new queued prompt.')}
onStop={() =>
- setNote('Flush stops the turn so the queue drains, oldest first.')
- }
- onSendNext={() =>
- setNote('Flush stops the turn so the queue drains, oldest first.')
+ setNote('Stop ends the turn so the queue drains, oldest first.')
}
/>
</div>
diff --git a/apps/web/src/features/block-agent/ui/AgentInput.test.tsx b/apps/web/src/features/block-agent/ui/AgentInput.test.tsx
index 6eb138225b..c8f313b2de 100644
--- a/apps/web/src/features/block-agent/ui/AgentInput.test.tsx
+++ b/apps/web/src/features/block-agent/ui/AgentInput.test.tsx
@@ -187,44 +187,19 @@ describe('on a touch device', () => {
expect(onSend).toHaveBeenCalledWith('first line', []);
expect(editor.clear).toHaveBeenCalledOnce();
});
-
- it('does not advance the queue from Enter either', () => {
- const onStop = vi.fn();
- render(() => (
- <AgentInput busy hasQueuedMessages onSend={vi.fn()} onStop={onStop} />
- ));
-
- expect(editor.enter?.()).toBe(false);
- expect(onStop).not.toHaveBeenCalled();
-
- fireEvent.click(
- screen.getByRole('button', { name: 'Flush queued messages' })
- );
- expect(onStop).toHaveBeenCalledOnce();
- });
});
-describe('queued message advancement', () => {
- it('keeps view-only drafts, stop, and queue advancement inert', () => {
+describe('while the agent is working', () => {
+ it('keeps view-only drafts and stop inert', () => {
const onSend = vi.fn();
const onStop = vi.fn();
- const onSendNext = vi.fn();
- render(() => (
- <AgentInput
- readOnly
- busy
- hasQueuedMessages
- onSend={onSend}
- onStop={onStop}
- onSendNext={onSendNext}
- />
- ));
+ render(() => <AgentInput readOnly busy onSend={onSend} onStop={onStop} />);
expect(
screen.getByTestId('agent-input-editor').getAttribute('data-disabled')
).toBe('true');
const stop = screen.getByRole('button', {
- name: 'Flush queued messages',
+ name: 'Stop',
}) as HTMLButtonElement;
expect(stop.disabled).toBe(true);
fireEvent.click(stop);
@@ -234,37 +209,16 @@ describe('queued message advancement', () => {
expect(onSend).not.toHaveBeenCalled();
expect(onStop).not.toHaveBeenCalled();
- expect(onSendNext).not.toHaveBeenCalled();
});
- it('shows a ringed send action that flushes the next queued message', () => {
+ it('never stops the turn from Enter on an empty draft', () => {
+ const onSend = vi.fn();
const onStop = vi.fn();
- render(() => (
- <AgentInput busy hasQueuedMessages onSend={vi.fn()} onStop={onStop} />
- ));
-
- const sendNext = screen.getByRole('button', {
- name: 'Flush queued messages',
- });
- expect(sendNext.hasAttribute('disabled')).toBe(false);
- expect(sendNext.getAttribute('data-intent')).toBe('flush');
- expect(screen.getByTestId('send-icon')).toBeTruthy();
-
- fireEvent.click(sendNext);
- expect(onStop).toHaveBeenCalledTimes(1);
+ render(() => <AgentInput busy onSend={onSend} onStop={onStop} />);
editor.enter?.();
- expect(onStop).toHaveBeenCalledTimes(2);
- });
-
- it('sends typed text instead of advancing past it', () => {
- const onSend = vi.fn();
- const onStop = vi.fn();
-
- render(() => (
- <AgentInput busy hasQueuedMessages onSend={onSend} onStop={onStop} />
- ));
+ expect(onStop).not.toHaveBeenCalled();
editor.change?.(' another request ');
editor.enter?.();
@@ -288,7 +242,6 @@ describe('queued message advancement', () => {
render(() => (
<AgentInput
busy
- hasQueuedMessages
onSend={onSend}
onStop={onStop}
attachments={[uploaded]}
@@ -297,9 +250,6 @@ describe('queued message advancement', () => {
));
// Attached files are a draft: both tapping Send and Enter send them.
- expect(
- screen.queryByRole('button', { name: 'Flush queued messages' })
- ).toBeNull();
expect(screen.getByRole('button', { name: 'Send' })).toBeTruthy();
expect(screen.queryByRole('button', { name: 'Stop' })).toBeNull();
diff --git a/apps/web/src/features/block-agent/ui/AgentInput.tsx b/apps/web/src/features/block-agent/ui/AgentInput.tsx
index 2497a7f11d..835390a87e 100644
--- a/apps/web/src/features/block-agent/ui/AgentInput.tsx
+++ b/apps/web/src/features/block-agent/ui/AgentInput.tsx
@@ -74,18 +74,6 @@ export interface AgentInputProps {
onDraftChange?: (draft: string) => void;
/** The agent is working: the send button becomes a stop square. */
busy?: boolean;
- /**
- * A waiting action can be flushed by ending the current turn. While the
- * input is empty, Enter and the send button do exactly that. The button
- * stays a send arrow, ringed so it reads as flush rather than a new message.
- */
- hasQueuedMessages?: boolean;
- /**
- * Enter or the send button with an empty input and a queued message. Falls
- * back to `onStop`, which is the mechanism: the queue advances when the
- * turn it waits on ends.
- */
- onSendNext?: () => void;
disabled?: boolean;
/** View-only sessions cannot edit drafts; pending sessions still can. */
readOnly?: boolean;
@@ -212,30 +200,6 @@ export function AgentInput(props: AgentInputProps) {
props.onSend(content, attached);
};
- // Deliberately not gated on `busy`. A speculated stop reads as done
- // everywhere else, so `busy` is already false while the runtime is still
- // winding the turn down - and that is exactly when a waiting message is
- // most worth advancing. Attached files are something to send in their own
- // right, so they hold it back.
- const canSendNext = () =>
- !dictation.active() &&
- markdown().trim().length === 0 &&
- attachments().length === 0 &&
- props.hasQueuedMessages === true &&
- !props.disabled &&
- !props.readOnly &&
- props.onStop !== undefined;
-
- const sendNext = () => {
- if (!canSendNext()) return;
- // Without `onSendNext`, Stop is the mechanism: it bypasses the server
- // queue, the fold shows it at once as a pending Stopped line, and when the runtime ends the cancelled turn the server
- // dispatches the oldest waiting action, so the queue remains FIFO. How
- // soon that is depends on the runtime - a booting sandbox cannot be
- // interrupted until it is up.
- (props.onSendNext ?? props.onStop)?.();
- };
-
const editor = buildConfig('chat')
.withAppLinkResolver(useMacroMentionLinkResolver())
.namespace('agent-input')
@@ -266,7 +230,6 @@ export function AgentInput(props: AgentInputProps) {
// button is the only way to submit.
if (isTouchDevice()) return false;
if (canSend()) send();
- else sendNext();
return true;
})
.onFocusLeave({
@@ -473,52 +436,31 @@ export function AgentInput(props: AgentInputProps) {
disabled={props.disabled || props.readOnly}
/>
<Show
- when={
- props.hasQueuedMessages &&
- markdown().trim().length === 0 &&
- attachments().length === 0
- }
+ when={props.busy && props.onStop && !canSend()}
fallback={
- <Show
- when={props.busy && props.onStop && !canSend()}
- fallback={
- <SendButton
- appearance="composer"
- tooltip="Send"
- disabled={!canSend()}
- onClick={send}
- />
- }
- >
- <Button
- aria-label="Stop"
- tooltip="Stop"
- variant={isTouchDevice() ? 'ghost' : 'secondary'}
- size="icon-md"
- disabled={props.disabled || props.readOnly}
- onClick={() => props.onStop?.()}
- class={
- isTouchDevice()
- ? 'size-7.5 text-ink-extra-muted not-disabled:bg-ink/5 not-disabled:hover:bg-ink/10'
- : undefined
- }
- >
- <div class="size-3.5 not-touch:size-[13.125px] rounded-sm bg-current" />
- </Button>
- </Show>
+ <SendButton
+ appearance="composer"
+ tooltip="Send"
+ disabled={!canSend()}
+ onClick={send}
+ />
}
>
- <SendButton
- appearance="composer"
- intent="flush"
- aria-label="Flush queued messages"
- tooltip={{
- content: 'Flush queued messages',
- shortcut: 'Enter',
- }}
- onClick={sendNext}
- disabled={!canSendNext()}
- />
+ <Button
+ aria-label="Stop"
+ tooltip="Stop"
+ variant={isTouchDevice() ? 'ghost' : 'secondary'}
+ size="icon-md"
+ disabled={props.disabled || props.readOnly}
+ onClick={() => props.onStop?.()}
+ class={
+ isTouchDevice()
+ ? 'size-7.5 text-ink-extra-muted not-disabled:bg-ink/5 not-disabled:hover:bg-ink/10'
+ : undefined
+ }
+ >
+ <div class="size-3.5 not-touch:size-[13.125px] rounded-sm bg-current" />
+ </Button>
</Show>
</div>
</div>
diff --git a/docs/agent-guide/ai-chat.md b/docs/agent-guide/ai-chat.md
index 5abfd6f716..2d7175897e 100644
--- a/docs/agent-guide/ai-chat.md
+++ b/docs/agent-guide/ai-chat.md
@@ -240,13 +240,12 @@ sessions. Existing legacy chat rows still open their original chats. Contextual
chat actions use agent sessions regardless of the flag; without the flag, the
legacy list and flag-gated composer flows remain available.
-While an agent works, a draft can be sent to its queue. Above the queue,
-**Send next** explicitly interrupts the current turn and sends the oldest queued
-message. The empty composer offers the same action as **Flush queued messages**
-with a ringed send arrow; with a draft it offers **Send**. Each queued row offers
-**Steer** while a turn is running, to interrupt it and send that row next. With no
-draft or queue, the busy composer offers **Stop**. Send next and Steer stay
-available while a previous one is starting; read-only sessions get neither.
+While an agent works, a draft can be sent to its queue; queued messages send in
+order as each turn ends. The busy composer offers **Send** with a draft and
+**Stop** without one; Enter on an empty draft does nothing. Each queued row
+offers **Steer** while a turn is running, to interrupt it and send that row next.
+Steer stays available while a previous one is starting; read-only sessions don't
+get it.
Phone verification: check portrait and landscape with touch emulation. In the
Agents composer, enter multiple lines and tap Send, attach, or the model control;
@@ -2048,14 +2047,11 @@ must stay hidden; subsequent live messages must still appear.
user message in the transcript.
- Keyboard: Up at the very start of the composer input moves focus into the
bottom (next-to-send) queue row; further Up presses walk toward newer entries, Down
- walks back and past the bottom row returns to the input. When the composer is empty
- and a prompt is queued, its action becomes `Flush queued messages` (the send arrow,
- with a ring so it reads as flushing the queue rather than sending a new message);
- pressing Enter or clicking that button cancels the current turn so the queue drains
- in order, oldest first. Steer on a queued row is the interrupt for that one message;
- flush sends whatever is already next. Each advance or Steer shows its message as a
- pending bubble at once and drops its row; consecutive ones never wait on each other in
- the UI. Their steer requests go out one at a time in press order, each after the
+ walks back and past the bottom row returns to the input. With an empty composer the
+ busy action is Stop, and Enter does nothing; the queue drains in order, oldest first,
+ as each turn ends. Steer on a queued row is the interrupt for that one message. Each
+ Steer shows its message as a pending bubble at once and drops its row; consecutive
+ ones never wait on each other in the UI. Their steer requests go out one at a time in press order, each after the
previous message leaves the server queue, so three rapid presses send three messages,
each once, in that order. A refused steer brings its row back labelled `Not sent`; it
stays queued and can be steered again. Typed composer text still takes priority and Enter