From 0d3741c9fd8e4ff9eefe85177eec01cdb4d4e162 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 13 Nov 2026 00:34:30 -0800 Subject: [PATCH] Align restart warnings and satisfy changed-file lint rules --- src/main/daemon/server/daemon-provider-processes.test.ts | 1 + src/main/daemon/server/daemon-provider-requests.ts | 3 +-- .../daemon/transport/client/daemon-client-hello-handshake.ts | 1 + .../daemon/transport/client/daemon-client-ndjson-readers.ts | 1 + src/main/pi/rpc/rpc-startup-open.ts | 3 +-- src/main/provider-process/hosted-provider-ownership.test.ts | 3 +++ src/main/startup/pty-startup/main-process-pty-startup.ts | 2 +- .../src/components/shared/MacFolderAccessFixDialog.tsx | 2 +- src/renderer/src/components/shared/useDaemonActions.tsx | 2 +- src/renderer/src/i18n/locales/ja.json | 4 ++-- 10 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/main/daemon/server/daemon-provider-processes.test.ts b/src/main/daemon/server/daemon-provider-processes.test.ts index 9adce75fcf7..722b153d49d 100644 --- a/src/main/daemon/server/daemon-provider-processes.test.ts +++ b/src/main/daemon/server/daemon-provider-processes.test.ts @@ -13,6 +13,7 @@ it.each([10, 100])('drains %i live roots without rescanning retained outcomes', const child = Object.assign(new EventEmitter(), { pid: 42, kill: vi.fn(() => true) }) children.push(child) queueMicrotask(() => child.emit('spawn')) + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: This held-child fixture supplies the PID, events and kill method used by the provider registry. return child as never }) const owner = new Socket() diff --git a/src/main/daemon/server/daemon-provider-requests.ts b/src/main/daemon/server/daemon-provider-requests.ts index 79c85321333..fe334451373 100644 --- a/src/main/daemon/server/daemon-provider-requests.ts +++ b/src/main/daemon/server/daemon-provider-requests.ts @@ -1,8 +1,7 @@ -import type { DaemonClientConnections } from './daemon-client-connections' +import type { DaemonClientConnections, ConnectedDaemonClient } from './daemon-client-connections' import type { DaemonTerminalAdmission } from './daemon-terminal-admission' import type { TerminalHost } from '../terminal-host/terminal-host' import type { DaemonRequest } from '../protocol/daemon-rpc-contract' -import type { ConnectedDaemonClient } from './daemon-client-connections' import type { DaemonProviderProcesses } from './daemon-provider-processes' import type { DaemonServerLifecycle } from './daemon-server-lifecycle' diff --git a/src/main/daemon/transport/client/daemon-client-hello-handshake.ts b/src/main/daemon/transport/client/daemon-client-hello-handshake.ts index 9ab8dbc0a31..b9a67b485ad 100644 --- a/src/main/daemon/transport/client/daemon-client-hello-handshake.ts +++ b/src/main/daemon/transport/client/daemon-client-hello-handshake.ts @@ -141,6 +141,7 @@ function parseDaemonEndpointIdentity(value: unknown): DaemonEndpointIdentity | n if (!value || typeof value !== 'object') { return null } + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: Only optional unknown fields are projected after the object check; values are validated below. const identity = value as { pid?: unknown startedAtMs?: unknown diff --git a/src/main/daemon/transport/client/daemon-client-ndjson-readers.ts b/src/main/daemon/transport/client/daemon-client-ndjson-readers.ts index 0e5f3f0e5f6..6ddd6860884 100644 --- a/src/main/daemon/transport/client/daemon-client-ndjson-readers.ts +++ b/src/main/daemon/transport/client/daemon-client-ndjson-readers.ts @@ -25,6 +25,7 @@ export function attachControlResponseReader( const parser = createNdjsonParser( (msg) => { if (msg && typeof msg === 'object' && 'type' in msg && msg.type === 'providerExit') { + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: The authenticated daemon emits this tagged record through its typed provider outcome encoder. onProviderEvent?.(msg as HostedProviderExitEvent) } else { onResponse(msg as RpcResponse) diff --git a/src/main/pi/rpc/rpc-startup-open.ts b/src/main/pi/rpc/rpc-startup-open.ts index a094c5d21a6..62a73e84c8e 100644 --- a/src/main/pi/rpc/rpc-startup-open.ts +++ b/src/main/pi/rpc/rpc-startup-open.ts @@ -1,4 +1,4 @@ -import type { PiRpcConnection } from './rpc-session' +import type { PiRpcConnection, PiRpcSession } from './rpc-session' import { waitForPromiseWithSignal } from '../../../shared/abort-signal-reason' import type { StructuredAgentSessionAcquireInput, @@ -8,7 +8,6 @@ import type { AgentSessionStartEndings } from '../../native-chat/agent-session-w import type { StructuredAgentSessionProviderOpenInput } from '../../native-chat/agent-session-wire/startup/structured-agent-session-provider-open-contract' import { JsonlRpcAgentExitError } from '../../jsonl-rpc/agent-connection' import { withProviderSpawnAbsence } from '../../provider-process/provider-executable-missing' -import type { PiRpcSession } from './rpc-session' import { piStartFailure } from './rpc-startup-outcome' /** Takes this child's own exit when first seen, so a start settling meanwhile cannot miss it; the diff --git a/src/main/provider-process/hosted-provider-ownership.test.ts b/src/main/provider-process/hosted-provider-ownership.test.ts index 13ceef89087..06045be9037 100644 --- a/src/main/provider-process/hosted-provider-ownership.test.ts +++ b/src/main/provider-process/hosted-provider-ownership.test.ts @@ -80,6 +80,7 @@ function pendingChild() { } const child = new HostedProviderChild( spec, + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: The fixture implements the daemon methods exercised by the hosted child without opening real daemon sockets. async () => client as never, () => { throw new Error('Duplicate spawn') @@ -204,6 +205,7 @@ it('keeps a bounded startup longer than one second hosted instead of spawning tw handle.exit() await vi.advanceTimersByTimeAsync(1_001) const startup = Promise.withResolvers() + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: Startup resolves to the same daemon-method fixture exercised by the hosted child. installProviderProcessHost(async () => startup.promise as never) const direct = vi.fn(() => { throw new Error('Unexpected fallback') @@ -243,6 +245,7 @@ it('keeps direct-fallback tree cleanup when its first stop signal fails', async async () => null, () => { queueMicrotask(() => direct.emit('spawn')) + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: The fixture supplies the streams, PID, events and kill result consumed by direct-child adoption and teardown. return direct as never } ) diff --git a/src/main/startup/pty-startup/main-process-pty-startup.ts b/src/main/startup/pty-startup/main-process-pty-startup.ts index 45b7f3a8ffb..880e79833e1 100644 --- a/src/main/startup/pty-startup/main-process-pty-startup.ts +++ b/src/main/startup/pty-startup/main-process-pty-startup.ts @@ -1,5 +1,4 @@ import { installProviderProcessHost } from '../../provider-process/provider-process-spawn' -import { getProviderProcessHostClient } from '../../daemon/providers/lifecycle/daemon-provider-state' import { app } from 'electron' import { parseWorkspaceKey } from '../../../shared/workspace-scope' import { isLocalExecutionHost } from '../../../shared/execution-host' @@ -8,6 +7,7 @@ import { track } from '../../telemetry/client' import { getPtyIdForPaneKey } from '../../ipc/pty/pane/key-state' import { getDaemonProvider, + getProviderProcessHostClient, listLiveDaemonPtyIds } from '../../daemon/providers/lifecycle/daemon-provider-state' import { initDaemonPtyProvider } from '../../daemon/providers/lifecycle/daemon-provider-init' diff --git a/src/renderer/src/components/shared/MacFolderAccessFixDialog.tsx b/src/renderer/src/components/shared/MacFolderAccessFixDialog.tsx index a0116afba79..0e0c67cffe6 100644 --- a/src/renderer/src/components/shared/MacFolderAccessFixDialog.tsx +++ b/src/renderer/src/components/shared/MacFolderAccessFixDialog.tsx @@ -116,7 +116,7 @@ function FixSteps({ ? undefined : t( 'auto.components.shared.MacFolderAccessFixDialog.restartConsequence', - 'Terminals and agents using this service will close.' + 'Open terminals restart; running agents stop.' ) } /> diff --git a/src/renderer/src/components/shared/useDaemonActions.tsx b/src/renderer/src/components/shared/useDaemonActions.tsx index 6b32480d688..c5ab31a7db7 100644 --- a/src/renderer/src/components/shared/useDaemonActions.tsx +++ b/src/renderer/src/components/shared/useDaemonActions.tsx @@ -238,7 +238,7 @@ function getCopy(kind: DaemonActionKind, t: Translate = translate): DaemonAction <> {t( 'auto.components.shared.useDaemonActions.01d6b7c64e', - 'Terminals and agents using this service will close. Remote hosts are not affected.' + 'Open terminals restart; running agents stop. Remote hosts are not affected.' )} ), diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index c57b689eb67..415139b2764 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -6747,7 +6747,7 @@ "d9657ac204": "ターミナルセッションのシャットダウンリクエストが送信されました。", "e8f25bd903": "ターミナルクリーンアップを完了できませんでした。", "a702d4196e": "これにより、すべてのワークスペースのターミナルタブが閉じられ、現在のターミナルセッションのシャットダウンがリクエストされます。保存されていないターミナル作業は失われます。デーモン自体は実行を続け、新規ターミナルはすぐに開けます。この操作は取り消せません。", - "01d6b7c64e": "開いているターミナルは再起動し、実行中のエージェントは停止します。リモートホストには影響しません。", + "01d6b7c64e": "開いているターミナルは再起動し、実行中の Agent は停止します。リモートホストには影響しません。", "922548bc66": "ターミナルサービスを再起動しますか?", "confirmRestart": "再起動", "busyRestarting": "再起動中…", @@ -6758,7 +6758,7 @@ "stepAllow": "ファイルとフォルダーで Orca を許可する", "openSystemSettings": "システム設定を開く", "stepRestart": "Orca のターミナルサービスを再起動", - "restartConsequence": "開いているターミナルは再起動し、実行中のエージェントは停止します。", + "restartConsequence": "開いているターミナルは再起動し、実行中の Agent は停止します。", "restarting": "再起動中…", "restart": "再起動", "restartFailed": "再起動に失敗しました。 「設定」→「ターミナル」→「セッションの管理」から再試行してください。",