DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
feat(ssh-ui): 连接/安装阶段步骤条 + 事件收尾标记不再丢弃
Menghuan19186984d4de2ab7
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 fad37eae..ba54918a 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@@ -306,6 +306,29 @@ describe('machinesSection', () => {await waitFor(() => expect(screen.getByTestId('status-a').textContent).toContain('Connecting over SSH'))})+ it('renders the step rail with the observed phases, latest highlighted', async () => {+ const { store, fetchFn } = mount({+ envelope: { ok: true, value: { items: [{ ...machineA, state: 'connecting', progress: { phase: 'handshake' } }] } },+ })+ await waitFor(() => expect(screen.getByTestId('step-rail').textContent).toBe('Handshake'))+ fetchFn.mockResolvedValueOnce({+ json: async () => ({ ok: true, value: { items: [{ ...machineA, state: 'connecting', progress: { phase: 'probing', attempt: 1, total: 3 } }] } }),+ } as unknown as Response)+ await act(async () => {+ await store.poll()+ })+ // install 未出现就不在轨上;最新阶段收尾+ await waitFor(() => expect(screen.getByTestId('step-rail').textContent).toBe('HandshakeProbe'))+ // 操作落定(progress 消失)步骤条收起+ fetchFn.mockResolvedValueOnce({+ json: async () => ({ ok: true, value: { items: [{ ...machineA, state: 'connected', tunnelBaseUrl: 'http://127.0.0.1:1' }] } }),+ } as unknown as Response)+ await act(async () => {+ await store.poll()+ })+ await waitFor(() => expect(screen.queryByTestId('step-rail')).toBeNull())+ })+it('falls back to question marks when probing progress has no numbers', async () => {mount({ envelope: { ok: true, value: { items: [{ ...machineA, state: 'connecting', progress: { phase: 'probing' } }] } } })await waitFor(() => expect(screen.getByTestId('status-a').textContent).toContain('Health check ?/?'))diff --git a/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts b/packages/dsh-tauri-ssh-ui/src/client/locales/index.tsindex 8765f4b2..fbf089d2 100644--- a/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/locales/index.ts@@ -78,6 +78,10 @@ export const zh = {'add.id_invalid': 'ID 需以小写字母或数字开头,仅含小写字母、数字、连字符','add.id_taken': 'ID 已被占用','add.host_required': '主机不能为空',+ 'step.handshake': '握手',+ 'step.installing': '安装',+ 'step.starting': '启动',+ 'step.probing': '探测','notice.probe_ok': '探测通过','notice.probe_failed': '探测失败','progress.installing': '正在安装 dsh(下载并校验官方打包运行时,通常 1–3 分钟)…',@@ -169,6 +173,10 @@ export const en = {'add.id_invalid': 'ID must start with a lowercase letter or digit and use only lowercase letters, digits, dashes','add.id_taken': 'ID already in use','add.host_required': 'Host is required',+ 'step.handshake': 'Handshake',+ 'step.installing': 'Install',+ 'step.starting': 'Start',+ 'step.probing': 'Probe','notice.probe_ok': 'Probe passed','notice.probe_failed': 'Probe failed','progress.installing': 'Installing dsh (downloading and verifying the official packaged runtime, usually 1–3 min)…',diff --git a/packages/dsh-tauri-ssh-ui/src/client/styles/index.cssr.ts b/packages/dsh-tauri-ssh-ui/src/client/styles/index.cssr.tsindex e330e62c..1972ef17 100644--- a/packages/dsh-tauri-ssh-ui/src/client/styles/index.cssr.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/styles/index.cssr.ts@@ -59,6 +59,32 @@ export default c([borderStyle: 'dashed',}),+ /* The step rail: compact phase chips of the in-flight operation. */+ c('.dshp-ssh-step-rail', {+ display: 'inline-flex',+ gap: '4px',+ margin: '0 0 0 8px',+ padding: 0,+ listStyle: 'none',+ verticalAlign: 'middle',+ }),+ c('.dshp-ssh-step-done', {+ fontSize: '11px',+ lineHeight: '16px',+ padding: '0 6px',+ borderRadius: '999px',+ color: 'var(--dsw-alias-label-tertiary)',+ border: '1px solid var(--dsw-alias-line-secondary, currentColor)',+ }),+ c('.dshp-ssh-step-current', {+ fontSize: '11px',+ lineHeight: '16px',+ padding: '0 6px',+ borderRadius: '999px',+ color: 'var(--dsw-alias-state-warning-primary, #d48806)',+ border: '1px solid currentColor',+ }),+/* Dirty form: ring the Save button so the staged-but-unsaved state is visible. */c('.dshp-ssh-save-dirty', {boxShadow: '0 0 0 2px var(--dsw-alias-state-warning-primary, #d48806)',diff --git a/packages/dsh-tauri-ssh-ui/src/client/styles/index.ts b/packages/dsh-tauri-ssh-ui/src/client/styles/index.tsindex 8a281cdf..eb850f37 100644--- a/packages/dsh-tauri-ssh-ui/src/client/styles/index.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/styles/index.ts@@ -27,6 +27,9 @@ export const cls = {dangerAction: 'dshp-ssh-danger-action',addAction: 'dshp-ssh-add-action',saveDirty: 'dshp-ssh-save-dirty',+ stepRail: 'dshp-ssh-step-rail',+ stepDone: 'dshp-ssh-step-done',+ stepCurrent: 'dshp-ssh-step-current',rows: 'dshp-ssh-rows',group: 'dshp-ssh-group',groupTitle: 'dshp-ssh-group-title',