diff --git a/apps/desktop/installer/assets/brand-2x.png b/apps/desktop/installer/assets/brand-2x.png index 7cf467d766..01dfb844c7 100644 Binary files a/apps/desktop/installer/assets/brand-2x.png and b/apps/desktop/installer/assets/brand-2x.png differ diff --git a/apps/desktop/installer/assets/brand-dark-2x.png b/apps/desktop/installer/assets/brand-dark-2x.png index 35c7648644..da372d2839 100644 Binary files a/apps/desktop/installer/assets/brand-dark-2x.png and b/apps/desktop/installer/assets/brand-dark-2x.png differ diff --git a/apps/desktop/installer/assets/brand-dark.png b/apps/desktop/installer/assets/brand-dark.png index bb0bf87883..3983af4e65 100644 Binary files a/apps/desktop/installer/assets/brand-dark.png and b/apps/desktop/installer/assets/brand-dark.png differ diff --git a/apps/desktop/installer/assets/brand.png b/apps/desktop/installer/assets/brand.png index e8b64ca003..9685dc2004 100644 Binary files a/apps/desktop/installer/assets/brand.png and b/apps/desktop/installer/assets/brand.png differ diff --git a/apps/desktop/installer/window-frame.cpp b/apps/desktop/installer/window-frame.cpp index 7f47563e81..d9c31f8cd3 100644 --- a/apps/desktop/installer/window-frame.cpp +++ b/apps/desktop/installer/window-frame.cpp @@ -119,6 +119,8 @@ static LRESULT CALLBACK ProgressProc(HWND window, UINT message, WPARAM wparam, L graphics.ScaleTransform(page->dpi / 96.0f, page->dpi / 96.0f); graphics.Clear(page->dark ? Color(255, 21, 21, 23) : Color(255, 255, 255, 255)); graphics.SetSmoothingMode(SmoothingModeAntiAlias); + graphics.SetInterpolationMode(InterpolationModeHighQualityBicubic); + graphics.SetPixelOffsetMode(PixelOffsetModeHalf); graphics.DrawImage(page->brand, Rect(0, 174, 600, 196)); const int stage = static_cast(reinterpret_cast(GetPropW(GetParent(window), L"HarnessInstaller.Stage"))); const double fraction = reinterpret_cast(GetPropW(GetParent(window), L"HarnessInstaller.ExtractProgress")) / 100.0; diff --git a/apps/desktop/resources/icon-windows.png b/apps/desktop/resources/icon-windows.png index 02bc5931d3..cc8a09e311 100644 Binary files a/apps/desktop/resources/icon-windows.png and b/apps/desktop/resources/icon-windows.png differ diff --git a/apps/desktop/resources/icon-windows.svg b/apps/desktop/resources/icon-windows.svg index 4ab25b9e70..eb07a50158 100644 --- a/apps/desktop/resources/icon-windows.svg +++ b/apps/desktop/resources/icon-windows.svg @@ -1,8 +1,8 @@ - - - + + + diff --git a/apps/desktop/src/locale.ts b/apps/desktop/src/locale.ts index d5aa25917c..45c2d5b25e 100644 --- a/apps/desktop/src/locale.ts +++ b/apps/desktop/src/locale.ts @@ -3,6 +3,8 @@ export const en = { application: 'Application', aboutMenu: 'About DeepSeek Harness', + aboutProduct: 'DeepSeek Harness', + aboutVersion: 'Version V{version}', hideApplication: 'Hide DeepSeek Harness', hideOtherApplications: 'Hide Others', showAllApplications: 'Show All', @@ -88,7 +90,7 @@ export const en = { updateTechnicalDetails: 'View technical details', updateTitle: 'DeepSeek Harness Update', updateAvailable: 'An update is available', - updateDetail: 'DeepSeek Harness {version}\n\nThis release includes its matching dsh version. The application will restart after installation.', + updateDetail: 'DeepSeek Harness {version}\n\nDeepSeek Harness will restart to complete the update.', installAndRestart: 'Install and Restart', later: 'Later', updateFailedTitle: 'Update Failed', @@ -130,6 +132,8 @@ export type DesktopMessages = { readonly [Key in keyof typeof en]: string } export const zh = { application: '应用', aboutMenu: '关于 DeepSeek Harness', + aboutProduct: 'DeepSeek Harness', + aboutVersion: '版本 V{version}', hideApplication: '隐藏 DeepSeek Harness', hideOtherApplications: '隐藏其他', showAllApplications: '显示全部', @@ -215,7 +219,7 @@ export const zh = { updateTechnicalDetails: '查看技术详情', updateTitle: 'DeepSeek Harness 更新', updateAvailable: '发现可用更新', - updateDetail: 'DeepSeek Harness {version}\n\n新版本绑定匹配的 dsh,安装后将重新启动。', + updateDetail: 'DeepSeek Harness {version}\n\nDeepSeek Harness 将重启以完成更新。', installAndRestart: '安装并重启', later: '稍后', updateFailedTitle: '更新失败', diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts index 46ce1f45c1..4e13cc34ef 100644 --- a/apps/desktop/src/main.ts +++ b/apps/desktop/src/main.ts @@ -276,6 +276,13 @@ async function main(): Promise { } finally { ordinaryDialogs.delete(controller) } } + // Copy comes from the same locale as the update prompts so the dialog + // chrome and its content never mix languages. + const showAbout = async (): Promise => { + await ordinaryMessageBox({ type: 'info', title: locale.messages.aboutMenu, message: locale.messages.aboutProduct, + detail: formatDesktopMessage(locale.messages.aboutVersion, { version: app.getVersion() }), + buttons: [locale.messages.updateAcknowledge], cancelId: 0 }) + } const appPreload = fileURLToPath(new URL('./preload-app.cjs', import.meta.url)) const applicationUrl = `${SCHEME}://app/` let hostUrl: string | undefined @@ -753,7 +760,12 @@ async function main(): Promise { { role: 'unhide', label: currentDesktopLocale().messages.showAllApplications }, { type: 'separator' }] : [] const applicationItems = (): MenuItemConstructorOptions[] => [ - { label: currentDesktopLocale().messages.aboutMenu, role: 'about' }, + // Windows has no system About panel; Electron's fallback is a plain + // message box, so the shell shows its own dimmed dialog instead. + process.platform === 'win32' + ? { label: currentDesktopLocale().messages.aboutMenu, + click: () => { void showAbout().catch((error: unknown) => { console.error(error) }) } } + : { label: currentDesktopLocale().messages.aboutMenu, role: 'about' }, { type: 'separator' }, { label: currentDesktopLocale().messages.checkUpdatesMenu, click: () => { void openUpdatePrompt(true) } }, ...development ? [ diff --git a/apps/desktop/tests/expected/about-panel.json b/apps/desktop/tests/expected/about-panel.json index 6900f525d3..8dc6ee9063 100644 --- a/apps/desktop/tests/expected/about-panel.json +++ b/apps/desktop/tests/expected/about-panel.json @@ -1,5 +1,5 @@ { - "en-US": { + "darwin:en-US": { "menu": [ { "label": "About DeepSeek Harness", "role": "about" }, { "type": "separator" } @@ -12,7 +12,7 @@ "iconPath": "" } }, - "zh-CN": { + "darwin:zh-CN": { "menu": [ { "label": "关于 DeepSeek Harness", "role": "about" }, { "type": "separator" } @@ -24,5 +24,31 @@ "copyright": "", "iconPath": "" } + }, + "win32:zh-CN": { + "menu": [ + { "label": "关于 DeepSeek Harness" }, + { "type": "separator" } + ], + "options": { + "applicationName": "DeepSeek Harness", + "applicationVersion": "1.0.0", + "version": "", + "copyright": "", + "iconPath": "" + } + }, + "win32:en-US": { + "menu": [ + { "label": "About DeepSeek Harness" }, + { "type": "separator" } + ], + "options": { + "applicationName": "DeepSeek Harness", + "applicationVersion": "1.0.0", + "version": "", + "copyright": "", + "iconPath": "" + } } } diff --git a/apps/desktop/tests/main-startup.spec.ts b/apps/desktop/tests/main-startup.spec.ts index 26c31d906c..13ef5ed9f0 100644 --- a/apps/desktop/tests/main-startup.spec.ts +++ b/apps/desktop/tests/main-startup.spec.ts @@ -405,7 +405,7 @@ describe('desktop main startup', () => { ['darwin', false, 'zh-CN'], ['win32', true, 'zh-CN'], ['win32', false, 'en-US'], - ] as const)('offers the native About panel before other commands on %s (packaged=%s, locale=%s)', async (platform, packaged, locale) => { + ] as const)('offers the About command before other commands on %s (packaged=%s, locale=%s)', async (platform, packaged, locale) => { vi.stubGlobal('process', { ...process, platform }) harness.app.isPackaged = packaged vi.spyOn(harness.app, 'getLocale').mockReturnValue(locale) @@ -415,9 +415,26 @@ describe('desktop main startup', () => { const submenu = applicationMenuItems() const options = harness.app.setAboutPanelOptions.mock.calls[0]![0] const expected = JSON.parse(readFileSync(new URL('./expected/about-panel.json', import.meta.url), 'utf8')) as Record - expect({ menu: submenu.slice(0, 2), options: { ...options, iconPath: '' } }).toEqual(expected[locale]) + const [about, separator] = submenu + expect({ menu: [{ label: about!.label, role: about!.role }, separator], options: { ...options, iconPath: '' } }) + .toEqual(expected[`${platform}:${locale}`]) expect(options.iconPath).toBe(packaged ? join('desktop-test-resources', 'icon.png') : join('desktop-test-app', 'resources', 'icon-windows.png')) + if (platform !== 'win32') { expect(about!.click).toBeUndefined(); return } + // Windows reuses the dimmed update dialog because Electron's fallback is a bare message box. + harness.dialog.showMessageBox.mockResolvedValueOnce({ response: 0 }) + ;(about!.click as () => void)() + await vi.advanceTimersByTimeAsync(0) + const zh = locale === 'zh-CN' + expect(harness.dialog.showMessageBox).toHaveBeenLastCalledWith(expect.objectContaining({ + type: 'info', title: zh ? '关于 DeepSeek Harness' : 'About DeepSeek Harness', message: 'DeepSeek Harness', + detail: zh ? '版本 V1.0.0' : 'Version V1.0.0', buttons: [zh ? '确定' : 'OK'], cancelId: 0, + })) + // A dialog that cannot open is logged, not surfaced as an unhandled rejection. + harness.dialog.showMessageBox.mockRejectedValueOnce(new Error('overlay unavailable')) + ;(about!.click as () => void)() + await vi.advanceTimersByTimeAsync(0) + expect(console.error).toHaveBeenLastCalledWith(expect.objectContaining({ message: 'overlay unavailable' })) }) it('shows one explained startup login before Host readiness and joins concurrent checks without reopening it', async () => { diff --git a/apps/web/tests/desktop-updates.e2e.ts b/apps/web/tests/desktop-updates.e2e.ts index 1e30848020..87903d8050 100644 --- a/apps/web/tests/desktop-updates.e2e.ts +++ b/apps/web/tests/desktop-updates.e2e.ts @@ -73,7 +73,7 @@ describe('web e2e: Desktop update workspace chrome', () => { const progress = presentDesktopUpdate({ phase: 'downloading', version, percent: 58 }, en) await publish(progress) - const downloading = page.getByRole('button', { name: '58%…', exact: true }) + const downloading = page.getByRole('button', { name: '58%', exact: true }) await downloading.waitFor() expect(await downloading.getAttribute('aria-disabled')).toBe('true') expect(await downloading.locator('svg').count()).toBe(1) @@ -86,20 +86,20 @@ describe('web e2e: Desktop update workspace chrome', () => { const expand = locale === 'zh-CN' ? '打开侧边栏' : 'Open sidebar' await page.getByRole('button', { name: collapse, exact: true }).click() const toggle = page.getByRole('button', { name: expand, exact: true }) - const badge = toggle.getByRole('img', { name: '58%…', exact: true }) + const badge = toggle.getByRole('img', { name: '58%', exact: true }) await badge.waitFor() await expect.poll(() => downloading.count()).toBe(0) - expect(await page.getByRole('img', { name: '58%…', exact: true }).count()).toBe(1) - const blue = await badge.evaluate(element => getComputedStyle(element).backgroundColor) + expect(await page.getByRole('img', { name: '58%', exact: true }).count()).toBe(1) + const updateBackground = await badge.evaluate(element => getComputedStyle(element).backgroundColor) await page.screenshot({ path: join(evidence, 'collapsed.png') }) const error = presentDesktopUpdate({ phase: 'error', version, failedOperation: 'download', message: 'HTTP 503' }, en) await publish(error) const errorBadge = toggle.getByRole('img', { name: retryLabel, exact: true }) await errorBadge.waitFor() - expect(await errorBadge.getAttribute('data-error')).toBe('true') - const red = await errorBadge.evaluate(element => getComputedStyle(element).backgroundColor) - expect(red).not.toBe(blue) + // A failure keeps the update palette; only the label distinguishes it. + const failedBackground = await errorBadge.evaluate(element => getComputedStyle(element).backgroundColor) + expect(failedBackground).toBe(updateBackground) await errorBadge.hover() const tooltip = page.getByRole('tooltip', { name: errorDetail, exact: true }) await expect.poll(() => tooltip.evaluateAll(elements => elements.map(element => getComputedStyle(element).opacity))).toEqual(['1']) @@ -132,7 +132,7 @@ describe('web e2e: Desktop update workspace chrome', () => { expect(tripwire.pageErrors).toEqual([]) expect(tripwire.warnings).toEqual([]) expect(await page.evaluate(() => (window as FixtureWindow).updateFixture.listeners.size)).toBe(1) - await writeFile(join(evidence, 'result.json'), JSON.stringify({ locale, geometry, blue, red, + await writeFile(join(evidence, 'result.json'), JSON.stringify({ locale, geometry, updateBackground, failedBackground, passed: true, explicitActions: 3, carrier: 'substituted', host: 'real Web composition', electron: false, installerExecuted: false }, null, 2) + '\n') console.log(`Desktop workspace chrome evidence: ${evidence}`) diff --git a/packages/client/ui-settings-general/README.i18n.yaml b/packages/client/ui-settings-general/README.i18n.yaml index f2f54516b2..d0491ebef3 100644 --- a/packages/client/ui-settings-general/README.i18n.yaml +++ b/packages/client/ui-settings-general/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/client/ui-settings-general/README.md -README.md: 266fe837899f13d33e7a098b901cc34402da765e -README.zh.md: 09570948b89089dda33d6705e4f17c7cd2f8481c +README.md: 36d3fd7b260f95cffb67977e5a6f37852bf195aa +README.zh.md: 9df8fe8bc3a39fceeccfc8b08a8e18cc5eeaf752 diff --git a/packages/client/ui-settings-general/README.md b/packages/client/ui-settings-general/README.md index 266fe83789..36d3fd7b26 100644 --- a/packages/client/ui-settings-general/README.md +++ b/packages/client/ui-settings-general/README.md @@ -31,7 +31,7 @@ Users reach the shell through the sidebar's bottom Settings control; feature plu When the section navigation exceeds the panel's available height, the list scrolls independently of the settings content and keeps the Settings title fixed. -In Desktop, the account-row update control shows availability, progress, verification, readiness, and persistent retry feedback. The preload carries semantic phase, version, progress, and classified failures; the component resolves every visible and accessible string from the active `settings` locale, including after an in-application language change. Selecting an available update starts downloading; installation requires a separate shell-owned confirmation. A collapsed sidebar shows the same status as a dot on its top expand button. Connection feedback takes priority except during shell-reported installation, when the expected backend disconnect must not hide update status. Failure restores connection feedback. Both controls share one carrier subscription; browser code cannot choose packages or authorize installation. [Desktop updates](../../../apps/desktop/README.md) owns the release workflow. +In Desktop, the account-row update control shows availability, progress, verification, readiness, and persistent retry feedback. It shares the connection indicator’s 28px height, 13px corners, 14px icon slot, 4px icon gap, and 12px medium text with an 18px line height; update-state border, fill, and text colors remain independently defined. Retry text and its dot use the same brand blue as other update labels; numeric download progress has no ellipsis. The preload carries semantic phase, version, progress, and classified failures; the component resolves every visible and accessible string from the active `settings` locale, including after an in-application language change. Selecting an available update starts downloading; installation requires a separate shell-owned confirmation. A collapsed sidebar shows the same status as a brand-blue dot on its top expand button, including failures. Connection feedback takes priority except during shell-reported installation, when the expected backend disconnect must not hide update status. Failure restores connection feedback. Both controls share one carrier subscription; browser code cannot choose packages or authorize installation. [Desktop updates](../../../apps/desktop/README.md) owns the release workflow. ### The General section diff --git a/packages/client/ui-settings-general/README.zh.md b/packages/client/ui-settings-general/README.zh.md index 09570948b8..9df8fe8bc3 100644 --- a/packages/client/ui-settings-general/README.zh.md +++ b/packages/client/ui-settings-general/README.zh.md @@ -31,7 +31,7 @@ kind: "package-reference" 当分区导航超出面板可用高度时,列表独立于设置内容滚动,并保持「设置」标题固定。 -在 Desktop 中,账户行更新控件显示可用版本、进度、验证、就绪和持久重试反馈。预加载仅传递语义化阶段、版本、进度和失败类别;组件从当前 `settings` locale 解析全部可见与无障碍文案,并在应用内语言变化后同步更新。选择可用更新即开始下载;安装需要独立的壳拥有的确认。侧栏收起时,其顶部展开按钮以圆点显示相同状态。连接反馈通常优先展示,但壳报告正在安装时,预期的后端断开不能遮盖更新状态;失败后恢复连接反馈。两个控件共用一次载体订阅;浏览器代码不能选择安装包或授权安装。[Desktop 更新](../../../apps/desktop/README.zh.md)负责发布流程。 +在 Desktop 中,账户行更新控件显示可用版本、进度、验证、就绪和持久重试反馈。它与连接指示器共用 28px 高度、13px 圆角、14px 图标占位、4px 图文间距,以及 12px 中等字重文字和 18px 行高;更新状态的边框、填充和文字颜色独立定义。重试文字及其圆点与其他更新文案使用相同的品牌蓝色;数字下载进度不带省略号。预加载仅传递语义化阶段、版本、进度和失败类别;组件从当前 `settings` locale 解析全部可见与无障碍文案,并在应用内语言变化后同步更新。选择可用更新即开始下载;安装需要独立的壳拥有的确认。侧栏收起时,其顶部展开按钮以品牌蓝色圆点显示相同状态,包括失败状态。连接反馈通常优先展示,但壳报告正在安装时,预期的后端断开不能遮盖更新状态;失败后恢复连接反馈。两个控件共用一次载体订阅;浏览器代码不能选择安装包或授权安装。[Desktop 更新](../../../apps/desktop/README.zh.md)负责发布流程。 ### 「通用」分区 diff --git a/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.module.css b/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.module.css index a51a817ca4..2869bd599f 100644 --- a/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.module.css +++ b/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.module.css @@ -1,28 +1,30 @@ -/* The entry's seat is the Settings foot row, which bleeds 2px past the sidebar - content box for the Settings hover surface. The New Session bar and panel - rows instead keep a 2px inset inside that box, so this entry gives back both - 2px offsets and ends on their trailing edge rather than flush against the - sidebar edge. */ .indicator { - display: inline-flex; + display: inline-grid; + grid-template-columns: 14px max-content; align-items: center; - gap: 6px; + column-gap: 4px; flex: none; - margin-inline-end: 4px; - padding: 1px 8px; + height: 28px; + padding: 0 8px; + box-sizing: border-box; border: 1px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent); - border-radius: 6px; + border-radius: 13px; color: var(--dsw-alias-brand-primary-new-colorprimary-new-color); background: color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 8%, transparent); - font: inherit; + font-family: inherit; font-size: 12px; - line-height: 20px; + font-weight: 500; + line-height: 18px; + text-align: left; white-space: nowrap; cursor: pointer; } -.indicator[data-error] { - color: var(--dsw-alias-state-error-primary); +.icon { + display: grid; + place-items: center; + width: 14px; + height: 14px; } .badge { @@ -36,8 +38,7 @@ background: var(--dsw-alias-brand-primary-new-colorprimary-new-color); } -.badge[data-error], .errorDot { background: var(--dsw-alias-state-error-primary); } -.errorDot { width: 6px; height: 6px; border-radius: 50%; corner-shape: round; } +.errorDot { background: currentColor; width: 6px; height: 6px; border-radius: 50%; corner-shape: round; } .spinner { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .spinner { animation: none; } } diff --git a/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.tsx b/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.tsx index b4b10350a3..15c671155b 100644 --- a/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.tsx +++ b/packages/client/ui-settings-general/src/client/DesktopUpdateIndicator.tsx @@ -46,6 +46,7 @@ function updateCopy(state: DesktopUpdatePresentation, t: SettingsTranslate): { l } /** + * Render update status with connection-indicator geometry and brand-blue labels, including retries. * @param props - Connection priority, sidebar width, and localized bridge-failure copy. * @returns Desktop-only status beside the account button, or nothing in browsers. */ @@ -64,10 +65,12 @@ export function DesktopUpdateIndicator({ wide, hidden, t, view, onOpen }: { const error = failed || state?.phase === 'error' const busy = opening || (state !== undefined && BUSY_PHASES.has(state.phase)) return -