diff --git a/src/main/ipc/runtime-environments/runtime-environment-managed-tunnel.test.ts b/src/main/ipc/runtime-environments/runtime-environment-managed-tunnel.test.ts index 8a136cd94bea..6246a8408d84 100644 --- a/src/main/ipc/runtime-environments/runtime-environment-managed-tunnel.test.ts +++ b/src/main/ipc/runtime-environments/runtime-environment-managed-tunnel.test.ts @@ -201,7 +201,7 @@ describe('resolving a runtime for a call, by host kind', () => { ) mocks.hasWslService = false await expect(resolveManagedRuntimeEnvironment('/u', 'wsl:ubuntu', noStart)).rejects.toThrow( - 'The WSL host Ubuntu isn’t available from your phone right now. Open one of its projects on your computer to connect it.' + 'The WSL host Ubuntu isn’t available from your phone right now. On your computer, click Start if it’s stopped; otherwise open one of its projects to connect it.' ) expect(mocks.ensureForRuntimeCall).not.toHaveBeenCalled() }) diff --git a/src/main/ipc/wsl-host-handlers.ts b/src/main/ipc/wsl-host-handlers.ts index b8226496afd9..3d44d783cbb6 100644 --- a/src/main/ipc/wsl-host-handlers.ts +++ b/src/main/ipc/wsl-host-handlers.ts @@ -301,7 +301,7 @@ export function registerWslHostHandlers(args: WslHostHandlerArgs): void { } wsl.setVisibleWork(visibleWork.report(windowId, ids)) }) - // The user switched to a workspace on this host: the focus entry that may boot its distro. + // The user switched to a workspace on this host: connects a running distro, never boots it (E9). ipcMain.handle('wslHosts:focusHost', (_event, request: { environmentId: string | null }) => { // null: the user is on a workspace that isn't on a WSL host. wsl.focusHost(typeof request?.environmentId === 'string' ? request.environmentId : null) diff --git a/src/main/ipc/wsl-move-host-connect.test.ts b/src/main/ipc/wsl-move-host-connect.test.ts index 047e5303f6a8..6cd0615a4b74 100644 --- a/src/main/ipc/wsl-move-host-connect.test.ts +++ b/src/main/ipc/wsl-move-host-connect.test.ts @@ -49,7 +49,7 @@ describe('the move driver reaching its WSL host', () => { recovering: false }) // A poll finding the distro stopped parks the host. - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') connector.connect.mockClear() return { connector, service } } @@ -77,13 +77,13 @@ describe('the move driver reaching its WSL host', () => { const { connector, service } = await stoppedAndParkedHost() await expect( connectWslMoveHostService(service, userDataPath, 'Ubuntu', 'automatic') - ).rejects.toThrow('Ubuntu was stopped') + ).rejects.toThrow('Ubuntu is stopped') // Running again is not enough while parked, even with visible work. connector.distro.state = 'running' service.setVisibleWork(['wsl:ubuntu']) await expect( connectWslMoveHostService(service, userDataPath, 'Ubuntu', 'automatic') - ).rejects.toThrow('Ubuntu was stopped') + ).rejects.toThrow('Ubuntu is stopped') expect(connector.connect).not.toHaveBeenCalled() }) diff --git a/src/main/wsl/wsl-host-add-admission.ts b/src/main/wsl/wsl-host-add-admission.ts index 01b5bba14986..4a5f97940776 100644 --- a/src/main/wsl/wsl-host-add-admission.ts +++ b/src/main/wsl/wsl-host-add-admission.ts @@ -27,16 +27,16 @@ export function wslHostAddRefusal( export const WSL_HOST_REMOVING_MESSAGE = 'This WSL host is being removed.' export function wslHostNotConnectedMessage(distro: string): string { - return `The WSL host ${distro} isn’t connected. Open one of its projects or connect it in Settings → Remote Orca Servers.` + return `The WSL host ${distro} isn’t connected. If it’s stopped, click Start; otherwise open one of its projects or connect it in Settings → Remote Orca Servers.` } export function wslHostStoppedMessage(distro: string): string { - return `${distro} was stopped. Switch to one of its projects, or reconnect it in Settings → Remote Orca Servers, to start it again.` + return `${distro} is stopped. To start it, click Start or open a new terminal in one of its projects.` } /** Shown on a paired phone once a stop is confirmed: only the desktop starts a distro. */ export function wslHostStoppedForPhoneMessage(distro: string): string { - return `The WSL host ${distro} isn’t running. Open one of its projects on your computer to start it.` + return `The WSL host ${distro} is stopped. To start it, click Start or open a new terminal in one of its projects on your computer.` } /** Shown on a paired phone while WSL hosts are switched off, or this one is being removed. */ @@ -46,7 +46,7 @@ export function wslHostHiddenFromPhoneMessage(distro: string): string { /** Shown on a paired phone while the desktop can't confirm the host runs (starting, reconnecting). */ export function wslHostUnavailableForPhoneMessage(distro: string): string { - return `The WSL host ${distro} isn’t available from your phone right now. Open one of its projects on your computer to connect it.` + return `The WSL host ${distro} isn’t available from your phone right now. On your computer, click Start if it’s stopped; otherwise open one of its projects to connect it.` } export function wslHostRemovalPendingMessage(distro: string): string { diff --git a/src/main/wsl/wsl-host-phone-reach.test.ts b/src/main/wsl/wsl-host-phone-reach.test.ts index d5a3ece5eb62..abbc44eb69a2 100644 --- a/src/main/wsl/wsl-host-phone-reach.test.ts +++ b/src/main/wsl/wsl-host-phone-reach.test.ts @@ -5,9 +5,9 @@ import { WslHostPhoneGate } from './wsl-host-phone-reach' import type { WslOrcadConnection } from './wsl-orcad-connection-types' const STOPPED = - 'The WSL host Ubuntu isn’t running. Open one of its projects on your computer to start it.' + 'The WSL host Ubuntu is stopped. To start it, click Start or open a new terminal in one of its projects on your computer.' const NEUTRAL = - 'The WSL host Ubuntu isn’t available from your phone right now. Open one of its projects on your computer to connect it.' + 'The WSL host Ubuntu isn’t available from your phone right now. On your computer, click Start if it’s stopped; otherwise open one of its projects to connect it.' const BRIDGE: WslOrcadConnection = { distro: 'Ubuntu', diff --git a/src/main/wsl/wsl-host-service-runtime-call-stop.test.ts b/src/main/wsl/wsl-host-service-runtime-call-stop.test.ts index 139a0acb7e91..00eb8c2d1283 100644 --- a/src/main/wsl/wsl-host-service-runtime-call-stop.test.ts +++ b/src/main/wsl/wsl-host-service-runtime-call-stop.test.ts @@ -54,18 +54,18 @@ describe('a runtime call that finds the WSL host stopped', () => { it('says the host stopped, so its panes offer Start instead of a dead prompt', async () => { const { service } = await stoppedUnderVisibleWork() - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') expect(published).toEqual([ expect.objectContaining({ environmentId: 'wsl:ubuntu', state: 'distro-stopped' }) ]) // Said once, however many calls meet the stop. - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') expect(published).toHaveLength(1) }) it('reconnects its open work once the distro runs again, without booting it', async () => { const { connector, service } = await stoppedUnderVisibleWork() - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') expect(connector.connect).not.toHaveBeenCalled() // Started some other way; the gate runs this only on a confirmed running list. @@ -78,7 +78,7 @@ describe('a runtime call that finds the WSL host stopped', () => { it('stays down while nothing shows the host, until it is opened', async () => { const { connector, service } = await stoppedUnderVisibleWork() - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') service.setVisibleWork([]) connector.distro.state = 'running' deferred.get('Ubuntu:wsl-host-parked:wsl:ubuntu')?.() @@ -89,7 +89,7 @@ describe('a runtime call that finds the WSL host stopped', () => { // e9-reviewer: the stop can land after liveness already reconnected and said ready. it('says ready again when the host was already back by the time the distro ran', async () => { const { connector, service } = await stoppedUnderVisibleWork() - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') connector.distro.state = 'running' // Liveness reconnected on its own. await connector.connect('Ubuntu') @@ -109,7 +109,7 @@ describe('a runtime call that finds the WSL host stopped', () => { expect(refusal).not.toBeInstanceOf(RemoteRuntimeClientError) expect(refusal).toMatchObject({ message: - 'Ubuntu was stopped. Switch to one of its projects, or reconnect it in Settings → Remote Orca Servers, to start it again.' + 'Ubuntu is stopped. To start it, click Start or open a new terminal in one of its projects.' }) }) }) diff --git a/src/main/wsl/wsl-host-service.test.ts b/src/main/wsl/wsl-host-service.test.ts index 56ee7fc62b35..a2d4d368ab1d 100644 --- a/src/main/wsl/wsl-host-service.test.ts +++ b/src/main/wsl/wsl-host-service.test.ts @@ -412,7 +412,7 @@ describe('WslHostService', () => { connector.connect.mockClear() // The focused host's polls get a refusal, not a boot, however often they come. - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') expect(connector.connect).not.toHaveBeenCalled() // Switching back to one of its workspaces is navigation: it re-checks, never starts it. @@ -480,7 +480,7 @@ describe('WslHostService', () => { .ensureForRuntimeCall('wsl:ubuntu') .catch((error: unknown) => error) expect(refusal).not.toBeInstanceOf(RemoteRuntimeClientError) - expect(String(refusal)).toContain('Ubuntu was stopped') + expect(String(refusal)).toContain('Ubuntu is stopped') expect(isRecoverableRemoteRuntimeConnectionError({ message: String(refusal) })).toBe(false) }) @@ -492,10 +492,10 @@ describe('WslHostService', () => { await connector.disconnect('Ubuntu') connector.distro.state = 'stopped' connector.connect.mockClear() - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') // Running again (started some other way) is not enough while parked: still no boot from a poll. connector.distro.state = 'running' - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') expect(connector.connect).not.toHaveBeenCalled() }) @@ -522,7 +522,7 @@ describe('WslHostService', () => { recovering: false }) connector.isSettling.mockReturnValue(false) - await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu was stopped') + await expect(service.ensureForRuntimeCall('wsl:ubuntu')).rejects.toThrow('Ubuntu is stopped') expect(connector.connect).not.toHaveBeenCalled() }) diff --git a/src/main/wsl/wsl-host-service.ts b/src/main/wsl/wsl-host-service.ts index b31f8deae385..51646e9f0018 100644 --- a/src/main/wsl/wsl-host-service.ts +++ b/src/main/wsl/wsl-host-service.ts @@ -165,7 +165,7 @@ export class WslHostService { return } if (enabled) { - // Nothing boots here: the window re-reports its focused host, the only one that may (E9). + // Nothing boots here: the window re-reports its focused host, which connects only if running (E9). return } this.disableGeneration += 1 diff --git a/src/renderer/src/components/settings/WslHostsSection.tsx b/src/renderer/src/components/settings/WslHostsSection.tsx index 2e79896120c7..b2aa1a071bce 100644 --- a/src/renderer/src/components/settings/WslHostsSection.tsx +++ b/src/renderer/src/components/settings/WslHostsSection.tsx @@ -143,7 +143,7 @@ export function WslHostsSection({ ? getWslHostsPausedLabel() : translate( 'auto.components.settings.wslHosts.description', - 'Orca runs a server inside each distro. A stopped distro starts only when you open one of its projects or connect it here.' + 'Orca runs a server inside each distro. Opening a project never starts a stopped distro: click Start, open a new terminal, or connect it here.' ))}

