Merge origin/main into brennanb2025/heavy-worker-host (picks up #44202's fixes for main's CI failures)

This commit is contained in:
Brennan Benson
2026-11-18 11:11:28 -08:00
40 changed files with 108 additions and 494 deletions
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -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é.",
+1 -1
View File
@@ -655,7 +655,7 @@
"confirm": "巻き戻す",
"unsupported": "このチャットは以前のメッセージに戻れません。",
"historyNotPaginated": "この古い Codex チャットは以前のメッセージに戻れません。「ここに巻き戻す」を使用するには、新規チャットを開始してください。",
"busy": "Agent がアイドル状態になり、このチャットであなたの対応を待つものがなくなると利用できます。",
"busy": "チャットがアイドル状態のときに利用できます",
"staleEpoch": "会話が変更されました。最新のメッセージを確認して、もう一度お試しください。",
"invalidTarget": "会話をこのメッセージに戻すことはできません。何も変更されていません。",
"historyLimit": "この会話は長すぎて巻き戻せません。何も変更されていません。",
+1 -1
View File
@@ -655,7 +655,7 @@
"confirm": "되감기",
"unsupported": "이 채팅은 이전 메시지로 돌아갈 수 없습니다.",
"historyNotPaginated": "이 오래된 Codex 채팅은 이전 메시지로 돌아갈 수 없습니다. 여기로 되감기를 사용하려면 새 채팅을 시작하세요.",
"busy": "에이전트가 유휴 상태이고 이 채팅에서 사용자를 기다리는 항목이 없으면 사용할 수 있습니다.",
"busy": "채팅이 유휴 상태일 때 사용할 수 있습니다",
"staleEpoch": "대화가 변경되었습니다. 최신 메시지를 확인하고 다시 시도하세요.",
"invalidTarget": "대화가 이 메시지로 돌아갈 수 없습니다. 변경된 내용은 없습니다.",
"historyLimit": "이 대화는 너무 길어 되돌아갈 수 없습니다. 변경된 내용은 없습니다.",
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -729,7 +729,7 @@
"confirm": "Вернуться",
"unsupported": "В этом чате нельзя вернуться к предыдущему сообщению.",
"historyNotPaginated": "В этом старом чате Codex нельзя вернуться к предыдущему сообщению. Создайте новый чат, чтобы использовать возврат к сообщению.",
"busy": "Доступно, когда агент закончит работу и чат не будет ждать вашего ответа.",
"busy": "Доступно, когда чат бездействует",
"staleEpoch": "Разговор изменился. Просмотрите последние сообщения и повторите попытку.",
"invalidTarget": "Нельзя вернуться к этому сообщению. Ничего не изменилось.",
"historyLimit": "Разговор слишком длинный для возврата. Ничего не изменилось.",
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -655,7 +655,7 @@
"confirm": "回溯",
"unsupported": "此聊天無法返回到更早的訊息。",
"historyNotPaginated": "此舊版 Codex 聊天無法返回到更早的訊息。請開始新聊天以使用「回溯到此處」。",
"busy": "當代理程式閒置且此聊天中沒有等待您處理的內容時可用。",
"busy": "聊天閒置時可用",
"staleEpoch": "對話已發生變化。請檢視最新訊息後重試。",
"invalidTarget": "對話無法返回到此訊息。未做任何更改。",
"historyLimit": "此對話過長,無法回溯。未做任何更改。",
+1 -1
View File
@@ -705,7 +705,7 @@
"confirm": "回溯",
"unsupported": "此聊天无法返回到更早的消息。",
"historyNotPaginated": "此旧版 Codex 聊天无法返回到更早的消息。请开始新聊天以使用“回溯到此处”。",
"busy": "当智能体空闲且此聊天中没有等待您处理的内容时可用。",
"busy": "聊天空闲时可用",
"staleEpoch": "对话已发生变化。请查看最新消息后重试。",
"invalidTarget": "对话无法返回到此消息。未做任何更改。",
"historyLimit": "此对话过长,无法回溯。未做任何更改。",
@@ -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',
@@ -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)
})
@@ -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'])
})
})
@@ -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(<GoogleServicePicker value={['gmail']} onChange={onChange} />)
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([])
})
})
@@ -33,15 +33,4 @@ describe('NativeChatConnectorAskerTag', () => {
forceSystemBrowser: true
})
})
it('shows the cached avatar, then initials when it can’t load', () => {
const { container } = render(<NativeChatConnectorAskerTag asker={SAM} />)
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()
})
})
@@ -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<Editor>()
function disposeEditor(editor: Editor): void {
disposedEditors.add(editor)
editor.destroy()
}
class ComposerEditors {
private editors = new Map<string, OwnedEditor>()
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()
}
})
}
@@ -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])(
@@ -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',
@@ -108,11 +108,12 @@ function NativeChatRewindMenuItem({
onSelect={() => void rewind.request(itemId, confirm)}
>
<Undo2 />
<span className="grid min-w-0">
<span className="grid min-w-0 flex-1">
{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 ? (
<span className="text-xs whitespace-normal text-muted-foreground">
<span className="text-xs whitespace-normal text-muted-foreground contain-inline-size">
{rewind.disabledReason}
</span>
) : null}
@@ -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<GlobalSettings> }): React.JSX.Element {
const theme = document.documentElement.classList.contains('dark') ? 'dark' : 'light'
const style = nativeChatAppearanceStyle({ theme, ...settings })
return (
<div
className={`${NATIVE_CHAT_APPEARANCE_ROOT_CLASS} relative h-56 overflow-hidden px-4 pt-3 text-sm text-chat-foreground`}
style={style}
data-native-chat-scheme={style.colorScheme}
>
<div className="space-y-3">
{PROSE.map((paragraph) => (
<p key={paragraph}>{paragraph}</p>
))}
</div>
<NativeChatJumpToLatest visible onJump={() => {}} />
</div>
)
}
export const overTranscript = defineFixture({ width: 640, render: () => <Transcript /> })
export const narrow = defineFixture({ width: 360, render: () => <Transcript /> })
// Chat-only Match Terminal derives its own surfaces from a dim terminal palette, outside the theme check.
export const matchTerminal = defineFixture({
width: 640,
render: () => (
<Transcript
settings={{
nativeChatAppearance: resolveNativeChatAppearanceSettings({ matchTerminalInterface: true }),
terminalColorOverrides: { background: '#333333', foreground: '#a1a1a1' }
}}
/>
)
})
@@ -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"
>
<ArrowDown className="size-3.5" />
<span>{label ?? t('components.native-chat.jumpToLatest', 'Jump to latest')}</span>
@@ -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(
<TooltipProvider>
<ActivityBarButton
item={count ? { ...item, count } : item}
active={active}
onClick={() => {}}
layout="top"
/>
</TooltipProvider>
)
}
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('')
})
})
@@ -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: () => <div>Slack workspaces</div>
}))
vi.mock('@/components/bots/composio/ComposioKeyControl', () => ({
ComposioKeyControl: () => <div>Composio key control</div>
}))
import { BotsSettingsPane } from './BotsSettingsPane'
afterEach(cleanup)
function renderPane(botsEnabled?: boolean) {
const updateSettings = vi.fn()
const settings = { ...getDefaultSettings('/home/me'), botsEnabled }
render(<BotsSettingsPane settings={settings} updateSettings={updateSettings} />)
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 })
})
})
@@ -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<typeof ShortcutLabels>('@/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> = {}
): SettingsSetupGuideProgress {
return {
ready: true,
doneCount: 5,
total: 8,
firstIncompleteStepId: 'agent-capabilities',
...overrides
}
}
function renderSidebar(
activeSectionId = 'orchestration',
settings: GlobalSettings = getDefaultSettings('/tmp')
): string {
return renderToStaticMarkup(
<TooltipProvider>
<SettingsSidebar
activeSectionId={activeSectionId}
settings={settings}
generalGroups={[
{
id: 'capabilities',
title: 'AI Capabilities',
sections: [
{
id: 'agents',
title: 'Agents',
icon: Bot
},
{
id: 'orchestration',
title: 'Orchestration',
icon: Network,
installStatus: 'install'
},
{
id: 'voice',
title: 'Voice',
icon: Mic,
installStatus: 'installed'
},
{
id: 'computer-use',
title: 'Computer Use',
icon: Bot,
installStatus: 'up-to-date'
},
{
id: 'voice-loading',
title: 'Voice Loading',
icon: Mic,
installStatus: 'checking'
},
{
id: 'linear',
title: 'Linear',
icon: GitBranch,
installStatus: 'update-available'
},
{
id: 'ephemeral-vms',
title: 'Ephemeral VMs',
icon: Bot,
installStatus: 'needs-attention'
},
{
id: 'plugins',
title: 'Plugins',
icon: Puzzle
}
]
},
{
id: 'setup',
title: 'Set Up',
sections: [
{
id: 'accounts',
title: 'AI Provider Accounts',
icon: Bot,
badge: 'Optional'
}
]
}
]}
repoSections={[]}
searchCandidates={[]}
onBack={vi.fn()}
onSelectSection={vi.fn()}
onOpenSearchResult={vi.fn()}
/>
</TooltipProvider>
)
}
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(
<TooltipProvider>
<SettingsSidebar
activeSectionId="bot-b1"
settings={getDefaultSettings('/tmp')}
generalGroups={[
{
id: 'bots',
title: 'Bots',
sections: [
{
id: 'bot-b1',
title: 'Reviewer',
icon: Bot,
bot: { id: 'b1', hostId: 'local', name: 'Reviewer', avatar: '🦉' }
}
]
}
]}
repoSections={[]}
searchCandidates={[]}
onBack={vi.fn()}
onSelectSection={vi.fn()}
onOpenSearchResult={vi.fn()}
/>
</TooltipProvider>
)
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'))
})
})
@@ -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<React.ComponentProps<typeof SidebarSectionHeader>> = {}) {
return render(
<TooltipProvider>
<SidebarSectionHeader title="Projects" sectionId="projects" actions={null} {...props} />
</TooltipProvider>
)
}
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: (
<button type="button" onClick={onCollapseAll}>
Collapse all projects
</button>
)
})
fireEvent.click(view.getByRole('button', { name: 'Collapse all projects' }))
expect(onCollapseAll).toHaveBeenCalledTimes(1)
expect(onToggle).not.toHaveBeenCalled()
})
})
@@ -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 }) => <div>{children}</div>,
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 }) => <div>{children}</div>,
DropdownMenuTrigger: ({ children }: { children: ReactNode; asChild?: boolean }) => (
<>{children}</>
),
DropdownMenuContent: ({ children }: { children: ReactNode }) => <div>{children}</div>,
DropdownMenuItem: ({ children }: { children: ReactNode; onSelect?: () => void }) => (
<div>{children}</div>
)
}))
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(
<WorktreeCardMetaBadges
issue={null}
linearIssue={null}
review={null}
comment={null}
bot={bot}
/>
)
const hoverMarkup = renderToStaticMarkup(
<WorktreeCardDetailsHover
issue={null}
linearIssue={null}
review={null}
comment={null}
bot={bot}
>
<span>worker</span>
</WorktreeCardDetailsHover>
)
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(
<WorktreeCardMetaBadges
issue={null}
linearIssue={null}
review={null}
comment={null}
cliProvenance={cliProvenance}
bot={{ id: 'bot-1', hostId: 'local', name: 'Ranger', avatar: null }}
/>
)
const cliMade = renderToStaticMarkup(
<WorktreeCardMetaBadges
issue={null}
linearIssue={null}
review={null}
comment={null}
cliProvenance={cliProvenance}
/>
)
expect(botMade).toContain('Made by Ranger')
expect(botMade).not.toContain('Created by Orca CLI')
expect(cliMade).toContain('Created by Orca CLI')
})
})
@@ -24,12 +24,12 @@ afterEach(() => {
openSettingsPage.mockReset()
})
function switcher(disabled: boolean) {
function disabledSwitcher() {
return (
<TooltipProvider>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<ProviderAccountChatButton provider="claude" target={local} disabled={disabled} />
<ProviderAccountChatButton provider="claude" target={local} disabled />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>Other account</DropdownMenuItem>
@@ -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()
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -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é.",
+1 -1
View File
@@ -20326,7 +20326,7 @@
"rewind": {
"unsupported": "このチャットは以前のメッセージに戻れません。",
"historyNotPaginated": "この古い Codex チャットは以前のメッセージに戻れません。「ここに巻き戻す」を使用するには、新規チャットを開始してください。",
"busy": "Agent がアイドル状態になり、このチャットであなたの対応を待つものがなくなると利用できます。",
"busy": "チャットがアイドル状態のときに利用できます",
"staleEpoch": "会話が変更されました。最新のメッセージを確認して、もう一度お試しください。",
"invalidTarget": "会話をこのメッセージに戻すことはできません。何も変更されていません。",
"historyLimit": "この会話は長すぎて巻き戻せません。何も変更されていません。",
+1 -1
View File
@@ -19243,7 +19243,7 @@
"rewind": {
"unsupported": "이 채팅은 이전 메시지로 돌아갈 수 없습니다.",
"historyNotPaginated": "이 오래된 Codex 채팅은 이전 메시지로 돌아갈 수 없습니다. 여기로 되감기를 사용하려면 새 채팅을 시작하세요.",
"busy": "에이전트가 유휴 상태이고 이 채팅에서 사용자를 기다리는 항목이 없으면 사용할 수 있습니다.",
"busy": "채팅이 유휴 상태일 때 사용할 수 있습니다",
"staleEpoch": "대화가 변경되었습니다. 최신 메시지를 확인하고 다시 시도하세요.",
"invalidTarget": "대화가 이 메시지로 돌아갈 수 없습니다. 변경된 내용은 없습니다.",
"historyLimit": "이 대화는 너무 길어 되돌아갈 수 없습니다. 변경된 내용은 없습니다.",
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -20529,7 +20529,7 @@
"rewind": {
"unsupported": "В этом чате нельзя вернуться к предыдущему сообщению.",
"historyNotPaginated": "В этом старом чате Codex нельзя вернуться к предыдущему сообщению. Создайте новый чат, чтобы использовать возврат к сообщению.",
"busy": "Доступно, когда агент закончит работу и чат не будет ждать вашего ответа.",
"busy": "Доступно, когда чат бездействует",
"staleEpoch": "Разговор изменился. Просмотрите последние сообщения и повторите попытку.",
"invalidTarget": "Нельзя вернуться к этому сообщению. Ничего не изменилось.",
"historyLimit": "Разговор слишком длинный для возврата. Ничего не изменилось.",
+1 -1
View File
@@ -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.",
+1 -1
View File
@@ -19557,7 +19557,7 @@
"rewind": {
"unsupported": "此聊天無法返回到更早的訊息。",
"historyNotPaginated": "此舊版 Codex 聊天無法返回到更早的訊息。請開始新聊天以使用「回溯到此處」。",
"busy": "當代理程式閒置且此聊天中沒有等待您處理的內容時可用。",
"busy": "聊天閒置時可用",
"staleEpoch": "對話已發生變化。請檢視最新訊息後重試。",
"invalidTarget": "對話無法返回到此訊息。未做任何更改。",
"historyLimit": "此對話過長,無法回溯。未做任何更改。",
+1 -1
View File
@@ -20333,7 +20333,7 @@
"rewind": {
"unsupported": "此聊天无法返回到更早的消息",
"historyNotPaginated": "此旧版 Codex 聊天无法返回到更早的消息,请开始新聊天以使用“回溯到此处”",
"busy": "当代理空闲且此聊天中没有等待您处理的内容时可用",
"busy": "聊天空闲时可用",
"staleEpoch": "对话已发生变化,请查看最新消息后重试",
"invalidTarget": "对话无法返回到此消息,未做任何更改",
"historyLimit": "此对话过长,无法回溯,未做任何更改",
@@ -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)