From a22e892395cfdaba4a80021762184f775e505157 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Wed, 18 Nov 2026 10:50:16 -0800 Subject: [PATCH 1/6] fix: usage limits no longer turn scheduled runs off; clearer continue and mail-hold states (#44040) * fix(scheduled-runs): a usage limit no longer turns scheduled background runs off A background run that a usage limit ended counted as a failed run, so a long or weekly limit failed each scheduled run at once and, after ten, turned the schedule off. A usage-limited run now records the limit and its reset; it never counts toward turning the schedule off, and scheduled runs (and the next-run time) wait for the reset, then catch up a slot still owed that day. * fix(native-chat): turn auto-continue on from the usage-limit row With automatic continuation off, the row's clock opened Settings > Chat. It now turns the setting on in place, so the host schedules this chat without leaving it. When the host reports off while the setting is already on (an asleep workspace, a chat it can't continue), the clock still opens Settings. * fix(scheduled-runs): a background run continued past its usage limit is recorded as done A scheduled background run that a usage limit stopped was recorded as "didn't finish" and stayed that way after its session was continued at the reset: the runner had stopped watching it, and the run refused the suggestions the continued turn made. The continued turn can now suggest, and when it succeeds the run is recorded as done as of then, its failure cleared and its suggestions replacing the open list. * fix(orchestration): say when mail waits behind a usage-limited turn Agent mail to a chat whose last turn failed is queued behind that failure until the chat's next turn, but the send receipt's hold check never knew about it, so a sender saw nothing. The receipt now says the mail waits behind a failed turn and, at a usage limit, when Orca continues the chat, or why it won't: automatic continue is off, was cancelled or gave up, or the chat's workspace is asleep, which continues once it wakes. --- src/main/bots/bot-look-around-failures.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/bots/bot-look-around-failures.test.ts diff --git a/src/main/bots/bot-look-around-failures.test.ts b/src/main/bots/bot-look-around-failures.test.ts new file mode 100644 index 00000000000..ac700c5685a --- /dev/null +++ b/src/main/bots/bot-look-around-failures.test.ts @@ -0,0 +1,15 @@ +import { expect, it } from 'vitest' +import { limitedLookContinuesInItsChat } from './bot-look-around-failures' + +const idle = { running: false, stillLimited: true, continueScheduled: false } + +it('a usage-limited look keeps its slot while its chat continues, and after the continue finished', () => { + expect(limitedLookContinuesInItsChat({ ...idle, continueScheduled: true })).toBe(true) + expect(limitedLookContinuesInItsChat({ ...idle, running: true })).toBe(true) + // The continued turn succeeded: the chat no longer ends at the limit. + expect(limitedLookContinuesInItsChat({ ...idle, stillLimited: false })).toBe(true) +}) + +it('leaves the slot owed when nothing will continue the limited chat', () => { + expect(limitedLookContinuesInItsChat(idle)).toBe(false) +}) From 4ccd5583dbd8aad71a496985d0d7cea316254c3d Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Wed, 18 Nov 2026 10:54:46 -0800 Subject: [PATCH 2/6] fix: preserve composer state and use the folder workspace selector (#44202) * fix(chat): reuse composer editors while their views are unmounted * fix(workspace): read persisted folder hosts through the catalog selector --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- .../editor/native-chat-composer-editor-owner.tsx | 12 ++++-------- .../native-chat-composer-editor-retention.test.tsx | 5 ++++- .../workspace-session-host-entries-write.ts | 3 ++- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-editor-owner.tsx b/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-editor-owner.tsx index f07766941c1..63f4fc84f78 100644 --- a/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-editor-owner.tsx +++ b/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-editor-owner.tsx @@ -42,11 +42,6 @@ class EditorSelection { // Tiptap reports an unmounted editor as destroyed too; only these may never mount a view again. const disposedEditors = new WeakSet() -function disposeEditor(editor: Editor): void { - disposedEditors.add(editor) - editor.destroy() -} - class ComposerEditors { private editors = new Map() private generation = 0 @@ -59,7 +54,7 @@ class ComposerEditors { if (generation === this.generation) { for (const entry of this.editors.values()) { entry.release() - disposeEditor(entry.editor) + entry.editor.destroy() } this.editors.clear() } @@ -69,7 +64,7 @@ class ComposerEditors { get(scope: string, options: Options): OwnedEditor { const existing = this.editors.get(scope) - if (existing && !existing.editor.isDestroyed) { + if (existing && !disposedEditors.has(existing.editor)) { existing.options = options return existing } @@ -89,13 +84,14 @@ class ComposerEditors { onSelectionUpdate: (...args) => entry.options.onSelectionUpdate?.(...args) }) } + entry.editor.on('destroy', () => disposedEditors.add(entry.editor)) this.editors.set(scope, entry) if (isNativeChatEditDraft(scope)) { entry.release = subscribeToNativeChatComposerDraft(scope, () => { if (!ephemeralDrafts.has(scope)) { this.editors.delete(scope) entry.release() - disposeEditor(entry.editor) + entry.editor.destroy() } }) } diff --git a/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-editor-retention.test.tsx b/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-editor-retention.test.tsx index 01f2cb970f8..35301f7caba 100644 --- a/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-editor-retention.test.tsx +++ b/src/renderer/src/components/native-chat/composer/editor/native-chat-composer-editor-retention.test.tsx @@ -44,6 +44,8 @@ it('keeps the draft, selection and undo across hides without a hidden view, and ) const view = render(pane(true)) const editor = promptEditor(within(view.container).getByRole('textbox')) + const onDestroy = vi.fn() + editor.on('destroy', onDestroy) act(() => { input.current!.setSelectionRange(5, 5) input.current!.insertText!(' world') @@ -53,6 +55,7 @@ it('keeps the draft, selection and undo across hides without a hidden view, and await act(() => vi.runOnlyPendingTimersAsync()) // A hidden composer keeps no view, so none of its document listeners run while other chats are typed in. expect(mountedEditorView(editor)).toBeNull() + expect(onDestroy).not.toHaveBeenCalled() view.rerender(pane(true)) expect(input.current!.value).toBe('hello world') expect([input.current!.selectionStart, input.current!.selectionEnd]).toEqual([2, 4]) @@ -63,7 +66,7 @@ it('keeps the draft, selection and undo across hides without a hidden view, and view.rerender(pane(false)) view.unmount() await act(() => vi.runOnlyPendingTimersAsync()) - expect(editor.isDestroyed).toBe(true) + expect(onDestroy).toHaveBeenCalledOnce() }) it.each([20, 200])( diff --git a/src/renderer/src/lib/workspace/persistence/workspace-session-host-entries-write.ts b/src/renderer/src/lib/workspace/persistence/workspace-session-host-entries-write.ts index 85960d623d5..09278a1c1ce 100644 --- a/src/renderer/src/lib/workspace/persistence/workspace-session-host-entries-write.ts +++ b/src/renderer/src/lib/workspace/persistence/workspace-session-host-entries-write.ts @@ -1,3 +1,4 @@ +import { selectFolderWorkspaces } from '@/store/workspaces/catalog/workspace-record-fields' import type { WorkspaceSessionPatch } from '../../../../../shared/workspace-session/workspace-session-state-types' import { getRepoExecutionHostId, @@ -28,7 +29,7 @@ export function routedSessionHostIds( for (const hostId of state.hydratedRuntimeSessionHostIds ?? []) { hostIds.add(hostId) } - for (const owner of [...(state.folderWorkspaces ?? []), ...(state.projectGroups ?? [])]) { + for (const owner of [...(selectFolderWorkspaces(state) ?? []), ...(state.projectGroups ?? [])]) { const parsed = parseExecutionHostId(owner.executionHostId) if (parsed) { hostIds.add(parsed.id) From c499f26d688398dc8aac2788311fe834573fbd0a Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Wed, 18 Nov 2026 11:00:33 -0800 Subject: [PATCH 3/6] fix(native-chat): wrap the disabled rewind reason instead of widening the chat menu (#43914) * fix(native-chat): wrap the disabled rewind reason instead of widening the chat menu * fix(native-chat): shorten the busy rewind reason to 'Available when chat is idle' * fix(mobile): say 'Available when chat is idle' for the busy rewind reason --- mobile/src/i18n/locales/de.json | 2 +- mobile/src/i18n/locales/en.json | 2 +- mobile/src/i18n/locales/es.json | 2 +- mobile/src/i18n/locales/fr.json | 2 +- mobile/src/i18n/locales/ja.json | 2 +- mobile/src/i18n/locales/ko.json | 2 +- mobile/src/i18n/locales/pt.json | 2 +- mobile/src/i18n/locales/ru.json | 2 +- mobile/src/i18n/locales/tr.json | 2 +- mobile/src/i18n/locales/zh-Hant.json | 2 +- mobile/src/i18n/locales/zh.json | 2 +- .../native-chat/history/mobile-native-chat-rewind-copy.ts | 6 +----- .../messages/actions/native-chat-rewind-copy.ts | 6 +----- .../pane/actions/NativeChatContextMenuItems.tsx | 7 ++++--- src/renderer/src/i18n/locales/de.json | 2 +- src/renderer/src/i18n/locales/en.json | 2 +- src/renderer/src/i18n/locales/es.json | 2 +- src/renderer/src/i18n/locales/fr.json | 2 +- src/renderer/src/i18n/locales/ja.json | 2 +- src/renderer/src/i18n/locales/ko.json | 2 +- src/renderer/src/i18n/locales/pt.json | 2 +- src/renderer/src/i18n/locales/ru.json | 2 +- src/renderer/src/i18n/locales/tr.json | 2 +- src/renderer/src/i18n/locales/zh-Hant.json | 2 +- src/renderer/src/i18n/locales/zh.json | 2 +- 25 files changed, 28 insertions(+), 35 deletions(-) diff --git a/mobile/src/i18n/locales/de.json b/mobile/src/i18n/locales/de.json index 7b6d959cbd6..ad4ab7d40ac 100644 --- a/mobile/src/i18n/locales/de.json +++ b/mobile/src/i18n/locales/de.json @@ -659,7 +659,7 @@ "confirm": "Zurücksetzen", "unsupported": "Dieser Chat kann nicht zu einer früheren Nachricht zurückgesetzt werden.", "historyNotPaginated": "Dieser ältere Codex-Chat kann nicht zu einer früheren Nachricht zurückgesetzt werden. Einen neuen Chat starten, um „Bis hierher zurücksetzen“ zu verwenden.", - "busy": "Verfügbar, sobald der Agent inaktiv ist und im Chat keine Aktion mehr aussteht.", + "busy": "Verfügbar, wenn der Chat inaktiv ist", "staleEpoch": "Das Gespräch hat sich geändert. Die neuesten Nachrichten prüfen und erneut versuchen.", "invalidTarget": "Das Gespräch kann nicht zu dieser Nachricht zurückgesetzt werden. Es wurde nichts geändert.", "historyLimit": "Dieses Gespräch ist zu lang, um darin zurückzugehen. Es wurde nichts geändert.", diff --git a/mobile/src/i18n/locales/en.json b/mobile/src/i18n/locales/en.json index 9b8de580fe0..3f9060f10d7 100644 --- a/mobile/src/i18n/locales/en.json +++ b/mobile/src/i18n/locales/en.json @@ -3594,7 +3594,7 @@ "confirm": "Rewind", "unsupported": "This chat can't go back to an earlier message.", "historyNotPaginated": "This older Codex chat can't go back to an earlier message. Start a new chat to use Rewind to here.", - "busy": "Available once the agent is idle and nothing in this chat is waiting on you.", + "busy": "Available when chat is idle", "staleEpoch": "The conversation changed. Review the latest messages and try again.", "invalidTarget": "The conversation can't go back to this message. Nothing was changed.", "historyLimit": "This conversation is too long to go back in. Nothing was changed.", diff --git a/mobile/src/i18n/locales/es.json b/mobile/src/i18n/locales/es.json index 7fa4c0d4439..4186338c189 100644 --- a/mobile/src/i18n/locales/es.json +++ b/mobile/src/i18n/locales/es.json @@ -694,7 +694,7 @@ "confirm": "Rebobinar", "unsupported": "Este chat no puede volver a un mensaje anterior.", "historyNotPaginated": "Este chat de Codex más antiguo no puede volver a un mensaje anterior. Inicia un chat nuevo para usar Rebobinar hasta aquí.", - "busy": "Disponible cuando el agente esté inactivo y nada en este chat esté esperándote.", + "busy": "Disponible cuando el chat esté inactivo", "staleEpoch": "La conversación cambió. Revisa los últimos mensajes e inténtalo de nuevo.", "invalidTarget": "La conversación no puede volver a este mensaje. No se cambió nada.", "historyLimit": "Esta conversación es demasiado larga para retroceder en ella. No se cambió nada.", diff --git a/mobile/src/i18n/locales/fr.json b/mobile/src/i18n/locales/fr.json index 2ebaa371b8e..195a566f657 100644 --- a/mobile/src/i18n/locales/fr.json +++ b/mobile/src/i18n/locales/fr.json @@ -694,7 +694,7 @@ "confirm": "Revenir", "unsupported": "Ce chat ne peut pas revenir à un message antérieur.", "historyNotPaginated": "Ce chat Codex plus ancien ne peut pas revenir à un message antérieur. Démarrez un nouveau chat pour utiliser « Revenir ici ».", - "busy": "Disponible une fois que l'agent est inactif et que plus rien dans ce chat n'attend votre action.", + "busy": "Disponible lorsque le chat est inactif", "staleEpoch": "La conversation a changé. Examinez les derniers messages et réessayez.", "invalidTarget": "La conversation ne peut pas revenir à ce message. Rien n'a été modifié.", "historyLimit": "Cette conversation est trop longue pour y revenir. Rien n'a été modifié.", diff --git a/mobile/src/i18n/locales/ja.json b/mobile/src/i18n/locales/ja.json index f63902f3eae..ffe753edd91 100644 --- a/mobile/src/i18n/locales/ja.json +++ b/mobile/src/i18n/locales/ja.json @@ -655,7 +655,7 @@ "confirm": "巻き戻す", "unsupported": "このチャットは以前のメッセージに戻れません。", "historyNotPaginated": "この古い Codex チャットは以前のメッセージに戻れません。「ここに巻き戻す」を使用するには、新規チャットを開始してください。", - "busy": "Agent がアイドル状態になり、このチャットであなたの対応を待つものがなくなると利用できます。", + "busy": "チャットがアイドル状態のときに利用できます", "staleEpoch": "会話が変更されました。最新のメッセージを確認して、もう一度お試しください。", "invalidTarget": "会話をこのメッセージに戻すことはできません。何も変更されていません。", "historyLimit": "この会話は長すぎて巻き戻せません。何も変更されていません。", diff --git a/mobile/src/i18n/locales/ko.json b/mobile/src/i18n/locales/ko.json index 132c026e6df..c6cff2af9f9 100644 --- a/mobile/src/i18n/locales/ko.json +++ b/mobile/src/i18n/locales/ko.json @@ -655,7 +655,7 @@ "confirm": "되감기", "unsupported": "이 채팅은 이전 메시지로 돌아갈 수 없습니다.", "historyNotPaginated": "이 오래된 Codex 채팅은 이전 메시지로 돌아갈 수 없습니다. 여기로 되감기를 사용하려면 새 채팅을 시작하세요.", - "busy": "에이전트가 유휴 상태이고 이 채팅에서 사용자를 기다리는 항목이 없으면 사용할 수 있습니다.", + "busy": "채팅이 유휴 상태일 때 사용할 수 있습니다", "staleEpoch": "대화가 변경되었습니다. 최신 메시지를 확인하고 다시 시도하세요.", "invalidTarget": "대화가 이 메시지로 돌아갈 수 없습니다. 변경된 내용은 없습니다.", "historyLimit": "이 대화는 너무 길어 되돌아갈 수 없습니다. 변경된 내용은 없습니다.", diff --git a/mobile/src/i18n/locales/pt.json b/mobile/src/i18n/locales/pt.json index fece4cac615..72644c1b824 100644 --- a/mobile/src/i18n/locales/pt.json +++ b/mobile/src/i18n/locales/pt.json @@ -719,7 +719,7 @@ "confirm": "Voltar", "unsupported": "Este chat não permite voltar a uma mensagem anterior.", "historyNotPaginated": "Este chat antigo do Codex não permite voltar a uma mensagem anterior. Inicie um novo chat para usar Voltar até aqui.", - "busy": "Disponível quando o agente estiver ocioso e não houver nada neste chat aguardando sua resposta.", + "busy": "Disponível quando o chat estiver ocioso", "staleEpoch": "A conversa mudou. Confira as mensagens mais recentes e tente novamente.", "invalidTarget": "Não é possível voltar a esta mensagem na conversa. Nada foi alterado.", "historyLimit": "Esta conversa é longa demais para voltar a uma mensagem anterior. Nada foi alterado.", diff --git a/mobile/src/i18n/locales/ru.json b/mobile/src/i18n/locales/ru.json index a870014d1d9..2e299fafe86 100644 --- a/mobile/src/i18n/locales/ru.json +++ b/mobile/src/i18n/locales/ru.json @@ -729,7 +729,7 @@ "confirm": "Вернуться", "unsupported": "В этом чате нельзя вернуться к предыдущему сообщению.", "historyNotPaginated": "В этом старом чате Codex нельзя вернуться к предыдущему сообщению. Создайте новый чат, чтобы использовать возврат к сообщению.", - "busy": "Доступно, когда агент закончит работу и чат не будет ждать вашего ответа.", + "busy": "Доступно, когда чат бездействует", "staleEpoch": "Разговор изменился. Просмотрите последние сообщения и повторите попытку.", "invalidTarget": "Нельзя вернуться к этому сообщению. Ничего не изменилось.", "historyLimit": "Разговор слишком длинный для возврата. Ничего не изменилось.", diff --git a/mobile/src/i18n/locales/tr.json b/mobile/src/i18n/locales/tr.json index 345f7d8f6ef..42888527679 100644 --- a/mobile/src/i18n/locales/tr.json +++ b/mobile/src/i18n/locales/tr.json @@ -659,7 +659,7 @@ "confirm": "Geri dön", "unsupported": "Bu sohbette önceki bir mesaja dönülemiyor.", "historyNotPaginated": "Bu eski Codex sohbetinde önceki bir mesaja dönülemiyor. Buraya geri dön özelliğini kullanmak için yeni bir sohbet başlatın.", - "busy": "Ajan boşta olduğunda ve sohbette sizden yanıt bekleyen bir işlem kalmadığında kullanılabilir.", + "busy": "Sohbet boştayken kullanılabilir", "staleEpoch": "Sohbet değişti. Son mesajları inceleyip yeniden deneyin.", "invalidTarget": "Sohbette bu mesaja dönülemiyor. Hiçbir şey değiştirilmedi.", "historyLimit": "Bu sohbet geri dönülemeyecek kadar uzun. Hiçbir şey değiştirilmedi.", diff --git a/mobile/src/i18n/locales/zh-Hant.json b/mobile/src/i18n/locales/zh-Hant.json index 6d86f8b5700..7aced3b8dec 100644 --- a/mobile/src/i18n/locales/zh-Hant.json +++ b/mobile/src/i18n/locales/zh-Hant.json @@ -655,7 +655,7 @@ "confirm": "回溯", "unsupported": "此聊天無法返回到更早的訊息。", "historyNotPaginated": "此舊版 Codex 聊天無法返回到更早的訊息。請開始新聊天以使用「回溯到此處」。", - "busy": "當代理程式閒置且此聊天中沒有等待您處理的內容時可用。", + "busy": "聊天閒置時可用", "staleEpoch": "對話已發生變化。請檢視最新訊息後重試。", "invalidTarget": "對話無法返回到此訊息。未做任何更改。", "historyLimit": "此對話過長,無法回溯。未做任何更改。", diff --git a/mobile/src/i18n/locales/zh.json b/mobile/src/i18n/locales/zh.json index b2d8136eceb..0168b7b5f10 100644 --- a/mobile/src/i18n/locales/zh.json +++ b/mobile/src/i18n/locales/zh.json @@ -705,7 +705,7 @@ "confirm": "回溯", "unsupported": "此聊天无法返回到更早的消息。", "historyNotPaginated": "此旧版 Codex 聊天无法返回到更早的消息。请开始新聊天以使用“回溯到此处”。", - "busy": "当智能体空闲且此聊天中没有等待您处理的内容时可用。", + "busy": "聊天空闲时可用", "staleEpoch": "对话已发生变化。请查看最新消息后重试。", "invalidTarget": "对话无法返回到此消息。未做任何更改。", "historyLimit": "此对话过长,无法回溯。未做任何更改。", diff --git a/mobile/src/session/native-chat/history/mobile-native-chat-rewind-copy.ts b/mobile/src/session/native-chat/history/mobile-native-chat-rewind-copy.ts index 4bc59a0373f..df668658b4f 100644 --- a/mobile/src/session/native-chat/history/mobile-native-chat-rewind-copy.ts +++ b/mobile/src/session/native-chat/history/mobile-native-chat-rewind-copy.ts @@ -9,11 +9,7 @@ const copy = { 'chat.rewind.historyNotPaginated', "This older Codex chat can't go back to an earlier message. Start a new chat to use Rewind to here." ), - busy: () => - translate( - 'chat.rewind.busy', - 'Available once the agent is idle and nothing in this chat is waiting on you.' - ), + busy: () => translate('chat.rewind.busy', 'Available when chat is idle'), 'stale-epoch': () => translate( 'chat.rewind.staleEpoch', diff --git a/src/renderer/src/components/native-chat/messages/actions/native-chat-rewind-copy.ts b/src/renderer/src/components/native-chat/messages/actions/native-chat-rewind-copy.ts index dee7dfd928e..8e0b3cdf851 100644 --- a/src/renderer/src/components/native-chat/messages/actions/native-chat-rewind-copy.ts +++ b/src/renderer/src/components/native-chat/messages/actions/native-chat-rewind-copy.ts @@ -15,11 +15,7 @@ const copy = { 'components.native-chat.rewind.historyNotPaginated', "This older Codex chat can't go back to an earlier message. Start a new chat to use Rewind to here." ), - busy: () => - translate( - 'components.native-chat.rewind.busy', - 'Available once the agent is idle and nothing in this chat is waiting on you.' - ), + busy: () => translate('components.native-chat.rewind.busy', 'Available when chat is idle'), 'stale-epoch': () => translate( 'components.native-chat.rewind.staleEpoch', diff --git a/src/renderer/src/components/native-chat/pane/actions/NativeChatContextMenuItems.tsx b/src/renderer/src/components/native-chat/pane/actions/NativeChatContextMenuItems.tsx index 9c8925af19e..e83994412ff 100644 --- a/src/renderer/src/components/native-chat/pane/actions/NativeChatContextMenuItems.tsx +++ b/src/renderer/src/components/native-chat/pane/actions/NativeChatContextMenuItems.tsx @@ -108,11 +108,12 @@ function NativeChatRewindMenuItem({ onSelect={() => void rewind.request(itemId, confirm)} > - + {t('components.native-chat.rewind.action', 'Rewind to here')} - {/* A disabled row cannot show the button's tooltip, so its reason sits under the label. */} + {/* A disabled row cannot show the button's tooltip, so its reason sits under the label, + wrapping to the other rows' width (contain-inline-size) instead of widening the menu. */} {rewind.disabledReason ? ( - + {rewind.disabledReason} ) : null} diff --git a/src/renderer/src/i18n/locales/de.json b/src/renderer/src/i18n/locales/de.json index 60a43b495f6..d48676d3b64 100644 --- a/src/renderer/src/i18n/locales/de.json +++ b/src/renderer/src/i18n/locales/de.json @@ -19866,7 +19866,7 @@ "rewind": { "unsupported": "Dieser Chat kann nicht zu einer früheren Nachricht zurückgesetzt werden.", "historyNotPaginated": "Dieser ältere Codex-Chat kann nicht zu einer früheren Nachricht zurückgesetzt werden. Einen neuen Chat starten, um „Bis hierher zurücksetzen“ zu verwenden.", - "busy": "Verfügbar, sobald der Agent inaktiv ist und im Chat keine Aktion mehr aussteht.", + "busy": "Verfügbar, wenn der Chat inaktiv ist", "staleEpoch": "Das Gespräch hat sich geändert. Die neuesten Nachrichten prüfen und erneut versuchen.", "invalidTarget": "Das Gespräch kann nicht zu dieser Nachricht zurückgesetzt werden. Es wurde nichts geändert.", "historyLimit": "Dieses Gespräch ist zu lang, um darin zurückzugehen. Es wurde nichts geändert.", diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 02cb38a8faa..685134e894b 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -21627,7 +21627,7 @@ "rewind": { "unsupported": "This chat can't go back to an earlier message.", "historyNotPaginated": "This older Codex chat can't go back to an earlier message. Start a new chat to use Rewind to here.", - "busy": "Available once the agent is idle and nothing in this chat is waiting on you.", + "busy": "Available when chat is idle", "staleEpoch": "The conversation changed. Review the latest messages and try again.", "invalidTarget": "The conversation can't go back to this message. Nothing was changed.", "historyLimit": "This conversation is too long to go back in. Nothing was changed.", diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index a7754d7209b..d2314578153 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -19757,7 +19757,7 @@ "rewind": { "unsupported": "Este chat no puede volver a un mensaje anterior.", "historyNotPaginated": "Este chat de Codex más antiguo no puede volver a un mensaje anterior. Inicia un chat nuevo para usar Rebobinar hasta aquí.", - "busy": "Disponible cuando el agente esté inactivo y nada en este chat esté esperándote.", + "busy": "Disponible cuando el chat esté inactivo", "staleEpoch": "La conversación cambió. Revisa los últimos mensajes e inténtalo de nuevo.", "invalidTarget": "La conversación no puede volver a este mensaje. No se cambió nada.", "historyLimit": "Esta conversación es demasiado larga para retroceder en ella. No se cambió nada.", diff --git a/src/renderer/src/i18n/locales/fr.json b/src/renderer/src/i18n/locales/fr.json index 926d22a3606..a980cb970a8 100644 --- a/src/renderer/src/i18n/locales/fr.json +++ b/src/renderer/src/i18n/locales/fr.json @@ -20028,7 +20028,7 @@ "rewind": { "unsupported": "Ce chat ne peut pas revenir à un message antérieur.", "historyNotPaginated": "Ce chat Codex plus ancien ne peut pas revenir à un message antérieur. Démarrez un nouveau chat pour utiliser « Revenir ici ».", - "busy": "Disponible une fois que l'agent est inactif et que plus rien dans ce chat n'attend votre action.", + "busy": "Disponible lorsque le chat est inactif", "staleEpoch": "La conversation a changé. Examinez les derniers messages et réessayez.", "invalidTarget": "La conversation ne peut pas revenir à ce message. Rien n'a été modifié.", "historyLimit": "Cette conversation est trop longue pour y revenir. Rien n'a été modifié.", diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index 3838b82f99c..926211a9e06 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -20326,7 +20326,7 @@ "rewind": { "unsupported": "このチャットは以前のメッセージに戻れません。", "historyNotPaginated": "この古い Codex チャットは以前のメッセージに戻れません。「ここに巻き戻す」を使用するには、新規チャットを開始してください。", - "busy": "Agent がアイドル状態になり、このチャットであなたの対応を待つものがなくなると利用できます。", + "busy": "チャットがアイドル状態のときに利用できます", "staleEpoch": "会話が変更されました。最新のメッセージを確認して、もう一度お試しください。", "invalidTarget": "会話をこのメッセージに戻すことはできません。何も変更されていません。", "historyLimit": "この会話は長すぎて巻き戻せません。何も変更されていません。", diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 268394a9f58..e492ee853e2 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -19243,7 +19243,7 @@ "rewind": { "unsupported": "이 채팅은 이전 메시지로 돌아갈 수 없습니다.", "historyNotPaginated": "이 오래된 Codex 채팅은 이전 메시지로 돌아갈 수 없습니다. 여기로 되감기를 사용하려면 새 채팅을 시작하세요.", - "busy": "에이전트가 유휴 상태이고 이 채팅에서 사용자를 기다리는 항목이 없으면 사용할 수 있습니다.", + "busy": "채팅이 유휴 상태일 때 사용할 수 있습니다", "staleEpoch": "대화가 변경되었습니다. 최신 메시지를 확인하고 다시 시도하세요.", "invalidTarget": "대화가 이 메시지로 돌아갈 수 없습니다. 변경된 내용은 없습니다.", "historyLimit": "이 대화는 너무 길어 되돌아갈 수 없습니다. 변경된 내용은 없습니다.", diff --git a/src/renderer/src/i18n/locales/pt.json b/src/renderer/src/i18n/locales/pt.json index 55821909b0a..b2fa9588c43 100644 --- a/src/renderer/src/i18n/locales/pt.json +++ b/src/renderer/src/i18n/locales/pt.json @@ -21323,7 +21323,7 @@ "rewind": { "unsupported": "Este chat não permite voltar a uma mensagem anterior.", "historyNotPaginated": "Este chat antigo do Codex não permite voltar a uma mensagem anterior. Inicie um novo chat para usar Voltar até aqui.", - "busy": "Disponível quando o agente estiver ocioso e não houver nada neste chat aguardando sua resposta.", + "busy": "Disponível quando o chat estiver ocioso", "staleEpoch": "A conversa mudou. Confira as mensagens mais recentes e tente novamente.", "invalidTarget": "Não é possível voltar a esta mensagem na conversa. Nada foi alterado.", "historyLimit": "Esta conversa é longa demais para voltar a uma mensagem anterior. Nada foi alterado.", diff --git a/src/renderer/src/i18n/locales/ru.json b/src/renderer/src/i18n/locales/ru.json index a4b98816d44..2c7fee5851a 100644 --- a/src/renderer/src/i18n/locales/ru.json +++ b/src/renderer/src/i18n/locales/ru.json @@ -20529,7 +20529,7 @@ "rewind": { "unsupported": "В этом чате нельзя вернуться к предыдущему сообщению.", "historyNotPaginated": "В этом старом чате Codex нельзя вернуться к предыдущему сообщению. Создайте новый чат, чтобы использовать возврат к сообщению.", - "busy": "Доступно, когда агент закончит работу и чат не будет ждать вашего ответа.", + "busy": "Доступно, когда чат бездействует", "staleEpoch": "Разговор изменился. Просмотрите последние сообщения и повторите попытку.", "invalidTarget": "Нельзя вернуться к этому сообщению. Ничего не изменилось.", "historyLimit": "Разговор слишком длинный для возврата. Ничего не изменилось.", diff --git a/src/renderer/src/i18n/locales/tr.json b/src/renderer/src/i18n/locales/tr.json index ad7a27bc773..a720811439d 100644 --- a/src/renderer/src/i18n/locales/tr.json +++ b/src/renderer/src/i18n/locales/tr.json @@ -20016,7 +20016,7 @@ "rewind": { "unsupported": "Bu sohbette önceki bir mesaja dönülemiyor.", "historyNotPaginated": "Bu eski Codex sohbetinde önceki bir mesaja dönülemiyor. Buraya geri dön özelliğini kullanmak için yeni bir sohbet başlatın.", - "busy": "Ajan boşta olduğunda ve sohbette sizden yanıt bekleyen bir işlem kalmadığında kullanılabilir.", + "busy": "Sohbet boştayken kullanılabilir", "staleEpoch": "Sohbet değişti. Son mesajları inceleyip yeniden deneyin.", "invalidTarget": "Sohbette bu mesaja dönülemiyor. Hiçbir şey değiştirilmedi.", "historyLimit": "Bu sohbet geri dönülemeyecek kadar uzun. Hiçbir şey değiştirilmedi.", diff --git a/src/renderer/src/i18n/locales/zh-Hant.json b/src/renderer/src/i18n/locales/zh-Hant.json index 471cc4e8333..5a95ebdfca1 100644 --- a/src/renderer/src/i18n/locales/zh-Hant.json +++ b/src/renderer/src/i18n/locales/zh-Hant.json @@ -19557,7 +19557,7 @@ "rewind": { "unsupported": "此聊天無法返回到更早的訊息。", "historyNotPaginated": "此舊版 Codex 聊天無法返回到更早的訊息。請開始新聊天以使用「回溯到此處」。", - "busy": "當代理程式閒置且此聊天中沒有等待您處理的內容時可用。", + "busy": "聊天閒置時可用", "staleEpoch": "對話已發生變化。請檢視最新訊息後重試。", "invalidTarget": "對話無法返回到此訊息。未做任何更改。", "historyLimit": "此對話過長,無法回溯。未做任何更改。", diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index d7a8db4803d..d8b5f0e5abf 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -20333,7 +20333,7 @@ "rewind": { "unsupported": "此聊天无法返回到更早的消息", "historyNotPaginated": "此旧版 Codex 聊天无法返回到更早的消息,请开始新聊天以使用“回溯到此处”", - "busy": "当代理空闲且此聊天中没有等待您处理的内容时可用", + "busy": "聊天空闲时可用", "staleEpoch": "对话已发生变化,请查看最新消息后重试", "invalidTarget": "对话无法返回到此消息,未做任何更改", "historyLimit": "此对话过长,无法回溯,未做任何更改", From 24625c5019ce597da9242d40de3c0e4dd22a6d70 Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Wed, 18 Nov 2026 11:02:17 -0800 Subject: [PATCH 4/6] test: drop shallow renderer chrome checks (#44196) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- .../bots/bot-connector-titles.test.ts | 18 ------- .../bots/google/GoogleServicePicker.test.tsx | 19 -------- .../activity-bar-buttons.test.tsx | 37 -------------- .../sidebar/SidebarSectionHeader.test.tsx | 48 ------------------- .../ProviderAccountChatButton.test.tsx | 18 ++----- 5 files changed, 3 insertions(+), 137 deletions(-) delete mode 100644 src/renderer/src/components/bots/google/GoogleServicePicker.test.tsx delete mode 100644 src/renderer/src/components/right-sidebar/activity-bar-buttons.test.tsx delete mode 100644 src/renderer/src/components/sidebar/SidebarSectionHeader.test.tsx diff --git a/src/renderer/src/components/bots/bot-connector-titles.test.ts b/src/renderer/src/components/bots/bot-connector-titles.test.ts index 82316d06853..48cd7a07e49 100644 --- a/src/renderer/src/components/bots/bot-connector-titles.test.ts +++ b/src/renderer/src/components/bots/bot-connector-titles.test.ts @@ -12,15 +12,6 @@ function texts(rows: BotConnectorTitleParts[]): string[] { const VIA = 'via Composio' describe('botConnectorTitles', () => { - it('marks the Composio row beside a native one of the same service', () => { - expect( - texts([ - { key: 'github:1', service: 'GitHub', place: 'stablyai' }, - { key: 'composio:c1', service: 'GitHub', hints: [VIA, 'Alice-H'] } - ]) - ).toEqual(['GitHub · stablyai', 'GitHub · via Composio']) - }) - it('names the account when two Composio rows share an app', () => { expect( texts([ @@ -30,13 +21,4 @@ describe('botConnectorTitles', () => { ]) ).toEqual(['Slack · Globex', 'Slack · a@example.com', 'Slack · b@example.com']) }) - - it('tells same-named apps apart by their address, matching services case-insensitively', () => { - expect( - texts([ - { key: 'linear:w1', service: 'Linear', place: 'Acme' }, - { key: 'app:linear', service: 'linear', hints: ['mcp.linear.app'] } - ]) - ).toEqual(['Linear · Acme', 'linear · mcp.linear.app']) - }) }) diff --git a/src/renderer/src/components/bots/google/GoogleServicePicker.test.tsx b/src/renderer/src/components/bots/google/GoogleServicePicker.test.tsx deleted file mode 100644 index 64c79c93fd2..00000000000 --- a/src/renderer/src/components/bots/google/GoogleServicePicker.test.tsx +++ /dev/null @@ -1,19 +0,0 @@ -// @vitest-environment happy-dom -import { cleanup, fireEvent, render, screen } from '@testing-library/react' -import { afterEach, describe, expect, it, vi } from 'vitest' -import { GoogleServicePicker } from './GoogleServicePicker' - -afterEach(cleanup) - -describe('Google service picker', () => { - it('toggles a service from anywhere on its row', () => { - const onChange = vi.fn() - render() - fireEvent.click(screen.getByText('See, create and move events')) - expect(onChange).toHaveBeenCalledTimes(1) - expect(onChange).toHaveBeenLastCalledWith(['gmail', 'calendar']) - fireEvent.click(screen.getAllByRole('checkbox')[0]!) - expect(onChange).toHaveBeenCalledTimes(2) - expect(onChange).toHaveBeenLastCalledWith([]) - }) -}) diff --git a/src/renderer/src/components/right-sidebar/activity-bar-buttons.test.tsx b/src/renderer/src/components/right-sidebar/activity-bar-buttons.test.tsx deleted file mode 100644 index e2ed8d1b146..00000000000 --- a/src/renderer/src/components/right-sidebar/activity-bar-buttons.test.tsx +++ /dev/null @@ -1,37 +0,0 @@ -// @vitest-environment happy-dom - -import { render, screen } from '@testing-library/react' -import { Activity } from 'lucide-react' -import { describe, expect, it } from 'vitest' -import { TooltipProvider } from '@/components/ui/tooltip' -import { ActivityBarButton, type ActivityBarItem } from './activity-bar/activity-bar-buttons' - -const item: ActivityBarItem = { - id: 'bot-activity', - icon: Activity, - title: 'Activity', - shortcut: '' -} - -function renderButton(count: number | undefined, active: boolean) { - return render( - - {}} - layout="top" - /> - - ) -} - -describe('an activity tab with something new inside', () => { - it('shows the count until the tab is open', () => { - const { unmount } = renderButton(2, false) - expect(screen.getByRole('button', { name: 'Activity, 2 new' }).textContent).toBe('2') - unmount() - renderButton(2, true) - expect(screen.getByRole('button').textContent).toBe('') - }) -}) diff --git a/src/renderer/src/components/sidebar/SidebarSectionHeader.test.tsx b/src/renderer/src/components/sidebar/SidebarSectionHeader.test.tsx deleted file mode 100644 index 0569bd89c8e..00000000000 --- a/src/renderer/src/components/sidebar/SidebarSectionHeader.test.tsx +++ /dev/null @@ -1,48 +0,0 @@ -// @vitest-environment happy-dom - -import { cleanup, fireEvent, render } from '@testing-library/react' -import { afterEach, describe, expect, it, vi } from 'vitest' -import { TooltipProvider } from '@/components/ui/tooltip' -import { SidebarSectionHeader } from './SidebarSectionHeader' - -afterEach(cleanup) - -function renderHeader(props: Partial> = {}) { - return render( - - - - ) -} - -describe('SidebarSectionHeader', () => { - it('has no fold button unless the section can fold', () => { - const view = renderHeader() - expect(view.queryByRole('button')).toBeNull() - }) - - it('folds from the title area and reports its state', () => { - const onToggle = vi.fn() - const view = renderHeader({ fold: { collapsed: true, label: 'Expand Projects', onToggle } }) - const button = view.getByRole('button', { name: 'Expand Projects' }) - expect(button.getAttribute('aria-expanded')).toBe('false') - fireEvent.click(button) - expect(onToggle).toHaveBeenCalledTimes(1) - }) - - it('keeps the title accessory a separate control from the fold', () => { - const onToggle = vi.fn() - const onCollapseAll = vi.fn() - const view = renderHeader({ - fold: { collapsed: false, label: 'Collapse Projects', onToggle }, - titleAccessory: ( - - ) - }) - fireEvent.click(view.getByRole('button', { name: 'Collapse all projects' })) - expect(onCollapseAll).toHaveBeenCalledTimes(1) - expect(onToggle).not.toHaveBeenCalled() - }) -}) diff --git a/src/renderer/src/components/status-bar/accounts/ProviderAccountChatButton.test.tsx b/src/renderer/src/components/status-bar/accounts/ProviderAccountChatButton.test.tsx index fe33171af9c..bb02203e173 100644 --- a/src/renderer/src/components/status-bar/accounts/ProviderAccountChatButton.test.tsx +++ b/src/renderer/src/components/status-bar/accounts/ProviderAccountChatButton.test.tsx @@ -24,12 +24,12 @@ afterEach(() => { openSettingsPage.mockReset() }) -function switcher(disabled: boolean) { +function disabledSwitcher() { return ( - + Other account @@ -40,21 +40,9 @@ function switcher(disabled: boolean) { } describe('ProviderAccountChatButton', () => { - it('opens its menu from the keyboard and returns focus on Escape', async () => { - const user = userEvent.setup() - render(switcher(false)) - const trigger = screen.getByRole('button', { name: 'Switch account' }) - trigger.focus() - await user.keyboard('{Enter}') - expect(await screen.findByRole('menuitem', { name: 'Other account' })).toBeInTheDocument() - await user.keyboard('{Escape}') - expect(screen.queryByRole('menuitem', { name: 'Other account' })).toBeNull() - expect(trigger).toHaveFocus() - }) - it('stays focusable but cannot open while disabled', async () => { const user = userEvent.setup() - render(switcher(true)) + render(disabledSwitcher()) const trigger = screen.getByRole('button', { name: 'Switch account' }) await user.click(trigger) trigger.focus() From be7f3283f930a6f5c4a7d77f5ac8e8b2f444ec07 Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Wed, 18 Nov 2026 11:03:27 -0800 Subject: [PATCH 5/6] test: drop shallow settings and metadata examples (#44198) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- .../NativeChatConnectorAskerTag.test.tsx | 11 -- .../settings/bots/BotsSettingsPane.test.tsx | 44 ----- .../navigation/SettingsSidebar.test.tsx | 172 ------------------ .../details/WorktreeCardMeta.test.tsx | 84 --------- 4 files changed, 311 deletions(-) delete mode 100644 src/renderer/src/components/settings/bots/BotsSettingsPane.test.tsx delete mode 100644 src/renderer/src/components/settings/navigation/SettingsSidebar.test.tsx delete mode 100644 src/renderer/src/components/sidebar/workspace-card/details/WorktreeCardMeta.test.tsx diff --git a/src/renderer/src/components/native-chat/NativeChatConnectorAskerTag.test.tsx b/src/renderer/src/components/native-chat/NativeChatConnectorAskerTag.test.tsx index 38d41e8f335..4a52f190fae 100644 --- a/src/renderer/src/components/native-chat/NativeChatConnectorAskerTag.test.tsx +++ b/src/renderer/src/components/native-chat/NativeChatConnectorAskerTag.test.tsx @@ -33,15 +33,4 @@ describe('NativeChatConnectorAskerTag', () => { forceSystemBrowser: true }) }) - - it('shows the cached avatar, then initials when it can’t load', () => { - const { container } = render() - const image = container.querySelector('img') - if (!image) { - throw new Error('no avatar image') - } - fireEvent.error(image) - expect(container.querySelector('img')).toBeNull() - expect(screen.getByText('SL')).toBeInTheDocument() - }) }) diff --git a/src/renderer/src/components/settings/bots/BotsSettingsPane.test.tsx b/src/renderer/src/components/settings/bots/BotsSettingsPane.test.tsx deleted file mode 100644 index a34a17d1bcc..00000000000 --- a/src/renderer/src/components/settings/bots/BotsSettingsPane.test.tsx +++ /dev/null @@ -1,44 +0,0 @@ -// @vitest-environment happy-dom - -import { cleanup, fireEvent, render, screen } from '@testing-library/react' -import { afterEach, describe, expect, it, vi } from 'vitest' -import { getDefaultSettings } from '../../../../../shared/orca-profiles/constants' - -vi.mock('@/lib/bot-catalog', () => ({ useBots: () => [], useHostBots: () => [] })) -vi.mock('@/components/bots/slack/SlackWorkspacesSettings', () => ({ - slackWorkspaces: () => [], - SlackWorkspacesSettings: () =>
Slack workspaces
-})) -vi.mock('@/components/bots/composio/ComposioKeyControl', () => ({ - ComposioKeyControl: () =>
Composio key control
-})) - -import { BotsSettingsPane } from './BotsSettingsPane' - -afterEach(cleanup) - -function renderPane(botsEnabled?: boolean) { - const updateSettings = vi.fn() - const settings = { ...getDefaultSettings('/home/me'), botsEnabled } - render() - return updateSettings -} - -describe('BotsSettingsPane', () => { - it('has bots on when nothing was saved, and turns them off from its switch', () => { - const updateSettings = renderPane(undefined) - - expect(screen.getByText('Slack workspaces')).toBeTruthy() - expect(screen.getByText('Composio key control')).toBeTruthy() - fireEvent.click(screen.getByRole('switch', { name: 'Enable bots' })) - expect(updateSettings).toHaveBeenCalledWith({ botsEnabled: false }) - }) - - it('shows only the switch while bots are off, and turns them back on', () => { - const updateSettings = renderPane(false) - - expect(screen.queryByText('Slack workspaces')).toBeNull() - fireEvent.click(screen.getByRole('switch', { name: 'Enable bots' })) - expect(updateSettings).toHaveBeenCalledWith({ botsEnabled: true }) - }) -}) diff --git a/src/renderer/src/components/settings/navigation/SettingsSidebar.test.tsx b/src/renderer/src/components/settings/navigation/SettingsSidebar.test.tsx deleted file mode 100644 index d92bef96f1f..00000000000 --- a/src/renderer/src/components/settings/navigation/SettingsSidebar.test.tsx +++ /dev/null @@ -1,172 +0,0 @@ -// @vitest-environment happy-dom - -import { renderToStaticMarkup } from 'react-dom/server' -import { Bot, GitBranch, Mic, Network, Puzzle } from 'lucide-react' -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { getDefaultSettings } from '../../../../../shared/orca-profiles/constants' -import type * as ShortcutLabels from '@/lib/keyboard/useShortcutLabel' -import { SettingsSidebar } from './SettingsSidebar' -import { TooltipProvider } from '../../ui/tooltip' -import type { SettingsSetupGuideProgress } from '../setup-guide/settings-setup-guide-progress' -import type { GlobalSettings } from '../../../../../shared/settings/global-settings-types' - -const mocks = vi.hoisted(() => ({ - useSettingsSetupGuideProgress: vi.fn() -})) - -vi.mock('@/lib/keyboard/useShortcutLabel', async () => { - const actual = await vi.importActual('@/lib/keyboard/useShortcutLabel') - return { - ...actual, - useShortcutLabel: () => '⌘F', - useShortcutKeyComboDetails: () => [{ keys: ['⌘', 'F'], doubleTap: false }] - } -}) - -vi.mock('../setup-guide/settings-setup-guide-progress', () => ({ - useSettingsSetupGuideProgress: mocks.useSettingsSetupGuideProgress -})) - -function makeSetupGuideProgress( - overrides: Partial = {} -): SettingsSetupGuideProgress { - return { - ready: true, - doneCount: 5, - total: 8, - firstIncompleteStepId: 'agent-capabilities', - ...overrides - } -} - -function renderSidebar( - activeSectionId = 'orchestration', - settings: GlobalSettings = getDefaultSettings('/tmp') -): string { - return renderToStaticMarkup( - - - - ) -} - -describe('SettingsSidebar', () => { - beforeEach(() => { - mocks.useSettingsSetupGuideProgress.mockReset() - mocks.useSettingsSetupGuideProgress.mockReturnValue(makeSetupGuideProgress()) - }) - - afterEach(() => { - document.body.innerHTML = '' - }) - - it("shows each bot's avatar in its row, above Projects", () => { - const markup = renderToStaticMarkup( - - - - ) - - expect(markup).toContain('🦉') - // The generic icon renders as lucide-bot elsewhere in the nav. - expect(renderSidebar()).toContain('lucide-bot') - expect(markup).not.toContain('lucide-bot') - expect(markup.indexOf('Reviewer')).toBeLessThan(markup.indexOf('Projects')) - }) -}) diff --git a/src/renderer/src/components/sidebar/workspace-card/details/WorktreeCardMeta.test.tsx b/src/renderer/src/components/sidebar/workspace-card/details/WorktreeCardMeta.test.tsx deleted file mode 100644 index 28460980dd6..00000000000 --- a/src/renderer/src/components/sidebar/workspace-card/details/WorktreeCardMeta.test.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { renderToStaticMarkup } from 'react-dom/server' -import type { ReactNode } from 'react' -import { describe, expect, it, vi } from 'vitest' -import { WorktreeCardDetailsHover } from './WorktreeCardMeta' -import { WorktreeCardMetaBadges } from '../metadata/WorktreeCardMetaBadges' - -vi.mock('@/components/ui/hover-card', () => ({ - HoverCard: ({ children }: { children: ReactNode }) => <>{children}, - HoverCardContent: ({ children }: { children: ReactNode }) =>
{children}
, - HoverCardTrigger: ({ children }: { children: ReactNode }) => <>{children} -})) - -vi.mock('@/components/ui/tooltip', () => ({ - Tooltip: ({ children }: { children: ReactNode }) => <>{children}, - TooltipContent: ({ children }: { children: ReactNode }) => <>{children}, - TooltipTrigger: ({ children }: { children: ReactNode }) => <>{children} -})) - -vi.mock('@/components/ui/dropdown-menu', () => ({ - DropdownMenu: ({ children }: { children: ReactNode }) =>
{children}
, - DropdownMenuTrigger: ({ children }: { children: ReactNode; asChild?: boolean }) => ( - <>{children} - ), - DropdownMenuContent: ({ children }: { children: ReactNode }) =>
{children}
, - DropdownMenuItem: ({ children }: { children: ReactNode; onSelect?: () => void }) => ( -
{children}
- ) -})) - -describe('WorktreeCardDetailsHover', () => { - it('names the bot that made the workspace', () => { - const bot = { id: 'bot-1', hostId: 'local' as const, name: 'Ranger', avatar: null } - const badgeMarkup = renderToStaticMarkup( - - ) - const hoverMarkup = renderToStaticMarkup( - - worker - - ) - - expect(badgeMarkup).toContain('Made by Ranger') - expect(hoverMarkup).toContain('Made by Ranger') - }) - - it("shows a bot's workspace by its bot alone, not also as CLI-made", () => { - const cliProvenance = { kind: 'created-by-cli' as const, createdAt: 1 } - const botMade = renderToStaticMarkup( - - ) - const cliMade = renderToStaticMarkup( - - ) - - expect(botMade).toContain('Made by Ranger') - expect(botMade).not.toContain('Created by Orca CLI') - expect(cliMade).toContain('Created by Orca CLI') - }) -}) From b2b14d8c084517d9e8794a928806d749342d6262 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Wed, 18 Nov 2026 11:10:07 -0800 Subject: [PATCH 6/6] fix(native-chat): raise Jump to latest pill contrast (#43859) --- .../scroll/NativeChatJumpToLatest.fixture.tsx | 51 +++++++++++++++++++ .../scroll/NativeChatJumpToLatest.tsx | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/renderer/src/components/native-chat/viewport/scroll/NativeChatJumpToLatest.fixture.tsx diff --git a/src/renderer/src/components/native-chat/viewport/scroll/NativeChatJumpToLatest.fixture.tsx b/src/renderer/src/components/native-chat/viewport/scroll/NativeChatJumpToLatest.fixture.tsx new file mode 100644 index 00000000000..45b2264d014 --- /dev/null +++ b/src/renderer/src/components/native-chat/viewport/scroll/NativeChatJumpToLatest.fixture.tsx @@ -0,0 +1,51 @@ +import { defineFixture } from '../../../../component-fixtures/component-fixture' +import { + NATIVE_CHAT_APPEARANCE_ROOT_CLASS, + nativeChatAppearanceStyle +} from '../../appearance/native-chat-appearance-style' +import { NativeChatJumpToLatest } from './NativeChatJumpToLatest' +import type { GlobalSettings } from '../../../../../../shared/settings/global-settings-types' +import { resolveNativeChatAppearanceSettings } from '../../../../../../shared/native-chat/settings/native-chat-appearance-settings' + +const PROSE = [ + 'The reconnect path retries the relay handshake before it replays buffered output, so a stalled socket shows up as a slow first frame rather than a dropped session.', + 'I traced the stall to the worktree sync: it waits for the remote index lock, and the lock holder is the previous connection that never released it after the laptop slept.', + 'Releasing the lock on disconnect fixes the overnight case. The remaining risk is a second client attaching during the grace window, which the lease check already rejects.', + 'Next I will run the remote suite against a paired Linux host and confirm the replay order matches the local transcript.' +] + +function Transcript({ settings }: { settings?: Partial }): React.JSX.Element { + const theme = document.documentElement.classList.contains('dark') ? 'dark' : 'light' + const style = nativeChatAppearanceStyle({ theme, ...settings }) + return ( +
+
+ {PROSE.map((paragraph) => ( +

{paragraph}

+ ))} +
+ {}} /> +
+ ) +} + +export const overTranscript = defineFixture({ width: 640, render: () => }) + +export const narrow = defineFixture({ width: 360, render: () => }) + +// Chat-only Match Terminal derives its own surfaces from a dim terminal palette, outside the theme check. +export const matchTerminal = defineFixture({ + width: 640, + render: () => ( + + ) +}) diff --git a/src/renderer/src/components/native-chat/viewport/scroll/NativeChatJumpToLatest.tsx b/src/renderer/src/components/native-chat/viewport/scroll/NativeChatJumpToLatest.tsx index 2e765272899..4fc0052dce3 100644 --- a/src/renderer/src/components/native-chat/viewport/scroll/NativeChatJumpToLatest.tsx +++ b/src/renderer/src/components/native-chat/viewport/scroll/NativeChatJumpToLatest.tsx @@ -27,7 +27,7 @@ export function NativeChatJumpToLatest({ aria-hidden={!visible || undefined} onMouseDown={keepFocus} onClick={onJump} - className="absolute bottom-3 left-1/2 flex h-8 -translate-x-1/2 items-center gap-1.5 rounded-full border border-border bg-popover px-3 text-xs font-medium text-popover-foreground shadow-floating transition-[opacity,translate] duration-150 ease-out hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none data-[shown=false]:pointer-events-none data-[shown=false]:translate-y-1 data-[shown=false]:opacity-0" + className="absolute bottom-3 left-1/2 flex h-8 -translate-x-1/2 items-center gap-1.5 rounded-full border border-popover-foreground/25 bg-popover px-3 text-xs font-medium text-popover-foreground shadow-floating transition-[opacity,translate] duration-150 ease-out hover:border-popover-foreground/40 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none data-[shown=false]:pointer-events-none data-[shown=false]:translate-y-1 data-[shown=false]:opacity-0" > {label ?? t('components.native-chat.jumpToLatest', 'Jump to latest')}