diff --git a/apps/web/tests/access-confirmation.e2e.ts b/apps/web/tests/access-confirmation.e2e.ts index f97978d346..75c9d51919 100644 --- a/apps/web/tests/access-confirmation.e2e.ts +++ b/apps/web/tests/access-confirmation.e2e.ts @@ -73,7 +73,7 @@ describe('web e2e: experimental Auto and Full access confirmation', () => { const currentMenuBox = await currentMenu.boundingBox() expect(currentTriggerBox).not.toBeNull() expect(currentMenuBox).not.toBeNull() - expect(Math.abs(currentMenuBox!.width - 144)).toBeLessThan(1) + expect(currentMenuBox!.width).toBeGreaterThanOrEqual(144) expect(currentMenuBox!.width).toBeGreaterThan(currentTriggerBox!.width) expect(Math.abs(currentTriggerBox!.y - currentMenuBox!.y - currentMenuBox!.height - 4)).toBeLessThan(1) diff --git a/apps/web/tests/document-preview.e2e.ts b/apps/web/tests/document-preview.e2e.ts index 79a5ed4bdb..46cb0e0239 100644 --- a/apps/web/tests/document-preview.e2e.ts +++ b/apps/web/tests/document-preview.e2e.ts @@ -1485,7 +1485,7 @@ else process.exit(1); await emptyOpen.waitFor({ timeout: 15_000 }) const prominent = unsupported.locator('[data-open-target="file"][data-size="large"]') expect((await prominent.boundingBox())?.height).toBe(36) - expect((await unsupported.locator('[data-open-path]').boundingBox())?.height).toBe(24) + expect((await unsupported.locator('[data-open-path]').boundingBox())?.height).toBe(28) await successShot(page, 'unsupported') sections.push([ '## Unviewable binary', '', diff --git a/apps/web/tests/icon-skin.e2e.ts b/apps/web/tests/icon-skin.e2e.ts index 3a2896dfc4..1d44ca2836 100644 --- a/apps/web/tests/icon-skin.e2e.ts +++ b/apps/web/tests/icon-skin.e2e.ts @@ -2,13 +2,61 @@ import { fileURLToPath } from 'node:url' import { join } from 'node:path' import { chromium } from 'playwright' +import sharp from 'sharp' import { expect, it, onTestFailed, onTestFinished } from 'vitest' import { launchWebScaffold } from './scaffold.ts' -import { newEnglishPage, saveFailureShot } from './support.ts' +import { connectFreshWorkspace, newEnglishPage, saveFailureShot } from './support.ts' const FIXTURE = fileURLToPath(new URL('./fixtures/plugins/fixture-icon-skin', import.meta.url)) const ICON = 'svg[data-icon="dsw-icon-search-outline-regular"]' +it.each(['light', 'dark'] as const)('renders a 16px permission trigger and 14px menu icons with fixed 1px strokes in %s mode', async (colorScheme) => { + const scaffold = await launchWebScaffold() + onTestFinished(() => scaffold.close()) + const browser = await chromium.launch() + onTestFinished(() => browser.close()) + const page = await browser.newPage({ deviceScaleFactor: 2, locale: 'en-US', colorScheme }) + onTestFailed(() => saveFailureShot(page, `permission-pixel-grid-${colorScheme}`)) + await page.goto(scaffold.authenticatedUrl) + await connectFreshWorkspace(page, scaffold.workspaceCwd) + await page.evaluate(() => document.fonts.ready) + const trigger = page.getByRole('button', { name: /^Access mode, current:/ }) + const triggerBox = await trigger.locator('svg').first().boundingBox() + expect(triggerBox && [triggerBox.width, triggerBox.height]).toEqual([16, 16]) + await trigger.click() + const icon = page.getByRole('menuitem', { name: 'Workspace Write', exact: true }).locator('svg').first() + // Isolate edge coverage from the menu's translucent material without changing placement. + await icon.evaluate((svg, dark) => { + svg.style.color = dark ? 'white' : 'black' + svg.style.backgroundColor = dark ? 'black' : 'white' + }, colorScheme === 'dark') + const box = await icon.boundingBox() + if (box === null) throw new Error('Permission icon is not visible') + expect([box.width, box.height]).toEqual([14, 14]) + expect([box.x * 2, box.y * 2]).toEqual([Math.round(box.x * 2), Math.round(box.y * 2)]) + const { data, info } = await sharp(await page.screenshot()).removeAlpha().raw().toBuffer({ resolveWithObject: true }) + const ink = (x: number, y: number) => { + const intensity = data[((Math.round(box.y * 2) + y) * info.width + Math.round(box.x * 2) + x) * info.channels]! / 255 + return colorScheme === 'dark' ? intensity : 1 - intensity + } + // Scaling the 16-unit geometry to 14px changes edge coverage; integrated + // ink must still measure one CSS pixel instead of shrinking to 0.875px. + const verticalCoverage = Array.from({ length: 7 }, (_, x) => ink(x + 1, 10)).reduce((sum, value) => sum + value, 0) + const horizontalCoverage = Array.from({ length: 6 }, (_, y) => ink(14, y + 9)).reduce((sum, value) => sum + value, 0) + expect(verticalCoverage / 2).toBeCloseTo(1, 2) + expect(horizontalCoverage / 2).toBeCloseTo(1, 2) + + await page.keyboard.press('Escape') + await page.getByRole('button', { name: 'Account menu', exact: true }).click() + const accountMenu = page.getByRole('menu').filter({ has: page.getByRole('menuitem', { name: 'Settings', exact: true }) }) + const accountIcons = accountMenu.getByRole('menuitem').locator('svg') + await expect.poll(() => accountIcons.count()).toBe(3) + for (const accountIcon of await accountIcons.all()) { + const accountBox = await accountIcon.boundingBox() + expect(accountBox && [accountBox.width, accountBox.height]).toEqual([14, 14]) + } +}) + it('renders product icons from the sprite and swaps in a theme plugin replacement', async () => { const scaffold = await launchWebScaffold({ extraInstallAnchors: [join(FIXTURE, 'package.json')] }) onTestFinished(() => scaffold.close()) @@ -40,3 +88,42 @@ it('renders product icons from the sprite and swaps in a theme plugin replacemen await expect.poll(geometry).toEqual(defaults) await expect.poll(() => disc.count()).toBe(0) }) + +it.each([1, 2])('keeps icon stroke widths at device pixel ratio %s', async (deviceScaleFactor) => { + const scaffold = await launchWebScaffold() + onTestFinished(() => scaffold.close()) + const browser = await chromium.launch() + onTestFinished(() => browser.close()) + const page = await browser.newPage({ deviceScaleFactor, locale: 'en-US' }) + await page.goto(scaffold.authenticatedUrl, { waitUntil: 'load' }) + await page.locator('symbol[id="dsw-icon-plus-outline-regular"]').waitFor({ state: 'attached', timeout: 20_000 }) + + for (const dark of [false, true]) { + for (const [weight, expectedWidth] of [['regular', 1], ['medium', 1.3]] as const) { + for (const size of [14, 16, 20]) { + await page.evaluate(({ size, weight, dark }) => { + document.querySelector('[data-stroke-sample]')?.remove() + const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg') + svg.setAttribute('data-stroke-sample', '') + // CSS sizing must work even when the component's width/height attributes remain at 16. + svg.setAttribute('width', '16') + svg.setAttribute('height', '16') + svg.style.cssText = `position:fixed;left:0;top:0;z-index:2147483647;display:block;width:${size}px;height:${size}px;color:${dark ? 'white' : 'black'};background:${dark ? 'black' : 'white'}` + const use = document.createElementNS('http://www.w3.org/2000/svg', 'use') + use.setAttribute('href', `#dsw-icon-plus-outline-${weight}`) + svg.append(use) + document.body.append(svg) + }, { size, weight, dark }) + const { data, info } = await sharp(await page.locator('[data-stroke-sample]').screenshot()).removeAlpha().raw().toBuffer({ resolveWithObject: true }) + // Integrate coverage across the vertical stem, away from the horizontal bar. + const row = Math.floor(info.height / 4) + let coverage = 0 + for (let x = 0; x < info.width; x++) { + const intensity = data[(row * info.width + x) * info.channels]! / 255 + coverage += dark ? intensity : 1 - intensity + } + expect(Math.abs(coverage / deviceScaleFactor - expectedWidth), `${size}px ${weight}, dark=${dark}`).toBeLessThan(0.04) + } + } + } +}) diff --git a/apps/web/tests/models-settings.e2e.ts b/apps/web/tests/models-settings.e2e.ts index ac0de149af..05b264ac8a 100644 --- a/apps/web/tests/models-settings.e2e.ts +++ b/apps/web/tests/models-settings.e2e.ts @@ -309,6 +309,10 @@ describe('web e2e: Models settings page configures a dormant provider', () => { await custom.getByRole('button', { name: '添加模型', exact: true }).click() await custom.getByLabel('模型 ID 1').fill('acme-large') await custom.getByRole('button', { name: '模型选项 1' }).click() + const fieldLeft = async (name: string) => custom.getByLabel(name, { exact: true }) + .evaluate(element => element.getBoundingClientRect().left) + expect(await fieldLeft('上下文窗口 1')).toBe(await fieldLeft('模型 ID 1')) + expect(await fieldLeft('最大输出 token 数 1')).toBe(await fieldLeft('显示名称 1')) expect(await custom.getByLabel('上下文窗口 1').getAttribute('placeholder')).toBe('1M') expect(await custom.getByLabel('最大输出 token 数 1').getAttribute('placeholder')).toBe('128K') expect(await custom.getByRole('group', { name: '输入类型 1' }).getByRole('checkbox', { name: '图片' }).isChecked()).toBe(false) diff --git a/packages/client/ui-agent-preset/README.i18n.yaml b/packages/client/ui-agent-preset/README.i18n.yaml index df89d4bbcb..709242e57c 100644 --- a/packages/client/ui-agent-preset/README.i18n.yaml +++ b/packages/client/ui-agent-preset/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: b3ad7867f23dad1c /deepseek-ai-dsh-client-ui-agent-preset/use-this-package: - en: b53d5c356c6a7a83 - zh: ade3f5f551e73c7e + en: f112d6ad327249f0 + zh: 7625fca0c15a3843 /deepseek-ai-dsh-client-ui-agent-preset/understand-the-implementation: en: 0373c5425a952881 zh: 609c5829283f515d diff --git a/packages/client/ui-agent-preset/README.md b/packages/client/ui-agent-preset/README.md index 28ed891c87..45f970c69b 100644 --- a/packages/client/ui-agent-preset/README.md +++ b/packages/client/ui-agent-preset/README.md @@ -25,6 +25,8 @@ Choose Agent presets and the new-task default in Web, read what each mode does a ## Use this package +The section heading and introduction form one group above the rosters; built-in and custom rosters retain a larger separation than their internal card spacing. + Settings shows the built-in and custom card groups with default highlighting and card-body selection; a group without presets is omitted, except the custom group, which keeps its Creator entry on screen. Coarse-pointer devices show complete card descriptions; other devices clamp descriptions to four lines with the full text available on hover. Every card offers “View configuration”, which opens the preset's declared plugin list as read-only YAML in the Loader's own dialect (`!!js` conditions included); a failed preset stays readable because its diagnostic points into that YAML. Escape closes only the viewer and returns focus to its card; leaving Settings clears the viewer, and a late read does not reopen it. The page edits nothing: the Creator entry starts a Creator-mode task that authors or overrides a preset as a bundle, offered while the `cordis` preset is on the roster and a conversation flow exists. With Coding Tools off in General Settings, the new-session picker and Settings roster offer Standard, Creator, and custom presets; turning them on also offers PTC and Minimal. Default selection and the Creator entry remain available in both states. Choosing a healthy default also synchronizes the blank session on the current new-task surface. Creator starts a new task using the `cordis` preset. @@ -39,6 +41,8 @@ Entering Creator selects `cordis` for the receiving blank Session without changi On Desktop, the optional [product analytics](../product-analytics/README.md) service receives `agent_preset_switch` when a direct mode-picker choice moves to a different built-in preset: an unbound choice counts once it is staged for the next Session, and a choice for the bound blank Session counts once the Host applies it. The event carries the source and target categories mapped from the preset id (`cordis` is `creator`; `ptc`, `minimal`, and `standard` keep their ids; any other id is `other`) and the Coding Tools setting known at the choice. Custom targets, refused choices, choices the Host settles on another preset, default changes and their blank-Session synchronization report nothing, and neither does a choice made while the source mode or Coding Tools setting is unknown. Custom preset ids and names are not collected. +Parallel preset descriptions start at the same distance below their headings. Shorter descriptions leave spare space below, keeping the card footers aligned without vertically centering the descriptions. + ## Understand the implementation diff --git a/packages/client/ui-agent-preset/README.zh.md b/packages/client/ui-agent-preset/README.zh.md index a5b948e6a2..4ed8583157 100644 --- a/packages/client/ui-agent-preset/README.zh.md +++ b/packages/client/ui-agent-preset/README.zh.md @@ -25,6 +25,8 @@ kind: "package-reference" ## 使用此包 +分区标题与说明在预设列表上方组成一组;内置与自定义列表之间的距离大于各列表内部的卡片间距。 + 设置页显示内置与自定义卡片分组、默认项高亮和点击卡片选择;没有 preset 的分组不显示,但自定义分组会保留其创造入口。粗指针设备完整显示卡片描述;其他设备最多显示四行描述,悬停可查看全文。每张卡片都提供「查看配置」,以只读 YAML 打开该 preset 声明的插件列表,使用 Loader 自己的方言(含 `!!js` 条件);加载失败的 preset 同样可读,因为其诊断信息正指向这份 YAML。Escape 只关闭查看器并将焦点还给卡片;离开设置页会清空查看器,迟到的读取结果不会重新打开它。本页不编辑任何内容:创造入口启动一个创造模式任务,以 bundle 形式创建或覆盖 preset;当 `cordis` preset 在列表中且存在会话流程时提供。 关闭通用设置中的代码工作工具后,新会话选择器和设置页列表提供标准、创造和自定义预设;开启后还提供 PTC 和极简模式。两种状态下均保留默认值选择和创造入口。选择健康定义作为默认值也会同步当前新任务页面的空白会话。Creator 入口开启一个使用 `cordis` preset 的新任务。 @@ -39,6 +41,8 @@ kind: "package-reference" 在桌面端,模式选择器中的直接选择切换到另一个内置 preset 时,可选的[产品埋点](../product-analytics/README.zh.md)服务会收到 `agent_preset_switch`:未绑定 Session 的选择在暂存给下一个 Session 时计入,已绑定空白 Session 的选择在 Host 应用后计入。事件携带按 preset id 映射的来源与目标类别(`cordis` 记为 `creator`;`ptc`、`minimal`、`standard` 保持原 id;其他 id 记为 `other`),以及选择时已知的代码工作工具设置。选择自定义目标、被拒绝的选择、Host 最终落在其他 preset 的选择、默认值修改及其空白 Session 同步均不报告;来源模式或代码工作工具设置未知时做出的选择同样不报告。不采集自定义 preset 的 id 和名称。 +并列预设的说明从标题下方相同距离开始。较短说明将剩余空间留在下方,卡片页尾保持对齐,不将说明单独垂直居中。 + ## 理解实现 diff --git a/packages/client/ui-agent-preset/src/client/AgentPresetSection.module.css b/packages/client/ui-agent-preset/src/client/AgentPresetSection.module.css index 96af208257..7336071265 100644 --- a/packages/client/ui-agent-preset/src/client/AgentPresetSection.module.css +++ b/packages/client/ui-agent-preset/src/client/AgentPresetSection.module.css @@ -1,21 +1,23 @@ .section { display: flex; flex-direction: column; - gap: 12px; + gap: 24px; max-width: 720px; color: var(--dsw-alias-label-primary); } .title { margin: 0; - font-size: 18px; - font-weight: 600; + font-size: 16px; + font-weight: 500; + line-height: 24px; } .intro { margin: 0; - font-size: 13px; + font-size: 14px; color: var(--dsw-alias-label-tertiary); + line-height: 22px; } /* Cards, not rows: a preset is a thing you pick, and the description is the @@ -26,18 +28,15 @@ gap: 10px; } -/* Group-to-group breathing room: the section's 12px gap plus 20px reads the - two rosters as separate blocks (32px total). */ +/* Separate the two rosters by 32px, including the section gap. */ .group + .group { - margin-top: 20px; + margin-top: 8px; } .groupHead { margin: 0; font-size: 12px; - font-weight: 600; - letter-spacing: .06em; - text-transform: uppercase; + font-weight: 500; color: var(--dsw-alias-label-tertiary); } @@ -234,12 +233,10 @@ /* Bounded to four lines. A preset publishes its own description, so one long one would otherwise stretch every card in its grid row. Clamping is CSS alone: the whole text stays in the DOM for assistive - tech, and the card offers it on hover when it is actually cut off. The - description does not grow to fill the card — `-webkit-line-clamp` on a - flex-stretched box leaves the clamp height and the box height disagreeing, - so auto margins center the text between the header and footer instead. */ + tech, and the card offers it on hover when it is actually cut off. + Descriptions start below their headings; spare height remains below them. */ .cardDesc { - margin-block: auto; + margin: 0; font-size: 13px; line-height: 1.55; color: var(--dsw-alias-label-secondary); @@ -419,3 +416,9 @@ opacity: 0.4; cursor: default; } + +.sectionHeader { + display: flex; + flex-direction: column; + gap: 4px; +} diff --git a/packages/client/ui-agent-preset/src/client/AgentPresetSection.tsx b/packages/client/ui-agent-preset/src/client/AgentPresetSection.tsx index 9406720154..968b5f0d5a 100644 --- a/packages/client/ui-agent-preset/src/client/AgentPresetSection.tsx +++ b/packages/client/ui-agent-preset/src/client/AgentPresetSection.tsx @@ -99,8 +99,10 @@ export function AgentPresetSection({ ) return
-

{t('nav')}

-

{t('sectionIntro')}

+
+

{t('nav')}

+

{t('sectionIntro')}

+
{state.error === null ? null :

{state.error}

} {([true, false] as const).map((builtIn) => { const rows = state.rows.filter(row => isBuiltInPreset(row) === builtIn diff --git a/packages/client/ui-chat/README.i18n.yaml b/packages/client/ui-chat/README.i18n.yaml index f0c7f90fe8..a4d0771c3a 100644 --- a/packages/client/ui-chat/README.i18n.yaml +++ b/packages/client/ui-chat/README.i18n.yaml @@ -33,11 +33,11 @@ en: b0d806604bc17006 zh: 18dabe5dc2d0d419 /deepseek-ai-dsh-client-ui-chat/grouped-rendering: - en: 3afad0b4c6bf9ce0 - zh: d8179ba4ee9fcd61 + en: fedd26c80754fcbc + zh: cefe4f2eb55d1065 /deepseek-ai-dsh-client-ui-chat/scroll-ownership: - en: 91e1f5f12ca51211 - zh: b92090966d58b82c + en: 570a53b953a556af + zh: 53e7f53bf7b4044a /deepseek-ai-dsh-client-ui-chat/model-experience: en: c17b4dd43a61c569 zh: f7414309810c3a08 diff --git a/packages/client/ui-chat/README.md b/packages/client/ui-chat/README.md index 97af0ab22b..34afe19f97 100644 --- a/packages/client/ui-chat/README.md +++ b/packages/client/ui-chat/README.md @@ -117,6 +117,8 @@ The process group uses a stable `div` layout box, a scroll body, and an uncapped Running group titles, reasoning previews, tool and command rows, the active retry line, and the bottom running status use the shared [TextShimmer](../ui-primitives/README.md#component-catalog). Each row’s text shares one left-to-right highlight, including collapsed group titles; icons and hover chevrons retain their base appearance. Ordinary flow rows sit 4px apart. An expanded group title has 8px before its content, Assistant responses have 12px from adjacent process rows, and completed-Turn duration/status controls have 16px from their input and from a directly following visible row. A reply that follows the control after folded rows keeps the 12px reply gap, so folding never changes its spacing. Hidden and empty rows, including retained empty slot anchors, add no gap. The running “Deep diving” text retains its blue base while its theme-specific highlight sweeps across it. +Closing assistant messages use 16px SVG boxes for copy and branch actions at the default content font size, with fixed 1px strokes and 28px click targets. SVG boxes do not shrink in the flex row; their size and targets follow the content font-size delta. + The running status shows a whale whose APNG mask inherits the text color. CSS selects the static SVG when reduced motion or forced colors are active, or alpha masks are unsupported. The APNG is a [package asset](../AGENTS.md#dependency-declaration) referenced by the plugin stylesheet; React does not pass image data through DOM styles. Scroll-edge fades initialize when `ResizeObserver` reports the open group's layout; opening the group performs no immediate scroll-dimension read in a layout effect. @@ -138,7 +140,7 @@ Chat waits for initial history before automatic content, scroll, or size updates Chat restores semantic anchors across history prepend and renderer remounts, with browser scroll anchoring disabled on its scrollport only while following the tail. Pinned scroll deliveries without reader movement, and reader input that reaches the floor within subpixel rounding, update follow ownership immediately, before subsequent layout changes can invalidate their floor. Other reader movement remains pending until the sampling interval or `scrollend`, even inside the follow threshold, so layout growth cannot erase small scroll gestures. Under completion-time folding, submitting transcript input or steering immediately restores tail following and clears an older pending reader sample. Under next-message folding, transcript input that no fold batch carries lands on one native animation; steering lands at once under either timing, because the running Turn keeps streaming above its echo. While the reader is pinned to the floor, `ResizeObserver` follows the new floor and selects the latest loaded Turn without reading row geometry. Once the reader moves away, flow-height changes preserve the top position and the reading-line geometry selects the active Turn. Turn-rail previews paint above sticky Markdown code-block banners, while the rail frame remains inside the transcript band above the composer. -The turn rail and back-to-bottom button sit outside the clipped transcript. They use the shared conversation scrollport for sticky positioning, or the Chat frame for absolute positioning when Chat owns its scrollport. The rail hides when the transcript's available width, excluding its horizontal padding, is at most 900px; the browser viewport width is not the criterion. +The turn rail and back-to-bottom button sit outside the clipped transcript. The 34px back-to-bottom button centers a 20px chevron with a fixed 1px stroke. They use the shared conversation scrollport for sticky positioning, or the Chat frame for absolute positioning when Chat owns its scrollport. The rail hides when the transcript's available width, excluding its horizontal padding, is at most 900px; the browser viewport width is not the criterion. The transcript root uses `overflow-x: visible; overflow-y: clip`: vertical overflow is clipped without creating a scroll container. Sticky Markdown code banners and expanded compaction headers therefore retain the actual conversation scrollport as their reference when no nearer scrolling ancestor exists. Capped process groups and terminal sections keep their own scrollports. diff --git a/packages/client/ui-chat/README.zh.md b/packages/client/ui-chat/README.zh.md index 9dcd30137d..5dc585afbc 100644 --- a/packages/client/ui-chat/README.zh.md +++ b/packages/client/ui-chat/README.zh.md @@ -117,6 +117,8 @@ Chat Builder 按节点发布 `bottomSource`:节点可见且属于已加载的 运行中的分组标题、思考预览、工具与命令行、当前重试行以及底部运行状态使用共享的 [TextShimmer](../ui-primitives/README.zh.md#component-catalog)。每行的文字共用一道从左到右的高光,包括折叠的分组标题;图标和悬停箭头保留底色。普通流程行之间相隔 4px;展开的分组标题与内容之间相隔 8px;Assistant 回复与相邻过程行之间相隔 12px;每轮完成/耗时控件与其输入、以及紧随其后的可见行之间保留 16px。控件与回复之间隔着已收起的行时,回复保持 12px 回复间距,因此折叠不会改变它的间距。隐藏行与空行(包括保留的空 slot 锚点)不产生间距。“深度求索”运行文字保留蓝色底色,并使用主题专用高光扫过文字。 +助手收尾消息的复制与分支操作在默认内容字号下使用 16px SVG 框、固定 1px 描边与 28px 点击区域。SVG 框不会在 flex 行中收缩;图标与点击区域尺寸均跟随内容字号增量。 + 运行状态显示一只鲸鱼,其 APNG 遮罩继承文字颜色。启用减少动态效果或强制颜色模式、或浏览器不支持 alpha 遮罩时,CSS 选择静态 SVG。APNG 是插件样式表引用的[包资源](../AGENTS.md#dependency-declaration);React 不通过 DOM 样式传递图片数据。 滚动边缘渐隐在 `ResizeObserver` 报告已展开组的布局后初始化;展开组时不会在 layout effect 中立即读取滚动尺寸。 @@ -138,7 +140,7 @@ Chat 等待初始历史就绪后,才允许自动内容、滚动或尺寸更新 Chat 会在历史前插与 renderer 重新挂载时恢复语义锚点,并且只在跟随底部时禁用自己滚动区域的浏览器自动锚定。没有读者移动的贴底滚动事件,以及到达底部(容许小于 1px 的取整误差)的读者输入,会立即更新跟随归属,避免后续布局变化使其底部位置失效。其他读者移动即使位于跟随阈值内,也保持待处理直到采样周期或 `scrollend`,防止布局增长抵消小幅滚动操作。采用完成时收起时,提交正文输入或 steering 会立即恢复跟随底部,并清除先前待处理的读者滚动采样。采用下次消息时收起时,没有折叠批次承载的正文输入用一次原生动画落到底部;steering 在两种时机下都立即落到底部,因为运行中的 Turn 仍在其回显上方持续输出。读者跟随底部时,`ResizeObserver` 追随新的底部,并且无需读取行几何就选中最后一个已加载轮次;读者离开底部后,高度变化会保持顶部位置,再由阅读线几何选择活跃轮次。轮次导航预览位于 Markdown 代码块粘性头栏上方,而导航外框始终处于 composer 上方的 transcript 区域内。 -轮次轨道与回到底部按钮位于正文裁剪层外。它们相对共享会话滚动容器做 sticky 定位;Chat 自己持有滚动容器时,则相对 Chat 外框做 absolute 定位。正文扣除水平内边距后的可用宽度不超过 900px 时,隐藏轮次轨道;判断依据不是浏览器视口宽度。 +轮次轨道与回到底部按钮位于正文裁剪层外。34px 的回到底部按钮居中容纳 20px 箭头,描边固定为 1px。它们相对共享会话滚动容器做 sticky 定位;Chat 自己持有滚动容器时,则相对 Chat 外框做 absolute 定位。正文扣除水平内边距后的可用宽度不超过 900px 时,隐藏轮次轨道;判断依据不是浏览器视口宽度。 正文根节点使用 `overflow-x: visible; overflow-y: clip`:裁剪纵向溢出,但不创建滚动容器。因此,在没有更近的滚动祖先时,Markdown 代码块的 sticky 头栏和展开的压缩摘要头栏仍以实际会话滚动容器为参照。限高过程组和终端区域保留各自的滚动容器。 diff --git a/packages/client/ui-chat/src/client/chat/ChatView.tsx b/packages/client/ui-chat/src/client/chat/ChatView.tsx index 703fe65449..c78253893d 100644 --- a/packages/client/ui-chat/src/client/chat/ChatView.tsx +++ b/packages/client/ui-chat/src/client/chat/ChatView.tsx @@ -259,7 +259,7 @@ export function ChatView({ aria-label={t('chat.toBottom')} onClick={scroll.returnToBottom} > - + )} diff --git a/packages/client/ui-chat/src/client/chat/MessageIconActions.module.css b/packages/client/ui-chat/src/client/chat/MessageIconActions.module.css index 9c211ea186..f808722d9e 100644 --- a/packages/client/ui-chat/src/client/chat/MessageIconActions.module.css +++ b/packages/client/ui-chat/src/client/chat/MessageIconActions.module.css @@ -74,16 +74,16 @@ cursor: pointer; } -/* Action glyphs follow the same px delta as the text they serve; the - assistant completion row gives them two extra pixels. */ +/* Action glyphs follow the content font-size delta. */ .action svg { width: calc(15px + var(--dsh-content-font-delta, 0px)); height: calc(15px + var(--dsh-content-font-delta, 0px)); } .actions[data-clock='end'] .action svg { - width: calc(17px + var(--dsh-content-font-delta, 0px)); - height: calc(17px + var(--dsh-content-font-delta, 0px)); + flex: none; + width: calc(16px + var(--dsh-content-font-delta, 0px)); + height: calc(16px + var(--dsh-content-font-delta, 0px)); } @media (hover: hover) { diff --git a/packages/client/ui-conversation/README.i18n.yaml b/packages/client/ui-conversation/README.i18n.yaml index 8f74c9dfc6..c76b95ff1b 100644 --- a/packages/client/ui-conversation/README.i18n.yaml +++ b/packages/client/ui-conversation/README.i18n.yaml @@ -21,8 +21,8 @@ en: cc4dafd1aae02468 zh: be6b67724b7ac4a3 /deepseek-ai-dsh-client-ui-conversation/shell-and-standard-props: - en: 08cf047cee6419bd - zh: 1f464f059753eacb + en: 29c9ef9d6c4915ce + zh: a2223e940a5a6833 /deepseek-ai-dsh-client-ui-conversation/temporary-composer-entries: en: bb1244310f5c0382 zh: 824b84077432b559 @@ -36,5 +36,5 @@ en: 38d243630d0e4c38 zh: a58cdc35b664020b /deepseek-ai-dsh-client-ui-conversation/known-limitations-and-deferred-work/dev-note: - en: e67f633dc6fe7773 - zh: e88aeb617ffb74ea + en: 563108fabf865200 + zh: b53dde7158e62607 diff --git a/packages/client/ui-conversation/README.md b/packages/client/ui-conversation/README.md index 1fdfca0f3c..2f65190efc 100644 --- a/packages/client/ui-conversation/README.md +++ b/packages/client/ui-conversation/README.md @@ -68,6 +68,8 @@ The existing semantic `DraftSnapshot` retains quote text and clipboard-coordinat ## Shell and standard props +The attachment and send controls share a 32px diameter and the toolbar center line in both the initial composer and the docked composer. + The shared image slot props keep display choices separate from durable references: `thumbnail` requests a contained attachment-list thumbnail, while `compact` requests a cropped gallery tile. An optional per-image `label` supplies the accessible display name; loading and cache identity still use the original attachment reference. `MessageImagesContentInput` adds optional complete `MessageImageLabels` for the root-scoped `conversation.images.content` Factory. Message, tool, and Factory inputs carry the view's authorized `loadImage` callback explicitly; loading and URL caching remain with the resource owner. [ui-attachment](../ui-attachment/README.md) provides this Factory and owns rendering and the lightbox. The composer uses a minimum 16px draft font on coarse-pointer devices to avoid focus-triggered browser zoom; larger font preferences still apply. @@ -205,6 +207,8 @@ None; Conversation assembly and browser input state do not alter provider-side p
Working context for maintainers — click to expand +The task panel keeps its heading and task text on one column, using equal leading slots without changing the icon artwork. + None.
diff --git a/packages/client/ui-conversation/README.zh.md b/packages/client/ui-conversation/README.zh.md index dd01ddf45b..7f3d040e35 100644 --- a/packages/client/ui-conversation/README.zh.md +++ b/packages/client/ui-conversation/README.zh.md @@ -68,6 +68,8 @@ Queue 预览启用空白折叠和文档边缘 trim,保留 emoji,并使用 CS ## Shell 与标准 props +初始输入区与底部输入区的附件、发送控件共用 32px 直径及工具栏中心线。 + 共享图片插槽属性将展示选择与持久化引用分开:`thumbnail` 请求完整缩放的附件列表缩略图,`compact` 请求裁剪的图片方块。每张图片可通过可选的 `label` 提供无障碍展示名称;加载和缓存标识仍使用原始附件引用。`MessageImagesContentInput` 为 root 作用域的 `conversation.images.content` Factory 增加可选的完整 `MessageImageLabels`。消息、工具及 Factory 输入显式携带视图提供的授权 `loadImage` 回调;读取和 URL 缓存仍由资源所有者负责。[ui-attachment](../ui-attachment/README.zh.md) 提供该 Factory,负责渲染与灯箱。 在粗指针设备上,composer 的草稿字号至少为 16px,以避免获得焦点时浏览器自动放大;更大的字号偏好仍然生效。 @@ -205,6 +207,8 @@ selector 必须是 owner currency 的纯函数。非 null 返回值作为 `match
维护者工作上下文——点击展开 +任务面板的标题和任务文字共用一列,通过相同的前导槽对齐,不改变图标绘制。 + 无。
diff --git a/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css b/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css index 7d6ae29adb..6a38002b22 100644 --- a/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css @@ -267,10 +267,7 @@ align-items: center; justify-content: space-between; gap: 12px; - /* 2px moved from the bottom pad to the top: the whole control row sits 2px - lower in the card (it read too high against the textarea) while the - controls' own centering stays untouched. */ - padding: 2px 8px 6px; + padding: 4px 8px 8px; min-width: 0; /* Size container so the chips inside can collapse to icon-only when the card runs out of row width (PermissionSelect @container rule). Anonymous @@ -323,13 +320,13 @@ } } -/* Attach circle (figma + control): 28px, selector fill, primary glyph. */ +/* The attachment and send controls share a diameter and vertical center. */ .add { display: grid; place-items: center; flex: none; - width: 28px; - height: 28px; + width: 32px; + height: 32px; border: none; border-radius: 999px; corner-shape: round; @@ -383,15 +380,13 @@ cursor: default; } -/* Primary send (figma IconButton 34:10465): 34px circle, #3964FE light / - #679EFE dark — the info-fill pair (500→400), NOT button-primary (ink); - white glyph; empty text = 0.4 opacity. */ +/* The send control keeps its semantic primary fill in both palettes. */ .primary { display: grid; place-items: center; flex: none; - width: 34px; - height: 34px; + width: 32px; + height: 32px; border: none; border-radius: 999px; corner-shape: round; @@ -401,10 +396,6 @@ color: #fff; cursor: pointer; transition: background-color 100ms ease; - /* Opts out of the row's 2px downward shift (.row top pad): the send circle - keeps its original seat while the smaller chips sit lower. Transform, not - margin, so flex centering math is untouched. */ - transform: translateY(-2px); } @media (hover: hover) { diff --git a/packages/client/ui-conversation/src/client/skeleton/TodoPanel.module.css b/packages/client/ui-conversation/src/client/skeleton/TodoPanel.module.css index 04b537dad1..46b5826c81 100644 --- a/packages/client/ui-conversation/src/client/skeleton/TodoPanel.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/TodoPanel.module.css @@ -52,6 +52,8 @@ } .lead { + width: 16px; + height: 16px; display: grid; flex: none; place-items: center; diff --git a/packages/client/ui-dockkit/README.i18n.yaml b/packages/client/ui-dockkit/README.i18n.yaml index 0fadf55cad..3bccfb518c 100644 --- a/packages/client/ui-dockkit/README.i18n.yaml +++ b/packages/client/ui-dockkit/README.i18n.yaml @@ -18,8 +18,8 @@ en: 718f52cfce426009 zh: e8282e2e3713d242 /deepseek-ai-dsh-client-ui-dockkit/embedding-it: - en: 53bbabeb910c6f77 - zh: 51fb4f8fb78cfd02 + en: 5e025290e8881fa8 + zh: 2bc9c3ff83914241 /deepseek-ai-dsh-client-ui-dockkit/interaction-rules-worth-keeping: en: cf2d00ce2b7d5719 zh: 5510420f8872e23a @@ -33,8 +33,8 @@ en: ca75c51c89c2c9b0 zh: f57cc48a1b5cbfa9 /deepseek-ai-dsh-client-ui-dockkit/known-limitations-and-deferred-work: - en: 4323810ca5a87e6c - zh: 3a24af2ea4467ab7 + en: eb44edbaf45e1b62 + zh: 3fcfb01054ceacc7 /deepseek-ai-dsh-client-ui-dockkit/known-limitations-and-deferred-work/dev-note: en: 45680a19e42f401a zh: 5500de88331c8a59 diff --git a/packages/client/ui-dockkit/README.md b/packages/client/ui-dockkit/README.md index a446fdedd6..66e347f888 100644 --- a/packages/client/ui-dockkit/README.md +++ b/packages/client/ui-dockkit/README.md @@ -48,6 +48,8 @@ Tab context menus show the close action name without a shortcut hint: they act o ## Embedding it +Strip chrome continues the adjacent control spacing, so embedder actions and the split action form one consistent trailing group. + Everything host-specific arrives through props: | Contract | Carries | @@ -101,6 +103,8 @@ None; this package neither assembles nor sends a provider request. ## Known Limitations and Deferred Work +Dock-zone menu glyphs retain a 16px layout box with an inset painted frame, matching the neighboring split action. + - **Size semantics are deliberately small**: fractional weights with one minimum-size clamp. No snap, priority, or preferred size, so the cascading-squeeze behaviour of a full splitview is absent. diff --git a/packages/client/ui-dockkit/README.zh.md b/packages/client/ui-dockkit/README.zh.md index d94e4ee9f3..68774f3ede 100644 --- a/packages/client/ui-dockkit/README.zh.md +++ b/packages/client/ui-dockkit/README.zh.md @@ -48,6 +48,8 @@ kind: "package-reference" ## 如何嵌入 +标签栏尾部控件沿用相邻控件的间距,使嵌入方操作与分栏操作组成一致的尾部操作组。 + 一切宿主相关的东西都通过 props 进入: | 约定 | 承载内容 | @@ -101,6 +103,8 @@ Sidebar 使用的 `DockLayout` 在选中项变化、跨格移动与浮动期间 ## 已知限制与延期工作 +停靠区域菜单图标保留 16px 布局框,实际绘制的边框向内缩进,与相邻分栏操作保持视觉比例。 + - **尺寸语义刻意保持精简**:比例权重加一处最小尺寸夹取。没有吸附、优先级或首选尺寸,因此完整 splitview 的级联挤压行为不存在。 diff --git a/packages/client/ui-dockkit/src/components/TabPanel.tsx b/packages/client/ui-dockkit/src/components/TabPanel.tsx index df0e39bdb4..42aeee74d4 100644 --- a/packages/client/ui-dockkit/src/components/TabPanel.tsx +++ b/packages/client/ui-dockkit/src/components/TabPanel.tsx @@ -69,7 +69,7 @@ const ZONE_FILL: Record = { /** The drop hint's glyph: the panel frame with the zone's fill drawn solid. */ function ZoneGlyph({ zone }: { readonly zone: DockZone }): ReactNode { return ( - {label} ) diff --git a/packages/client/ui-primitives/src/Input.module.css b/packages/client/ui-primitives/src/Input.module.css index 30ff82da20..d01f6361d3 100644 --- a/packages/client/ui-primitives/src/Input.module.css +++ b/packages/client/ui-primitives/src/Input.module.css @@ -34,5 +34,11 @@ } .input::placeholder { - color: var(--dsw-alias-label-dimmed); + color: var(--dsw-alias-label-tertiary); +} + +@media (pointer: coarse) { + .input { + font-size: 16px; + } } diff --git a/packages/client/ui-primitives/src/LinkIcon.tsx b/packages/client/ui-primitives/src/LinkIcon.tsx index d8f8347282..312a71b193 100644 --- a/packages/client/ui-primitives/src/LinkIcon.tsx +++ b/packages/client/ui-primitives/src/LinkIcon.tsx @@ -53,25 +53,25 @@ export function classifyLinkPath(path: string): LinkIconKind { const PhotoGlyph = ({ size, className, strokeWidth }: IconProps & { strokeWidth: number }) => ( ) const PaperDocGlyph = ({ size, className, strokeWidth }: IconProps & { strokeWidth: number }) => ( ) const PaperGlyph = ({ size, className, strokeWidth }: IconProps & { strokeWidth: number }) => ( ) diff --git a/packages/client/ui-primitives/src/Menu.tsx b/packages/client/ui-primitives/src/Menu.tsx index 90f76edd1a..ba98078eca 100644 --- a/packages/client/ui-primitives/src/Menu.tsx +++ b/packages/client/ui-primitives/src/Menu.tsx @@ -292,6 +292,11 @@ export function Menu({ open, anchor, items = [], children, selectedId, selectedI if (lw > 0) x = Math.min(Math.max(x, MARGIN), vw - lw - MARGIN) if (lh > 0) y = Math.min(Math.max(y, overlayTopMargin(MARGIN, r, GAP)), vh - lh - MARGIN) + // Text-sized anchors can land between device pixels and soften the entire menu. + const dpr = window.devicePixelRatio + x = Math.round(x * dpr) / dpr + y = Math.round(y * dpr) / dpr + setFixedPos(current => current?.left === x && current.top === y ? current : { left: x, top: y }) } // First run measures the hidden pre-render (same commit as `open`), so diff --git a/packages/client/ui-primitives/src/Modal.module.css b/packages/client/ui-primitives/src/Modal.module.css index 6be4e62b0a..6f047bd8af 100644 --- a/packages/client/ui-primitives/src/Modal.module.css +++ b/packages/client/ui-primitives/src/Modal.module.css @@ -66,14 +66,13 @@ width: 100%; } -/* Header row (figma Title row): pad l24/t22/r14/b12, SPACE_BETWEEN — - * title left, close button right. */ +/* The 14px close icon shares the content edge inside its 28px target. */ .header { display: flex; align-items: center; justify-content: space-between; gap: 8px; - padding: 22px 14px 12px 24px; + padding: 22px calc(24px - (28px - 14px) / 2) 12px 24px; } .title { @@ -122,6 +121,10 @@ padding: 0 24px; } +.header + .body { + margin-top: 8px; +} + .footer { display: flex; align-items: center; diff --git a/packages/client/ui-primitives/src/PermissionIcon.tsx b/packages/client/ui-primitives/src/PermissionIcon.tsx index ee480c8c2d..065d1e44ab 100644 --- a/packages/client/ui-primitives/src/PermissionIcon.tsx +++ b/packages/client/ui-primitives/src/PermissionIcon.tsx @@ -9,8 +9,8 @@ interface PermissionIconArtworkProps extends IconProps { function ReadOnlyArtwork({ size = 16, className, strokeWidth }: PermissionIconArtworkProps): ReactNode { return ( ) } @@ -18,11 +18,9 @@ function ReadOnlyArtwork({ size = 16, className, strokeWidth }: PermissionIconAr function WorkspaceWriteArtwork({ size = 16, className, strokeWidth }: PermissionIconArtworkProps): ReactNode { return ( ) } @@ -30,9 +28,9 @@ function WorkspaceWriteArtwork({ size = 16, className, strokeWidth }: Permission function FullAccessArtwork({ size = 16, className, strokeWidth }: PermissionIconArtworkProps): ReactNode { return ( ) } @@ -40,8 +38,8 @@ function FullAccessArtwork({ size = 16, className, strokeWidth }: PermissionIcon function AutoReviewArtwork({ size = 16, className, strokeWidth }: PermissionIconArtworkProps): ReactNode { return ( ) } diff --git a/packages/client/ui-primitives/src/Pill.module.css b/packages/client/ui-primitives/src/Pill.module.css index 7295f702b8..ae9bcb066b 100644 --- a/packages/client/ui-primitives/src/Pill.module.css +++ b/packages/client/ui-primitives/src/Pill.module.css @@ -18,7 +18,7 @@ } @media (hover: hover) { - .interactive:hover { + .interactive:hover:where(:not(:disabled):not(.active)) { background: var(--dsw-alias-interactive-bg-hover); } } @@ -28,3 +28,13 @@ background: var(--dsw-alias-button-ghost-active-fill); box-shadow: inset 0 0 0 1px var(--dsw-alias-button-ghost-active-border); } + +.interactive:disabled { + cursor: default; + opacity: 0.4; +} + +.interactive:focus-visible { + outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); + outline-offset: 2px; +} diff --git a/packages/client/ui-primitives/src/RiskConfirmation.module.css b/packages/client/ui-primitives/src/RiskConfirmation.module.css index 3c29131429..577b6510e6 100644 --- a/packages/client/ui-primitives/src/RiskConfirmation.module.css +++ b/packages/client/ui-primitives/src/RiskConfirmation.module.css @@ -50,7 +50,7 @@ flex: none; width: 16px; height: 16px; - margin: 3px 0 0; + margin: 3px 1px 0; accent-color: var(--dsw-alias-button-primary-fill); cursor: pointer; } diff --git a/packages/client/ui-primitives/src/SegmentedTabs.module.css b/packages/client/ui-primitives/src/SegmentedTabs.module.css index a4edb7ada9..35e4a5a5a3 100644 --- a/packages/client/ui-primitives/src/SegmentedTabs.module.css +++ b/packages/client/ui-primitives/src/SegmentedTabs.module.css @@ -38,14 +38,14 @@ } @media (hover: hover) { - .tab:hover { + .tab:hover:not(:disabled) { background: transparent; color: var(--dsw-alias-label-primary); } } .tab[aria-selected='true'] { - font-weight: 600; + font-weight: 500; } .tabs[data-size='sm'] { @@ -58,15 +58,9 @@ height: 30px; } -.tabs[data-size='sm'] .tab[aria-selected='true'] { - font-weight: 500; -} - .tab:focus-visible { - outline: none; - text-decoration: underline; - text-decoration-thickness: 1px; - text-underline-offset: 4px; + outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); + outline-offset: -2px; } @media (prefers-reduced-motion: reduce) { diff --git a/packages/client/ui-primitives/src/icons/artwork.ts b/packages/client/ui-primitives/src/icons/artwork.ts index b92ac0e900..82e6457fe2 100644 --- a/packages/client/ui-primitives/src/icons/artwork.ts +++ b/packages/client/ui-primitives/src/icons/artwork.ts @@ -5,10 +5,10 @@ * document icon sprite, which a theme can replace with its own SVG. */ -/** Regular stroke width used by the product icon set. */ +/** Regular stroke width in CSS pixels, independent of rendered icon size. */ export const ICON_REGULAR_STROKE = 1 -/** Medium stroke width used by emphasized product icons. */ +/** Emphasized stroke width in CSS pixels, independent of rendered icon size. */ export const ICON_MEDIUM_STROKE = 1.3 /** One product glyph: default rendered height, `[width, height]` box ratio when not square, and SVG source per stroke width. */ @@ -20,107 +20,108 @@ interface IconArtwork { /** Default artwork keyed by glyph name; symbol ids derive from these keys. */ export const ICON_ARTWORK = { - 'new-chat-outline': { size: 16, svg: strokeWidth => `` }, - 'search-outline': { size: 16, svg: strokeWidth => `` }, - 'globe-outline': { size: 14, svg: strokeWidth => `` }, - 'settings-outline': { size: 16, svg: strokeWidth => `` }, - 'panel-left-outline': { size: 16, svg: strokeWidth => `` }, + 'logout-outline': { size: 16, svg: strokeWidth => `` }, + 'new-chat-outline': { size: 16, svg: strokeWidth => `` }, + 'search-outline': { size: 16, svg: strokeWidth => `` }, + 'globe-outline': { size: 14, svg: strokeWidth => `` }, + 'settings-outline': { size: 16, svg: strokeWidth => `` }, + 'panel-left-outline': { size: 16, svg: strokeWidth => `` }, 'ellipsis-outline': { size: 16, svg: strokeWidth => `` }, - 'plus-outline': { size: 16, svg: strokeWidth => `` }, - 'check-outline': { size: 16, svg: strokeWidth => `` }, - 'branch-outline': { size: 16, svg: strokeWidth => `` }, - 'chevron-down-outline': { size: 14, svg: strokeWidth => `` }, - 'chevron-left-outline': { size: 14, svg: strokeWidth => `` }, - 'chevron-right-outline': { size: 14, svg: strokeWidth => `` }, + 'plus-outline': { size: 16, svg: strokeWidth => `` }, + 'check-outline': { size: 16, svg: strokeWidth => `` }, + 'branch-outline': { size: 16, svg: strokeWidth => `` }, + 'chevron-down-outline': { size: 14, svg: strokeWidth => `` }, + 'chevron-left-outline': { size: 14, svg: strokeWidth => `` }, + 'chevron-right-outline': { size: 14, svg: strokeWidth => `` }, 'triangle-right-fill': { size: 14, svg: strokeWidth => `` }, - 'chevron-up-outline': { size: 14, svg: strokeWidth => `` }, - 'close-outline': { size: 16, svg: strokeWidth => `` }, - 'close-fill': { size: 14, svg: strokeWidth => `` }, + 'chevron-up-outline': { size: 14, svg: strokeWidth => `` }, + 'close-outline': { size: 16, svg: strokeWidth => `` }, + 'close-fill': { size: 14, svg: strokeWidth => `` }, 'close-circle-fill': { size: 16, svg: strokeWidth => `` }, - 'copy-outline': { size: 16, svg: strokeWidth => `` }, - 'refresh-outline': { size: 16, svg: strokeWidth => `` }, - 'like-outline': { size: 16, svg: strokeWidth => `` }, - 'like-fill': { size: 16, svg: strokeWidth => `` }, - 'dislike-outline': { size: 16, svg: strokeWidth => `` }, - 'dislike-fill': { size: 16, svg: strokeWidth => `` }, - 'share-outline': { size: 16, svg: strokeWidth => `` }, - 'deliver-doc': { size: 16, svg: strokeWidth => `` }, - 'edit-outline': { size: 16, svg: strokeWidth => `` }, - 'think-outline': { size: 16, svg: strokeWidth => `` }, - 'agent-preset-outline': { size: 16, svg: strokeWidth => `` }, - 'browse-outline': { size: 16, svg: strokeWidth => `` }, - 'context-injection-outline': { size: 16, svg: strokeWidth => `` }, - 'link-outline': { size: 16, svg: strokeWidth => `` }, - 'right-up-outline': { size: 16, svg: strokeWidth => `` }, - 'enhance-outline': { size: 16, svg: strokeWidth => `` }, - 'trash-outline': { size: 16, svg: strokeWidth => `` }, - 'warning-outline': { size: 16, svg: strokeWidth => `` }, - 'check-circle-fill': { size: 16, svg: strokeWidth => `` }, - 'warning-triangle-outline': { size: 16, svg: strokeWidth => `` }, - 'user-outline': { size: 16, svg: strokeWidth => `` }, - 'users-outline': { size: 16, svg: strokeWidth => `` }, - 'paper-plane-outline': { size: 14, svg: strokeWidth => `` }, + 'copy-outline': { size: 16, svg: strokeWidth => `` }, + 'refresh-outline': { size: 16, svg: strokeWidth => `` }, + 'like-outline': { size: 16, svg: strokeWidth => `` }, + 'like-fill': { size: 16, svg: strokeWidth => `` }, + 'dislike-outline': { size: 16, svg: strokeWidth => `` }, + 'dislike-fill': { size: 16, svg: strokeWidth => `` }, + 'share-outline': { size: 16, svg: strokeWidth => `` }, + 'deliver-doc': { size: 16, svg: strokeWidth => `` }, + 'edit-outline': { size: 16, svg: strokeWidth => `` }, + 'think-outline': { size: 16, svg: strokeWidth => `` }, + 'agent-preset-outline': { size: 16, svg: strokeWidth => `` }, + 'browse-outline': { size: 16, svg: strokeWidth => `` }, + 'context-injection-outline': { size: 16, svg: strokeWidth => `` }, + 'link-outline': { size: 16, svg: strokeWidth => `` }, + 'right-up-outline': { size: 16, svg: strokeWidth => `` }, + 'enhance-outline': { size: 16, svg: strokeWidth => `` }, + 'trash-outline': { size: 16, svg: strokeWidth => `` }, + 'warning-outline': { size: 16, svg: strokeWidth => `` }, + 'check-circle-fill': { size: 16, svg: strokeWidth => `` }, + 'warning-triangle-outline': { size: 16, svg: strokeWidth => `` }, + 'user-outline': { size: 16, svg: strokeWidth => `` }, + 'users-outline': { size: 16, svg: strokeWidth => `` }, + 'paper-plane-outline': { size: 14, svg: strokeWidth => `` }, 'stop-fill': { size: 16, svg: strokeWidth => `` }, - 'paperclip-outline': { size: 16, svg: strokeWidth => `` }, - 'loading-outline': { size: 16, svg: strokeWidth => `` }, - 'download-outline': { size: 16, svg: strokeWidth => `` }, - 'play-outline': { size: 16, svg: strokeWidth => `` }, - 'pause-outline': { size: 16, svg: strokeWidth => `` }, - 'fullscreen-outline': { size: 16, svg: strokeWidth => `` }, - 'code-outline': { size: 16, svg: strokeWidth => `` }, - 'cordis-plugin-outline': { size: 14, svg: strokeWidth => `` }, - 'api-outline': { size: 14, svg: strokeWidth => `` }, - 'personalization-outline': { size: 16, svg: strokeWidth => `` }, - 'project-add-outline': { size: 16, svg: strokeWidth => `` }, - 'folder-open-outline': { size: 16, svg: strokeWidth => `` }, + 'paperclip-outline': { size: 16, svg: strokeWidth => `` }, + 'loading-outline': { size: 16, svg: strokeWidth => `` }, + 'download-outline': { size: 16, svg: strokeWidth => `` }, + 'play-outline': { size: 16, svg: strokeWidth => `` }, + 'pause-outline': { size: 16, svg: strokeWidth => `` }, + 'fullscreen-outline': { size: 16, svg: strokeWidth => `` }, + 'code-outline': { size: 16, svg: strokeWidth => `` }, + 'cordis-plugin-outline': { size: 14, svg: strokeWidth => `` }, + 'api-outline': { size: 14, svg: strokeWidth => `` }, + 'personalization-outline': { size: 16, svg: strokeWidth => `` }, + 'project-add-outline': { size: 16, svg: strokeWidth => `` }, + 'folder-open-outline': { size: 16, svg: strokeWidth => `` }, 'folder-open': { size: 16, svg: strokeWidth => `` }, - 'folder-close': { size: 16, svg: strokeWidth => `` }, - 'tree-corner': { size: 10, aspect: [8, 10], svg: strokeWidth => `` }, - 'light-outline': { size: 16, svg: strokeWidth => `` }, - 'dark-outline': { size: 16, svg: strokeWidth => `` }, - 'followsystem-outline': { size: 16, svg: strokeWidth => `` }, - 'data-outline': { size: 16, svg: strokeWidth => `` }, - 'database-outline': { size: 16, svg: strokeWidth => `` }, - 'clock-outline': { size: 16, svg: strokeWidth => `` }, - 'gauge-outline': { size: 16, svg: strokeWidth => `` }, - 'send-outline': { size: 14, svg: strokeWidth => `` }, - 'queue-outline': { size: 14, svg: strokeWidth => `` }, - 'checklist-outline': { size: 14, svg: strokeWidth => `` }, - 'list-pen-outline': { size: 16, svg: strokeWidth => `` }, - 'goal-outline': { size: 16, svg: strokeWidth => `` }, - 'sparkle': { size: 16, svg: strokeWidth => `` }, - 'inspect-outline': { size: 12, svg: strokeWidth => `` }, - 'skill-outline': { size: 16, svg: strokeWidth => `` }, - 'question-outline': { size: 14, svg: strokeWidth => `` }, - 'info-outline': { size: 14, svg: strokeWidth => `` }, - 'plugin-pinwheel-outline': { size: 16, svg: strokeWidth => `` }, - 'alarm-clock-outline': { size: 16, svg: strokeWidth => `` }, - 'archive-outline': { size: 20, svg: strokeWidth => `` }, - 'wrap-lines-outline': { size: 16, svg: strokeWidth => `` }, + 'folder-close': { size: 16, svg: strokeWidth => `` }, + 'tree-corner': { size: 10, aspect: [8, 10], svg: strokeWidth => `` }, + 'light-outline': { size: 16, svg: strokeWidth => `` }, + 'dark-outline': { size: 16, svg: strokeWidth => `` }, + 'followsystem-outline': { size: 16, svg: strokeWidth => `` }, + 'data-outline': { size: 16, svg: strokeWidth => `` }, + 'database-outline': { size: 16, svg: strokeWidth => `` }, + 'clock-outline': { size: 16, svg: strokeWidth => `` }, + 'gauge-outline': { size: 16, svg: strokeWidth => `` }, + 'send-outline': { size: 14, svg: strokeWidth => `` }, + 'queue-outline': { size: 14, svg: strokeWidth => `` }, + 'checklist-outline': { size: 14, svg: strokeWidth => `` }, + 'list-pen-outline': { size: 16, svg: strokeWidth => `` }, + 'goal-outline': { size: 16, svg: strokeWidth => `` }, + 'sparkle': { size: 16, svg: strokeWidth => `` }, + 'inspect-outline': { size: 12, svg: strokeWidth => `` }, + 'skill-outline': { size: 16, svg: strokeWidth => `` }, + 'question-outline': { size: 14, svg: strokeWidth => `` }, + 'info-outline': { size: 14, svg: strokeWidth => `` }, + 'plugin-pinwheel-outline': { size: 16, svg: strokeWidth => `` }, + 'alarm-clock-outline': { size: 16, svg: strokeWidth => `` }, + 'archive-outline': { size: 20, svg: strokeWidth => `` }, + 'wrap-lines-outline': { size: 16, svg: strokeWidth => `` }, 'nowrap-fill': { size: 16, svg: () => '' }, 'wrap-fill': { size: 16, svg: () => '' }, - 'compare-split-outline': { size: 16, svg: strokeWidth => `` }, - 'plan-outline': { size: 14, svg: strokeWidth => `` }, - 'compact-outline': { size: 16, svg: strokeWidth => `` }, - 'shield-outline': { size: 16, svg: strokeWidth => `` }, - 'check-circle-outline': { size: 16, svg: strokeWidth => `` }, - 'unarchive-outline': { size: 20, svg: strokeWidth => `` }, - 'pin-outline': { size: 16, svg: strokeWidth => `` }, - 'pin-fill': { size: 16, svg: strokeWidth => `` }, - 'flat-list-outline': { size: 16, svg: strokeWidth => `` }, - 'workspace-tree-outline': { size: 16, svg: strokeWidth => `` }, - 'chevrons-up-down-outline': { size: 16, svg: strokeWidth => `` }, - 'drag-handle-outline': { size: 16, svg: strokeWidth => `` }, + 'compare-split-outline': { size: 16, svg: strokeWidth => `` }, + 'plan-outline': { size: 14, svg: strokeWidth => `` }, + 'compact-outline': { size: 16, svg: strokeWidth => `` }, + 'shield-outline': { size: 16, svg: strokeWidth => `` }, + 'check-circle-outline': { size: 16, svg: strokeWidth => `` }, + 'unarchive-outline': { size: 20, svg: strokeWidth => `` }, + 'pin-outline': { size: 16, svg: strokeWidth => `` }, + 'pin-fill': { size: 16, svg: strokeWidth => `` }, + 'flat-list-outline': { size: 16, svg: strokeWidth => `` }, + 'workspace-tree-outline': { size: 16, svg: strokeWidth => `` }, + 'chevrons-up-down-outline': { size: 16, svg: strokeWidth => `` }, + 'drag-handle-outline': { size: 16, svg: strokeWidth => `` }, 'archive-off-outline': { size: 16, svg: strokeWidth => strokeWidth === ICON_MEDIUM_STROKE - ? `` - : `` }, - 'archive-check-outline': { size: 16, svg: strokeWidth => `` }, - 'sliders-two-outline': { size: 16, svg: strokeWidth => `` }, + ? `` + : `` }, + 'archive-check-outline': { size: 16, svg: strokeWidth => `` }, + 'sliders-two-outline': { size: 16, svg: strokeWidth => `` }, 'microphone-outline': { size: 16, svg: strokeWidth => strokeWidth === ICON_MEDIUM_STROKE - ? `` - : `` }, - 'apps-add-outline': { size: 16, svg: strokeWidth => `` }, - 'apps-add-compact-outline': { size: 16, svg: strokeWidth => `` }, + ? `` + : `` }, + 'apps-add-outline': { size: 16, svg: strokeWidth => `` }, + 'apps-add-compact-outline': { size: 16, svg: strokeWidth => `` }, } satisfies Record /** Glyph name accepted by {@link iconSymbolId}. */ diff --git a/packages/client/ui-primitives/src/icons/index.tsx b/packages/client/ui-primitives/src/icons/index.tsx index ef96e16203..72a201fabb 100644 --- a/packages/client/ui-primitives/src/icons/index.tsx +++ b/packages/client/ui-primitives/src/icons/index.tsx @@ -24,6 +24,12 @@ function productIcon(glyph: IconGlyph, weight: IconWeight): (props: IconProps) = ) } +/** Regular logout arrow and door with a fixed one-pixel stroke. */ +export const IconLogoutOutlineRegular = productIcon('logout-outline', 'regular') + +/** Medium logout arrow and door with a fixed 1.3px stroke. */ +export const IconLogoutOutlineMedium = productIcon('logout-outline', 'medium') + /** Regular one-pixel IconNewChatOutline artwork. */ export const IconNewChatOutlineRegular = productIcon('new-chat-outline', 'regular') @@ -234,10 +240,10 @@ export const IconWarningOutlineRegular = productIcon('warning-outline', 'regular /** Medium IconWarningOutline artwork with a 1.3px stroke. */ export const IconWarningOutlineMedium = productIcon('warning-outline', 'medium') -/** Regular IconCheckCircleFill artwork (circled check); its fill-only geometry is weight-independent. */ +/** Regular one-pixel IconCheckCircleFill artwork. */ export const IconCheckCircleFillRegular = productIcon('check-circle-fill', 'regular') -/** Medium IconCheckCircleFill artwork; it matches Regular because the geometry is fill-only. */ +/** Medium IconCheckCircleFill artwork with a fixed 1.3px stroke. */ export const IconCheckCircleFillMedium = productIcon('check-circle-fill', 'medium') /** Regular rounded warning triangle with an exclamation mark. */ @@ -456,10 +462,10 @@ export const IconQuestionOutlineRegular = productIcon('question-outline', 'regul /** Medium IconQuestionOutline artwork with a 1.3px stroke. */ export const IconQuestionOutlineMedium = productIcon('question-outline', 'medium') -/** Regular IconInfoOutline artwork; its fill-only geometry is weight-independent. */ +/** Regular one-pixel IconInfoOutline artwork. */ export const IconInfoOutlineRegular = productIcon('info-outline', 'regular') -/** Medium IconInfoOutline artwork; its fill-only geometry is weight-independent. */ +/** Medium IconInfoOutline artwork with a fixed 1.3px stroke. */ export const IconInfoOutlineMedium = productIcon('info-outline', 'medium') /** Regular one-pixel plugin pinwheel artwork. */ @@ -525,7 +531,7 @@ export const IconShieldOutlineMedium = productIcon('shield-outline', 'medium') /** Regular one-pixel IconCheckCircleOutline artwork. */ export const IconCheckCircleOutlineRegular = productIcon('check-circle-outline', 'regular') -/** Medium IconCheckCircleOutline artwork with a 1.3px stroke. */ +/** Medium IconCheckCircleOutline artwork with a fixed 1.3px stroke. */ export const IconCheckCircleOutlineMedium = productIcon('check-circle-outline', 'medium') /** Regular one-pixel IconUnarchiveOutline artwork. */ diff --git a/packages/client/ui-primitives/src/icons/props.ts b/packages/client/ui-primitives/src/icons/props.ts index 560adbeb1e..85a599f7be 100644 --- a/packages/client/ui-primitives/src/icons/props.ts +++ b/packages/client/ui-primitives/src/icons/props.ts @@ -1,6 +1,6 @@ /** Shared props for every product icon component. */ export interface IconProps { - /** Square edge in px; defaults to the glyph's own drawn size. */ + /** Rendered height in CSS px; stroked geometry retains its Regular or Medium width. */ size?: number | undefined /** Extra class for layout placement; color rides currentColor. * (`| undefined` for exactOptionalPropertyTypes: callers forward their own optional prop.) */ diff --git a/packages/client/ui-primitives/src/icons/shared-artwork.tsx b/packages/client/ui-primitives/src/icons/shared-artwork.tsx index 3bd29f7a6f..e3a0255f6f 100644 --- a/packages/client/ui-primitives/src/icons/shared-artwork.tsx +++ b/packages/client/ui-primitives/src/icons/shared-artwork.tsx @@ -12,9 +12,9 @@ interface WeightedArtworkProps extends IconProps { */ export const ChatLinesOutlineArtwork = ({ size = 16, className, strokeWidth }: WeightedArtworkProps) => ( ) @@ -25,10 +25,10 @@ export const ChatLinesOutlineArtwork = ({ size = 16, className, strokeWidth }: W */ export const GlobeOutlineArtwork = ({ size = 14, className, strokeWidth }: WeightedArtworkProps) => ( ) @@ -39,9 +39,9 @@ export const GlobeOutlineArtwork = ({ size = 14, className, strokeWidth }: Weigh */ export const CodeBracketsArtwork = ({ size = 14, className, strokeWidth }: WeightedArtworkProps) => ( ) @@ -52,8 +52,8 @@ export const CodeBracketsArtwork = ({ size = 14, className, strokeWidth }: Weigh */ export const BrowseOutlineArtwork = ({ size = 16, className, strokeWidth }: WeightedArtworkProps) => ( ) @@ -65,7 +65,7 @@ export const BrowseOutlineArtwork = ({ size = 16, className, strokeWidth }: Weig */ export const FolderCloseArtwork = ({ size = 16, className, strokeWidth }: WeightedArtworkProps) => ( ) diff --git a/packages/client/ui-primitives/src/markdown/MarkdownText.module.css b/packages/client/ui-primitives/src/markdown/MarkdownText.module.css index fc6a907ad1..120d672c55 100644 --- a/packages/client/ui-primitives/src/markdown/MarkdownText.module.css +++ b/packages/client/ui-primitives/src/markdown/MarkdownText.module.css @@ -93,17 +93,18 @@ box-shadow: 0 0 0 2px var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); } -/* Leading link-category glyph inside anchors, file mentions, and - URL-promoted inline code: outline glyphs ride the link's currentColor. - 1.1em keeps the glyph proportional to the surrounding text's size (it - shrinks with the code chip's 0.875em); the small negative offset seats - its optical center on the cap height. */ +/* Inline icon boxes follow the text middle, preserving their internal whitespace. + Separate the link from preceding prose more than the icon from its label. */ .linkIcon { flex: none; width: 1.1em; height: 1.1em; - vertical-align: -0.25em; - margin-right: 5px; + vertical-align: calc(0.5cap - 0.55em); + margin-inline: 0.25em 0.125em; +} + +.markdown code .linkIcon { + margin-inline-start: 0; } .markdown :where(ul, ol) { diff --git a/packages/client/ui-primitives/tests/fixtures/markdown-dom/cjk-strong-and-inline-code-url.settled.txt b/packages/client/ui-primitives/tests/fixtures/markdown-dom/cjk-strong-and-inline-code-url.settled.txt index ee3cf3638e..7e5273146b 100644 --- a/packages/client/ui-primitives/tests/fixtures/markdown-dom/cjk-strong-and-inline-code-url.settled.txt +++ b/packages/client/ui-primitives/tests/fixtures/markdown-dom/cjk-strong-and-inline-code-url.settled.txt @@ -11,10 +11,10 @@ diff --git a/packages/client/ui-primitives/tests/fixtures/markdown-dom/cjk-strong-and-inline-code-url.streaming.txt b/packages/client/ui-primitives/tests/fixtures/markdown-dom/cjk-strong-and-inline-code-url.streaming.txt index ee3cf3638e..7e5273146b 100644 --- a/packages/client/ui-primitives/tests/fixtures/markdown-dom/cjk-strong-and-inline-code-url.streaming.txt +++ b/packages/client/ui-primitives/tests/fixtures/markdown-dom/cjk-strong-and-inline-code-url.streaming.txt @@ -11,10 +11,10 @@ diff --git a/packages/client/ui-primitives/tests/fixtures/markdown-dom/footnotes.settled.txt b/packages/client/ui-primitives/tests/fixtures/markdown-dom/footnotes.settled.txt index eafe1678ab..e00b22574d 100644 --- a/packages/client/ui-primitives/tests/fixtures/markdown-dom/footnotes.settled.txt +++ b/packages/client/ui-primitives/tests/fixtures/markdown-dom/footnotes.settled.txt @@ -19,10 +19,10 @@ #text "Footnote a body with "

#text "relative dropped and js dropped and "

@@ -57,10 +57,10 @@ #text "[spaces encoded]("

diff --git a/packages/client/ui-primitives/tests/fixtures/markdown-dom/links-and-autolinks.streaming.txt b/packages/client/ui-primitives/tests/fixtures/markdown-dom/links-and-autolinks.streaming.txt index 0f674a580a..e9ac2b5ad1 100644 --- a/packages/client/ui-primitives/tests/fixtures/markdown-dom/links-and-autolinks.streaming.txt +++ b/packages/client/ui-primitives/tests/fixtures/markdown-dom/links-and-autolinks.streaming.txt @@ -2,45 +2,45 @@

#text "relative dropped and js dropped and "

@@ -57,10 +57,10 @@ #text "[spaces encoded]("

diff --git a/packages/client/ui-primitives/tests/fixtures/markdown-dom/reference-links-and-images.settled.txt b/packages/client/ui-primitives/tests/fixtures/markdown-dom/reference-links-and-images.settled.txt index 741f29e03d..636af55cab 100644 --- a/packages/client/ui-primitives/tests/fixtures/markdown-dom/reference-links-and-images.settled.txt +++ b/packages/client/ui-primitives/tests/fixtures/markdown-dom/reference-links-and-images.settled.txt @@ -3,26 +3,26 @@ #text "A "

diff --git a/packages/client/ui-primitives/tests/fixtures/markdown-dom/reference-links-and-images.streaming.txt b/packages/client/ui-primitives/tests/fixtures/markdown-dom/reference-links-and-images.streaming.txt index 741f29e03d..636af55cab 100644 --- a/packages/client/ui-primitives/tests/fixtures/markdown-dom/reference-links-and-images.streaming.txt +++ b/packages/client/ui-primitives/tests/fixtures/markdown-dom/reference-links-and-images.streaming.txt @@ -3,26 +3,26 @@ #text "A "

diff --git a/packages/client/ui-primitives/tests/fixtures/markdown-dom/table-with-alignment.settled.txt b/packages/client/ui-primitives/tests/fixtures/markdown-dom/table-with-alignment.settled.txt index 67d874bb19..5b419eb641 100644 --- a/packages/client/ui-primitives/tests/fixtures/markdown-dom/table-with-alignment.settled.txt +++ b/packages/client/ui-primitives/tests/fixtures/markdown-dom/table-with-alignment.settled.txt @@ -26,10 +26,10 @@ diff --git a/packages/client/ui-primitives/tests/fixtures/markdown-dom/table-with-alignment.streaming.txt b/packages/client/ui-primitives/tests/fixtures/markdown-dom/table-with-alignment.streaming.txt index 67d874bb19..5b419eb641 100644 --- a/packages/client/ui-primitives/tests/fixtures/markdown-dom/table-with-alignment.streaming.txt +++ b/packages/client/ui-primitives/tests/fixtures/markdown-dom/table-with-alignment.streaming.txt @@ -26,10 +26,10 @@ diff --git a/packages/client/ui-primitives/tests/icons.client.spec.tsx b/packages/client/ui-primitives/tests/icons.client.spec.tsx index a5250f1126..00ba3a3bf1 100644 --- a/packages/client/ui-primitives/tests/icons.client.spec.tsx +++ b/packages/client/ui-primitives/tests/icons.client.spec.tsx @@ -27,8 +27,8 @@ function artwork(glyph: IconGlyph, weight: IconWeight): Document { } describe('product icon set', () => { - it('exports regular and medium variants for all 96 public glyphs', () => { - expect(iconNames.length).toBe(192) + it('exports regular and medium variants for all 97 public glyphs', () => { + expect(iconNames.length).toBe(194) expect(iconNames.some(name => /\d+$/.test(name))).toBe(false) const regular = iconNames.filter(name => name.endsWith('Regular')).map(name => name.slice(0, -'Regular'.length)) const medium = iconNames.filter(name => name.endsWith('Medium')).map(name => name.slice(0, -'Medium'.length)) diff --git a/packages/client/ui-primitives/tests/menu-anchor-width.client.spec.tsx b/packages/client/ui-primitives/tests/menu-anchor-width.client.spec.tsx index 4aacc054b4..477e75cd9f 100644 --- a/packages/client/ui-primitives/tests/menu-anchor-width.client.spec.tsx +++ b/packages/client/ui-primitives/tests/menu-anchor-width.client.spec.tsx @@ -15,6 +15,16 @@ function measureAnchor() { } describe('Menu anchor minimum width', () => { + it.each([[1, 280, 66], [1.25, 280, 66.4], [2, 280.5, 66.5]])('aligns fractional anchors to device pixels at DPR %s', (dpr, left, top) => { + measureAnchor() + vi.stubGlobal('devicePixelRatio', dpr) + vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockReturnValue(new DOMRect(120.34, 40.34, 280, 22)) + const view = render(

Tools} + items={[{ id: 'one', label: 'One' }]} onClose={vi.fn()} />) + expect(view.getByRole('menu').style.left).toBe(`${left}px`) + expect(view.getByRole('menu').style.top).toBe(`${top}px`) + }) + it('matches the anchor and clears its minimum when the option is removed', () => { measureAnchor() const props = { open: true, portal: true, align: 'end' as const, anchor: , onClose: vi.fn() } diff --git a/packages/client/ui-schedule/README.i18n.yaml b/packages/client/ui-schedule/README.i18n.yaml index 6af57d26c8..c47c0d1ed7 100644 --- a/packages/client/ui-schedule/README.i18n.yaml +++ b/packages/client/ui-schedule/README.i18n.yaml @@ -15,14 +15,14 @@ en: d152484eb41ac6b4 zh: 405b30feaf48c087 /deepseek-ai-dsh-client-ui-schedule/use-this-package: - en: fccffd577fcf93f2 - zh: 4719236f7d89e0a8 + en: f5a22f2a024e5dd7 + zh: eba09109efffe4b0 /deepseek-ai-dsh-client-ui-schedule/use-this-package/time-zone-data-source: en: 47cd16c142e82385 zh: 181849a3c7a167fd /deepseek-ai-dsh-client-ui-schedule/understand-the-implementation: - en: 959145f9a08c3913 - zh: 7c0afb742790c474 + en: 12704660f3bd5830 + zh: ebf29ea8f46d2900 /deepseek-ai-dsh-client-ui-schedule/further-exploration: en: 06e265120b05dbf5 zh: 08ab1ef979b8ea40 diff --git a/packages/client/ui-schedule/README.md b/packages/client/ui-schedule/README.md index ee91c4aa00..e7d0adacf4 100644 --- a/packages/client/ui-schedule/README.md +++ b/packages/client/ui-schedule/README.md @@ -25,6 +25,8 @@ Manage active and inactive tasks from the Automation tasks page and the right Si ## Use this package +Catalog empty states center within the space below the page controls and remain scrollable on short viewports. Filters, input fields, multi-line task rows, and nested rule groups use the shared radius appropriate to their role. + The shipped Web composition mounts `ui-schedule` with the Host Schedule service. The clock context that supplies the model's current time is preset-owned: `standard`, `cordis`, and `ptc` declare it, and `minimal` declares neither it nor the reminder tools. The Automation tasks sidebar entry opens a global page without selecting or activating a Session. The page header's New action starts a new Session, where the reminder is created by asking the model; the page itself has no creation form. Once the catalog holds an inactive task, the search row's More task actions menu offers Clear all inactive tasks, which removes every inactive task after a confirmation that states how many inactive tasks the catalog currently holds. The page's task list supports text search and one Enabled, Inactive, and All status filter row, starting on Enabled; search matches the stored task name, the instruction, and the internal Session id, not a resolved Session title, and the empty state shows a decorative document-and-clock illustration above its notice and New action, with colors that follow the light or dark theme. Selecting an active or inactive task opens a second detail level with Rules and Records tabs. Every list row shows the task's stored title with its status, frequency, and next run and never the original Session name; the detail's name control shows the stored title. Rules contains the complete reminder, status, next target for active tasks, original recurrence rule, and task id. Daily rule labels show the saved local time and exact stored IANA zone, preserving nonzero seconds and milliseconds rather than substituting the browser's zone. The Linked session entry in the detail tab strip names the linked Session by its catalog title, falling back to the Session id when no title is available. When the strip cannot fit the tab list beside the labelled entry, the entry becomes an icon button with the same button style as More task actions, with the Session chat icon and a Linked session tooltip that also shows while the entry is disabled; the entry keeps focus when it switches layouts; the tab list scrolls without a visible scrollbar. It opens an available, unarchived Session after metadata loads; pending Session or Workspace metadata, an archived Session, missing Session membership, or a Workspace query error keeps it disabled with an explanation. The click rechecks availability; browsing does not unarchive the Session. Only this action requests Session activation. Deletion is available from the More task actions menu in the detail's top strip, separate from navigation. The page header keeps the title at its natural width and moves the actions to another line when the title and the actions no longer fit together. Each action label stays on one line. On a coarse pointer the list's search box and the detail's instruction and run-time fields take a 16px step — iOS Safari zooms the visual viewport for a focused field below that size — while the name control keeps its 20px step and a fine pointer keeps the compact steps. @@ -65,6 +67,8 @@ Access: the plugin registers these surfaces only while the current Peer may call
Implementation internals — click to expand +Schedule group headings, field labels and hints share an inset text column inside the detail view. + The browser entry registers the `schedules` main panel and matching sidebar entry, the `schedule-catalog` entry among the Session header's right-aligned utilities at `order: -5` immediately left of the overflow menu, the `schedule_create` transcript card at the turn level through `ctx.uiConversation.events` and ui-chat's list seat `conversation.chat.turnTail`, so it renders after the turn's closing assistant text and stays visible when the tool-call group is collapsed, the root-scoped Session-row seats `sidebar.session.row.leading` and `sidebar.session.row.hover`, and the right-Sidebar page type `@deepseek-ai/dsh-client-ui-schedule/task` under the kind `scheduleTask`. The type registers in two stages: its definition into `ctx.sidebarRightTabs`, then its body and chip into the keyed `sidebar.right.pane.tab` and `sidebar.right.pane.tab.title` seats under the definition's id. Opening a task from the Session entry calls `ctx.sidebarRight.openTab` with that entry's Session id and the chosen task id, so the detail appears in the Sidebar for the Session the entry belongs to; the Automation tasks page keeps its own list and shares the same detail component. The global page, the tab, the row mark, and the row hover section read active and inactive tasks from one `schedule.catalog` source; the header entry keeps its own per-Session `schedule.list` read, which returns only that Session's active tasks. Every surface uses the same observable query lifecycle and refreshes after `schedule/changed` or connection resets. The transcript card narrows the created task from the call's persisted result JSON rather than a Host-added field; the call's own Tool-group cell stays with ui-tool's generic keyed tool view, and the card appears only for a call that produced a complete task. The reconciliation is causal, never clock-based: a catalog snapshot carries `readRequest` (the ordinal of the newest requested read) and `readSettled` (the ordinal of the read that produced its records); the Turn tail anchors `readRequest` when it mounts and requests one read, uses its retained records only once `readSettled` exceeds that anchor, and the source coalesces the requests of one commit into a single `list()`, sharing that read only with callers that have not already observed it. Comparing the browser's clock with the Host's would not establish that order. The shared delete callback and injected `onUpdateTiming` retain the selected record's original Session binding rather than using the currently open conversation. The detail holds the shown task's local draft, the authoritative values it compares that draft against, and any pending or failed save; the owner retains the task while a save is pending or failed and after a confirmed deletion, so a catalog refresh that drops the row can neither close the surfaced failure nor close the detail that states the deletion. Save submits one `schedule.update` request carrying the complete expected `ScheduleRecord` and the staged change; `onUpdateTiming` refreshes the catalog without turning a readback failure into a mutation failure. A restored task tab carries no navigation parameters, because the Sidebar persists a tab's layout record and not what its opener passed. The page type therefore keeps its own binding from the Session and the layout record's id to the Session and id of the task that record last showed, stored under one `dsh.schedule.task-tab.v1.` localStorage key per Session with one entry per tab id and never any task content. Its body and chip read the entry only for a record without navigation parameters, remove it once a read that succeeded after the tab appeared cannot resolve it, and report no missing task on a binding's behalf. Once such a read leaves the tab without a task identity, the body names that state instead of reporting a load that never finishes. diff --git a/packages/client/ui-schedule/README.zh.md b/packages/client/ui-schedule/README.zh.md index c89225104e..6fba7507b7 100644 --- a/packages/client/ui-schedule/README.zh.md +++ b/packages/client/ui-schedule/README.zh.md @@ -25,6 +25,8 @@ kind: "package-reference" ## 使用本包 +清单空状态在页面控件下方的剩余空间内居中,矮视口仍可滚动阅读。筛选、输入框、多行任务条目和嵌套规则组分别使用对应角色的统一圆角。 + 随发行版交付的 Web 组合把 `ui-schedule` 与 Host Schedule 服务一起挂载。为模型提供当前时间的时钟上下文归 preset 所有:`standard`、`cordis` 与 `ptc` 声明它,`minimal` 既不声明它,也不声明提醒工具。侧栏的自动化任务入口打开全局页面,不选择或激活会话。页面页头的“新建”操作会打开一个新会话,提醒由模型在该会话中创建;页面本身没有创建表单。目录中存在已结束任务后,搜索行右侧的「更多任务操作」菜单提供「清除全部已结束任务」,经确认后移除全部已结束任务,确认提示说明目录当前包含多少个已结束任务。列表支持文本搜索和一行“已开启/已结束/全部”状态筛选,默认停在“已开启”;搜索匹配任务已存储的名称、指令和内部会话 id,不匹配解析出的会话标题,空状态在提示和“新建”操作上方显示装饰性的文档与时钟插画,配色跟随浅色或深色主题。选择活动或已结束任务后,进入含“规则”和“任务运行记录”页签的第二层详情。每条列表行显示任务已存储的标题及其状态、频率和下次运行,不显示原会话名称;详情中的名称输入框显示任务已存储的标题。“规则”显示完整提醒、状态、活动任务的下一目标时间、原始重复规则和任务 id。每天的规则标签显示已保存的本地时间与精确的存储 IANA 时区,保留非零秒与毫秒,而不替换为浏览器时区。详情页签条内的“关联会话”入口按会话标题显示,取不到标题时回退显示会话 id。页签条放不下页签列表和带文字的入口时,入口收为与“更多任务操作”同样式的图标按钮,使用会话对话图标,悬停提示“关联会话”,入口禁用时也会显示;切换形态时保留焦点;页签列表可滚动但不显示滚动条。元数据加载后,它可打开可用且未归档的会话;会话或 Workspace 元数据尚未就绪、会话已归档、会话不在列表中或 Workspace 查询失败时,入口保持禁用并显示原因。点击时会重新检查可用性;浏览不会取消会话归档。仅此操作请求激活会话。删除位于详情顶部条带的“更多任务操作”菜单。 页头按标题的自然宽度排布;标题和操作无法并排容纳时,将操作移到下一行。每个操作文案保持单行。粗指针设备上,列表的搜索框以及详情的指令和运行时间输入框采用 16px 字号——iOS Safari 会放大聚焦到更小字号输入框时的视觉视口——而名称输入框保留 20px、细指针设备保留紧凑字号。 @@ -65,6 +67,8 @@ kind: "package-reference"
实现内部细节 — 点击展开 +自动化详情内的分组标题、字段标签与提示共用内缩文字列。 + 浏览器入口注册 `schedules` 主面板及对应的侧栏入口、Session 页头右侧功能位中位于 `order: -5` 且紧邻更多操作菜单左侧的 `schedule-catalog` 入口、经由 `ctx.uiConversation.events` 与 ui-chat 的 list seat `conversation.chat.turnTail` 在轮次层级注册的 `schedule_create` transcript 卡片(因此它渲染在该轮收尾的 assistant 文本之后,并在工具调用组折叠时仍然可见)、root 作用域的两个 Session 行 seat `sidebar.session.row.leading` 与 `sidebar.session.row.hover`,以及 kind 为 `scheduleTask` 的右侧栏页类型 `@deepseek-ai/dsh-client-ui-schedule/task`。该类型分两阶段注册:先把其定义注册进 `ctx.sidebarRightTabs`,再按该定义的 id 把正文与 chip 注册进带键 seat `sidebar.right.pane.tab` 与 `sidebar.right.pane.tab.title`。从 Session 入口打开任务时调用 `ctx.sidebarRight.openTab`,传入该入口的 Session id 与所选任务 id,详情因此出现在该入口所属 Session 的右侧栏中;自动化任务页面保留自己的列表并共用同一个详情组件。全局页面、任务页签、行标记与行悬停区段都从同一个 `schedule.catalog` 源读取活动与已结束任务;页头入口保留自己的按 Session `schedule.list` 读取,只返回该 Session 的活动任务。每个面都使用同一套可观察的查询生命周期,并在 `schedule/changed` 或连接重置后刷新。transcript 卡片从该调用持久化的结果 JSON 收窄出创建的任务,而不是依赖 Host 追加字段;该调用自身的工具调用组单元格由 ui-tool 的通用键控视图渲染,且卡片只对产生完整任务的调用出现。该对齐是因果判定而非时钟比较:目录快照带有 `readRequest`(最新被请求的读取序号)与 `readSettled`(产出当前记录的读取序号);Turn 尾部挂载时锚定 `readRequest` 并请求一次读取,仅在 `readSettled` 大于该锚点后才用其保留记录判定,且源把一次提交内的请求合并为单次 `list()`,只把该读取共享给尚未观察到它的调用者。比较浏览器时钟与 Host 时钟无法确立这一顺序。共用的删除回调与注入的 `onUpdateTiming` 保留所选记录的原 Session 绑定,而不使用当前打开的对话。详情保留当前任务的本地草稿、用于比较的权威值以及等待中或失败的保存;保存等待中或失败期间以及删除确认后,属主保留所显示的任务,使目录刷新在丢弃该行时既不能关闭已呈现的失败,也不能关闭陈述删除的详情。保存发出一次携带完整预期 `ScheduleRecord` 和分阶段变更的 `schedule.update` 请求;`onUpdateTiming` 刷新目录,而不把回读失败变成修改失败。 刷新恢复出的任务标签没有导航参数,因为 Sidebar 只持久化标签的布局记录,不持久化打开方传入的内容。因此该页面类型自行保存从 Session 加布局记录 id 到该记录最后显示任务的 Session 和 id 的关联:每个 Session 一个 `dsh.schedule.task-tab.v1.` localStorage 键,按 tab id 一条记录,且从不保存任务内容。正文和 chip 只对没有导航参数的记录读取该条目,在标签出现之后成功的一次读取无法解析时将其删除,且不代替关联声称任务缺失。这样的一次读取无法为该标签给出任务标识时,正文陈述该状态,而不呈现永不结束的加载。 diff --git a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css index 7c4acf5a3d..57a7ce9035 100644 --- a/packages/client/ui-schedule/src/client/TaskManagerPage.module.css +++ b/packages/client/ui-schedule/src/client/TaskManagerPage.module.css @@ -38,11 +38,15 @@ clamp(24-48px) inline / 48px bottom inset, so sibling first-level pages share one content frame at every width. */ .pageContent { - max-width: 960px; + max-width: calc(960px + 2 * clamp(24px, 4vw, 48px)); margin: 0 auto; /* Inline and bottom insets only: the 28px top inset belongs to the heading row, which starts at the window's top edge. */ padding: 0 clamp(24px, 4vw, 48px) 48px; + display: flex; + flex-direction: column; + box-sizing: border-box; + min-height: 100%; } /* Page title and creation actions. */ @@ -87,14 +91,13 @@ white-space: nowrap; } -/* The Plugins toolbar's steps: New and the bulk cleanup share one 32px - capsule with a 13px label. */ +/* Header actions use the standard-control radius at their compact page height. */ .headerAction { height: 32px; font-size: 13px; line-height: 20px; padding: 0 12px; - border-radius: 16px; + border-radius: var(--dsw-radius-md); } /* The mock's `.list-tools`: the one row of filter tabs, 8px between chips and @@ -114,9 +117,7 @@ gap: 8px 12px; } -/* The mock's `.tab`: the filter chip's 28px box, 10px sides, 14px radius, and - the mock's 14px label. The selected chip takes the mock's `--hover` fill at - the chip's own weight instead of the atom's bordered capsule. */ +/* Filter chips use the compact-control radius and retain a stable footprint. */ .filterTab { display: inline-flex; flex: none; @@ -124,7 +125,7 @@ height: 28px; padding: 0 10px; border: 0; - border-radius: 14px; + border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-tertiary); font: inherit; @@ -181,7 +182,7 @@ margin: 0; padding: 0 10px; border: 0.5px solid var(--dsw-alias-border-l3); - border-radius: 12px; + border-radius: var(--dsw-radius-md); color: var(--dsw-alias-label-tertiary); transition: border-color 0.15s; } @@ -218,7 +219,7 @@ } .searchField input::placeholder { - color: var(--dsw-alias-label-caption); + color: var(--dsw-alias-label-tertiary); } .searchField input:focus-visible { @@ -249,7 +250,9 @@ /* The mock's `#rule-list`: the catalog notices and the rows share one column with no box of their own. */ .list { - display: block; + display: flex; + flex-direction: column; + flex: 1 0 auto; } /* The Plugins page's `.cards` column: 2px between rows. */ @@ -272,7 +275,7 @@ width: 100%; height: auto; padding: 8px; - border-radius: 12px; + border-radius: var(--dsw-radius-lg); text-align: left; white-space: normal; } @@ -378,7 +381,7 @@ gap: 9px; margin: 0 0 20px; padding: 12px 14px; - border-radius: 10px; + border-radius: var(--dsw-radius-lg); background: var(--dsw-specific-sidebar-fill); color: var(--dsw-alias-label-secondary); font-size: 12px; @@ -758,7 +761,7 @@ .retentionRule { margin-top: 12px; padding: 12px 14px; - border-radius: 8px; + border-radius: var(--dsw-radius-lg); background: var(--dsw-alias-bg-layer-1); } @@ -776,11 +779,9 @@ margin-top: 28px; } -/* The mock's `.automation-detail .form-section h3`: the `运行时间` heading is - 13px tertiary ink, regular weight, and the mock's 20px leading. The 6px - lead-in nudges it off the card's rounded edge, as the hint below. */ +/* Heading and hint follow the field labels: 12px inset plus the hairline. */ .ruleCard h3 { - margin: 0 0 8px 10px; + margin: 0 0 8px 12.5px; color: var(--dsw-alias-label-tertiary); font-size: 13px; line-height: 20px; @@ -792,7 +793,7 @@ flex-direction: column; padding: 0 12px; border: 0.5px solid var(--dsw-alias-border-l3); - border-radius: 16px; + border-radius: var(--dsw-radius-lg); } /* Escape-key guard around a dropdown: the wrapper takes no box of its own, so @@ -886,7 +887,7 @@ min-width: 0; min-height: 32px; padding: 0 8px; - border-radius: 18px; + border-radius: var(--dsw-radius-md); transition: background 0.15s; } @@ -932,7 +933,7 @@ width: 100%; padding: 6px 8px; border: 0.5px solid var(--dsw-alias-border-l2); - border-radius: 7px; + border-radius: var(--dsw-radius-md); outline: none; background: var(--dsw-alias-bg-base); color: var(--dsw-alias-label-primary); @@ -976,7 +977,7 @@ padding: 5px 8px; margin-right: 0; border: none; - border-radius: 18px; + border-radius: var(--dsw-radius-md); background: transparent; color: var(--dsw-alias-label-primary); font: inherit; @@ -1016,7 +1017,7 @@ justify-content: center; min-width: 72px; height: 36px; - border-radius: 18px; + border-radius: var(--dsw-radius-md); background: var(--dsw-alias-bg-module-platform); } @@ -1129,9 +1130,9 @@ color: var(--dsw-alias-label-tertiary); } -/* The 6px lead-in matches the card heading above, off the rounded edge. */ +/* Share the heading and field-label column. */ .ruleHint { - margin: 8px 0 0 10px; + margin: 8px 0 0 12.5px; color: var(--dsw-alias-label-tertiary); font-size: 13px; line-height: 1.6; @@ -1162,7 +1163,7 @@ margin: 0; padding: 12px; border: 0.5px solid var(--dsw-alias-border-l3); - border-radius: 16px; + border-radius: var(--dsw-radius-lg); outline: 0; background: var(--dsw-alias-bg-base); color: var(--dsw-alias-label-primary); @@ -1210,7 +1211,7 @@ gap: 12px; margin: 0 -8px; padding: 14px 8px; - border-radius: 8px; + border-radius: var(--dsw-radius-lg); font-size: 14px; line-height: 22px; } @@ -1419,9 +1420,8 @@ height: 28px; padding: 0 8px; border: 0; - /* The strip's icon buttons are 28px `sm` capsules (14px), so this pill keeps - the same corner. */ - border-radius: 14px; + /* Linked-session actions share the strip's compact-control geometry. */ + border-radius: var(--dsw-radius-sm); text-align: left; } @@ -1565,3 +1565,10 @@ font-size: 16px; } } + +.list > .empty { + flex: 1; + justify-content: center; + min-height: 280px; + box-sizing: border-box; +} diff --git a/packages/client/ui-schedule/tests/task-manager-page.client.spec.tsx b/packages/client/ui-schedule/tests/task-manager-page.client.spec.tsx index e185f2d136..78f076356e 100644 --- a/packages/client/ui-schedule/tests/task-manager-page.client.spec.tsx +++ b/packages/client/ui-schedule/tests/task-manager-page.client.spec.tsx @@ -3945,13 +3945,13 @@ describe('Task detail name and instruction edits', () => { expect(instruction).toMatch(/field-sizing:\s*content;/) expect(instruction).toMatch(/padding:\s*12px;/) expect(instruction).toMatch(/border:\s*0\.5px solid var\(--dsw-alias-border-l3\);/) - expect(instruction).toMatch(/border-radius:\s*16px;/) + expect(instruction).toMatch(/border-radius:\s*var\(--dsw-radius-lg\);/) // The mock inherits the instruction's 14px text and pins its own 24px leading. expect(instruction).toMatch(/font-size:\s*14px;/) expect(instruction).toMatch(/line-height:\s*24px;/) expect(stylesheet).toMatch(/\.instruction:hover\s*\{[^}]*border-color:\s*var\(--dsw-alias-border-l2\);/) expect(stylesheet).toMatch(/\.instruction:focus\s*\{[^}]*border-color:\s*var\(--dsw-alias-state-business-primary\);/) - expect(stylesheet).toMatch(/\.ruleRows\s*\{[^}]*border-radius:\s*16px;/) + expect(stylesheet).toMatch(/\.ruleRows\s*\{[^}]*border-radius:\s*var\(--dsw-radius-lg\);/) }) }) @@ -3974,7 +3974,7 @@ describe('Mock detail metrics shared with the task list', () => { expect(notice).toMatch(/gap:\s*9px;/) expect(notice).toMatch(/align-items:\s*flex-start;/) expect(notice).toMatch(/background:\s*var\(--dsw-specific-sidebar-fill\);/) - expect(notice).toMatch(/border-radius:\s*10px;/) + expect(notice).toMatch(/border-radius:\s*var\(--dsw-radius-lg\);/) expect(notice).toMatch(/margin:\s*0 0 20px;/) // The notice keeps the colour this box had before it took the mock's // surface fill; the retired deletion-failure variant leaves no rule behind. @@ -4015,7 +4015,7 @@ describe('Mock detail metrics shared with the task list', () => { // jsdom computes no layout, so the values are read from the applied // stylesheet the way the detail-metric assertions above read it. expect(rule('pageScroll')).toMatch(/overflow:\s*auto;/) - expect(rule('pageContent')).toMatch(/max-width:\s*960px;/) + expect(rule('pageContent')).toMatch(/max-width:\s*calc\(960px \+ 2 \* clamp\(24px, 4vw, 48px\)\);/) expect(rule('pageContent')).toMatch(/margin:\s*0 auto;/) // The Plugins page's own column inset, shared by both first-level pages: // inline and bottom only, because the heading row owns the top inset. @@ -4043,7 +4043,7 @@ describe('Mock detail metrics shared with the task list', () => { expect(headerAction).toMatch(/height:\s*32px;/) expect(headerAction).toMatch(/font-size:\s*13px;/) expect(headerAction).toMatch(/padding:\s*0 12px;/) - expect(headerAction).toMatch(/border-radius:\s*16px;/) + expect(headerAction).toMatch(/border-radius:\s*var\(--dsw-radius-md\);/) const headingTitle = /\.pageHeading h1\s*\{([^}]*)\}/.exec(stylesheet)?.[1] ?? '' // The first-level title step is the Plugins page's `pageTitle`, not the // mock's larger page heading; the equality case below pins that pair. @@ -4055,7 +4055,7 @@ describe('Mock detail metrics shared with the task list', () => { const tab = rule('filterTab') expect(tab).toMatch(/height:\s*28px;/) expect(tab).toMatch(/padding:\s*0 10px;/) - expect(tab).toMatch(/border-radius:\s*14px;/) + expect(tab).toMatch(/border-radius:\s*var\(--dsw-radius-sm\);/) expect(tab).toMatch(/font-size:\s*14px;/) // The selected chip keeps the chip's own weight; only the fill marks it. expect(rule('filterTabActive')).not.toMatch(/font-weight/) @@ -4069,12 +4069,12 @@ describe('Mock detail metrics shared with the task list', () => { expect(field).toMatch(/height:\s*var\(--task-search-height\);/) expect(field).toMatch(/padding:\s*0 10px;/) expect(field).toMatch(/border:\s*0\.5px solid var\(--dsw-alias-border-l3\);/) - expect(field).toMatch(/border-radius:\s*12px;/) + expect(field).toMatch(/border-radius:\s*var\(--dsw-radius-md\);/) expect(stylesheet).toMatch(/\.searchField:hover\s*\{[^}]*border-color:\s*var\(--dsw-alias-border-l2\);/) expect(stylesheet) .toMatch(/\.searchField:focus-within\s*\{[^}]*border-color:\s*var\(--dsw-alias-state-business-primary\);/) expect(stylesheet).toMatch(/\.searchField > :first-child svg\s*\{[^}]*width:\s*14px;/) - expect(stylesheet).toMatch(/\.searchField input::placeholder\s*\{[^}]*color:\s*var\(--dsw-alias-label-caption\);/) + expect(stylesheet).toMatch(/\.searchField input::placeholder\s*\{[^}]*color:\s*var\(--dsw-alias-label-tertiary\);/) expect(stylesheet).toMatch(/\.searchField input::-webkit-search-cancel-button\s*\{[^}]*display:\s*none;/) expect(rule('searchClear')).toMatch(/margin-right:\s*-6px;/) expect(rule('searchClear')).toMatch(/color:\s*var\(--dsw-alias-label-tertiary\);/) @@ -4088,7 +4088,7 @@ describe('Mock detail metrics shared with the task list', () => { expect(row).toMatch(/width:\s*100%;/) expect(row).not.toMatch(/margin:/) expect(row).toMatch(/padding:\s*8px;/) - expect(row).toMatch(/border-radius:\s*12px;/) + expect(row).toMatch(/border-radius:\s*var\(--dsw-radius-lg\);/) expect(row).not.toMatch(/border(?:-(?!radius)|:)/) expect(stylesheet) .toMatch(/\.row:hover\s*\{[^}]*background:\s*var\(--dsw-alias-interactive-bg-hover\);/) diff --git a/packages/client/ui-settings-account/README.i18n.yaml b/packages/client/ui-settings-account/README.i18n.yaml index ebcb4c7149..295786f0cf 100644 --- a/packages/client/ui-settings-account/README.i18n.yaml +++ b/packages/client/ui-settings-account/README.i18n.yaml @@ -15,11 +15,11 @@ en: c26f81e8adf0128b zh: e11ab371f51f66bc /deepseek-ai-dsh-client-ui-settings-account/use-this-package: - en: 2e63a8b01d800894 - zh: 42db1f28e2ddb2a3 + en: c32dd6d42fec101f + zh: 9a2371d06fa05c19 /deepseek-ai-dsh-client-ui-settings-account/use-this-package/desktop-onboarding: - en: 7ae4e68f9491b068 - zh: f7478269bf8d28b3 + en: f18fbc85f23c1cb4 + zh: d66c67e3c4c950ee /deepseek-ai-dsh-client-ui-settings-account/understand-the-implementation: en: 186b2046cfb5ef76 zh: 57b042a618fb612e diff --git a/packages/client/ui-settings-account/README.md b/packages/client/ui-settings-account/README.md index f16fe754b3..4bd50dad6a 100644 --- a/packages/client/ui-settings-account/README.md +++ b/packages/client/ui-settings-account/README.md @@ -28,6 +28,8 @@ A new account-model sign-in-required event displays “Model unavailable. Please ## Use this package +Settings, feedback, sign-in and logout actions use 14px shared Regular icons with 1px strokes; logout inherits the same fixed stroke weight without a separately positioned inner SVG. + Desktop and plain Web clients both mount the sidebar account launcher, Account settings, the sign-in step of model onboarding, and the account-state subscription. Desktop main opens the authorization page in the system browser. A plain Web client, identified by the absent Desktop preload bridge, sends `login_source` web with its own origin as the callback origin, preopens a tab during the sign-in click, navigates it to the authorization URL with the same `theme` parameter once its attempt receives one, and closes it on failure, expiry, or cancellation; a blocked popup leaves the copy-link route. Embedded Platform pages, Desktop onboarding, and the native device reader stay Desktop-only, so Web Platform links open new tabs. The sidebar and Account settings display circular profile images with diameters of 24px and 32px respectively. Both observe one browser image load and show the account icon while no URL is available, loading is pending, or loading failed. A rendered image failure updates the shared result, so both surfaces return to the icon and remain eligible for retry; reports from a superseded picture attempt are ignored. Each Settings entry, or return from a Settings or quota-notice top-up page, retries a failed image once even when its URL is unchanged; pending and successful loads are reused, and success updates both surfaces. A changed picture URL starts a new load; account-state replacement, sign-out, and plugin unload discard the previous picture and its callbacks. The collapsed sidebar centers the avatar in a 36 × 36 px button. Before sign-in the sidebar launcher shows a compact More row instead, leading with the ellipsis glyph and aligning its content and inset hover fill with navigation rows. Expanded buttons use border-box sizing: the signed-in row is 44px high including its 6px padding, and the signed-out More row is 32px high. The signed-in launcher retains its 24px avatar and 8px label gap and owns a 2px inline margin on its root; this inset does not move the Settings shell's adjacent status indicator horizontally. @@ -65,6 +67,8 @@ The welcome page requires Get started. The credit page always appears. A positiv Access: the account stream, quota notice, settings launcher, account settings section, and models sign-in entry exist only while the current Peer may call `account/watch`; Desktop onboarding and the platform page are not gated. Losing that access discards the account reads that grant started, closes a pending authorization tab, and clears the account view, details, picture, and sign-in dialog state; a later grant shows the account section again once its first frame arrives. The owner always has access. +The sign-in close icon’s complete box aligns with the action row’s trailing edge while retaining the larger click target. + ## Understand the implementation diff --git a/packages/client/ui-settings-account/README.zh.md b/packages/client/ui-settings-account/README.zh.md index 6599e08a22..bcdce215d4 100644 --- a/packages/client/ui-settings-account/README.zh.md +++ b/packages/client/ui-settings-account/README.zh.md @@ -28,6 +28,8 @@ kind: "package-reference" ## 使用此包 +设置、意见反馈、登录和退出登录操作使用共享的 14px Regular 图标,描边为 1px;退出登录采用相同的固定描边粗细,无需单独定位内层 SVG。 + Desktop 与普通 Web 客户端都挂载侧边栏账号菜单、账号设置、模型引导中的登录步骤,并订阅账号状态。Desktop 主进程在系统浏览器中打开授权页面。普通 Web 客户端(以缺少 Desktop preload 桥接识别)以 `login_source` web 发起登录,并以自身 origin 作为回调 origin;它在点击登录时预先打开一个标签页,本次尝试获得授权 URL 后带上相同的 `theme` 参数导航该标签页,并在失败、过期或取消时关闭它;弹窗被拦截时仍可使用复制链接。内嵌 Platform 页面、Desktop 引导和原生设备信息读取器仅在 Desktop 中提供,因此 Web 中的 Platform 链接在新标签页打开。 侧边栏和账号设置以正圆图片显示账号头像,直径分别为 24px 和 32px。两处共享一次浏览器图片加载,URL 缺失、加载中或加载失败时使用账号图标兜底。渲染图片失败时更新共享结果,两处一起恢复为图标,并保留重试机会;已被替换的图片加载尝试上报的失败会被忽略。每次进入设置,或从设置及余额不足提示打开的充值页面返回时,都会重试一次失败的图片,即使 URL 未变化;加载中和已成功的图片会复用,成功后两处一起展示。头像 URL 变化时开始新加载;账号状态替换、退出登录和插件卸载会丢弃旧头像及其回调。折叠侧边栏将头像居中放置在 36 × 36 px 的按钮内。登录前侧边栏入口改为紧凑的「更多」行,以三点图标开头,内容和内缩的悬停底色与导航行对齐。展开态按钮采用 border-box 尺寸:已登录行含 6px 内边距共高 44px,未登录的「更多」行高 32px。已登录入口保留 24px 头像及 8px 标签间距,并由自身根节点承担左右各 2px 外边距;该内缩不会水平移动设置外壳中相邻的状态指示器。 @@ -65,6 +67,8 @@ Desktop preload 标记在账号凭证已存储后启用引导。进度属于本 访问控制:账号状态流、额度提醒、设置启动器、账号设置分区与模型登录入口只在当前 Peer 可以调用 `account/watch` 时存在;桌面引导与平台页面不受此控制。失去该权限时,这一轮发出的账号读取作废,待授权的浏览器标签页关闭,账号视图、详情、头像与登录对话框状态清空;之后再次授权时,账号分区等新流的第一帧到达后才重新出现。owner 始终有权限。 +登录弹窗关闭图标的完整框与操作区尾端对齐,同时保留较大的点击热区。 + ## 理解实现 diff --git a/packages/client/ui-settings-account/src/client/AccountMenu.module.css b/packages/client/ui-settings-account/src/client/AccountMenu.module.css index a18e586f6a..66214266d6 100644 --- a/packages/client/ui-settings-account/src/client/AccountMenu.module.css +++ b/packages/client/ui-settings-account/src/client/AccountMenu.module.css @@ -28,11 +28,3 @@ font-size: 14px; line-height: 22px; } - -.signedOutMenu [role='menuitem'] > span:first-child:not(:last-child) { - width: 16px; - height: 16px; - color: var(--dsw-alias-menu-icon); -} - -.signedOutMenu [role='menuitem'] > span:first-child:not(:last-child) svg { width: 16px; height: 16px; } diff --git a/packages/client/ui-settings-account/src/client/AccountMenu.tsx b/packages/client/ui-settings-account/src/client/AccountMenu.tsx index 0b24f8cacd..e8bbae0035 100644 --- a/packages/client/ui-settings-account/src/client/AccountMenu.tsx +++ b/packages/client/ui-settings-account/src/client/AccountMenu.tsx @@ -1,7 +1,7 @@ /** Sidebar account launcher and locally authoritative sign-out action. */ import { useEffect, useRef, useState } from 'react' import { - Toast, Menu, IconEllipsisOutlineMedium, IconPaperPlaneOutlineMedium, IconSettingsOutlineMedium, IconUserOutlineMedium, + Toast, Menu, IconEllipsisOutlineMedium, IconPaperPlaneOutlineRegular, IconSettingsOutlineRegular, IconUserOutlineRegular, } from '@deepseek-ai/dsh-client-ui-primitives' import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots' import type { AccountSectionInjected } from './AccountSection.tsx' @@ -72,11 +72,11 @@ export function AccountMenu({ {wide && {signedIn ? label : t('more')}} } items={[ - { id: 'settings', label: t('settings'), icon: , + { id: 'settings', label: t('settings'), icon: , ...(settingsShortcut === undefined ? {} : { shortcut: settingsShortcut }) }, - { id: 'contact', label: t('contactUs'), icon: }, + { id: 'contact', label: t('contactUs'), icon: }, ...(signedIn ? [{ id: 'signout', label: t('signOut'), icon: , disabled: busy }] - : [{ id: 'signin', label: t('signIn'), icon: }]), + : [{ id: 'signin', label: t('signIn'), icon: }]), ]} onClose={() => { setOpen(false) }} onSelect={(id) => { diff --git a/packages/client/ui-settings-account/src/client/LogoutIcon.tsx b/packages/client/ui-settings-account/src/client/LogoutIcon.tsx index 6c3a5cb61e..4943a81157 100644 --- a/packages/client/ui-settings-account/src/client/LogoutIcon.tsx +++ b/packages/client/ui-settings-account/src/client/LogoutIcon.tsx @@ -1,10 +1,7 @@ -/** Figma IcDsLogOutOutline16 glyph, stored inline for theme-aware rendering. */ +/** Account-menu logout glyph with the shared optical size and stroke weight. */ +import { IconLogoutOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives' -/** @returns the account menu logout glyph. */ +/** @returns the decorative account-menu logout glyph. */ export function LogoutIcon() { - return + return } diff --git a/packages/client/ui-settings-account/src/client/SignInDialog.module.css b/packages/client/ui-settings-account/src/client/SignInDialog.module.css index f9e5a031c5..84089e1a26 100644 --- a/packages/client/ui-settings-account/src/client/SignInDialog.module.css +++ b/packages/client/ui-settings-account/src/client/SignInDialog.module.css @@ -1,6 +1,6 @@ .dialog { user-select: none; box-sizing: border-box; border: 0.5px solid var(--dsw-alias-border-inverted); } .content { display: flex; flex-direction: column; width: 100%; } -.header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 24px 12px; } +.header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 22px calc(24px - (28px - 14px) / 2) 12px 24px; } .title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--dsw-alias-label-primary); } .close { box-sizing: border-box; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 6px; border: 0; border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-primary); cursor: pointer; } @media (hover: hover) { diff --git a/packages/client/ui-settings-general/README.i18n.yaml b/packages/client/ui-settings-general/README.i18n.yaml index 3be104f993..015190482d 100644 --- a/packages/client/ui-settings-general/README.i18n.yaml +++ b/packages/client/ui-settings-general/README.i18n.yaml @@ -27,8 +27,8 @@ en: ba55fe92bf49dc5a zh: 9a0e1345496a0ae6 /deepseek-ai-dsh-client-ui-settings-general/understand-the-implementation: - en: 9c8c35ae0e672b14 - zh: 503c8e9d24a93d88 + en: 1ba35ad8aae06c14 + zh: 4d6ea8c306dd9eba /deepseek-ai-dsh-client-ui-settings-general/understand-the-implementation/ledger-projections: en: 3e3c2c72f87e8b23 zh: 12b10ba2d37c9077 diff --git a/packages/client/ui-settings-general/README.md b/packages/client/ui-settings-general/README.md index 3a7c6ffdee..a72e7e1da3 100644 --- a/packages/client/ui-settings-general/README.md +++ b/packages/client/ui-settings-general/README.md @@ -71,6 +71,8 @@ The shell declares settings.launcher for an account-owned sidebar menu and retai
Implementation internals — click to expand +The options scrollport exposes its trailing inset as `--dsh-settings-scroll-inset`, allowing a section-owned sticky action group to cover that inset without leaving underlying content visible. + The shell owns the chrome and the projections; it contributes the Coding Tools and Current version rows, while feature registrants own their additional content and copy. The panel's four seats — title, header, navigation, section — are its direct children and take their places from its grid, so one markup tree serves both the desktop rail and the mobile strip. ### Ledger projections diff --git a/packages/client/ui-settings-general/README.zh.md b/packages/client/ui-settings-general/README.zh.md index bc53c128df..2affc3b233 100644 --- a/packages/client/ui-settings-general/README.zh.md +++ b/packages/client/ui-settings-general/README.zh.md @@ -71,6 +71,8 @@ Web 与桌面端的通用设置底部显示当前发布版本,使用构建注
实现细节——点击展开 +选项滚动区通过 `--dsh-settings-scroll-inset` 提供末端内边距,让分区自己的固定操作组覆盖该留白,避免底层内容从下方露出。 + 外壳拥有界面框架与投影,并提供代码工作工具行与当前版本行;功能注册方拥有其余内容与文案。面板的四个座位——标题、头部、导航、分区——是它的直接子节点并按网格落位,因此同一棵标记树同时服务桌面导航栏与移动端条带。 ### 账本投影 diff --git a/packages/client/ui-settings-general/src/client/SettingsRoot.module.css b/packages/client/ui-settings-general/src/client/SettingsRoot.module.css index 87b137c082..830bf10773 100644 --- a/packages/client/ui-settings-general/src/client/SettingsRoot.module.css +++ b/packages/client/ui-settings-general/src/client/SettingsRoot.module.css @@ -242,10 +242,11 @@ /* Options area (figma Options 501:29983): pad (24,0,24,24), scrolls. */ .options { + --dsh-settings-scroll-inset: 24px; grid-area: options; min-width: 0; min-height: 0; - padding: 0 24px 24px; + padding: 0 24px var(--dsh-settings-scroll-inset); overflow-y: auto; } diff --git a/packages/client/ui-settings-models/README.i18n.yaml b/packages/client/ui-settings-models/README.i18n.yaml index 53f1ab1e77..0f41b56158 100644 --- a/packages/client/ui-settings-models/README.i18n.yaml +++ b/packages/client/ui-settings-models/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 09388d293f9be9cb /deepseek-ai-dsh-client-ui-settings-models/use-this-package: - en: db5aaf7f702e1f0c - zh: 409a78c14fb2b6e3 + en: 9a429fabe725d166 + zh: 0ba6e68958fb4c75 /deepseek-ai-dsh-client-ui-settings-models/use-this-package/api-keys: en: f4817eb2e3537ed9 zh: e589c193fa85473f @@ -30,11 +30,11 @@ en: 589397a35f82244e zh: 342fbceee2c173a2 /deepseek-ai-dsh-client-ui-settings-models/use-this-package/extension-slots: - en: 79f8f80bdaba73cd - zh: f4d7496b293fbf81 + en: db662df5625ede0b + zh: e7578f1a5894ac59 /deepseek-ai-dsh-client-ui-settings-models/understand-the-implementation: - en: a87afbec5e339b36 - zh: 6348c81af7e650e1 + en: b4adb51e0ceff8da + zh: 238873b13d0660cf /deepseek-ai-dsh-client-ui-settings-models/understand-the-implementation/validation: en: 74948a88fe1f9aac zh: 8ad2200fa74c12c9 diff --git a/packages/client/ui-settings-models/README.md b/packages/client/ui-settings-models/README.md index 0a65e5a7d2..3c8ab9220e 100644 --- a/packages/client/ui-settings-models/README.md +++ b/packages/client/ui-settings-models/README.md @@ -27,6 +27,8 @@ Desktop product events use the optional [product analytics service](../product-a ## Use this package +The section title and introduction form one group above the provider list. Expanded model fields separate adjacent field groups more than labels from their controls, and model-list actions follow the shared control-radius scale. + Saving credentials or a custom provider preserves the selected model. The user can select an available model from the composer. DeepSeek Account appears first and DeepSeek second in the provider list; third-party providers retain their directory order. @@ -81,12 +83,16 @@ The Models page includes **DeepSeek Account** (`deepseek-account`, **DeepSeek ----- +Onboarding groups its title and explanation closely, then separates credential fields and the action row with larger gaps. + ## Understand the implementation
Implementation internals — click to expand +Model identity and capacity fields share columns; narrow cards stack their fields. Each provider editor keeps its cancel and save actions together at the scrolling edge, and focused controls retain clearance from that action group. + The page never holds a full settings section: it holds only the REDACTED descriptor, so every edit lands as `settings.mutate` path ops against the stored section — a set per changed field, an unset per cleared one, and a single unset for a deleted provider row. ### Validation diff --git a/packages/client/ui-settings-models/README.zh.md b/packages/client/ui-settings-models/README.zh.md index a99154c6db..9cf5d34731 100644 --- a/packages/client/ui-settings-models/README.zh.md +++ b/packages/client/ui-settings-models/README.zh.md @@ -27,6 +27,8 @@ kind: "package-reference" ## 使用本包 +分区标题与说明在提供商列表上方组成一组。模型展开字段的组间距大于标签与控件间距,模型列表操作沿用统一的控件圆角尺度。 + 保存凭据或自定义提供方时保留已选模型。用户可在 composer 中选择可用模型。 提供方列表中 DeepSeek 账号排第一,DeepSeek 排第二;第三方提供方保留目录中的相对顺序。 @@ -81,12 +83,16 @@ Models 页面包含 **DeepSeek 账号**(`deepseek-account`,英文为 **DeepS ----- +首次配置将标题和说明紧密成组,再以较大间距分隔密钥字段和操作区。 + ## 理解实现
实现细节——点击展开 +模型标识与容量字段共用列,窄卡片中字段纵向排列。每个提供商编辑区在滚动边缘保留取消与保存操作组,聚焦控件与该操作组保持避让。 + 页面只持有脱敏后的描述符,从不持有完整设置分区:因此每次编辑都以 `settings.mutate` 路径操作落到已存分区上——每个改动字段一次 set、每个清除字段一次 unset、删除提供商行则一次 unset。 ### 校验 diff --git a/packages/client/ui-settings-models/src/client/ModelsSection.module.css b/packages/client/ui-settings-models/src/client/ModelsSection.module.css index 51995fc1ae..d91fa21144 100644 --- a/packages/client/ui-settings-models/src/client/ModelsSection.module.css +++ b/packages/client/ui-settings-models/src/client/ModelsSection.module.css @@ -6,7 +6,7 @@ .section { display: flex; flex-direction: column; - gap: 12px; + gap: 24px; max-width: 720px; color: var(--dsw-alias-label-primary); } @@ -42,12 +42,11 @@ .rows { list-style: none; - /* Extra air between the title/intro block and the first provider card. */ - margin: 12px 0 0; + margin: 0; padding: 0; display: flex; flex-direction: column; - gap: 8px; + gap: 12px; } /* Provider cards share the settings material; editors use the inset module fill. */ @@ -58,7 +57,7 @@ padding: 12px 14px; display: flex; flex-direction: column; - gap: 12px; + gap: 16px; } .rowHead { @@ -339,12 +338,30 @@ color: var(--dsw-alias-label-tertiary); } +/* The provider owns a persistent action group within its scrolling editor. */ +.editor > .editorActions { + position: sticky; + bottom: calc(-1 * var(--dsh-settings-scroll-inset, 0px)); + z-index: 2; + padding: 12px 0 calc(12px + var(--dsh-settings-scroll-inset, 0px)); + background: var(--dsw-alias-bg-module-platform); + box-shadow: 0 -1px var(--dsw-alias-border-l2); +} + +.editor :is(input, button, select) { + scroll-margin-block: 72px; +} + .editorActions { display: flex; justify-content: flex-end; gap: 8px; } +.addBlock > .editorActions { + margin-top: 12px; +} + .addBlock { display: flex; flex-direction: column; @@ -467,8 +484,8 @@ position: relative; display: flex; flex-direction: column; - gap: 10px; - padding-top: 12px; + gap: 12px; + padding-top: 16px; border-top: 0.5px solid var(--dsw-alias-border-l2); } @@ -494,9 +511,10 @@ } .modelList { + container-type: inline-size; display: flex; flex-direction: column; - gap: 8px; + gap: 12px; } .modelListHead { @@ -506,7 +524,30 @@ gap: 12px; } +@container (max-width: 400px) { + .modelRow > input { + grid-column: 2 / 4; + } + + .modelRow > button:nth-last-child(2) { + grid-column: 4; + grid-row: 1; + } + + .modelRow > button:last-child { + grid-column: 5; + grid-row: 1; + } + + .modelAdvanced > .modelField { + grid-column: 1 / -1; + } +} + .modelEntry { + display: grid; + grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, 1fr) 28px 28px; + column-gap: 6px; position: relative; border: 0.5px solid var(--dsw-alias-border-l4); border-radius: var(--dsw-radius-lg); @@ -515,7 +556,8 @@ .modelRow { display: grid; - grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto auto; + grid-column: 1 / -1; + grid-template-columns: subgrid; align-items: center; gap: 6px; } @@ -618,16 +660,17 @@ .modelAdvanced { display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 8px; - padding: 8px 4px 2px; + grid-column: 2 / 4; + grid-template-columns: subgrid; + row-gap: 16px; + padding: 16px 0 6px; } .modelField { display: flex; flex-direction: column; min-width: 0; - gap: 4px; + gap: 6px; } .modelInputTypes { @@ -640,7 +683,7 @@ .modelInputTypes legend { padding: 0; - margin-bottom: 4px; + margin-bottom: 6px; } .modelInputChoices { @@ -707,17 +750,18 @@ align-self: flex-start; display: inline-flex; align-items: center; - gap: 4px; - height: 28px; + gap: 6px; + height: 32px; padding: 0 10px; border: 0.5px solid var(--dsw-alias-border-l3); - border-radius: var(--dsw-radius-sm); + border-radius: var(--dsw-radius-md); background: transparent; color: var(--dsw-alias-label-primary); font: inherit; font-size: 12px; line-height: 18px; cursor: pointer; + margin-top: 4px; } @media (hover: hover) { @@ -753,7 +797,7 @@ select.input { } .input::placeholder { - color: var(--dsw-alias-label-dimmed); + color: var(--dsw-alias-label-tertiary); } .input:disabled { @@ -917,3 +961,15 @@ select.input { line-height: 20px; text-align: center; } + +.sectionHeader { + display: flex; + flex-direction: column; + gap: 4px; +} + +@media (pointer: coarse) { + .input { + font-size: 16px; + } +} diff --git a/packages/client/ui-settings-models/src/client/ModelsSection.tsx b/packages/client/ui-settings-models/src/client/ModelsSection.tsx index 461ab37aad..43517c183c 100644 --- a/packages/client/ui-settings-models/src/client/ModelsSection.tsx +++ b/packages/client/ui-settings-models/src/client/ModelsSection.tsx @@ -412,8 +412,10 @@ function Loaded({ injected, renderSlot }: { injected: ModelsSectionFace; renderS return (
-

{t('title')}

-

{t('intro')}

+
+

{t('title')}

+

{t('intro')}

+
{!state.writable && state.status === 'ready' ?

{t('readOnly')}

: null} {savedIdentity === undefined ? null diff --git a/packages/client/ui-settings-models/src/client/OnboardingModal.module.css b/packages/client/ui-settings-models/src/client/OnboardingModal.module.css index 5c5629567f..a230af5b76 100644 --- a/packages/client/ui-settings-models/src/client/OnboardingModal.module.css +++ b/packages/client/ui-settings-models/src/client/OnboardingModal.module.css @@ -23,7 +23,7 @@ } .body { - margin-top: 20px; + margin-top: 8px; } @media (max-width: 560px) { diff --git a/packages/client/ui-settings-models/tests/styles.client.spec.ts b/packages/client/ui-settings-models/tests/styles.client.spec.ts index ac0aeb6838..dcff990212 100644 --- a/packages/client/ui-settings-models/tests/styles.client.spec.ts +++ b/packages/client/ui-settings-models/tests/styles.client.spec.ts @@ -19,7 +19,7 @@ const css = readFileSync(fileURLToPath(new URL('../src/client/ModelsSection.modu const tokens = readdirSync(fileURLToPath(new URL('../../ui-theme/src/styles/', import.meta.url))) .filter(name => name.endsWith('.css')) .map(name => readFileSync(fileURLToPath(new URL(`../../ui-theme/src/styles/${name}`, import.meta.url)), 'utf8')) - .join('\n') + .join('\n') + readFileSync(fileURLToPath(new URL('../../ui-settings-general/src/client/SettingsRoot.module.css', import.meta.url)), 'utf8') /** The declarations of one top-level rule, by selector. */ function block(selector: string): string { diff --git a/packages/client/ui-settings-plugin-inventory/README.i18n.yaml b/packages/client/ui-settings-plugin-inventory/README.i18n.yaml index 17f73de103..184bd25ddb 100644 --- a/packages/client/ui-settings-plugin-inventory/README.i18n.yaml +++ b/packages/client/ui-settings-plugin-inventory/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 09388d293f9be9cb /deepseek-ai-dsh-client-ui-settings-plugin-inventory/use-this-package: - en: 67637808e7940157 - zh: d4d0716ea4d33e4a + en: 8a8fa761a23a79df + zh: ac6eea41b19cd3f5 /deepseek-ai-dsh-client-ui-settings-plugin-inventory/use-this-package/reading-a-card: en: 3cb7d3a63d5c0fea zh: d127dfbb58e50e4b @@ -27,8 +27,8 @@ en: 673c7574e14078be zh: b093e897f0341973 /deepseek-ai-dsh-client-ui-settings-plugin-inventory/understand-the-implementation: - en: cab883d26642c932 - zh: 54e7321bd781b400 + en: 89816853fefb4d2e + zh: 24be88ce6f4a596e /deepseek-ai-dsh-client-ui-settings-plugin-inventory/understand-the-implementation/registration: en: e4792880c5916ce0 zh: 4c8171a446dd153f diff --git a/packages/client/ui-settings-plugin-inventory/README.md b/packages/client/ui-settings-plugin-inventory/README.md index ceac087bd9..b71677dc03 100644 --- a/packages/client/ui-settings-plugin-inventory/README.md +++ b/packages/client/ui-settings-plugin-inventory/README.md @@ -25,6 +25,8 @@ The **Plugin list** tab lets Web users inspect plugins without changing their co ## Use this package +Search, session plugins, and global plugins are separate groups. Each group keeps its title and description near its cards, while repeated card rows share the same spacing. + Open the Plugins section in Settings and select the **Plugin list** tab to inspect the Host's plugin inventory. The tab reads no Remote during plugin activation — selecting it for the first time mounts the component and lazily calls `ctx.remote.pluginInventory.list()` through `api-remotes`. A failed installation with pending pnpm build permissions offers **Allow these scripts and retry**. The action displays the exact package names and persistent permission scope, then retries the original package spec and activation choice. One click approves the entire displayed group, which can include pending packages from earlier attempts. Closing the page grants no permission. @@ -55,6 +57,8 @@ The Plugin list also shows synchronization failures on the current page. Its ret
Implementation internals — click to expand +Each section heading and description form one text group beside the preset selector; the card list has a larger separating gap. + The tab is a read-only projection of a Host-owned snapshot; it performs no Remote read during plugin activation and takes the snapshot on first selection. ### Registration diff --git a/packages/client/ui-settings-plugin-inventory/README.zh.md b/packages/client/ui-settings-plugin-inventory/README.zh.md index f061018cef..e7003a10af 100644 --- a/packages/client/ui-settings-plugin-inventory/README.zh.md +++ b/packages/client/ui-settings-plugin-inventory/README.zh.md @@ -25,6 +25,8 @@ kind: "package-reference" ## 使用本包 +搜索、会话插件和全局插件分别成组。各组标题与说明靠近所属卡片,重复卡片行保持相同间距。 + 打开设置中的「插件」分区并选择**插件列表**标签页,即可查看宿主的插件清单。插件激活期间不会读取 Remote——首次选择该标签页时才挂载组件,并通过 `api-remotes` 懒调用 `ctx.remote.pluginInventory.list()`。 安装失败且存在待审批的 pnpm 构建权限时,页面提供“允许这些脚本并重试”。该操作展示准确包名和持久授权范围,再使用原来的包规格及启用选项重试。一次点击批准整个列表,其中可能包括此前安装留下的待审批包。关闭页面不会授予权限。 @@ -55,6 +57,8 @@ kind: "package-reference"
实现细节——点击展开 +各分区标题和说明组成一个文本组,与预设选择器并列;卡片列表使用更大的外部间距分隔。 + 该标签页是宿主拥有快照的只读投影;插件激活期间不执行任何 Remote 读取,首次选择时才取快照。 ### 注册 diff --git a/packages/client/ui-settings-plugin-inventory/src/client/PluginInventorySettingsTab.module.css b/packages/client/ui-settings-plugin-inventory/src/client/PluginInventorySettingsTab.module.css index db943b1066..32595ac10c 100644 --- a/packages/client/ui-settings-plugin-inventory/src/client/PluginInventorySettingsTab.module.css +++ b/packages/client/ui-settings-plugin-inventory/src/client/PluginInventorySettingsTab.module.css @@ -47,7 +47,7 @@ .catalog { display: flex; flex-direction: column; - gap: 12px; + gap: 24px; } .search { @@ -89,7 +89,7 @@ .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 10px; + gap: 12px; margin: 0; padding: 0; list-style: none; @@ -245,21 +245,28 @@ .group { display: flex; flex-direction: column; - gap: 10px; + gap: 16px; } -/* Every group header takes the preset switcher's 36px height, so each subtitle - sits the same distance below its title. */ +/* Title and description remain one group beside the independent selector. */ .groupTitleRow { display: flex; - align-items: center; - gap: 8px; - min-height: 36px; + flex-wrap: wrap; + align-items: flex-start; + gap: 16px; +} + +.groupHeading { + display: flex; + flex: 1 1 180px; + flex-direction: column; + gap: 4px; + min-width: 0; } .group + .group { border-top: 0.5px solid var(--dsw-alias-border-l2); - padding-top: 14px; + padding-top: 24px; } .headerEnd { @@ -296,7 +303,7 @@ .groupTitle { font-size: 14px; line-height: 22px; - font-weight: 400; + font-weight: 500; color: var(--dsw-alias-label-primary); } @@ -304,7 +311,7 @@ display: flex; flex-wrap: wrap; row-gap: 4px; - margin: -6px 0 0 20px; + margin: 0 0 0 20px; color: var(--dsw-alias-label-tertiary); font-size: 12px; line-height: 18px; @@ -510,3 +517,9 @@ font-size: 16px; } } + +@media (pointer: coarse) { + .search input { + font-size: 16px; + } +} diff --git a/packages/client/ui-settings-plugin-inventory/src/client/PluginInventorySettingsTab.tsx b/packages/client/ui-settings-plugin-inventory/src/client/PluginInventorySettingsTab.tsx index 8138b0d397..063ad29778 100644 --- a/packages/client/ui-settings-plugin-inventory/src/client/PluginInventorySettingsTab.tsx +++ b/packages/client/ui-settings-plugin-inventory/src/client/PluginInventorySettingsTab.tsx @@ -478,16 +478,19 @@ export function PluginInventorySettingsTab( {selected !== undefined ? (
- +
+ +

{t('presetSubtitle')}

+
-

{t('presetSubtitle')}

{presetEffectiveOpen ? (
{selected.broken !== undefined ? ( @@ -550,18 +552,20 @@ export function PluginInventorySettingsTab( {entries.length > 0 ? (
- +
+ +

{t('globalSubtitle')}

+
-

{t('globalSubtitle')}

{globalEffectiveOpen && globalCount > 0 ? (
    {filteredFailed.map(entry => globalRowCard(entry))} diff --git a/packages/client/ui-settings-plugins/README.i18n.yaml b/packages/client/ui-settings-plugins/README.i18n.yaml index a783ce1ee9..ce716e7532 100644 --- a/packages/client/ui-settings-plugins/README.i18n.yaml +++ b/packages/client/ui-settings-plugins/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 09388d293f9be9cb /deepseek-ai-dsh-client-ui-settings-plugins/use-this-package: - en: b4deec821244f970 - zh: 49b3afedc992b7fe + en: 707c56b36501dab4 + zh: ec8f9a2b36e73af8 /deepseek-ai-dsh-client-ui-settings-plugins/understand-the-implementation: en: c5cfef002b32c7c1 zh: 0249b45a28c16b61 diff --git a/packages/client/ui-settings-plugins/README.md b/packages/client/ui-settings-plugins/README.md index ac0d69210f..389951420b 100644 --- a/packages/client/ui-settings-plugins/README.md +++ b/packages/client/ui-settings-plugins/README.md @@ -25,6 +25,8 @@ Use the **Built-in plugins** settings section to inspect the plugins this deploy ## Use this package +The section title and introduction form one header group; the plugin inventory is a separate neighboring group. + Open **Built-in plugins** in Settings. [ui-settings-plugin-inventory](../ui-settings-plugin-inventory/README.md) contributes the inventory as the section's one tab, shown as the page itself; a second registered tab turns the row into tabs. A deployment whose composition contributes no tab shows the section's empty line. To contribute a tab, register into `settings.plugins.tab` with an `id`, an `order`, and a localized `label`; the section renders the entries in order and mounts a tab on its first selection. Feature copy stays in the registering plugin's dictionary. diff --git a/packages/client/ui-settings-plugins/README.zh.md b/packages/client/ui-settings-plugins/README.zh.md index 44a16ec015..c5db6e38a0 100644 --- a/packages/client/ui-settings-plugins/README.zh.md +++ b/packages/client/ui-settings-plugins/README.zh.md @@ -25,6 +25,8 @@ kind: "package-reference" ## 使用本包 +分区标题与说明组成一个标题组,插件清单是与之相邻的独立分组。 + 在设置里打开**内置插件**。[ui-settings-plugin-inventory](../ui-settings-plugin-inventory/README.zh.md) 把清单作为分区唯一的标签页贡献进来,直接显示为页面本身;注册第二个标签页后这一行就变成标签行。组合里没有任何标签页贡献的部署会显示分区的空提示。 要贡献一个标签页,带 `id`、`order` 和本地化的 `label` 注册进 `settings.plugins.tab`;分区按序渲染条目,标签页在首次被选中时挂载。功能文案留在注册方自己的字典里。 diff --git a/packages/client/ui-settings-plugins/src/client/PluginsSettingsSection.module.css b/packages/client/ui-settings-plugins/src/client/PluginsSettingsSection.module.css index 5a524b709b..b87526ce33 100644 --- a/packages/client/ui-settings-plugins/src/client/PluginsSettingsSection.module.css +++ b/packages/client/ui-settings-plugins/src/client/PluginsSettingsSection.module.css @@ -3,21 +3,23 @@ .section { display: flex; flex-direction: column; - gap: 12px; + gap: 24px; max-width: 760px; color: var(--dsw-alias-label-primary); } .heading { margin: 0; - font-size: 18px; - font-weight: 600; + font-size: 16px; + font-weight: 500; + line-height: 24px; } .intro { margin: 0; - font-size: 13px; + font-size: 14px; color: var(--dsw-alias-label-tertiary); + line-height: 22px; } .tabs { @@ -71,7 +73,7 @@ .panel { min-width: 0; - padding-top: 2px; + padding-top: 0; } .cards { @@ -111,3 +113,9 @@ line-height: 22px; font-weight: 600; } + +.sectionHeader { + display: flex; + flex-direction: column; + gap: 4px; +} diff --git a/packages/client/ui-settings-plugins/src/client/PluginsSettingsSection.tsx b/packages/client/ui-settings-plugins/src/client/PluginsSettingsSection.tsx index 1c8148c654..0ee8bc5c9d 100644 --- a/packages/client/ui-settings-plugins/src/client/PluginsSettingsSection.tsx +++ b/packages/client/ui-settings-plugins/src/client/PluginsSettingsSection.tsx @@ -52,8 +52,10 @@ export function PluginsSettingsSection({ t, renderSlot, useTabs }: PluginsSettin return (
    -

    {t('title')}

    -

    {t('intro')}

    +
    +

    {t('title')}

    +

    {t('intro')}

    +
    {rows.length === 0 ?

    {t('empty')}

    : single !== undefined ? (
    {renderSlot('settings.plugins.tab', {}, { only: single.id })}
    ) : ( diff --git a/packages/client/ui-shortcuts/README.i18n.yaml b/packages/client/ui-shortcuts/README.i18n.yaml index 48f267d1ad..22f5e9ef91 100644 --- a/packages/client/ui-shortcuts/README.i18n.yaml +++ b/packages/client/ui-shortcuts/README.i18n.yaml @@ -15,11 +15,11 @@ en: d152484eb41ac6b4 zh: 0cd57b7b8d8c9b59 /deepseek-ai-dsh-client-ui-shortcuts/use-this-package: - en: 84a109505e902f0a - zh: 87053c34cf4da672 + en: bbb365ff236edf02 + zh: b2e3bdff99e4d663 /deepseek-ai-dsh-client-ui-shortcuts/understand-the-implementation: - en: f56f2610e7258825 - zh: 249d7cdd55c57166 + en: 4f04c5262cc25a0d + zh: 86016074dd8d71c5 /deepseek-ai-dsh-client-ui-shortcuts/further-exploration: en: 8fe02ef5221e434d zh: 3aabfcfeb6d49a0e diff --git a/packages/client/ui-shortcuts/README.md b/packages/client/ui-shortcuts/README.md index d6bf0cf06b..d11a2dc521 100644 --- a/packages/client/ui-shortcuts/README.md +++ b/packages/client/ui-shortcuts/README.md @@ -25,6 +25,8 @@ Browse the commands available in the current window and find them by action, Eng ## Use this package +Shortcut save feedback reuses the shared 16px Regular warning and circled-check glyphs. + The Web app bundle mounts this package together with `shortcuts`. The reference shows only registered commands and existing fixed input actions. Desktop shows the effective device keys; commands without a Web default show No shortcut. The Settings entry and Mod+/ open the same single dialog, titled “Keyboard shortcuts” in English and “快捷键” in Chinese. Its 480×600 CSS-pixel card shrinks to fit smaller windows; the header and search remain above an internally scrolling list. The search field receives focus on open without changing its border color. Automatic entry and return focus in the reference, recorder, and reset confirmation omit outlines, including returns after Escape and application close shortcuts. Containers remain outline-free, and Tab and directional navigation retain their visible focus indicators. The Settings entry follows Coding Tools and is labeled “Edit shortcuts”, with an “Open from anywhere” shortcut tooltip, and uses a filled button with the same standard radius as adjacent settings controls and no dropdown icon and reads the same effective binding for its tooltip and `aria-keyshortcuts`; both are absent without a binding. `Mod+/` opens the reference when no modal is open or Settings is in front, and closes it when the reference is in front. While the reference is in front, the Settings command cannot open or close Settings. Held-key repeats are ignored. Recording, pending writes, and a nested confirmation prevent the reference shortcut from closing the dialog. @@ -43,6 +45,8 @@ Hover an application row to highlight its rounded surface and reveal the edit ic
    Implementation internals — click to expand +The search icon and empty query hint use the same foreground role; entered text keeps the primary text color. + The General Settings entry and shell overlay share one declared interaction store. Catalog and configuration updates arrive through injected observable hooks; recording and persistence use injected service callbacks. The shared modal primitive owns top-layer Escape, Tab traversal, and restoration to the invoking control. All fixed actions come from the service's observable fixed catalog. Conversation and approval plugins contribute their own actions; this integration contributes shared menu actions. Rows follow locale updates and disappear when their registration is disposed. diff --git a/packages/client/ui-shortcuts/README.zh.md b/packages/client/ui-shortcuts/README.zh.md index a8f61d7466..c473ba6d68 100644 --- a/packages/client/ui-shortcuts/README.zh.md +++ b/packages/client/ui-shortcuts/README.zh.md @@ -25,6 +25,8 @@ kind: "package-reference" ## 使用此包 +快捷键保存反馈复用共享的 16px Regular 警告与圆环勾选图标。 + Web 应用 bundle 将此包与 `shortcuts` 一同挂载。速查仅展示已注册命令和现有固定输入操作。桌面端展示设备对应的有效键位;没有 Web 默认键位的命令显示“暂无快捷键”。设置入口与 Mod+/打开同一个单实例弹窗,中文标题为“快捷键”,英文标题为“Keyboard shortcuts”。卡片尺寸为 480×600 CSS 像素,小窗口中缩小以保持可见;标题和搜索框位于内部滚动列表上方。打开时聚焦搜索框,边框颜色保持不变。速查窗、录键框及重置确认框内的自动进入和回焦均不绘制外轮廓线,包括通过 Esc 和应用关闭快捷键触发的回焦。容器仍不绘制焦点外框,Tab 和方向键导航保留可见焦点提示。设置入口位于代码工作工具之后,标为“编辑快捷键”,快捷键提示文案为“全局唤起查看”,使用与相邻设置控件一致的标准圆角填充按钮,不带下拉图标,并从同一有效绑定读取提示及 `aria-keyshortcuts`;没有绑定时不显示提示,也不设置该属性。 没有模态弹窗或设置位于最前方时,`Mod+/` 打开速查;速查位于最前方时,该快捷键关闭速查。速查位于前方时,设置命令不能打开或关闭设置。长按产生的重复按键不执行操作。录键期间、写入尚未完成或嵌套确认框打开时,速查快捷键不会关闭弹窗。 @@ -43,6 +45,8 @@ Web 应用 bundle 将此包与 `shortcuts` 一同挂载。速查仅展示已注
    实现细节——点击展开 +搜索图标与空查询提示使用同一前景色角色,已输入文字保留主要文字色。 + 通用设置入口与 shell 弹层共享一个已声明的交互 store。目录与配置通过注入的 observable hook 更新;录键和持久化使用注入的服务回调。共用模态组件负责顶层 Esc、Tab 导航和关闭后恢复触发控件焦点。 所有固定操作均来自服务的可观察固定目录。Conversation 和审批插件贡献各自的操作;本集成贡献共用菜单操作。行内容跟随语言更新,并在其注册被释放时移除。 diff --git a/packages/client/ui-shortcuts/src/client/Icons.tsx b/packages/client/ui-shortcuts/src/client/Icons.tsx index 03dfcf7220..5bb1afa9c6 100644 --- a/packages/client/ui-shortcuts/src/client/Icons.tsx +++ b/packages/client/ui-shortcuts/src/client/Icons.tsx @@ -1,8 +1,8 @@ /** Supplied shortcut-control and feedback artwork, colored by the owning UI. */ +import { IconCheckCircleOutlineRegular, IconWarningOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives' + const artwork = { edit: <>, - error: <>, - success: <>, } /** @@ -10,7 +10,9 @@ const artwork = { * @param props - glyph kind and semantic color class. * @returns an ornamental SVG hidden from assistive technology. */ -export function ShortcutIcon({ kind, className }: { kind: keyof typeof artwork; className?: string | undefined }) { - const size = kind === 'edit' ? 12 : 16 +export function ShortcutIcon({ kind, className }: { kind: 'edit' | 'error' | 'success'; className?: string | undefined }) { + if (kind === 'error') return + if (kind === 'success') return + const size = 12 return } diff --git a/packages/client/ui-shortcuts/src/client/Reference.module.css b/packages/client/ui-shortcuts/src/client/Reference.module.css index 09d2e2a0ed..58a5d8cc69 100644 --- a/packages/client/ui-shortcuts/src/client/Reference.module.css +++ b/packages/client/ui-shortcuts/src/client/Reference.module.css @@ -115,7 +115,7 @@ border-radius: 12px; background: var(--dsw-alias-markdown-code-block); } -.searchIcon { flex: none; color: var(--dsw-alias-label-caption); } +.searchIcon { flex: none; color: var(--dsw-alias-label-tertiary); } .search { width: 100%; min-width: 0; diff --git a/packages/client/ui-sidebar-documentpreview/README.i18n.yaml b/packages/client/ui-sidebar-documentpreview/README.i18n.yaml index 7c04fe5269..37ecadcb9b 100644 --- a/packages/client/ui-sidebar-documentpreview/README.i18n.yaml +++ b/packages/client/ui-sidebar-documentpreview/README.i18n.yaml @@ -27,8 +27,8 @@ en: 595499992ceea693 zh: 83c6147c46a80dca /deepseek-ai-dsh-client-ui-sidebar-documentpreview/office-preview: - en: 372d8ce6492e6896 - zh: 912f613bc9221aa3 + en: 26c75ee8ebfea482 + zh: 94953fc5b2e3d21d /deepseek-ai-dsh-client-ui-sidebar-documentpreview/navigation: en: 59256644b39e412d zh: 8ab908393b018431 diff --git a/packages/client/ui-sidebar-documentpreview/README.md b/packages/client/ui-sidebar-documentpreview/README.md index 1e7649dd61..4e81c1a918 100644 --- a/packages/client/ui-sidebar-documentpreview/README.md +++ b/packages/client/ui-sidebar-documentpreview/README.md @@ -114,6 +114,8 @@ A yellow rounded-triangle warning appears before Reload in the document toolbar
    Office implementation — click to expand +The external-open control aligns its complete frame with the upper toolbar’s icon boxes, excluding extra hit padding and preserving whitespace within the glyphs. + Office registration, loading, caching, and font notices live in `src/client/office/`. The injected Office face writes converted PDF bytes, font metadata, and failures through the declared store actions. The Office body triggers loading, binds cancellation to its lifecycle, and declares a nested PDF slot that reuses the lazy PDF body and its tab viewing state. The keyed `sidebar.right.tab.document.action` slot places renderer controls before Reload. The Office action shares the body’s store and reads only the current revision’s font metadata. Registration remains available without the Host renderer; optional `remote.officeToPdf` and `remote.workspaceFiles` injections supply conversion and freshness callbacks, and their removal restores unavailable guidance. Registrations and tab retention follow effect lifetimes. The [conversion service](../../document/office-to-pdf/README.md) owns the Host Remote methods, mounted by `api/remotes`. The Office Remote returns converted PDFs as native `Uint8Array` values through Connection's multipart binary transport. Renderers borrow retained bytes read-only and copy them before Worker transfer. diff --git a/packages/client/ui-sidebar-documentpreview/README.zh.md b/packages/client/ui-sidebar-documentpreview/README.zh.md index 022f396ea4..86ed509cf6 100644 --- a/packages/client/ui-sidebar-documentpreview/README.zh.md +++ b/packages/client/ui-sidebar-documentpreview/README.zh.md @@ -114,6 +114,8 @@ CSV 和 TSV 默认使用表格查看器,也可选择纯文本;CSV 还提供
    Office 实现——点击展开 +外部打开控件以完整边框对应上排工具栏的图标框,不把额外热区计入共同边缘,并保留 glyph 内部留白。 + Office 注册、加载、缓存和字体提示位于 `src/client/office/`。注入的 Office face 通过已声明的 store action 写入转换后的 PDF 字节、字体元数据和失败。Office 正文触发加载,将取消绑定到自身生命周期,并声明嵌套 PDF slot,复用惰性 PDF 正文及其 tab 阅读状态。keyed slot `sidebar.right.tab.document.action` 将渲染器操作放在刷新按钮前。Office 操作与正文共享 store,仅读取当前 revision 的字体元数据。Host 渲染器缺失时,注册仍然可用;可选的 `remote.officeToPdf` 和 `remote.workspaceFiles` 注入提供转换与版本检查回调,移除后恢复不可用提示。注册和 tab 状态保留都遵循 effect 生命周期。[转换服务](../../document/office-to-pdf/README.zh.md)拥有 Host Remote 方法,由 `api/remotes` 挂载。 Office Remote 通过 Connection 的 multipart 二进制传输返回原生 `Uint8Array` PDF。渲染器以只读方式借用保留的字节,并在传给 Worker 前复制。 diff --git a/packages/client/ui-sidebar-documentpreview/src/client/TextPreview.module.css b/packages/client/ui-sidebar-documentpreview/src/client/TextPreview.module.css index 72b808750c..53f1173cb4 100644 --- a/packages/client/ui-sidebar-documentpreview/src/client/TextPreview.module.css +++ b/packages/client/ui-sidebar-documentpreview/src/client/TextPreview.module.css @@ -28,6 +28,17 @@ border-bottom: 0.5px solid var(--dsw-alias-border-l3); } +/* Match the trailing icon box above, retaining its internal glyph whitespace. */ +.externalActions { + display: flex; + flex: none; + margin-inline-end: 6px; +} + +.externalActions:empty { + display: none; +} + .path { margin-right: 12px; } diff --git a/packages/client/ui-sidebar-documentpreview/src/client/TextPreview.tsx b/packages/client/ui-sidebar-documentpreview/src/client/TextPreview.tsx index ecb0f6cb13..ea002b0c6b 100644 --- a/packages/client/ui-sidebar-documentpreview/src/client/TextPreview.tsx +++ b/packages/client/ui-sidebar-documentpreview/src/client/TextPreview.tsx @@ -203,7 +203,11 @@ export function TextPreview({
    - {fileOwner !== undefined && renderSlot('sidebar.right.tab.document.actions', fileOwner)} + {fileOwner !== undefined && ( +
    + {renderSlot('sidebar.right.tab.document.actions', fileOwner)} +
    + )}
    @@ -330,7 +334,11 @@ export function TextPreview({ {/* jscpd:ignore-end */} - {fileOwner !== undefined && renderSlot('sidebar.right.tab.document.actions', fileOwner)} + {fileOwner !== undefined && ( +
    + {renderSlot('sidebar.right.tab.document.actions', fileOwner)} +
    + )}
    Working context for maintainers — click to expand +Each nested icon box starts on the parent label column; indentation includes the parent icon box and its text gap, retaining the icon’s internal whitespace. + None. The page refresh shortcut refreshes the focused file tree through its ordinary directory reader. The reload control displays the effective binding on hover and keyboard focus. diff --git a/packages/client/ui-sidebar-files/README.zh.md b/packages/client/ui-sidebar-files/README.zh.md index ec092a362d..23e75b7ecb 100644 --- a/packages/client/ui-sidebar-files/README.zh.md +++ b/packages/client/ui-sidebar-files/README.zh.md @@ -70,6 +70,8 @@ kind: "package-reference"
    维护者工作上下文——点击展开 +每层子级图标框承接父级文字列;缩进包含父级图标框及图文间距,并保留图标内部留白。 + 无。 页面刷新快捷键通过常规目录读取器刷新聚焦的文件树。重新读取控件在悬停和键盘聚焦时显示有效绑定。 diff --git a/packages/client/ui-sidebar-files/src/client/FilesBody.module.css b/packages/client/ui-sidebar-files/src/client/FilesBody.module.css index ef7717fb9f..5775d2c655 100644 --- a/packages/client/ui-sidebar-files/src/client/FilesBody.module.css +++ b/packages/client/ui-sidebar-files/src/client/FilesBody.module.css @@ -57,9 +57,9 @@ list-style: none; } -/* Every nested level indents by one step; the root level sits under the header. */ +/* A child icon box starts on its parent text column: 16px icon plus 6px gap. */ .level .level { - padding-left: 18px; + padding-left: calc(16px + 6px); } .item { diff --git a/packages/client/ui-sidebar-terminal/README.i18n.yaml b/packages/client/ui-sidebar-terminal/README.i18n.yaml index 8f5ca888d3..8175028b99 100644 --- a/packages/client/ui-sidebar-terminal/README.i18n.yaml +++ b/packages/client/ui-sidebar-terminal/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 1fa9a72d1ee045cc /deepseek-ai-dsh-client-ui-sidebar-terminal/use-this-package: - en: b47107dfb3d55936 - zh: d08eaca75da03456 + en: b9bc5ae972e2359c + zh: 80c6dc3f91b75ade /deepseek-ai-dsh-client-ui-sidebar-terminal/understand-the-implementation: en: 005b5496578870d3 zh: 9883a41eef2a18a5 diff --git a/packages/client/ui-sidebar-terminal/README.md b/packages/client/ui-sidebar-terminal/README.md index 052388c2b3..2a3dffaa05 100644 --- a/packages/client/ui-sidebar-terminal/README.md +++ b/packages/client/ui-sidebar-terminal/README.md @@ -25,6 +25,8 @@ Choose an installed shell from the right sidebar's Start page to run commands in ## Use this package +Terminal tab titles reuse the shared 16px Regular terminal prompt glyph. + The `terminal.new` command creates a separate terminal in the focused dock pane, replacing a guide and retaining existing content pages. From the conversation or a floating content page, it uses the active dock pane. The guide card right-aligns the current effective shortcut as unboxed text without a duplicate tooltip. Windows and macOS Web use the [shortcut service’s platform defaults](../shortcuts/README.md); Linux Web leaves the command unbound by default. Open the right sidebar and click **New terminal** to open the remembered available shell immediately. The separate arrow beside the title opens the installed-shell menu; selecting an item remembers it and opens that shell directly. Discovery runs when the menu opens and does not allocate a terminal. A failed lookup offers Retry in the menu. Use **New tab** to return to the guide and open another terminal. diff --git a/packages/client/ui-sidebar-terminal/README.zh.md b/packages/client/ui-sidebar-terminal/README.zh.md index d3aad2400d..c6c80c2e9c 100644 --- a/packages/client/ui-sidebar-terminal/README.zh.md +++ b/packages/client/ui-sidebar-terminal/README.zh.md @@ -25,6 +25,8 @@ kind: "package-reference" ## 使用此包 +终端页签标题复用共享的 16px Regular 终端提示符图标。 + 命令 `terminal.new` 在焦点停靠分栏创建独立终端,替换开始页并保留已有内容页。从聊天区或浮动内容页触发时,使用活动停靠分栏。开始页卡片右侧对齐显示当前有效快捷键的无背景文字,不额外弹出重复提示。Windows 和 macOS Web 使用[快捷键服务的平台默认值](../shortcuts/README.zh.md);Linux Web 默认不绑定此命令。 展开右侧栏,点击**新建终端**即可直接打开上次选择且仍可用的 shell。标题旁的独立箭头展开已安装 shell 菜单;选择后立即记住该项并打开终端。菜单展开时才查询 shell,不分配终端进程;查询失败可在菜单内重试。通过**新标签页**回到开始页并打开更多终端。 diff --git a/packages/client/ui-sidebar-terminal/src/client/TerminalIcon.tsx b/packages/client/ui-sidebar-terminal/src/client/TerminalIcon.tsx index a875c26837..eaacf74d11 100644 --- a/packages/client/ui-sidebar-terminal/src/client/TerminalIcon.tsx +++ b/packages/client/ui-sidebar-terminal/src/client/TerminalIcon.tsx @@ -1,13 +1,11 @@ /** Terminal glyph for sidebar tab titles. */ import type { ReactNode } from 'react' +import { IconApiOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives' /** - * Render the tab title's terminal prompt in the surrounding text color. + * Render the shared terminal prompt in the surrounding text color. * @returns a decorative sixteen-pixel line glyph. */ export function TerminalIcon(): ReactNode { - return + return } diff --git a/packages/client/ui-theme/README.i18n.yaml b/packages/client/ui-theme/README.i18n.yaml index 2290e7fe26..9b6fd198bc 100644 --- a/packages/client/ui-theme/README.i18n.yaml +++ b/packages/client/ui-theme/README.i18n.yaml @@ -30,8 +30,8 @@ en: 203523ddd7927c34 zh: 31dd89da78f9ab4f /deepseek-ai-dsh-client-ui-theme/understand-the-implementation: - en: 3eb9b0e3365b2db3 - zh: c73acc55dd897266 + en: de2e61c0e342c637 + zh: b1bf19c75153f3d9 /deepseek-ai-dsh-client-ui-theme/understand-the-implementation/stylesheets: en: 925119bd420325b4 zh: 384ef1f890b059da diff --git a/packages/client/ui-theme/README.md b/packages/client/ui-theme/README.md index c0c2916068..b4e20ee667 100644 --- a/packages/client/ui-theme/README.md +++ b/packages/client/ui-theme/README.md @@ -57,6 +57,8 @@ Shared menus use `--dsw-menu-surface-fill` and blur through `MenuSurface`; platf
    Implementation internals — click to expand +Font-size controls reserve the same disclosure column for every role, so expanded code and terminal values align with the text value. + The service owns theme, font-size, and font-family state and publishes snapshots. The ui-layout presenter applies those snapshots, and the token sheets own the color and conversation text scales. ### Stylesheets diff --git a/packages/client/ui-theme/README.zh.md b/packages/client/ui-theme/README.zh.md index 0b63fb239f..5dcd6a3eb6 100644 --- a/packages/client/ui-theme/README.zh.md +++ b/packages/client/ui-theme/README.zh.md @@ -57,6 +57,8 @@ Desktop 的固定快捷键 `Cmd`/`Ctrl` + `+`(或 `=`)和 `Cmd`/`Ctrl` + `-`
    实现细节——点击展开 +各字体字号控件预留相同的展开操作列,使展开后的代码、终端数值与正文字号对齐。 + 服务拥有主题、字号与字体状态并发布快照。ui-layout 展示转换器应用这些快照,token 样式表则拥有颜色与会话文本尺度。 ### 样式表 diff --git a/packages/client/ui-theme/src/client/FontSizeRow.module.css b/packages/client/ui-theme/src/client/FontSizeRow.module.css index e5a26d5472..f51ad6e54b 100644 --- a/packages/client/ui-theme/src/client/FontSizeRow.module.css +++ b/packages/client/ui-theme/src/client/FontSizeRow.module.css @@ -52,7 +52,8 @@ /* Standard-size stepper with an always-visible arrow column and an external unit label. */ .control { - display: inline-flex; + display: inline-grid; + grid-template-columns: 72px max-content 24px; align-items: center; gap: 8px; } diff --git a/packages/client/ui-theme/tests/expected/radius-exceptions.expected.json b/packages/client/ui-theme/tests/expected/radius-exceptions.expected.json index aee0023246..edcfaa7f14 100644 --- a/packages/client/ui-theme/tests/expected/radius-exceptions.expected.json +++ b/packages/client/ui-theme/tests/expected/radius-exceptions.expected.json @@ -28,22 +28,6 @@ "ui-schedule/src/client/ScheduleCreateCard.module.css": [ ".leading: border-radius: 10px" ], - "ui-schedule/src/client/TaskManagerPage.module.css": [ - ".headerAction: border-radius: 16px", - ".filterTab: border-radius: 14px", - ".searchField: border-radius: 12px", - ".row: border-radius: 12px", - ".notice: border-radius: 10px", - ".retentionRule: border-radius: 8px", - ".ruleRows: border-radius: 16px", - ".ruleValueFace: border-radius: 18px", - ".zoneSearch: border-radius: 7px", - ".ruleInput: border-radius: 18px", - ".ruleIntervalStepper: border-radius: 18px", - ".instruction: border-radius: 16px", - ".delivery: border-radius: 8px", - ".linkedSession: border-radius: 14px" - ], "ui-settings-account/src/client/AccountNotice.module.css": [ ".card: border-radius: 16px" ], diff --git a/packages/client/ui-tool/README.i18n.yaml b/packages/client/ui-tool/README.i18n.yaml index 5e2e05cf28..f87e6e3bff 100644 --- a/packages/client/ui-tool/README.i18n.yaml +++ b/packages/client/ui-tool/README.i18n.yaml @@ -24,8 +24,8 @@ en: 3643ffbb8cf80e4c zh: b49654dc3b94b2be /deepseek-ai-dsh-client-ui-tool/understand-the-implementation: - en: 00bc7b0c84edc603 - zh: 1cfcf5b435248a91 + en: e5529d3c0f8e0c08 + zh: 2356087b23f6ea1a /deepseek-ai-dsh-client-ui-tool/understand-the-implementation/rendering-contract: en: 672e63b2f92e689b zh: ba950ecb480325a6 diff --git a/packages/client/ui-tool/README.md b/packages/client/ui-tool/README.md index 3854a5a92a..ea2d349fb5 100644 --- a/packages/client/ui-tool/README.md +++ b/packages/client/ui-tool/README.md @@ -65,6 +65,8 @@ Answer-panel buttons belong to the question renderer. It composes `DisclosureRow
    Implementation internals — click to expand +The generic and Bash fallback IN/OUT cards share a label column across sections, preserving independent input and output scrolling. + The package realizes one dispatch rule: atomic Tool views are keyed by wire Tool name and registered by their owning business packages; this package only renders the tree and the fallback. ### Rendering contract diff --git a/packages/client/ui-tool/README.zh.md b/packages/client/ui-tool/README.zh.md index 822caa6bee..7614587724 100644 --- a/packages/client/ui-tool/README.zh.md +++ b/packages/client/ui-tool/README.zh.md @@ -65,6 +65,8 @@ owner 载荷为 `ToolCallOwnerProps`:`callId`、`toolName`、`phase` 判别字
    实现细节——点击展开 +通用与 Bash 回退的 IN/OUT 卡片跨分区共用标签列,并保留输入、输出各自独立的滚动。 + 本包实现一条分派规则:原子工具视图按 wire 工具名称键控、由所属业务包注册;本包只渲染树与回退。 ### 渲染约定 diff --git a/packages/client/ui-tool/src/client/tool/components/ToolRow.module.css b/packages/client/ui-tool/src/client/tool/components/ToolRow.module.css index e7f99f96c4..d42249c84b 100644 --- a/packages/client/ui-tool/src/client/tool/components/ToolRow.module.css +++ b/packages/client/ui-tool/src/client/tool/components/ToolRow.module.css @@ -198,8 +198,8 @@ column — the padding and the IN/OUT gutter-label grid live on each section so the divider spans the full card width and each section scrolls alone. */ .ioCard { - display: flex; - flex-direction: column; + display: grid; + grid-template-columns: max-content minmax(0, 1fr); margin: 4px 0 4px 4px; border: 0.5px solid var(--dsw-alias-border-l1); border-radius: var(--dsw-radius-lg); @@ -211,7 +211,8 @@ independently so a long input never buries a short output (and vice versa). */ .ioSection { display: grid; - grid-template-columns: max-content 1fr; + grid-column: 1 / -1; + grid-template-columns: subgrid; column-gap: 14px; align-items: baseline; padding: 12px 16px; @@ -248,7 +249,7 @@ /* l2 hairline between the IN and OUT sections, spanning the full card width (it sits between the padded sections, not inside their grid). */ .ioDivider { - flex: none; + grid-column: 1 / -1; height: 0.5px; background: var(--dsw-alias-border-l2); } diff --git a/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css b/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css index 6f521dc8b3..0cd6b41301 100644 --- a/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css +++ b/packages/client/ui-tool/src/client/tool/toolviews/bash-sample.module.css @@ -25,8 +25,8 @@ example, command cancellation). Preserve ToolRow's bounded IN/OUT fallback so the original command and full error remain available from this keyed row. */ .ioCard { - display: flex; - flex-direction: column; + display: grid; + grid-template-columns: max-content minmax(0, 1fr); margin: 4px 0 4px 4px; border: 0.5px solid var(--dsw-alias-border-l1); border-radius: var(--dsw-radius-lg); @@ -36,7 +36,8 @@ .ioSection { display: grid; - grid-template-columns: max-content 1fr; + grid-column: 1 / -1; + grid-template-columns: subgrid; column-gap: 14px; align-items: baseline; padding: 12px 16px; @@ -62,7 +63,7 @@ } .ioDivider { - flex: none; + grid-column: 1 / -1; height: 0.5px; background: var(--dsw-alias-border-l2); } diff --git a/packages/client/ui-user-questions/README.i18n.yaml b/packages/client/ui-user-questions/README.i18n.yaml index 4177fb0a50..91bf52eb99 100644 --- a/packages/client/ui-user-questions/README.i18n.yaml +++ b/packages/client/ui-user-questions/README.i18n.yaml @@ -27,8 +27,8 @@ en: 6b12f1362c614a39 zh: 27d9cf54d4cbd5d2 /deepseek-ai-dsh-client-ui-user-questions/use-this-package/failure-and-recovery: - en: d4f1dee7e7ff1d15 - zh: 6fb56ad50ca6851c + en: adc9bd449c99faf0 + zh: 9a84e33659780a0c /deepseek-ai-dsh-client-ui-user-questions/understand-the-implementation: en: 77e1b2585acdf67b zh: d433ec185c6b8f57 diff --git a/packages/client/ui-user-questions/README.md b/packages/client/ui-user-questions/README.md index 5effc083a8..e04e43883d 100644 --- a/packages/client/ui-user-questions/README.md +++ b/packages/client/ui-user-questions/README.md @@ -61,6 +61,8 @@ The settled bubble is fully visible and has no disclosure control. Question and ----- +The question card’s trailing header icon box and footer action surface share the content edge. Pager icons use that same content inset on the leading side; larger click targets extend beyond the icon boxes. + ## Understand the implementation diff --git a/packages/client/ui-user-questions/README.zh.md b/packages/client/ui-user-questions/README.zh.md index ad9149c648..efe7f394cf 100644 --- a/packages/client/ui-user-questions/README.zh.md +++ b/packages/client/ui-user-questions/README.zh.md @@ -61,6 +61,8 @@ Web 客户端在聊天输入框旁显示 agent(智能体)的提问。用户 ----- +提问卡片顶部尾端图标框与页尾操作按钮底板共用内容边缘;分页图标在前导侧使用相同内容缩进,较大的点击热区延伸至图标框之外。 + ## 理解实现 diff --git a/packages/client/ui-user-questions/src/client/QuestionComposer.module.css b/packages/client/ui-user-questions/src/client/QuestionComposer.module.css index 5c530aef72..9f4f6b467f 100644 --- a/packages/client/ui-user-questions/src/client/QuestionComposer.module.css +++ b/packages/client/ui-user-questions/src/client/QuestionComposer.module.css @@ -82,7 +82,7 @@ justify-content: space-between; gap: 16px; flex-shrink: 0; - padding: 20px 16px 0 24px; + padding: 20px calc(24px - (24px - 16px) / 2) 0 24px; } .headingBlock { @@ -588,7 +588,7 @@ gap: 12px; flex-shrink: 0; margin-top: 12px; - padding: 0 10px 0 18px; + padding: 0 24px 0 calc(24px - (24px - 14px) / 2); } .feedback { diff --git a/packages/client/ui-workflow-run/README.i18n.yaml b/packages/client/ui-workflow-run/README.i18n.yaml index fe1307e874..f85f4f2111 100644 --- a/packages/client/ui-workflow-run/README.i18n.yaml +++ b/packages/client/ui-workflow-run/README.i18n.yaml @@ -24,8 +24,8 @@ en: de2dbff7df2294ed zh: 97a03787caf02e2b /deepseek-ai-dsh-client-ui-workflow-run/understand-the-implementation: - en: d41b996f3fb6727b - zh: 6b40fdf1db894fff + en: c9eefa2ad7c96ebb + zh: 2992366d72f9659d /deepseek-ai-dsh-client-ui-workflow-run/understand-the-implementation/disclosure-choices: en: adf86d983c51865e zh: 014a4644d55be111 diff --git a/packages/client/ui-workflow-run/README.md b/packages/client/ui-workflow-run/README.md index 9b72a88818..e7c6143d2e 100644 --- a/packages/client/ui-workflow-run/README.md +++ b/packages/client/ui-workflow-run/README.md @@ -43,6 +43,8 @@ Completion updates the visible status immediately but delays its automatic close
    Implementation internals — click to expand +Nested phase and member slots continue the parent text column; the indent follows the leading slot and text gap at each font size, including narrow layouts. + The node is a deterministic replay of durable session events: `tool-workflow/run-start` creates one Context keyed by `runId`, and member starts, member endings, and the run ending update that Context in log order. A history tail containing only updates remains pending until an older page supplies the unique start, after which prepend, complete replay, and live append produce the same state. ### Disclosure choices diff --git a/packages/client/ui-workflow-run/README.zh.md b/packages/client/ui-workflow-run/README.zh.md index 1172d1df7e..131dd5d941 100644 --- a/packages/client/ui-workflow-run/README.zh.md +++ b/packages/client/ui-workflow-run/README.zh.md @@ -43,6 +43,8 @@ kind: "package-reference"
    实现细节——点击展开 +嵌套阶段和成员的前导槽承接父级文字列;缩进随前导槽及图文间距变化,窄布局也保留该关系。 + 节点是持久化会话事件的确定性回放:`tool-workflow/run-start` 以 `runId` 创建唯一上下文,成员开始、成员结束与运行结束事件按日志顺序更新该上下文。只有 update 的历史尾页会保持 pending,直到更早页面补入唯一 start;此后 prepend、完整回放与实时 append 得到相同状态。 ### 展开选择 diff --git a/packages/client/ui-workflow-run/src/client/WorkflowRunPanel.module.css b/packages/client/ui-workflow-run/src/client/WorkflowRunPanel.module.css index a259df8fc8..452d71928b 100644 --- a/packages/client/ui-workflow-run/src/client/WorkflowRunPanel.module.css +++ b/packages/client/ui-workflow-run/src/client/WorkflowRunPanel.module.css @@ -1,4 +1,6 @@ .root { + --workflow-leading: calc(16px + var(--dsh-content-font-delta, 0px)); + --workflow-indent: calc(var(--workflow-leading) + 6px); width: 100%; min-width: 0; } @@ -147,7 +149,7 @@ flex-direction: column; gap: 4px; min-width: 0; - padding: 4px 0 0 16px; + padding: 4px 0 0 calc(8px + var(--workflow-indent)); } .phase { @@ -159,7 +161,7 @@ flex-direction: column; gap: 2px; min-width: 0; - padding: 0 0 0 16px; + padding: 0 0 0 var(--workflow-indent); } .memberRow, @@ -264,13 +266,6 @@ padding: 0; } -@media (max-width: 560px) { - .phaseList, - .members { - padding-left: 12px; - } -} - .headerContent { flex: 1; } diff --git a/packages/experimental/client-ui-agent-team/README.i18n.yaml b/packages/experimental/client-ui-agent-team/README.i18n.yaml index 643f2124cc..b525c4e5d9 100644 --- a/packages/experimental/client-ui-agent-team/README.i18n.yaml +++ b/packages/experimental/client-ui-agent-team/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 09388d293f9be9cb /deepseek-ai-dsh-experimental-client-ui-agent-team/use-this-package: - en: ba021754d3ae6d9e - zh: 18017b40f13e6ffd + en: e40c37ea4a49fea6 + zh: af9590069ac9dee9 /deepseek-ai-dsh-experimental-client-ui-agent-team/use-this-package/inspect-and-navigate-the-roster: en: 62778e911a4ee9e9 zh: dff1dbbc3d5e4af6 diff --git a/packages/experimental/client-ui-agent-team/README.md b/packages/experimental/client-ui-agent-team/README.md index 718aa773eb..849dd5585e 100644 --- a/packages/experimental/client-ui-agent-team/README.md +++ b/packages/experimental/client-ui-agent-team/README.md @@ -25,6 +25,8 @@ This package adds an Agent Teams action to the Web conversation header, where a ## Use this package +The complete team panel separates members from shared tasks more than adjacent cards within either section. Section headings align with the card edges, and the panel fill follows the outer panel corners. + Enable this package through [`@deepseek-ai/dsh-experimental-agent-team-profile`](../agent-team-profile/README.md), which supplies the Team service, tools, and Web UI together. The Web Client loader mounts the `/client` export; the root Host export is inert, and the package has no user configuration fields. ### Inspect and navigate the roster diff --git a/packages/experimental/client-ui-agent-team/README.zh.md b/packages/experimental/client-ui-agent-team/README.zh.md index d912200054..c19ed8a3a4 100644 --- a/packages/experimental/client-ui-agent-team/README.zh.md +++ b/packages/experimental/client-ui-agent-team/README.zh.md @@ -25,6 +25,8 @@ kind: "package-reference" ## 使用本包 +整个团队面板中,成员与共享任务之间的距离大于各区内部的相邻卡片间距。分区标题与卡片边缘对齐,面板底色沿用外框圆角。 + 通过 [`@deepseek-ai/dsh-experimental-agent-team-profile`](../agent-team-profile/README.zh.md) 启用本包。这个组合包同时提供团队服务、工具与 Web 界面。Web Client loader 挂载 `/client` export;root Host export 不执行行为,本包也没有用户配置字段。 ### 检查并导航 roster diff --git a/packages/experimental/client-ui-agent-team/src/client/TeamAction.module.css b/packages/experimental/client-ui-agent-team/src/client/TeamAction.module.css index 7ee1a34ef2..a8bb35df8a 100644 --- a/packages/experimental/client-ui-agent-team/src/client/TeamAction.module.css +++ b/packages/experimental/client-ui-agent-team/src/client/TeamAction.module.css @@ -5,11 +5,11 @@ .trigger { display: inline-flex; align-items: center; - gap: 5px; + gap: 6px; min-height: 28px; padding: 3px 7px; border: 0; - border-radius: 6px; + border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-tertiary); font-size: 12px; @@ -61,7 +61,7 @@ padding: 8px 2px 0; overflow: hidden; border: 0; - border-radius: 12px; + border-radius: var(--dsw-radius-panel); --dsw-elevation-stroke-color: var(--dsw-alias-border-l1); box-shadow: var(--dsw-elevation-prominent); } @@ -75,7 +75,7 @@ position: absolute; z-index: -1; inset: 0; - border-radius: 12px; + border-radius: inherit; background: var(--dsw-specific-menu); backdrop-filter: var(--dsw-menu-backdrop-filter); } @@ -115,7 +115,7 @@ display: flex; align-items: center; gap: 8px; - margin: 16px 0 8px 4px; + margin: 32px 0 8px; color: var(--dsw-alias-label-primary); font-size: 13px; font-weight: 500; @@ -138,11 +138,11 @@ align-items: flex-start; gap: 8px; min-width: 0; - padding: 10px 12px; + padding: 12px; border: 0; --dsw-elevation-stroke-color: var(--dsw-alias-border-l2); box-shadow: var(--dsw-elevation-stroke); - border-radius: 8px; + border-radius: var(--dsw-radius-lg); background: var(--dsw-alias-bg-layer-2); color: var(--dsw-alias-label-primary); text-align: left; @@ -251,21 +251,21 @@ .tasks { display: flex; flex-direction: column; - gap: 7px; + gap: 12px; } /* Empty task board: a plain description in place of the section heading, flush with the body's bottom padding. */ .emptyNotice { - margin: 16px 0 0 4px; + margin: 24px 0 0; color: var(--dsw-alias-label-tertiary); font-size: 12px; } .task { - padding: 11px 13px; + padding: 12px; border: 0.5px solid var(--dsw-alias-border-l2); - border-radius: 9px; + border-radius: var(--dsw-radius-lg); background: var(--dsw-alias-bg-layer-2); } @@ -279,7 +279,7 @@ } .task p { - margin: 5px 0; + margin: 8px 0; color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 18px; diff --git a/packages/experimental/client-ui-voice-input/README.i18n.yaml b/packages/experimental/client-ui-voice-input/README.i18n.yaml index 6aa37a6ef0..069ecadf75 100644 --- a/packages/experimental/client-ui-voice-input/README.i18n.yaml +++ b/packages/experimental/client-ui-voice-input/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 364c80ee00a374ff /deepseek-ai-dsh-experimental-client-ui-voice-input/use-this-package: - en: b7a99b656839e8a0 - zh: 5c6e2635eb20fc11 + en: f0338485205c082d + zh: b6f0fbc04f245c1d /deepseek-ai-dsh-experimental-client-ui-voice-input/understand-the-implementation: en: 8fe96eeef9afe7d7 zh: 11936f647ded39eb diff --git a/packages/experimental/client-ui-voice-input/README.md b/packages/experimental/client-ui-voice-input/README.md index 2aa4fdd707..d56764cced 100644 --- a/packages/experimental/client-ui-voice-input/README.md +++ b/packages/experimental/client-ui-voice-input/README.md @@ -35,6 +35,8 @@ Before downloading or retrying, **Model download source** offers Automatic and t ----- +Activation prompts use the shared modal description, so the heading and explanatory text form one group above the actions. + ## Understand the implementation diff --git a/packages/experimental/client-ui-voice-input/README.zh.md b/packages/experimental/client-ui-voice-input/README.zh.md index 3dadc0d92d..e76c1f7958 100644 --- a/packages/experimental/client-ui-voice-input/README.zh.md +++ b/packages/experimental/client-ui-voice-input/README.zh.md @@ -35,6 +35,8 @@ kind: "package-reference" ----- +启用提示使用共享弹窗的说明区域,使标题与解释文字在操作区上方组成一组。 + ## 理解实现 diff --git a/packages/experimental/client-ui-voice-input/src/client/VoiceSetupDialog.tsx b/packages/experimental/client-ui-voice-input/src/client/VoiceSetupDialog.tsx index b85e80a442..26bfc8b373 100644 --- a/packages/experimental/client-ui-voice-input/src/client/VoiceSetupDialog.tsx +++ b/packages/experimental/client-ui-voice-input/src/client/VoiceSetupDialog.tsx @@ -21,12 +21,11 @@ type VoiceSetupDialogProps = PropsLocale export function VoiceSetupDialog({ open, needsInstallation, onDismiss, onOpenDetails, t }: VoiceSetupDialogProps) { return {onOpenDetails !== undefined && } - }> -

    {t(needsInstallation ? 'setupPrompt.body' : 'setupPrompt.unavailableBody')}

    -
    + } /> }