diff --git a/src/renderer/src/hooks/ipc-events/wsl-host-ipc-bridge.ts b/src/renderer/src/hooks/ipc-events/wsl-host-ipc-bridge.ts index da906ac48e98..3aea4d38d23c 100644 --- a/src/renderer/src/hooks/ipc-events/wsl-host-ipc-bridge.ts +++ b/src/renderer/src/hooks/ipc-events/wsl-host-ipc-bridge.ts @@ -8,8 +8,8 @@ import { selectFolderWorkspaces } from '@/store/workspace-record-selectors' /** * The WSL hosts with visible work: the active workspace's, and those of workspaces focused earlier - * in this window that still have tabs (their panes stay mounted). Saved tabs alone never count, so - * a launch boots only the focused host (E9). + * in this window that still have tabs (their panes stay mounted). Saved tabs alone never count, and + * a launch boots none: the focused host connects only if its distro already runs (E9). */ export function selectWslHostsWithVisibleWork( state: AppState, diff --git a/src/renderer/src/i18n/locales/de.json b/src/renderer/src/i18n/locales/de.json index 2de32463a757..1854cca49a25 100644 --- a/src/renderer/src/i18n/locales/de.json +++ b/src/renderer/src/i18n/locales/de.json @@ -12753,7 +12753,7 @@ "wslHosts": { "title": "WSL-Hosts", "experimental": "Experimentell", - "description": "Orca führt in jeder Distribution einen Server aus. Eine gestoppte Distribution startet erst, wenn eines ihrer Projekte geöffnet oder hier eine Verbindung zu ihr hergestellt wird.", + "description": "Orca führt in jeder Distribution einen Server aus. Das Öffnen eines Projekts startet eine gestoppte Distribution nie: Klicke auf „Starten“, öffne ein neues Terminal oder verbinde sie hier.", "add": "WSL-Distribution hinzufügen", "connect": "Verbinden", "forceUpdate": "Update erzwingen", diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 26b9fecc52b9..33ec637890f4 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -12833,7 +12833,7 @@ "wslHosts": { "title": "WSL hosts", "experimental": "Experimental", - "description": "Orca runs a server inside each distro. A stopped distro starts only when you open one of its projects or connect it here.", + "description": "Orca runs a server inside each distro. Opening a project never starts a stopped distro: click Start, open a new terminal, or connect it here.", "add": "Add WSL distro", "connect": "Connect", "forceUpdate": "Force update", diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index 970b789f0e77..de47430f1dd3 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -12465,7 +12465,7 @@ "wslHosts": { "title": "Hosts WSL", "experimental": "Experimental", - "description": "Orca ejecuta un servidor dentro de cada distro. Una distro detenida solo se inicia cuando abres uno de sus proyectos o la conectas aquí.", + "description": "Orca ejecuta un servidor dentro de cada distro. Abrir un proyecto nunca inicia una distro detenida: haz clic en Iniciar, abre una terminal nueva o conéctala aquí.", "add": "Agregar distro WSL", "connect": "Conectar", "turnOn": "Activar en Experimental", diff --git a/src/renderer/src/i18n/locales/fr.json b/src/renderer/src/i18n/locales/fr.json index a48d6e3233a3..5303c0a08755 100644 --- a/src/renderer/src/i18n/locales/fr.json +++ b/src/renderer/src/i18n/locales/fr.json @@ -12689,7 +12689,7 @@ "wslHosts": { "title": "Hôtes WSL", "experimental": "Expérimental", - "description": "Orca exécute un serveur dans chaque distro. Une distro arrêtée ne démarre que lorsque vous ouvrez l'un de ses projets ou la connectez ici.", + "description": "Orca exécute un serveur dans chaque distro. Ouvrir un projet ne démarre jamais une distro arrêtée : cliquez sur Démarrer, ouvrez un nouveau terminal ou connectez-la ici.", "add": "Ajouter une distro WSL", "connect": "Connecter", "turnOn": "Activer dans Expérimental", diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index 88fe43b34990..ac8d9eb6c72b 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -12177,7 +12177,7 @@ "wslHosts": { "title": "WSL ホスト", "experimental": "実験的機能", - "description": "Orca は各ディストリビューション内でサーバーを実行します。停止中のディストリビューションは、そのプロジェクトを開くか、ここで接続したときにのみ起動します。", + "description": "Orca は各ディストリビューション内でサーバーを実行します。プロジェクトを開いても、停止中のディストリビューションは起動しません。[起動] をクリックするか、新しいターミナルを開くか、ここで接続してください。", "add": "WSL ディストリビューションを追加", "connect": "接続", "turnOn": "実験的機能でオンにする", diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index c85631a3ae89..e3a39f46f3a8 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -12177,7 +12177,7 @@ "wslHosts": { "title": "WSL 호스트", "experimental": "실험적", - "description": "Orca는 각 배포판 안에서 서버를 실행합니다. 중지된 배포판은 해당 배포판의 프로젝트를 열거나 여기에서 연결할 때만 시작됩니다.", + "description": "Orca는 각 배포판 안에서 서버를 실행합니다. 프로젝트를 열어도 중지된 배포판은 시작되지 않습니다. [시작]을 클릭하거나, 새 터미널을 열거나, 여기에서 연결하세요.", "add": "WSL 배포판 추가", "connect": "연결", "turnOn": "실험적에서 켜기", diff --git a/src/renderer/src/i18n/locales/pt.json b/src/renderer/src/i18n/locales/pt.json index a1a4207cb99a..d791ca474838 100644 --- a/src/renderer/src/i18n/locales/pt.json +++ b/src/renderer/src/i18n/locales/pt.json @@ -9008,7 +9008,7 @@ "wslHosts": { "title": "Hosts WSL", "experimental": "Experimental", - "description": "O Orca executa um servidor dentro de cada distribuição. Uma distribuição parada só é iniciada quando você abre um dos projetos dela ou a conecta aqui.", + "description": "O Orca executa um servidor dentro de cada distribuição. Abrir um projeto nunca inicia uma distribuição parada: clique em Iniciar, abra um novo terminal ou conecte-a aqui.", "add": "Adicionar distribuição WSL", "connect": "Conectar", "forceUpdate": "Forçar atualização", diff --git a/src/renderer/src/i18n/locales/ru.json b/src/renderer/src/i18n/locales/ru.json index 38b9824ec75b..a9f94a22b562 100644 --- a/src/renderer/src/i18n/locales/ru.json +++ b/src/renderer/src/i18n/locales/ru.json @@ -13119,7 +13119,7 @@ "wslHosts": { "title": "Серверы WSL", "experimental": "Экспериментальные", - "description": "Orca запускает сервер внутри каждого дистрибутива. Остановленный дистрибутив запускается только при открытии его проекта или подключении здесь.", + "description": "Orca запускает сервер внутри каждого дистрибутива. Открытие проекта никогда не запускает остановленный дистрибутив: нажмите «Запустить», откройте новый терминал или подключите его здесь.", "add": "Добавить дистрибутив WSL", "connect": "Подключиться", "forceUpdate": "Принудительно обновить", diff --git a/src/renderer/src/i18n/locales/tr.json b/src/renderer/src/i18n/locales/tr.json index 95eb1cbf0ac3..a9dd8659cd54 100644 --- a/src/renderer/src/i18n/locales/tr.json +++ b/src/renderer/src/i18n/locales/tr.json @@ -12739,7 +12739,7 @@ "wslHosts": { "title": "WSL ana makineleri", "experimental": "Deneysel", - "description": "Orca her dağıtımın içinde bir sunucu çalıştırır. Durdurulmuş bir dağıtım yalnızca projelerinden birini açtığınızda veya buradan bağlandığınızda başlar.", + "description": "Orca her dağıtımın içinde bir sunucu çalıştırır. Bir proje açmak durdurulmuş bir dağıtımı asla başlatmaz: Başlat’a tıklayın, yeni bir terminal açın veya buradan bağlanın.", "add": "WSL dağıtımı ekle", "connect": "Bağlan", "forceUpdate": "Güncellemeyi zorla", diff --git a/src/renderer/src/i18n/locales/zh-Hant.json b/src/renderer/src/i18n/locales/zh-Hant.json index cd67ec16b89c..dcc6be9b4579 100644 --- a/src/renderer/src/i18n/locales/zh-Hant.json +++ b/src/renderer/src/i18n/locales/zh-Hant.json @@ -12576,7 +12576,7 @@ "wslHosts": { "title": "WSL 主機", "experimental": "實驗性", - "description": "Orca 在每個發行版內執行一個伺服器。已停止的發行版只有在您開啟其某個專案或在此連線它時才會啟動。", + "description": "Orca 在每個發行版內執行一個伺服器。開啟專案不會啟動已停止的發行版:請按一下「啟動」、開啟新終端機,或在此連線它。", "add": "新增 WSL 發行版", "connect": "連線", "forceUpdate": "強制更新", diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index d84c2bccad1f..0cb2fe7239f2 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -12177,7 +12177,7 @@ "wslHosts": { "title": "WSL 主机", "experimental": "实验性", - "description": "Orca 在每个发行版内运行一个服务器。已停止的发行版只有在您打开其某个项目或在此连接它时才会启动。", + "description": "Orca 在每个发行版内运行一个服务器。打开项目不会启动已停止的发行版:请点击“启动”、打开新终端,或在此连接它。", "add": "添加 WSL 发行版", "connect": "连接", "turnOn": "在实验性中开启", diff --git a/tests/e2e/wsl-host-chat.spec.ts b/tests/e2e/wsl-host-chat.spec.ts index 257f172a0787..02410f65a522 100644 --- a/tests/e2e/wsl-host-chat.spec.ts +++ b/tests/e2e/wsl-host-chat.spec.ts @@ -28,7 +28,7 @@ import { test.describe('native chat on a WSL host', () => { test.skip(!SUPPORTED, 'the Claude stub wrapper is POSIX-only') - test('admits, streams, offers Start for a stopped distro, and continues after Start or a focus boot', async ({ + test('admits, streams, offers Start for a stopped distro, continues after Start, and never boots it on a project switch', async ({ orcaPage: hub, claudeStub }, testInfo) => { @@ -124,7 +124,7 @@ test.describe('native chat on a WSL host', () => { ), { timeout: 30_000 } ) - .toContain('Ubuntu was stopped') + .toContain('Ubuntu is stopped') return connects } const stoppedNotice = chat.getByText('Ubuntu is stopped', { exact: true }) @@ -148,16 +148,21 @@ test.describe('native chat on a WSL host', () => { const connectsBeforeStop = await stopDistro() await expect(stoppedNotice).toBeVisible({ timeout: 30_000 }) - // Switching away and back is the user acting on the host: that boots it and the chat goes on. + // Switching away and back is navigation, not a start: the distro stays stopped (#36688). await page.evaluate(() => window.__store?.getState().setActiveWorktree(null)) - // The whole stopped window, up to the focus, booted nothing. + await expect.poll(() => focusProject(page, projectPath), { timeout: 30_000 }).toBeTruthy() + await expect(chat).toBeVisible({ timeout: 60_000 }) + await expect(stoppedNotice).toBeVisible({ timeout: 30_000 }) + // ast-grep-ignore: test-no-real-time-wait -- the claim is that the switch boots nothing over time + await page.waitForTimeout(5_000) expect(fakeWslConnects(connectLogFile)).toHaveLength(connectsBeforeStop) expect(readDistroState(distrosFile)).toBe('stopped') - await expect.poll(() => focusProject(page, projectPath), { timeout: 30_000 }).toBeTruthy() + // Start is what boots it, once, and the chat goes on. + await start.click() await expect .poll(() => fakeWslConnects(connectLogFile).length, { timeout: 60_000 }) - .toBeGreaterThan(connectsBeforeStop) - await expect(chat).toBeVisible({ timeout: 60_000 }) + .toBe(connectsBeforeStop + 1) + await expect(stoppedNotice).toBeHidden({ timeout: 60_000 }) await send('after the distro restarted') await expectReplyAfter('after the distro restarted') await page.screenshot({ path: testInfo.outputPath('wsl-host-chat-after-boot.png') }) @@ -382,7 +387,7 @@ test.describe('native chat on a WSL host', () => { ), { timeout: 30_000 } ) - .toContain('Ubuntu was stopped') + .toContain('Ubuntu is stopped') const stoppedNotice = chat.getByText('Ubuntu is stopped', { exact: true }) await expect(stoppedNotice).toBeVisible({ timeout: 30_000 }) // Send waits for Start rather than failing against a stopped distro; while held, the button is diff --git a/tests/e2e/wsl-host-no-background-boot.spec.ts b/tests/e2e/wsl-host-no-background-boot.spec.ts index 27291e9e359a..d34b93a2526b 100644 --- a/tests/e2e/wsl-host-no-background-boot.spec.ts +++ b/tests/e2e/wsl-host-no-background-boot.spec.ts @@ -165,7 +165,7 @@ test.describe('E9: background work on a stopped WSL host', () => { ), { timeout: 30_000 } ) - .toContain('Ubuntu was stopped') + .toContain('Ubuntu is stopped') const connectsWhileStopped = fakeWslConnects(connectLogFile).length // Setup connected at least once: a connect log that was never written fails here. expect(connectsWhileStopped).toBeGreaterThan(0) diff --git a/tests/e2e/wsl-host-terminal-start.spec.ts b/tests/e2e/wsl-host-terminal-start.spec.ts index bbc0a19e2cd3..231d83641a4b 100644 --- a/tests/e2e/wsl-host-terminal-start.spec.ts +++ b/tests/e2e/wsl-host-terminal-start.spec.ts @@ -99,7 +99,7 @@ test('a stopped WSL distro boots only for Start or New Terminal, never for a ter ), { timeout: 30_000 } ) - .toContain('Ubuntu was stopped') + .toContain('Ubuntu is stopped') return connects } // The shown tab's card; a background tab's stays in the DOM, hidden.