DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
feat(ssh-ui): 弹窗打开在飞反馈
Menghuan19185d78d1ca2413
diff --git a/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.test.tsx b/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.test.tsxindex ba54918a..1866c787 100644--- a/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.test.tsx+++ b/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.test.tsx@@ -203,6 +203,22 @@ describe('machinesSection', () => {await waitFor(() => expect(screen.getByTestId('bridge-error-a').textContent).toContain('window refused'))})+ it('shows an in-flight opening state and settles back afterwards', async () => {+ let release: () => void = () => {}+ const openWindow = vi.fn(() => new Promise<void>((resolve) => {+ release = resolve+ }))+ mount({+ bridge: desktopBridge(openWindow),+ envelope: { ok: true, value: { items: [{ ...machineA, state: 'connected', tunnelBaseUrl: 'http://127.0.0.1:49152' }] } },+ })+ fireEvent.click(await screen.findByText('Open'))+ // 在飞:按钮换「Opening…」并禁用,杜绝连点+ await waitFor(() => expect(screen.getByText('Opening…').closest('button')?.hasAttribute('disabled')).toBe(true))+ act(() => release())+ await waitFor(() => expect(withinButton(screen.getByTestId('machine-a'), 'Open')).toBeTruthy())+ })+it('renders the connecting state with the connect action disabled', async () => {mount({ envelope: { ok: true, value: { items: [{ ...machineA, state: 'connecting' }] } } })await waitFor(() => expect(screen.getByText('alpha')).toBeTruthy())diff --git a/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts b/packages/dsh-tauri-ssh-ui/src/client/locales/index.tsindex fbf089d2..d39b9a6c 100644--- a/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts@@ -70,6 +70,7 @@ export const zh = {'progress.handshake': '正在建立 SSH 连接…','progress.starting': '正在启动远端实例…','progress.probing': '健康检查 {attempt}/{total}…',+ 'open.opening': '正在打开…','open.probing': '正在探测桌面环境…','add.title': '添加机器','add.submit': '添加并保存',@@ -165,6 +166,7 @@ export const en = {'progress.handshake': 'Connecting over SSH…','progress.starting': 'Starting the remote instance…','progress.probing': 'Health check {attempt}/{total}…',+ 'open.opening': 'Opening…','open.probing': 'Probing the desktop bridge…','add.title': 'Add machine','add.submit': 'Add & save',