Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ca356d0
Advertise mid-turn queueing as queued-messages.v2
brennanb2025 Oct 30, 2026
3011eed
Let each desktop send choose queue or steer while the agent works
brennanb2025 Oct 30, 2026
e4509b8
Hold Send on the phone to queue or steer a message mid-turn
brennanb2025 Oct 30, 2026
b8202fb
Read the follow-up default from one place on desktop and phone
brennanb2025 Oct 30, 2026
7f801fd
Keep phone follow-up choices aligned with live host state
brennanb2025 Oct 30, 2026
4bc897d
Update stream and wire fixtures for live follow-up preferences
brennanb2025 Oct 30, 2026
37f20a9
Document minimal runtime test fixture assertions
brennanb2025 Oct 30, 2026
3a2aa8a
Keep mobile preference tests in the mobile compiler project
brennanb2025 Oct 30, 2026
6ffbfc2
feat(native-chat): queue follow-ups by default with a toggle
brennanb2025 Oct 31, 2026
658ec09
test(mobile): assert shared preference renders on real changes
brennanb2025 Oct 31, 2026
9e3261d
Remove obsolete follow-up option translations
brennanb2025 Oct 31, 2026
cd96b59
Describe Cmd/Ctrl+Enter relative to the Queue follow-ups switch
brennanb2025 Oct 31, 2026
6a71515
Show what a mid-turn phone Send does, and offer the other way only wh…
brennanb2025 Oct 31, 2026
ebfb2fe
Steer the head card once while its shortcut is held
brennanb2025 Oct 31, 2026
b0f1449
Show beside Stop what Enter does while the agent works
brennanb2025 Oct 31, 2026
5ca2298
Test the send keys and Queue follow-ups search against real wiring
brennanb2025 Oct 31, 2026
63b8771
Merge origin/main into brennanb2025/queue-switch-on-pr
brennanb2025 Oct 31, 2026
6099958
Move the composer's send-hold check into its own helper
brennanb2025 Oct 31, 2026
7616809
Disable the mid-turn Queue/Steer button whenever Send would be disabled
brennanb2025 Oct 31, 2026
51c214c
Hide the mid-turn Queue/Steer button in goal mode
brennanb2025 Oct 31, 2026
5f4f964
Fix the Russian queue hint to say the message runs after this turn
brennanb2025 Oct 31, 2026
be27d15
Stub window.api without a type assertion in the Queue follow-ups sett…
brennanb2025 Oct 31, 2026
df44a46
Pass sendHeld to the composer field in tests and drop an unknown sett…
brennanb2025 Oct 31, 2026
22cc9a0
Let Cmd-click (Ctrl-click elsewhere) on the mid-turn Queue/Steer butt…
brennanb2025 Oct 31, 2026
924105e
Merge the duplicate composer-types import and give the composer's rou…
brennanb2025 Oct 31, 2026
c6046b1
Share one window key listener across every chat's Queue/Steer button,…
brennanb2025 Oct 31, 2026
76ad638
Merge origin/main into brennanb2025/queue-switch-on-pr
brennanb2025 Oct 31, 2026
ce94239
Remove the desktop Queue/Steer button shown beside Stop while the age…
brennanb2025 Oct 31, 2026
e0636aa
Put the composer's send-hold checks back inline in the pane
brennanb2025 Oct 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion mobile/src/components/ActionSheetModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRef, type ReactNode } from 'react'
import { ActivityIndicator, View, Text, Pressable, StyleSheet } from 'react-native'
import { Edit3, Trash2, type LucideIcon } from 'lucide-react-native'
import { Check, Edit3, Trash2, type LucideIcon } from 'lucide-react-native'
import { colors, radii, spacing, typography } from '../theme/mobile-theme'
import { themedStyleSheet } from '../theme/themed-styles'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
Expand All @@ -14,6 +14,8 @@ export type ActionSheetAction = {
destructive?: boolean
disabled?: boolean
hint?: string
/** Marks the choice that is current, as a trailing check. */
checked?: boolean
loading?: boolean
skipAutoClose?: boolean
closeBeforePress?: boolean
Expand Down Expand Up @@ -78,6 +80,7 @@ export function ActionSheetContent({ title, message, children, actions, onClose
pressed && !action.disabled && !action.loading && styles.actionPressed
]}
disabled={action.disabled || action.loading}
accessibilityState={action.checked ? { checked: true } : undefined}
onPress={() => {
action.onPress()
if (!action.skipAutoClose && onClose) {
Expand Down Expand Up @@ -105,6 +108,8 @@ export function ActionSheetContent({ title, message, children, actions, onClose
</View>
{action.loading ? (
<ActivityIndicator size="small" color={colors.textSecondary} />
) : action.checked ? (
<Check size={18} color={colors.textPrimary} />
) : null}
</Pressable>
</View>
Expand Down
13 changes: 10 additions & 3 deletions mobile/src/components/composer-input/ComposerSendButton.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import { ActivityIndicator, Pressable } from 'react-native'
import { ArrowUp } from 'lucide-react-native'
import { ArrowUp, type LucideIcon } from 'lucide-react-native'
import { colors } from '../../theme/mobile-theme'
import { useMobileColorScheme } from '../../theme/use-mobile-color-scheme'
import { composerInputStyles as styles } from './composer-input-styles'

export function ComposerSendButton({
onPress,
onLongPress,
canSend,
sending = false,
label = 'Send'
label = 'Send',
icon: Icon = ArrowUp
}: {
onPress: () => void
/** A hold offers more ways to send; absent, a hold is a plain press. */
onLongPress?: () => void
canSend: boolean
sending?: boolean
label?: string
/** What a tap does when it isn't a plain send. */
icon?: LucideIcon
}): React.JSX.Element {
useMobileColorScheme()
const enabled = canSend && !sending
Expand All @@ -30,12 +36,13 @@ export function ComposerSendButton({
pressed && enabled && styles.pressed
]}
onPress={onPress}
onLongPress={onLongPress}
disabled={!enabled}
>
{sending ? (
<ActivityIndicator size="small" color={colors.bgBase} />
) : (
<ArrowUp size={19} color={canSend ? colors.bgBase : colors.textMuted} strokeWidth={2.4} />
<Icon size={19} color={canSend ? colors.bgBase : colors.textMuted} strokeWidth={2.4} />
)}
</Pressable>
)
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@
"cancelEditing": "Bearbeitung abbrechen",
"placeholder": "Frage stellen, @ für Dateiverweise, / für Befehle",
"saveEditedMessage": "Bearbeitete Nachricht speichern",
"sendMessage": "Nachricht senden"
"sendMessage": "Nachricht senden",
"sendQueue": "Einreihen",
"sendSteer": "Steuern",
"sendQueueHint": "Läuft nach dem aktuellen Durchgang",
"sendSteerHint": "Fließt in das ein, was der Agent gerade tut"
},
"composerAttachments": {
"attachedImage": "Angehängtes Bild",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2550,7 +2550,11 @@
"placeholder": "Ask anything, @ to mention files, / for commands",
"cancelEditing": "Cancel editing",
"saveEditedMessage": "Save edited message",
"sendMessage": "Send message"
"sendMessage": "Send message",
"sendQueue": "Queue",
"sendSteer": "Steer",
"sendQueueHint": "Runs after the current turn",
"sendSteerHint": "Goes into what the agent is doing now"
},
"composerAttachments": {
"file": "File",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@
"cancelEditing": "Cancelar edición",
"placeholder": "Pregunta lo que quieras, @ para referenciar archivos, / para comandos",
"saveEditedMessage": "Guardar mensaje editado",
"sendMessage": "Enviar mensaje"
"sendMessage": "Enviar mensaje",
"sendQueue": "Poner en cola",
"sendSteer": "Enviar ahora",
"sendQueueHint": "Se ejecuta después del turno actual",
"sendSteerHint": "Entra en lo que el agente está haciendo ahora"
},
"composerAttachments": {
"attachedImage": "Imagen adjunta",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@
"cancelEditing": "Annuler la modification",
"placeholder": "Posez votre question, @ pour référencer des fichiers, / pour les commandes",
"saveEditedMessage": "Enregistrer le message modifié",
"sendMessage": "Envoyer le message"
"sendMessage": "Envoyer le message",
"sendQueue": "Mettre en file d’attente",
"sendSteer": "Envoyer maintenant",
"sendQueueHint": "S’exécute après le tour en cours",
"sendSteerHint": "S’ajoute à ce que l’agent fait en ce moment"
},
"composerAttachments": {
"attachedImage": "Image jointe",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@
"cancelEditing": "編集をキャンセル",
"placeholder": "何でも聞いてください。@ でファイルを参照、/ でコマンドを実行",
"saveEditedMessage": "編集したメッセージを保存",
"sendMessage": "メッセージを送信"
"sendMessage": "メッセージを送信",
"sendQueue": "キューに入れる",
"sendSteer": "今すぐ送信",
"sendQueueHint": "現在のターンの後に実行します",
"sendSteerHint": "Agent が今行っている作業に加えます"
},
"composerAttachments": {
"attachedImage": "添付画像",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@
"cancelEditing": "편집 취소",
"placeholder": "무엇이든 물어보세요. @로 파일 참조, /로 명령어 실행",
"saveEditedMessage": "수정한 메시지 저장",
"sendMessage": "메시지 보내기"
"sendMessage": "메시지 보내기",
"sendQueue": "대기열에 추가",
"sendSteer": "지금 보내기",
"sendQueueHint": "현재 턴이 끝난 뒤 실행됩니다",
"sendSteerHint": "Agent가 지금 하고 있는 작업에 들어갑니다"
},
"composerAttachments": {
"attachedImage": "첨부된 이미지",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@
"cancelEditing": "Cancelar edição",
"placeholder": "Pergunte o que quiser, @ para mencionar arquivos, / para comandos",
"saveEditedMessage": "Salvar mensagem editada",
"sendMessage": "Enviar mensagem"
"sendMessage": "Enviar mensagem",
"sendQueue": "Colocar na fila",
"sendSteer": "Orientar",
"sendQueueHint": "Executa depois do turno atual",
"sendSteerHint": "Entra no que o agente está fazendo agora"
},
"composerAttachments": {
"attachedImage": "Imagem anexada",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@
"cancelEditing": "Отменить редактирование",
"placeholder": "Задайте вопрос; @ — файлы, / — команды",
"saveEditedMessage": "Сохранить изменённое сообщение",
"sendMessage": "Отправить сообщение"
"sendMessage": "Отправить сообщение",
"sendQueue": "В очередь",
"sendSteer": "Направить",
"sendQueueHint": "Выполнится после текущего хода",
"sendSteerHint": "Попадёт в то, что агент делает сейчас"
},
"composerAttachments": {
"attachedImage": "Прикреплённое изображение",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@
"cancelEditing": "Düzenlemeyi iptal et",
"placeholder": "Bir şey sorun; dosyalara başvurmak için @, komutlar için / kullanın",
"saveEditedMessage": "Düzenlenen mesajı kaydet",
"sendMessage": "Mesaj gönder"
"sendMessage": "Mesaj gönder",
"sendQueue": "Sıraya al",
"sendSteer": "Yönlendir",
"sendQueueHint": "Geçerli tur bittikten sonra çalışır",
"sendSteerHint": "Ajanın şu anda yaptığı işe katılır"
},
"composerAttachments": {
"attachedImage": "Ekli görsel",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@
"cancelEditing": "取消編輯",
"placeholder": "隨心輸入,@ 引用檔案,/ 使用命令",
"saveEditedMessage": "儲存編輯後的訊息",
"sendMessage": "傳送訊息"
"sendMessage": "傳送訊息",
"sendQueue": "加入佇列",
"sendSteer": "引導",
"sendQueueHint": "在目前回合結束後執行",
"sendSteerHint": "加入代理程式目前正在進行的工作"
},
"composerAttachments": {
"attachedImage": "已附加的圖片",
Expand Down
6 changes: 5 additions & 1 deletion mobile/src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@
"cancelEditing": "取消编辑",
"placeholder": "随心输入,@ 引用文件,/ 使用命令",
"saveEditedMessage": "保存编辑后的消息",
"sendMessage": "发送消息"
"sendMessage": "发送消息",
"sendQueue": "加入队列",
"sendSteer": "立即发送",
"sendQueueHint": "在当前回合结束后运行",
"sendSteerHint": "加入智能体当前正在进行的工作"
},
"composerAttachments": {
"attachedImage": "已添加的图片",
Expand Down
4 changes: 3 additions & 1 deletion mobile/src/session/MobileNativeChatOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ export function MobileNativeChatOverlay({
onResume: queued.resume,
sessionKey: queued.sessionKey,
// Hold steering while Stop ends the turn; use the session’s single display-status decision.
steerHeld: controller.nativeChatTurnIndicator?.stopping === true
steerHeld: controller.nativeChatTurnIndicator?.stopping === true,
agentWorking: controller.nativeChatTurnActive
},
backgroundTasks: controller.nativeChatBackgroundTasks
})
Expand Down Expand Up @@ -192,6 +193,7 @@ export function MobileNativeChatOverlay({
agentWorking={controller.nativeChatTurnActive}
awaitingInput={controller.nativeChatAwaitingInput}
canStop={controller.nativeChatCanStop}
sendFollowUp={controller.nativeChatSendFollowUp}
structuredActivityUi={controller.nativeChatStructured}
turnIndicator={controller.nativeChatTurnIndicator}
workingStartedAt={controller.nativeChatWorkingStartedAt}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ vi.mock('lucide-react-native', () =>
[
'ArrowDown',
'ArrowUp',
'ListEnd',
'CornerDownRight',
'ChevronDown',
'ChevronUp',
'ChevronsDownUp',
Expand Down
11 changes: 6 additions & 5 deletions mobile/src/session/MobileNativeChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { MobileNativeChatFloatingControls } from './MobileNativeChatFloatingCont
import type { PendingNativeChatImage } from './native-chat/composer/mobile-native-chat-image-attachment'
import {
MobileNativeChatDraftComposer,
type MobileNativeChatSendProps,
type MobileNativeChatStructuredComposer
} from './native-chat/composer/MobileNativeChatComposer'
import { MobileNativeChatPromptCard } from './native-chat/input/MobileNativeChatPromptCard'
Expand All @@ -71,7 +72,7 @@ export type MobileNativeChatInputLockReason = 'disconnected' | 'waiting'

type Props = ComposerTrayProps & MobileNativeChatMicProps & ChatViewProps

type ChatViewProps = {
type ChatViewProps = MobileNativeChatSendProps & {
// Keep raw messages to distinguish loading from a loaded transcript filtered to empty.
messages: NativeChatMessage[]
folded: NativeChatMessage[]
Expand All @@ -98,7 +99,6 @@ type ChatViewProps = {
hasMore?: boolean
olderPages?: OlderPagePhase
onLoadEarlier?: () => void
onSend: (text: string) => Promise<boolean>
// Fence send completion by route identity after tab/view switches.
sendSurfaceId: string
getSendCompletionGeneration: () => number
Expand Down Expand Up @@ -154,6 +154,7 @@ export function MobileNativeChatView({
sessionLive,
agentWorking,
canStop = agentWorking,
sendFollowUp,
awaitingInput = null,
structuredActivityUi = false,
turnIndicator = null,
Expand Down Expand Up @@ -236,8 +237,8 @@ export function MobileNativeChatView({
const { jumpToTail, recordScrollMetrics, scrollMayLoadEarlier } = tail

const handleSend = useCallback(
async (text: string): Promise<boolean> => {
const accepted = await onSend(text)
async (...send: Parameters<typeof onSend>): Promise<boolean> => {
const accepted = await onSend(...send)
if (!accepted) {
return false
}
Expand Down Expand Up @@ -400,7 +401,7 @@ export function MobileNativeChatView({
onChangeText={onComposerTextChange}
onSend={handleSend}
sendSurfaceId={sendSurfaceId}
{...{ getSendCompletionGeneration, getComposerEditGeneration, inputRef }}
{...{ getSendCompletionGeneration, getComposerEditGeneration, inputRef, sendFollowUp }}
agent={agent}
sessionOptions={sessionOptions}
onAttachImage={onAttachImage}
Expand Down
5 changes: 4 additions & 1 deletion mobile/src/session/MobileQueuedMessageCardRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ type QueuedMessageCardRowProps = {
busy: boolean
editBlocked: boolean
steerHeld: boolean
/** Steer only into a running turn; an idle agent's card reads Send. */
agentWorking: boolean
onSend: () => void
onDelete: () => void
onMore: () => void
Expand Down Expand Up @@ -59,6 +61,7 @@ function QueuedMessageCardContents({
busy,
editBlocked,
steerHeld,
agentWorking,
onSend,
onDelete,
onMore,
Expand All @@ -68,7 +71,7 @@ function QueuedMessageCardContents({
const t = useMobileTranslation()
const [expanded, setExpanded] = useState(false)
const returned = card.state === 'returned'
const steers = queuedMessageCardSteers(card)
const steers = agentWorking && queuedMessageCardSteers(card)
const count = card.images?.length ?? 0
return (
<View testID="queued-card-row" style={[styles.card, styles.divided]}>
Expand Down
2 changes: 1 addition & 1 deletion mobile/src/session/__mocks__/mobile-prompt-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function Harness(props: HarnessProps) {
controller: current,
onOpenFile: vi.fn(),
images: {
sendNativeChat: controller.handleNativeChatSend,
sendNativeChat: (text: string) => controller.handleNativeChatSend(text),
attachments: [],
isAttaching: false,
attachImage: async () => {},
Expand Down
2 changes: 2 additions & 0 deletions mobile/src/session/__mocks__/mobile-prompt-render-mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ vi.mock('lucide-react-native', () =>
[
'ArrowDown',
'ArrowUp',
'ListEnd',
'CornerDownRight',
'ChevronDown',
'ChevronUp',
'ChevronsDownUp',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ vi.mock('react-native', async () => {
})
vi.mock('lucide-react-native', () => ({
ArrowUp: 'ArrowUp',
ListEnd: 'ListEnd',
CornerDownRight: 'CornerDownRight',
Check: 'Check',
ChevronDown: 'ChevronDown',
ChevronLeft: 'ChevronLeft',
Expand Down
2 changes: 2 additions & 0 deletions mobile/src/session/mobile-file-search-owner-cleanup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ vi.mock('react-native', async () => {
})
vi.mock('lucide-react-native', () => ({
ArrowUp: 'ArrowUp',
ListEnd: 'ListEnd',
CornerDownRight: 'CornerDownRight',
Check: 'Check',
ChevronDown: 'ChevronDown',
ChevronLeft: 'ChevronLeft',
Expand Down
Loading
Loading