From 28c57a001e328a07a6326af705c18ac245a2ade0 Mon Sep 17 00:00:00 2001 From: kingwl Date: Sun, 4 Oct 2026 21:41:34 +0800 Subject: [PATCH 1/7] fix(web): align composer corner with send button --- packages/client/ui-conversation/README.i18n.yaml | 4 ++-- packages/client/ui-conversation/README.md | 2 ++ packages/client/ui-conversation/README.zh.md | 2 ++ .../src/client/skeleton/InputBar.module.css | 14 +++++++++----- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/client/ui-conversation/README.i18n.yaml b/packages/client/ui-conversation/README.i18n.yaml index 444a85d6bd..6949a521ed 100644 --- a/packages/client/ui-conversation/README.i18n.yaml +++ b/packages/client/ui-conversation/README.i18n.yaml @@ -18,8 +18,8 @@ en: 1d2a3a7f98c2cc9b zh: f895dd5e9f91e0a9 /deepseek-ai-dsh-client-ui-conversation/shell-and-standard-props: - en: 8fddd7e838da57d8 - zh: 98748142be2e61d4 + en: 2cd14507e7c68483 + zh: 2484605b53d421de /deepseek-ai-dsh-client-ui-conversation/temporary-composer-entries: en: bb1244310f5c0382 zh: 824b84077432b559 diff --git a/packages/client/ui-conversation/README.md b/packages/client/ui-conversation/README.md index b557262cf4..d445dea05c 100644 --- a/packages/client/ui-conversation/README.md +++ b/packages/client/ui-conversation/README.md @@ -56,6 +56,8 @@ The shared image slot props keep display choices separate from durable reference The composer measures its expanded control groups after size, content, visibility, or font-loading changes. If they cannot share a line, the row sets `--dsh-composer-model-text-display: none` and `--dsh-composer-model-icon-display: block` for the model seat; their defaults are `block` and `none`. Wrapping remains available if even the icon cannot fit. +The composer card uses circular corners with a radius equal to half the primary button diameter plus its equal right and bottom inset. The workspace-picker outline inherits the same radius and curve. + The context-occupancy button shows a ring and percentage below the input card, after the Session statistics. Clicking it opens the token breakdown in a panel kept inside the viewport, including when no statistics are shown; the button stays hidden until context usage and capacity are available. With Coding Tools off, the shell hides only Trajectory; other plugin-contributed Views remain available. The View tab bar is hidden when fewer than two Views are available. Turning Coding Tools off while Trajectory is active returns to Chat; stored View preferences and recorded Session data remain intact. Turning it on makes Trajectory available again. View owners receive the available roster so their navigation actions can follow the same visibility. diff --git a/packages/client/ui-conversation/README.zh.md b/packages/client/ui-conversation/README.zh.md index a441b15f7d..690aa03fa1 100644 --- a/packages/client/ui-conversation/README.zh.md +++ b/packages/client/ui-conversation/README.zh.md @@ -56,6 +56,8 @@ target package 通过 declaration merge 扩展 snapshot 与 Location data map, 控件组的尺寸、内容、可见性或字体加载状态变化后,composer 测量展开状态下的控件组。若无法排在同一行,控制栏为模型位设置 `--dsh-composer-model-text-display: none` 和 `--dsh-composer-model-icon-display: block`;两者默认值分别为 `block` 和 `none`。若连图标也放不下,仍允许换行。 +输入卡片使用圆弧圆角,半径等于主按钮直径的一半加上按钮到右侧和底部的相等间距。工作区选择状态的轮廓继承相同的半径与曲线。 + 上下文占用按钮在输入卡片下方、会话统计右侧显示圆环和百分比。点击按钮可在视口内的面板查看 token 构成,没有统计项时面板也不会越界;上下文用量和容量尚不可用时,按钮保持隐藏。 关闭代码工作工具时,外壳仅隐藏 Trajectory;其他插件贡献的 View 仍然可用。可用 View 少于两个时隐藏 View 标签栏。在 Trajectory 激活时关闭代码工作工具会返回 Chat;已保存的 View 偏好和 Session 记录保持不变。开启后,Trajectory 恢复可用。View 所有者接收可用列表,使导航操作跟随相同的可见性。 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 4676f4cd7d..3b0ba53ee7 100644 --- a/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css @@ -43,6 +43,8 @@ } .card { + --dsh-composer-primary-size: 34px; + --dsh-composer-control-inset: 8px; box-sizing: border-box; position: relative; /* overlay anchor positioning context */ display: flex; @@ -58,7 +60,8 @@ soft elevation tier. Fill: the input surface token (elevated in dark). */ border: 0; --dsw-elevation-stroke-color: var(--dsw-alias-border-l2); - border-radius: var(--dsw-radius-panel); + border-radius: calc(var(--dsh-composer-primary-size) / 2 + var(--dsh-composer-control-inset)); + corner-shape: round; background: var(--dsw-specific-input-major); box-shadow: var(--dsw-elevation-soft); /* The draft text follows the Settings font-size preference (the textarea, @@ -90,7 +93,8 @@ inset: 0; box-sizing: border-box; border: 1px dashed currentColor; - border-radius: var(--dsw-radius-panel); + border-radius: inherit; + corner-shape: inherit; color: var(--dsw-alias-border-l4); transition: color 100ms ease; pointer-events: none; @@ -257,7 +261,7 @@ /* 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: 2px var(--dsh-composer-control-inset) calc(var(--dsh-composer-control-inset) - 2px); 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 @@ -373,8 +377,8 @@ display: grid; place-items: center; flex: none; - width: 34px; - height: 34px; + width: var(--dsh-composer-primary-size); + height: var(--dsh-composer-primary-size); border: none; border-radius: 999px; corner-shape: round; From 169e0c3881869a2f6d302208e80f3fad07dcc44c Mon Sep 17 00:00:00 2001 From: kingwl Date: Sun, 4 Oct 2026 22:52:19 +0800 Subject: [PATCH 2/7] fix(web): reconcile composer geometry with radius standard --- docs/ui-radius.i18n.yaml | 12 ++++++------ docs/ui-radius.md | 6 ++++-- docs/ui-radius.zh.md | 6 ++++-- docs/web-styling.i18n.yaml | 4 ++-- docs/web-styling.md | 2 +- docs/web-styling.zh.md | 2 +- packages/client/ui-conversation/README.i18n.yaml | 4 ++-- packages/client/ui-conversation/README.md | 2 +- packages/client/ui-conversation/README.zh.md | 2 +- .../src/client/skeleton/InputBar.module.css | 15 +++++++-------- .../client/ui-theme/src/styles/corner-shape.css | 9 +++++---- 11 files changed, 34 insertions(+), 30 deletions(-) diff --git a/docs/ui-radius.i18n.yaml b/docs/ui-radius.i18n.yaml index a5015aa946..823adc9b94 100644 --- a/docs/ui-radius.i18n.yaml +++ b/docs/ui-radius.i18n.yaml @@ -15,14 +15,14 @@ en: cd8120cba5566e19 zh: 65359436088c8bc5 /dsh-unified-corner-radius-standard/select-the-radius: - en: 06ddd6bf9ef1e48c - zh: 4c42d0c9266a00e8 + en: 3aa8142ca22f8747 + zh: c979d1aad2cac1cf /dsh-unified-corner-radius-standard/reuse-tokens-and-preserve-deliberate-shapes: - en: fb6d50f3139ad186 - zh: 668cb0c02bd22167 + en: 57074166ec5a6149 + zh: 3065680007c3a436 /dsh-unified-corner-radius-standard/nested-geometry-and-hover: - en: 3920921700d8ad1c - zh: fc99da8a5e905a27 + en: 52196376c6fb71cc + zh: 6bca8db1174ad469 /dsh-unified-corner-radius-standard/settings-card-materials: en: 85e7e63183df06d1 zh: 1da2b44083d7ebe2 diff --git a/docs/ui-radius.md b/docs/ui-radius.md index d6d28568ca..9fe6b72b9e 100644 --- a/docs/ui-radius.md +++ b/docs/ui-radius.md @@ -34,7 +34,7 @@ H means designed outer height in CSS pixels, including borders. R means CSS `bor | Standard control or single-line cell | H32–40; buttons, inputs, selects, navigation rows | R12 | `--dsw-radius-md` | | Large control or grouped content | Large buttons, deliberately multiline cells, nested form groups | R16 | `--dsw-radius-lg` | | Independent content card | Settings cards, message bubbles, guide entry cards | R20 | `--dsw-radius-xl` | -| Main enclosing surface | Composer, dialogs, main or floating panels | R28 | `--dsw-radius-panel` | +| Main enclosing surface | Dialogs, main or floating panels | R28 | `--dsw-radius-panel` | Prefer an existing shared size variant when a proposed control falls between these bands. A taller card remains a card: do not promote it to R28 merely because it exceeds a button's height. A multiline cell intentionally designed for multiple lines uses R16; an ordinary button whose label wraps retains its button variant. @@ -49,7 +49,7 @@ Reuse `ui-primitives` controls before adding feature-owned geometry. Use `box-si Consume the named tokens instead of introducing local values such as 10px, 14px, 18px, or 24px for ordinary controls and cards. Schedule controls, Desktop onboarding, account notices, and shortcut controls retain their package-owned geometry; the [radius exception record](../packages/client/ui-theme/tests/expected/radius-exceptions.expected.json) pins each permitted file, selector, and declaration rather than exempting whole packages. A family-specific property may refer to a shared token, as `--dsl-guide-entry-radius` does. Geometry derived from a real inset may use `calc()`; it is not an additional scale tier. -Ordinary rounded surfaces use the theme's `superellipse(1.5)` curve where supported. `corner-shape` is not inherited: the theme applies it to elements and their `::before`/`::after`. Unsupported engines retain ordinary circular corners. Do not introduce component-specific smoothing that makes a fill and its outline curve differently. +Ordinary rounded surfaces use the theme's `superellipse(1.5)` curve where supported; the composer follows the circular [concentric-inset rule](#nested-hover). `corner-shape` is not inherited: the theme applies it to elements and their `::before`/`::after`. Unsupported engines retain ordinary circular corners. Do not introduce component-specific smoothing that makes a fill and its outline curve differently. Preserve intentional circles and capsules: avatars and status dots use `50%`; explicit pills and full-round tracks may use `999px`. Pair every such full-round declaration with `corner-shape: round` in the same rule. Do not turn every button into a capsule just because its height is small. Tiny drawing details, such as glyph marks or miniature tracks, may retain their established local geometry; they do not justify arbitrary radii on surrounding controls. @@ -68,6 +68,8 @@ Distinguish these three arrangements before changing a child radius: | Fill flush against an enclosing edge | The enclosure owns the visible corner; clip the fill or inherit the matching corner | A split-button card with two independent hover regions | | Separate card or form group inside another surface | Choose the child's semantic tier; do not subtract all parent padding mechanically | R16 editor within an R20 settings card | +The composer uses circular arcs at all four corners, with outer R = primary-button diameter / 2 + its equal right and bottom inset. A 34px button and 8px inset give R25. The lower-right arc and button share a center, keeping the horizontal, vertical, and diagonal gaps equal. The workspace-picker outline inherits the card's radius and curve. + Standard menus use outer R16, 4px padding, and R12 items. Compact menus use outer R12, 4px padding, and R8 items. Shared `SegmentedControl` uses outer R12, 4px inset, and R8 segments/indicator; `SegmentedTabs` uses outer R16, 4px inset, and R12 segments/indicator. Keep indicator offsets, width calculations, submenu alignment, and pointer bridges consistent when changing padding. A single clickable surface paints hover on itself. A flush pseudo-element or overlay uses the same radius and curve as the visible enclosure. Avoid a separately rounded fill that leaves a crescent between the background and the border. diff --git a/docs/ui-radius.zh.md b/docs/ui-radius.zh.md index 657684ebc7..eefc36722a 100644 --- a/docs/ui-radius.zh.md +++ b/docs/ui-radius.zh.md @@ -34,7 +34,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 | 标准控件或单行 cell | H32–40;按钮、输入框、选择器、导航行 | R12 | `--dsw-radius-md` | | 大控件或分组内容 | 大按钮、明确设计为多行的 cell、嵌套表单组 | R16 | `--dsw-radius-lg` | | 独立内容卡片 | 设置卡片、消息气泡、引导入口卡片 | R20 | `--dsw-radius-xl` | -| 主容器 | 对话输入框、对话框、主面板或悬浮面板 | R28 | `--dsw-radius-panel` | +| 主容器 | 对话框、主面板或悬浮面板 | R28 | `--dsw-radius-panel` | 拟定控件尺寸落在档位之间时,优先复用已有的公共尺寸变体。高卡片仍是卡片,不因高度超过按钮就升到 R28。专门设计为多行的 cell 使用 R16;普通按钮的文字发生换行时,仍保留其按钮变体。 @@ -49,7 +49,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 普通控件和卡片使用具名 token,不新增 10px、14px、18px、24px 等局部数值。计划任务控件、Desktop 引导、账号通知和快捷键控件保留所属包的几何规则;[圆角例外记录](../packages/client/ui-theme/tests/expected/radius-exceptions.expected.json)逐项固定允许的文件、选择器及声明,不豁免整个包。组件族专用属性可引用共享 token,例如 `--dsl-guide-entry-radius`。由真实内缩距离派生的几何可使用 `calc()`;它不构成新的尺度档位。 -普通圆角表面在支持时使用主题的 `superellipse(1.5)` 曲线。`corner-shape` 不会继承:主题将它应用于元素及其 `::before`/`::after`。不支持的引擎保留普通圆弧。不要添加组件专用的平滑规则,导致底色与外框使用不同曲线。 +普通圆角表面在支持时使用主题的 `superellipse(1.5)` 曲线;对话输入框遵循圆弧的[同心内缩规则](#nested-hover)。`corner-shape` 不会继承:主题将它应用于元素及其 `::before`/`::after`。不支持的引擎保留普通圆弧。不要添加组件专用的平滑规则,导致底色与外框使用不同曲线。 保留有意设计的圆形与胶囊:头像和状态点使用 `50%`;明确的胶囊与全圆轨道可使用 `999px`。每个此类全圆声明都在同一规则中配对 `corner-shape: round`。不要因为高度较小就把所有按钮变成胶囊。图形标记或微型轨道等细小绘制细节可保留既有局部几何,但不能据此给外围控件使用任意圆角。 @@ -68,6 +68,8 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 | 底色紧贴容器边缘 | 由外框决定可见圆角;裁切底色或继承相应圆角 | 两个独立 hover 区域组成的分体按钮卡片 | | 容器内独立的卡片或表单组 | 按子元素用途选择档位;不机械减去全部父级内边距 | R20 设置卡片内的 R16 编辑器 | +对话输入框四角均使用圆弧,外层 R = 主按钮直径 / 2 + 按钮到右侧和底部的相等内缩距离。34px 按钮与 8px 内缩距离对应 R25。右下角圆弧与按钮同心,使水平、垂直和对角线间隙相等。工作区选择状态的轮廓继承卡片的半径与曲线。 + 标准菜单使用外层 R16、4px 内边距、R12 菜单项。紧凑菜单使用外层 R12、4px 内边距、R8 菜单项。公共 `SegmentedControl` 使用外层 R12、4px 内缩、R8 分段和指示器;`SegmentedTabs` 使用外层 R16、4px 内缩、R12 分段和指示器。修改内边距时,同步保持指示器偏移、宽度计算、子菜单对齐与指针桥接区域一致。 单个可点击表面在自身绘制 hover。贴边的伪元素或覆盖层使用与可见外框相同的圆角和曲线。避免单独给底色设置圆角,导致背景与边框之间出现月牙状空隙。 diff --git a/docs/web-styling.i18n.yaml b/docs/web-styling.i18n.yaml index 26a4c7ade1..0ab7b06830 100644 --- a/docs/web-styling.i18n.yaml +++ b/docs/web-styling.i18n.yaml @@ -9,8 +9,8 @@ en: dc8c41fbf9869179 zh: e45976a585cb9c86 /web-ui-style-reference/component-rules: - en: 3a35065f2be9de06 - zh: 41291bba391fb515 + en: 17ccf65aec7f97b5 + zh: f2592e85e617b959 /web-ui-style-reference/corner-radii-and-settings-cards: en: 118972f6c2bd6ce4 zh: 85f8416b03e4dd8b diff --git a/docs/web-styling.md b/docs/web-styling.md index 564801d476..9190ff74b2 100644 --- a/docs/web-styling.md +++ b/docs/web-styling.md @@ -21,7 +21,7 @@ Global style sheets belong in `ui-theme/src/styles/`. Component styles live besi - Keep source text, terminal output, and diff lines unwrapped when their component contract requires column preservation; use the shared scrollbar styles rather than component-specific scrollbar selectors. - Put presentation in CSS. Inline React styles may pass component-local custom-property values but must not encode theme branches. - Preserve keyboard focus visibility and reduced-motion behavior when adding transitions or hover-only controls. -- Rounded corners inherit the global superellipse smoothing from ui-theme's `corner-shape.css` on supporting engines. Pair `corner-shape: round` with every full-round `border-radius` (`50%`, `100%`, or a pill radius) so circles and capsules keep circular arcs; the ui-theme corner-shape spec enforces the pairing. +- Rounded corners default to the global superellipse smoothing from ui-theme's `corner-shape.css` on supporting engines. Follow the [corner-radius standard](ui-radius.md#shapes) for circular shapes and component-specific curves; the ui-theme corner-shape spec enforces the full-round pairing. - Elevated surfaces (menus, popovers, modals, panels, floating buttons, the composer) set `border: 0` and take `box-shadow: var(--dsw-elevation-panel)`, `var(--dsw-elevation-prominent)`, or the composer's `var(--dsw-elevation-soft)` (larger blur at lower alpha): the 0.5px hairline stroke is the first shadow layer, and `--dsw-elevation-stroke-color` rebinds or suppresses it per surface or state. Never pair a `--dsw-alias-border-*` border with an lv/elevation shadow — the ui-theme elevation spec rejects the pairing; state-colored borders (warn panels) stay real borders. - Existing and new dropdown, context, submenu, and selection menus use `Menu` or wrap custom content in `MenuSurface`. The material is the theme-owned `--dsw-menu-surface-fill` plus `--dsw-menu-backdrop-filter`; feature and platform CSS must not override either. The ui-theme menu spec rejects unwrapped menu/listbox renderers, material overrides, and token redefinitions. The schedule-owned `TaskMenu` and `ClockPicker` retain their existing containers and material as explicit exceptions ([owner](../packages/client/ui-schedule/README.md)). - Modal backdrops, including settings and confirmation dialogs, retain their translucent dark mask without blur. The theme sets `--dsw-mask-blur` to `none`; Desktop-owned modal overlays also leave the parent page unfiltered. diff --git a/docs/web-styling.zh.md b/docs/web-styling.zh.md index e75def975c..6e351b81f7 100644 --- a/docs/web-styling.zh.md +++ b/docs/web-styling.zh.md @@ -21,7 +21,7 @@ - 当组件约定要求保留列结构时,源码文本、终端输出和 diff 行不得换行;使用共享滚动条样式,不得定义组件专用滚动条选择器。 - 呈现规则写在 CSS 中。React 内联样式可以传递组件局部自定义属性值,但不得编码主题分支。 - 添加过渡动画或仅悬停可见的控件时,保留清晰可见的键盘焦点和减少动态效果行为。 -- 支持的引擎上,圆角继承 ui-theme `corner-shape.css` 的全局超级椭圆平滑。每个正圆 `border-radius`(`50%`、`100%` 或胶囊半径)必须配对 `corner-shape: round`,使圆形与胶囊保持圆弧;ui-theme 的 corner-shape spec 强制这一配对。 +- 支持的引擎上,圆角默认使用 ui-theme `corner-shape.css` 的全局超级椭圆平滑。圆形与组件专用曲线遵循[圆角规范](ui-radius.zh.md#shapes);ui-theme 的 corner-shape spec 强制全圆声明的配对。 - 高层级表面(菜单、浮层、对话框、面板、悬浮按钮、输入框)设 `border: 0` 并使用 `box-shadow: var(--dsw-elevation-panel)`、`var(--dsw-elevation-prominent)` 或输入框专用的 `var(--dsw-elevation-soft)`(更大模糊、更低透明度):0.5px 发丝描边是第一层投影,`--dsw-elevation-stroke-color` 可按表面或状态重绑或抑制描边。不得将 `--dsw-alias-border-*` border 与 lv/elevation 投影配对——ui-theme 的 elevation spec 会拒绝;状态色 border(warn 面板)保持真 border。 - 存量和新增的下拉菜单、上下文菜单、子菜单及选择菜单使用 `Menu`,自定义内容用 `MenuSurface` 包裹。材质由主题的 `--dsw-menu-surface-fill` 和 `--dsw-menu-backdrop-filter` 组成;功能及平台 CSS 不得覆盖两者。ui-theme 菜单检查拒绝未使用共享容器的 menu/listbox 渲染、材质覆盖和 token 重定义。计划任务自有的 `TaskMenu` 与 `ClockPicker` 是明确例外,保留现有容器和材质([所属包](../packages/client/ui-schedule/README.zh.md))。 - 设置、确认框等模态弹窗保留黑色半透明遮罩,不模糊背景。主题将 `--dsw-mask-blur` 设为 `none`;Desktop 自有模态浮层也不对父页面施加模糊。 diff --git a/packages/client/ui-conversation/README.i18n.yaml b/packages/client/ui-conversation/README.i18n.yaml index 6949a521ed..d30e863a64 100644 --- a/packages/client/ui-conversation/README.i18n.yaml +++ b/packages/client/ui-conversation/README.i18n.yaml @@ -18,8 +18,8 @@ en: 1d2a3a7f98c2cc9b zh: f895dd5e9f91e0a9 /deepseek-ai-dsh-client-ui-conversation/shell-and-standard-props: - en: 2cd14507e7c68483 - zh: 2484605b53d421de + en: 038d0dc420daacdb + zh: 35acd178057c137f /deepseek-ai-dsh-client-ui-conversation/temporary-composer-entries: en: bb1244310f5c0382 zh: 824b84077432b559 diff --git a/packages/client/ui-conversation/README.md b/packages/client/ui-conversation/README.md index d445dea05c..2e197a4f25 100644 --- a/packages/client/ui-conversation/README.md +++ b/packages/client/ui-conversation/README.md @@ -56,7 +56,7 @@ The shared image slot props keep display choices separate from durable reference The composer measures its expanded control groups after size, content, visibility, or font-loading changes. If they cannot share a line, the row sets `--dsh-composer-model-text-display: none` and `--dsh-composer-model-icon-display: block` for the model seat; their defaults are `block` and `none`. Wrapping remains available if even the icon cannot fit. -The composer card uses circular corners with a radius equal to half the primary button diameter plus its equal right and bottom inset. The workspace-picker outline inherits the same radius and curve. +The composer card and workspace-picker outline follow the [concentric-inset rule](../../../docs/ui-radius.md#nested-hover). The context-occupancy button shows a ring and percentage below the input card, after the Session statistics. Clicking it opens the token breakdown in a panel kept inside the viewport, including when no statistics are shown; the button stays hidden until context usage and capacity are available. diff --git a/packages/client/ui-conversation/README.zh.md b/packages/client/ui-conversation/README.zh.md index 690aa03fa1..5b4895e243 100644 --- a/packages/client/ui-conversation/README.zh.md +++ b/packages/client/ui-conversation/README.zh.md @@ -56,7 +56,7 @@ target package 通过 declaration merge 扩展 snapshot 与 Location data map, 控件组的尺寸、内容、可见性或字体加载状态变化后,composer 测量展开状态下的控件组。若无法排在同一行,控制栏为模型位设置 `--dsh-composer-model-text-display: none` 和 `--dsh-composer-model-icon-display: block`;两者默认值分别为 `block` 和 `none`。若连图标也放不下,仍允许换行。 -输入卡片使用圆弧圆角,半径等于主按钮直径的一半加上按钮到右侧和底部的相等间距。工作区选择状态的轮廓继承相同的半径与曲线。 +输入卡片与工作区选择状态的轮廓遵循[同心内缩规则](../../../docs/ui-radius.zh.md#nested-hover)。 上下文占用按钮在输入卡片下方、会话统计右侧显示圆环和百分比。点击按钮可在视口内的面板查看 token 构成,没有统计项时面板也不会越界;上下文用量和容量尚不可用时,按钮保持隐藏。 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 3b0ba53ee7..d3ade8f8a0 100644 --- a/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css @@ -45,6 +45,7 @@ .card { --dsh-composer-primary-size: 34px; --dsh-composer-control-inset: 8px; + --dsh-composer-row-shift: 2px; box-sizing: border-box; position: relative; /* overlay anchor positioning context */ display: flex; @@ -61,6 +62,7 @@ border: 0; --dsw-elevation-stroke-color: var(--dsw-alias-border-l2); border-radius: calc(var(--dsh-composer-primary-size) / 2 + var(--dsh-composer-control-inset)); + /* The outer arc must stay concentric with the circular primary button. */ corner-shape: round; background: var(--dsw-specific-input-major); box-shadow: var(--dsw-elevation-soft); @@ -258,10 +260,9 @@ 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 var(--dsh-composer-control-inset) calc(var(--dsh-composer-control-inset) - 2px); + /* Smaller controls sit below the primary button's vertical center. */ + padding: var(--dsh-composer-row-shift) var(--dsh-composer-control-inset) + calc(var(--dsh-composer-control-inset) - var(--dsh-composer-row-shift)); 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 @@ -388,10 +389,8 @@ 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); + /* Cancel the row shift to preserve equal right and bottom insets. */ + transform: translateY(calc(-1 * var(--dsh-composer-row-shift))); } .primary:hover:not(:disabled) { diff --git a/packages/client/ui-theme/src/styles/corner-shape.css b/packages/client/ui-theme/src/styles/corner-shape.css index 70197aa6a3..fe848ddca6 100644 --- a/packages/client/ui-theme/src/styles/corner-shape.css +++ b/packages/client/ui-theme/src/styles/corner-shape.css @@ -1,6 +1,6 @@ -/* Smooth corner curvature for every rounded surface. Inside the support - * guard, all corners curve along superellipse(1.5) — between a circular arc - * (round = superellipse(1)) and a squircle (superellipse(2)) — instead of the +/* Default smooth corner curvature. Inside the support guard, corners use + * superellipse(1.5) — between a circular arc (round = superellipse(1)) and a + * squircle (superellipse(2)) — instead of the * default arc; engines without corner-shape keep circular corners because the * token and the rule exist only inside the guard. * @@ -12,7 +12,8 @@ * circle into a squircle and squares off capsule ends, so every effectively * uncapped radius (50%, 100%, or a pill radius far above the box size) pairs * `corner-shape: round` with its `border-radius` in the owning component - * sheet. The corner-shape stylesheet spec enforces that pairing. */ + * sheet. The corner-shape stylesheet spec enforces that pairing. + * Component-specific curve rules are documented in docs/ui-radius.md. */ @supports (corner-shape: superellipse(1.5)) { :root { --dsw-corner-shape: superellipse(1.5); From 3a9f0f1aab189fe1f39aab1b24f771c5aaa96a34 Mon Sep 17 00:00:00 2001 From: kingwl Date: Sun, 4 Oct 2026 23:36:21 +0800 Subject: [PATCH 3/7] fix(web): unify conversation radii and nested menu insets --- apps/web/tests/subagent-conversation.e2e.ts | 2 +- docs/ui-radius.i18n.yaml | 12 ++++++------ docs/ui-radius.md | 12 +++++++----- docs/ui-radius.zh.md | 12 +++++++----- packages/client/ui-commands/README.i18n.yaml | 4 ++-- packages/client/ui-commands/README.md | 2 ++ packages/client/ui-commands/README.zh.md | 2 ++ .../src/client/PopupSelectView.module.css | 2 +- packages/client/ui-conversation/README.i18n.yaml | 4 ++-- packages/client/ui-conversation/README.md | 2 +- packages/client/ui-conversation/README.zh.md | 2 +- .../src/client/skeleton/ContextMeter.module.css | 3 ++- .../src/client/skeleton/InputBar.module.css | 10 +++++++--- packages/client/ui-jobs/README.i18n.yaml | 4 ++-- packages/client/ui-jobs/README.md | 2 ++ packages/client/ui-jobs/README.zh.md | 2 ++ .../ui-jobs/src/client/JobListAction.module.css | 8 ++++++-- packages/client/ui-plan/README.i18n.yaml | 4 ++-- packages/client/ui-plan/README.md | 2 ++ packages/client/ui-plan/README.zh.md | 2 ++ .../client/ui-plan/src/client/PlanPreview.module.css | 4 ++-- packages/client/ui-schedule/README.i18n.yaml | 4 ++-- packages/client/ui-schedule/README.md | 2 ++ packages/client/ui-schedule/README.zh.md | 2 ++ .../ui-schedule/src/client/TaskMenu.module.css | 6 +++--- packages/client/ui-subagent/README.i18n.yaml | 4 ++-- packages/client/ui-subagent/README.md | 2 ++ packages/client/ui-subagent/README.zh.md | 2 ++ .../src/client/SubagentHeaderLineage.module.css | 6 +++--- .../tests/expected/radius-exceptions.expected.json | 7 +++---- 30 files changed, 82 insertions(+), 50 deletions(-) diff --git a/apps/web/tests/subagent-conversation.e2e.ts b/apps/web/tests/subagent-conversation.e2e.ts index 14c368b72f..2971ba7dc2 100644 --- a/apps/web/tests/subagent-conversation.e2e.ts +++ b/apps/web/tests/subagent-conversation.e2e.ts @@ -542,7 +542,7 @@ describe('web e2e: persisted subagent conversation and human continuation', () = Math.round(clickAreaBox!.x - menuBox!.x), Math.round(menuBox!.x + menuBox!.width - clickAreaBox!.x - clickAreaBox!.width), // The outer menu padding insets the scrollable tree rows. - ]).toEqual([3, 3]) + ]).toEqual([4, 4]) await compareOrRefreshGolden( BRANCHLESS_EXPECTED, await captureStableAria(page, '[role="tree"][aria-label="Subagent sessions"]', scaffold.workspaceCwd), diff --git a/docs/ui-radius.i18n.yaml b/docs/ui-radius.i18n.yaml index 823adc9b94..5fdd6c94a2 100644 --- a/docs/ui-radius.i18n.yaml +++ b/docs/ui-radius.i18n.yaml @@ -15,14 +15,14 @@ en: cd8120cba5566e19 zh: 65359436088c8bc5 /dsh-unified-corner-radius-standard/select-the-radius: - en: 3aa8142ca22f8747 - zh: c979d1aad2cac1cf + en: 133f5ec603e88375 + zh: ef264171ceff69ed /dsh-unified-corner-radius-standard/reuse-tokens-and-preserve-deliberate-shapes: - en: 57074166ec5a6149 - zh: 3065680007c3a436 + en: 855243d81b28eb13 + zh: b66b63e4f5e793fa /dsh-unified-corner-radius-standard/nested-geometry-and-hover: - en: 52196376c6fb71cc - zh: 6bca8db1174ad469 + en: 8b4df9c033b66378 + zh: 6b9bcd19040ec0e5 /dsh-unified-corner-radius-standard/settings-card-materials: en: 85e7e63183df06d1 zh: 1da2b44083d7ebe2 diff --git a/docs/ui-radius.md b/docs/ui-radius.md index 9fe6b72b9e..7434013541 100644 --- a/docs/ui-radius.md +++ b/docs/ui-radius.md @@ -40,7 +40,7 @@ Prefer an existing shared size variant when a proposed control falls between the Concrete defaults: `Button` uses H28/R8 for `sm` and H36/R12 for `md`, including outline variants. Standard H32 inputs and H36 selectors use R12. The Workspace files and New terminal guide entries both use R20, including title-only and described variants. Reserve R28 for their enclosing panel or dialog, not those entries. -Code blocks, diffs, and file previews share R16: changed-file entry cards, delivered-file cards, generic file attachment cards, and hover preview panels. The 40px file-icon tiles inside changed-file and delivery cards use R10 on all four corners as a component-specific exception. Their hover fills keep the same contour. +Code blocks, diffs, and file previews share R16: changed-file entry cards, delivered-file cards, submitted-plan cards, generic file attachment cards, and hover preview panels. The 40px file-icon tiles inside changed-file, delivery, and submitted-plan cards use R10 on all four corners as a component-specific exception. Their hover fills keep the same contour. ## Reuse tokens and preserve deliberate shapes @@ -51,7 +51,7 @@ Consume the named tokens instead of introducing local values such as 10px, 14px, Ordinary rounded surfaces use the theme's `superellipse(1.5)` curve where supported; the composer follows the circular [concentric-inset rule](#nested-hover). `corner-shape` is not inherited: the theme applies it to elements and their `::before`/`::after`. Unsupported engines retain ordinary circular corners. Do not introduce component-specific smoothing that makes a fill and its outline curve differently. -Preserve intentional circles and capsules: avatars and status dots use `50%`; explicit pills and full-round tracks may use `999px`. Pair every such full-round declaration with `corner-shape: round` in the same rule. Do not turn every button into a capsule just because its height is small. Tiny drawing details, such as glyph marks or miniature tracks, may retain their established local geometry; they do not justify arbitrary radii on surrounding controls. +Preserve intentional circles and capsules: avatars and status dots use `50%`; explicit pills and full-round tracks may use `999px`. Pair every such full-round declaration with `corner-shape: round` in the same rule. Token/cache statistics and the context-occupancy trigger belong to one capsule family, including their hover, expanded, and focus states. Do not turn every button into a capsule just because its height is small. Tiny drawing details, such as glyph marks or miniature tracks, may retain their established local geometry; they do not justify arbitrary radii on surrounding controls. Both the avatar container and its `img` must remain circular; an image that inherits only `border-radius` still needs an explicit `corner-shape: round` or must inherit the curve from its circular container. Keep equal width and height on both. See [Account settings](../packages/client/ui-settings-account/README.md#use-this-package) for account avatar sizes. @@ -64,13 +64,15 @@ Distinguish these three arrangements before changing a child radius: | Arrangement | Rule | Example | |---|---|---| -| Concentric inset | Inner R = max(0, outer R − inset); use the same curve | Outer R16, inset 4, inner R12 | +| Circular concentric inset | Inner R = max(0, outer R − inset); both arcs share a center and use `round` | Outer R16, inset 4, inner R12 | | Fill flush against an enclosing edge | The enclosure owns the visible corner; clip the fill or inherit the matching corner | A split-button card with two independent hover regions | | Separate card or form group inside another surface | Choose the child's semantic tier; do not subtract all parent padding mechanically | R16 editor within an R20 settings card | -The composer uses circular arcs at all four corners, with outer R = primary-button diameter / 2 + its equal right and bottom inset. A 34px button and 8px inset give R25. The lower-right arc and button share a center, keeping the horizontal, vertical, and diagonal gaps equal. The workspace-picker outline inherits the card's radius and curve. +The composer uses circular arcs at all four corners, with outer R = primary-button diameter / 2 + its equal right and bottom inset. A 34px button and 8px inset give R25. With the toolbar on one line, the lower-right arc and primary button share a center; the 28px attachment button shares the lower-left center with an 11px left and bottom inset. Each pair keeps its horizontal, vertical, and diagonal gaps equal. The workspace-picker outline inherits the card's radius and curve. -Standard menus use outer R16, 4px padding, and R12 items. Compact menus use outer R12, 4px padding, and R8 items. Shared `SegmentedControl` uses outer R12, 4px inset, and R8 segments/indicator; `SegmentedTabs` uses outer R16, 4px inset, and R12 segments/indicator. Keep indicator offsets, width calculations, submenu alignment, and pointer bridges consistent when changing padding. +Standard menus use outer R16, 4px padding, and R12 items, including command selection, task menus, and the exposed highlights in subagent and background-job menus. Tree disclosure gutters retain their indentation; controls inside a filled job row keep their own compact geometry. Compact menus use outer R12, 4px padding, and R8 items. Shared `SegmentedControl` uses outer R12, 4px inset, and R8 segments/indicator; `SegmentedTabs` uses outer R16, 4px inset, and R12 segments/indicator. Keep indicator offsets, width calculations, submenu alignment, and pointer bridges consistent when changing padding. + +The radius subtraction is also the nominal sizing rule for nested superellipses. Equal exponents do not make them exact offset curves, so their diagonal gap may differ from the side inset. Keep the shared superellipse menu and segmented-control treatments; use circular arcs when strict equal radial spacing is required. A single clickable surface paints hover on itself. A flush pseudo-element or overlay uses the same radius and curve as the visible enclosure. Avoid a separately rounded fill that leaves a crescent between the background and the border. diff --git a/docs/ui-radius.zh.md b/docs/ui-radius.zh.md index eefc36722a..ad5534a6cb 100644 --- a/docs/ui-radius.zh.md +++ b/docs/ui-radius.zh.md @@ -40,7 +40,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 具体默认值:`Button` 的 `sm` 使用 H28/R8,`md` 使用 H36/R12,包含描边变体。标准 H32 输入框和 H36 选择器使用 R12。“工作区文件”和“新建终端”引导入口统一使用 R20,包含仅标题与带描述的变体。R28 留给包围它们的面板或对话框,不用于这些入口。 -代码块、diff 与文件预览共用 R16:包括改动文件入口卡片、交付文件卡片、通用附件文件卡片和悬停预览浮层。改动文件与交付文件卡片内部的 40px 文件图标底框作为组件特例,四角统一使用 R10。各自的 hover 保持同一轮廓。 +代码块、diff 与文件预览共用 R16:包括改动文件入口卡片、交付文件卡片、已提交计划卡片、通用附件文件卡片和悬停预览浮层。改动文件、交付文件与已提交计划卡片内部的 40px 文件图标底框作为组件特例,四角统一使用 R10。各自的 hover 保持同一轮廓。 ## 复用 token,保留有意设计的形状 @@ -51,7 +51,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 普通圆角表面在支持时使用主题的 `superellipse(1.5)` 曲线;对话输入框遵循圆弧的[同心内缩规则](#nested-hover)。`corner-shape` 不会继承:主题将它应用于元素及其 `::before`/`::after`。不支持的引擎保留普通圆弧。不要添加组件专用的平滑规则,导致底色与外框使用不同曲线。 -保留有意设计的圆形与胶囊:头像和状态点使用 `50%`;明确的胶囊与全圆轨道可使用 `999px`。每个此类全圆声明都在同一规则中配对 `corner-shape: round`。不要因为高度较小就把所有按钮变成胶囊。图形标记或微型轨道等细小绘制细节可保留既有局部几何,但不能据此给外围控件使用任意圆角。 +保留有意设计的圆形与胶囊:头像和状态点使用 `50%`;明确的胶囊与全圆轨道可使用 `999px`。每个此类全圆声明都在同一规则中配对 `corner-shape: round`。Token/缓存统计与上下文占用率入口属于同一胶囊家族,包含 hover、展开与焦点状态。不要因为高度较小就把所有按钮变成胶囊。图形标记或微型轨道等细小绘制细节可保留既有局部几何,但不能据此给外围控件使用任意圆角。 头像的容器和内部 `img` 都要保持正圆;图片不能只继承 `border-radius`,还必须显式使用 `corner-shape: round`,或从正圆容器继承曲线。图片和容器均保持宽高相等。账号头像的具体尺寸见[账号设置](../packages/client/ui-settings-account/README.zh.md#use-this-package)。 @@ -64,13 +64,15 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 | 关系 | 规则 | 示例 | |---|---|---| -| 同心内缩 | 内层 R = max(0, 外层 R − 内缩距离);使用相同曲线 | 外层 R16,内缩 4,内层 R12 | +| 圆弧同心内缩 | 内层 R = max(0, 外层 R − 内缩距离);两段圆弧同心且使用 `round` | 外层 R16,内缩 4,内层 R12 | | 底色紧贴容器边缘 | 由外框决定可见圆角;裁切底色或继承相应圆角 | 两个独立 hover 区域组成的分体按钮卡片 | | 容器内独立的卡片或表单组 | 按子元素用途选择档位;不机械减去全部父级内边距 | R20 设置卡片内的 R16 编辑器 | -对话输入框四角均使用圆弧,外层 R = 主按钮直径 / 2 + 按钮到右侧和底部的相等内缩距离。34px 按钮与 8px 内缩距离对应 R25。右下角圆弧与按钮同心,使水平、垂直和对角线间隙相等。工作区选择状态的轮廓继承卡片的半径与曲线。 +对话输入框四角均使用圆弧,外层 R = 主按钮直径 / 2 + 按钮到右侧和底部的相等内缩距离。34px 按钮与 8px 内缩距离对应 R25。工具栏保持单行时,右下角圆弧与主按钮同心;28px 附件按钮距左侧和底部均为 11px,与左下角同心。每一对轮廓的水平、垂直和对角线间隙均相等。工作区选择状态的轮廓继承卡片的半径与曲线。 -标准菜单使用外层 R16、4px 内边距、R12 菜单项。紧凑菜单使用外层 R12、4px 内边距、R8 菜单项。公共 `SegmentedControl` 使用外层 R12、4px 内缩、R8 分段和指示器;`SegmentedTabs` 使用外层 R16、4px 内缩、R12 分段和指示器。修改内边距时,同步保持指示器偏移、宽度计算、子菜单对齐与指针桥接区域一致。 +标准菜单使用外层 R16、4px 内边距、R12 菜单项,包含命令选择、任务菜单,以及子会话和后台任务菜单的外露高亮区域。树形展开操作保留缩进;带底色任务行内的控件保留各自的紧凑几何。紧凑菜单使用外层 R12、4px 内边距、R8 菜单项。公共 `SegmentedControl` 使用外层 R12、4px 内缩、R8 分段和指示器;`SegmentedTabs` 使用外层 R16、4px 内缩、R12 分段和指示器。修改内边距时,同步保持指示器偏移、宽度计算、子菜单对齐与指针桥接区域一致。 + +半径相减也用于嵌套超级椭圆的名义尺寸关系。相同指数不意味着两条曲线严格等距,因此对角线间隙可能不同于侧边内缩。菜单与分段控件保留公共的超级椭圆样式;要求径向严格等距时使用圆弧。 单个可点击表面在自身绘制 hover。贴边的伪元素或覆盖层使用与可见外框相同的圆角和曲线。避免单独给底色设置圆角,导致背景与边框之间出现月牙状空隙。 diff --git a/packages/client/ui-commands/README.i18n.yaml b/packages/client/ui-commands/README.i18n.yaml index 6177afb95c..97fd762cc1 100644 --- a/packages/client/ui-commands/README.i18n.yaml +++ b/packages/client/ui-commands/README.i18n.yaml @@ -27,8 +27,8 @@ en: 4feecdbec0c3f39e zh: 618944ecade8a3a2 /deepseek-ai-dsh-client-ui-commands/understand-the-implementation: - en: 3aeeba6c91c3ef19 - zh: d3afb3df6d15e17b + en: dbd2d83fb5e57ff3 + zh: 6e2e837f6a08f2fb /deepseek-ai-dsh-client-ui-commands/further-exploration: en: 409c04f534d23de7 zh: 165022d7a0a554eb diff --git a/packages/client/ui-commands/README.md b/packages/client/ui-commands/README.md index 8bf2cdc958..a3f56ab147 100644 --- a/packages/client/ui-commands/README.md +++ b/packages/client/ui-commands/README.md @@ -59,6 +59,8 @@ Popup selection panels fill the composer overlay's width, matching the slash men Each command-directory fetch requires an existing retained Client Session and waits for its initial history open to succeed before sending `commands.list`. A temporary `commandCatalog` reference holds that Session until the fetch settles. An unretained Session or a failed open rejects without sending the RPC, so background catalog refreshes do not reopen closed Sessions. +Popup selection uses the [standard menu inset and item radii](../../../docs/ui-radius.md#nested-hover). + ----- diff --git a/packages/client/ui-commands/README.zh.md b/packages/client/ui-commands/README.zh.md index 792611b54e..8c36427041 100644 --- a/packages/client/ui-commands/README.zh.md +++ b/packages/client/ui-commands/README.zh.md @@ -59,6 +59,8 @@ composer 携带图片或通用文件提交时,只有声明了 `input.attachmen 每次命令目录拉取都要求客户端已持有该会话,并等待首次历史打开成功后才发送 `commands.list`。临时的 `commandCatalog` 引用持续持有会话,直到拉取结束。未被持有的会话或打开失败会直接拒绝,不发送 RPC,因此后台目录刷新不会重新打开已关闭的会话。 +弹出选择面板使用[标准菜单的内缩与菜单项圆角](../../../docs/ui-radius.zh.md#nested-hover)。 + ----- diff --git a/packages/client/ui-commands/src/client/PopupSelectView.module.css b/packages/client/ui-commands/src/client/PopupSelectView.module.css index f500af280b..bf44e4afa8 100644 --- a/packages/client/ui-commands/src/client/PopupSelectView.module.css +++ b/packages/client/ui-commands/src/client/PopupSelectView.module.css @@ -9,7 +9,7 @@ right: 0; box-sizing: border-box; z-index: 100; - padding: 3px; + padding: 4px; display: flex; flex-direction: column; min-width: min(220px, 100%); diff --git a/packages/client/ui-conversation/README.i18n.yaml b/packages/client/ui-conversation/README.i18n.yaml index d30e863a64..7d5d001462 100644 --- a/packages/client/ui-conversation/README.i18n.yaml +++ b/packages/client/ui-conversation/README.i18n.yaml @@ -18,8 +18,8 @@ en: 1d2a3a7f98c2cc9b zh: f895dd5e9f91e0a9 /deepseek-ai-dsh-client-ui-conversation/shell-and-standard-props: - en: 038d0dc420daacdb - zh: 35acd178057c137f + en: 066f66b4835e9fe7 + zh: 036c13d5189d6ff7 /deepseek-ai-dsh-client-ui-conversation/temporary-composer-entries: en: bb1244310f5c0382 zh: 824b84077432b559 diff --git a/packages/client/ui-conversation/README.md b/packages/client/ui-conversation/README.md index 2e197a4f25..b8281142a2 100644 --- a/packages/client/ui-conversation/README.md +++ b/packages/client/ui-conversation/README.md @@ -56,7 +56,7 @@ The shared image slot props keep display choices separate from durable reference The composer measures its expanded control groups after size, content, visibility, or font-loading changes. If they cannot share a line, the row sets `--dsh-composer-model-text-display: none` and `--dsh-composer-model-icon-display: block` for the model seat; their defaults are `block` and `none`. Wrapping remains available if even the icon cannot fit. -The composer card and workspace-picker outline follow the [concentric-inset rule](../../../docs/ui-radius.md#nested-hover). +The composer card, its circular toolbar buttons, and the workspace-picker outline follow the [concentric-inset rule](../../../docs/ui-radius.md#nested-hover). The context meter follows the [statistics capsule rule](../../../docs/ui-radius.md#shapes). The context-occupancy button shows a ring and percentage below the input card, after the Session statistics. Clicking it opens the token breakdown in a panel kept inside the viewport, including when no statistics are shown; the button stays hidden until context usage and capacity are available. diff --git a/packages/client/ui-conversation/README.zh.md b/packages/client/ui-conversation/README.zh.md index 5b4895e243..b0efd8f7f3 100644 --- a/packages/client/ui-conversation/README.zh.md +++ b/packages/client/ui-conversation/README.zh.md @@ -56,7 +56,7 @@ target package 通过 declaration merge 扩展 snapshot 与 Location data map, 控件组的尺寸、内容、可见性或字体加载状态变化后,composer 测量展开状态下的控件组。若无法排在同一行,控制栏为模型位设置 `--dsh-composer-model-text-display: none` 和 `--dsh-composer-model-icon-display: block`;两者默认值分别为 `block` 和 `none`。若连图标也放不下,仍允许换行。 -输入卡片与工作区选择状态的轮廓遵循[同心内缩规则](../../../docs/ui-radius.zh.md#nested-hover)。 +输入卡片、圆形工具栏按钮与工作区选择状态的轮廓遵循[同心内缩规则](../../../docs/ui-radius.zh.md#nested-hover)。上下文占用率入口遵循[统计胶囊规则](../../../docs/ui-radius.zh.md#shapes)。 上下文占用按钮在输入卡片下方、会话统计右侧显示圆环和百分比。点击按钮可在视口内的面板查看 token 构成,没有统计项时面板也不会越界;上下文用量和容量尚不可用时,按钮保持隐藏。 diff --git a/packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css b/packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css index 7952f18006..52476cbd50 100644 --- a/packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css @@ -13,7 +13,8 @@ flex: none; padding: 1px 8px; border: none; - border-radius: var(--dsw-radius-sm); + border-radius: 999px; + corner-shape: round; background: transparent; color: var(--dsw-alias-label-tertiary); font-family: inherit; 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 d3ade8f8a0..af3cb8fff7 100644 --- a/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css @@ -44,6 +44,7 @@ .card { --dsh-composer-primary-size: 34px; + --dsh-composer-add-size: 28px; --dsh-composer-control-inset: 8px; --dsh-composer-row-shift: 2px; box-sizing: border-box; @@ -62,7 +63,7 @@ border: 0; --dsw-elevation-stroke-color: var(--dsw-alias-border-l2); border-radius: calc(var(--dsh-composer-primary-size) / 2 + var(--dsh-composer-control-inset)); - /* The outer arc must stay concentric with the circular primary button. */ + /* The lower arcs share centers with the circular toolbar buttons. */ corner-shape: round; background: var(--dsw-specific-input-major); box-shadow: var(--dsw-elevation-soft); @@ -320,14 +321,17 @@ display: grid; place-items: center; flex: none; - width: 28px; - height: 28px; + width: var(--dsh-composer-add-size); + height: var(--dsh-composer-add-size); + /* The smaller circle needs the radius difference as extra left inset. */ + margin-left: calc((var(--dsh-composer-primary-size) - var(--dsh-composer-add-size)) / 2); border: none; border-radius: 999px; corner-shape: round; background: var(--dsw-specific-selector); color: var(--dsw-alias-label-primary); cursor: pointer; + transform: translateY(calc(-1 * var(--dsh-composer-row-shift))); } .add:hover:not(:disabled) { diff --git a/packages/client/ui-jobs/README.i18n.yaml b/packages/client/ui-jobs/README.i18n.yaml index 74868aab1a..18fb8ec0fa 100644 --- a/packages/client/ui-jobs/README.i18n.yaml +++ b/packages/client/ui-jobs/README.i18n.yaml @@ -24,8 +24,8 @@ en: c34dad62fee63306 zh: 167d9da7928a9488 /deepseek-ai-dsh-client-ui-jobs/understand-the-implementation: - en: f6f5d497ab340b9e - zh: 94832761177f12ca + en: 7bfd0ea35873d198 + zh: 33ade728e90c3dd4 /deepseek-ai-dsh-client-ui-jobs/further-exploration: en: 01eaaecb5850f391 zh: 2eabd14cde191ab8 diff --git a/packages/client/ui-jobs/README.md b/packages/client/ui-jobs/README.md index 52b920b439..795cfc947d 100644 --- a/packages/client/ui-jobs/README.md +++ b/packages/client/ui-jobs/README.md @@ -53,6 +53,8 @@ One slot entry in the header actions band (after the preset label) renders the t | [`src/client/index.ts`](src/client/index.ts) | Slot registration and the dictionaries | | [`src/client/locales.ts`](src/client/locales.ts) | The `job` namespace copy (zh source of truth) | +Background-job rows follow the [standard menu edge geometry](../../../docs/ui-radius.md#nested-hover); controls inside a filled running row retain compact corners. + ----- diff --git a/packages/client/ui-jobs/README.zh.md b/packages/client/ui-jobs/README.zh.md index 1881d9432a..433df6868a 100644 --- a/packages/client/ui-jobs/README.zh.md +++ b/packages/client/ui-jobs/README.zh.md @@ -53,6 +53,8 @@ kind: "package-reference" | [`src/client/index.ts`](src/client/index.ts) | slot 注册与词典 | | [`src/client/locales.ts`](src/client/locales.ts) | `job` 命名空间文案(zh 为事实源) | +后台任务行遵循[标准菜单边缘几何](../../../docs/ui-radius.zh.md#nested-hover);带底色运行行内的控件保留紧凑圆角。 + ----- diff --git a/packages/client/ui-jobs/src/client/JobListAction.module.css b/packages/client/ui-jobs/src/client/JobListAction.module.css index d51e9f7156..b8790b66d3 100644 --- a/packages/client/ui-jobs/src/client/JobListAction.module.css +++ b/packages/client/ui-jobs/src/client/JobListAction.module.css @@ -51,7 +51,7 @@ max-width: min(560px, calc(100vw - 32px)); max-height: min(480px, calc(100vh - 140px)); margin: 0; - padding: 3px; + padding: 4px; overflow: auto; list-style: none; border: 0; @@ -158,6 +158,10 @@ background: transparent; } +.rowLineLive .row { + border-radius: var(--dsw-radius-sm); +} + .rowLineLive .row:focus-visible { background: color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent); } @@ -232,7 +236,7 @@ min-height: 28px; padding: 4px 7px; border: 0; - border-radius: var(--dsw-radius-sm); + border-radius: var(--dsw-radius-md); background: transparent; color: var(--dsw-alias-label-primary); font-size: 12px; diff --git a/packages/client/ui-plan/README.i18n.yaml b/packages/client/ui-plan/README.i18n.yaml index 3a5ee2140c..c8cd16312e 100644 --- a/packages/client/ui-plan/README.i18n.yaml +++ b/packages/client/ui-plan/README.i18n.yaml @@ -27,8 +27,8 @@ en: a13078ade4ef3b9d zh: 2c8b3e8b62ad5652 /deepseek-ai-dsh-client-ui-plan/understand-the-implementation: - en: 5a6910010ef46fb6 - zh: 00c55930c00a508c + en: 8f4efc68f61687a2 + zh: 917497a67dc2683e /deepseek-ai-dsh-client-ui-plan/further-exploration: en: 59f62ef6269abf82 zh: c8b4ee607be1e432 diff --git a/packages/client/ui-plan/README.md b/packages/client/ui-plan/README.md index afba1c7052..57e3519093 100644 --- a/packages/client/ui-plan/README.md +++ b/packages/client/ui-plan/README.md @@ -55,6 +55,8 @@ Plan cards derive from native `tool/call` or PTC dispatch arguments through a Co The framework-bound `usePlans(turn)` exposes only submitted-plan data for that Turn. Chat indexes membership on Node updates and orders this collection when read; card rendering neither scans the transcript nor subscribes to other Turns or Node kinds. +Submitted-plan cards follow the [file-card radius family](../../../docs/ui-radius.md#radius-scale). + ----- diff --git a/packages/client/ui-plan/README.zh.md b/packages/client/ui-plan/README.zh.md index 5a08a67c43..a4618ea8db 100644 --- a/packages/client/ui-plan/README.zh.md +++ b/packages/client/ui-plan/README.zh.md @@ -55,6 +55,8 @@ kind: "package-reference" 框架绑定的 `usePlans(turn)` 只提供该回合的已提交计划数据。Chat 随节点更新维护成员索引,并在读取时排列该集合;卡片渲染不扫描整段对话,也不订阅其他回合或节点类型。 +已提交计划卡片遵循[文件卡片圆角家族](../../../docs/ui-radius.zh.md#radius-scale)。 + ----- diff --git a/packages/client/ui-plan/src/client/PlanPreview.module.css b/packages/client/ui-plan/src/client/PlanPreview.module.css index 6344ddeb79..13f0d24081 100644 --- a/packages/client/ui-plan/src/client/PlanPreview.module.css +++ b/packages/client/ui-plan/src/client/PlanPreview.module.css @@ -12,7 +12,7 @@ padding: 8px 10px; margin: 0; border: 0.5px solid var(--dsw-alias-border-l1); - border-radius: var(--dsw-radius-xl); + border-radius: var(--dsw-radius-lg); background: var(--plan-card-fill); color: var(--dsw-alias-label-primary); font: inherit; @@ -23,7 +23,7 @@ :global(body[data-ds-dark-theme]) .card { --plan-card-fill: var(--dsw-static-neutral-850); --plan-card-hover: var(--dsw-static-neutral-800); } .card:hover { background: var(--plan-card-hover); } .card:focus-visible { outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); outline-offset: 3px; } -.cardIcon { box-sizing: border-box; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0.5px solid var(--dsw-alias-border-l1); border-radius: var(--dsw-radius-md); background: var(--plan-card-fill); } +.cardIcon { box-sizing: border-box; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0.5px solid var(--dsw-alias-border-l1); border-radius: 10px; background: var(--plan-card-fill); } .cardDetails { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; } .cardTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; line-height: 20px; } .cardDescription { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-tertiary); font-size: 10px; line-height: 16px; } diff --git a/packages/client/ui-schedule/README.i18n.yaml b/packages/client/ui-schedule/README.i18n.yaml index 21244ecf66..aae91cb558 100644 --- a/packages/client/ui-schedule/README.i18n.yaml +++ b/packages/client/ui-schedule/README.i18n.yaml @@ -21,8 +21,8 @@ en: 6bd6882dbbbefcb0 zh: 03aa15f1a65d13dc /deepseek-ai-dsh-client-ui-schedule/understand-the-implementation: - en: a03a551e0ed96c6b - zh: a85efe7db56b7df3 + en: 5e640dad909768cc + zh: d25fee44d0550c90 /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 9f60a11b1c..ae2b0ffc6b 100644 --- a/packages/client/ui-schedule/README.md +++ b/packages/client/ui-schedule/README.md @@ -67,6 +67,8 @@ A restored task tab carries no navigation parameters, because the Sidebar persis Subscriptions exist only while the framework observes a source. The final unsubscribe releases event listeners and invalidates pending responses. Components receive framework-bound `useCatalog` hooks and explicit action callbacks. The mounted Records view reads `schedule.history` with the selected task's original Session binding; catalog and list responses omit full history. Components own disposable search, filtering, selection, confirmation, and history-page state. Reminder records remain Host-owned and do not come from historical Session projections or browser-local demo data. +Task menus use the [standard menu geometry](../../../docs/ui-radius.md#nested-hover), including keyboard-highlighted rows. + diff --git a/packages/client/ui-schedule/README.zh.md b/packages/client/ui-schedule/README.zh.md index 29c127bad3..9e616725a6 100644 --- a/packages/client/ui-schedule/README.zh.md +++ b/packages/client/ui-schedule/README.zh.md @@ -67,6 +67,8 @@ kind: "package-reference" 仅在框架观察数据源期间订阅。最后一个订阅取消时释放事件监听,并使尚未完成的响应失效。组件接收框架绑定的 `useCatalog` hook 和明确的操作回调。已挂载的任务运行记录视图使用所选任务的原会话绑定读取 `schedule.history`;目录和列表响应不包含完整历史。组件拥有可丢弃的搜索、筛选、选择、确认和历史分页状态。提醒记录由 Host 拥有,不来自历史会话投影或浏览器本地演示数据。 +任务菜单使用[标准菜单几何](../../../docs/ui-radius.zh.md#nested-hover),包含键盘高亮行。 + diff --git a/packages/client/ui-schedule/src/client/TaskMenu.module.css b/packages/client/ui-schedule/src/client/TaskMenu.module.css index 91fa09e354..5ddd158c37 100644 --- a/packages/client/ui-schedule/src/client/TaskMenu.module.css +++ b/packages/client/ui-schedule/src/client/TaskMenu.module.css @@ -10,12 +10,12 @@ .list { /* min-widths below are the design's outer card widths — include the pad. */ box-sizing: border-box; - padding: 3px; + padding: 4px; display: flex; flex-direction: column; gap: 0; border: 0; - border-radius: 16px; + border-radius: var(--dsw-radius-lg); background: var(--dsw-specific-menu); backdrop-filter: var(--dsw-menu-backdrop-filter); --dsw-elevation-stroke-color: var(--dsw-alias-border-l1); @@ -88,7 +88,7 @@ min-height: 34px; padding: 6px 8px; border: none; - border-radius: 8px; + border-radius: var(--dsw-radius-md); background: transparent; cursor: pointer; font-size: 13px; diff --git a/packages/client/ui-subagent/README.i18n.yaml b/packages/client/ui-subagent/README.i18n.yaml index 646813b0a8..33267df8ec 100644 --- a/packages/client/ui-subagent/README.i18n.yaml +++ b/packages/client/ui-subagent/README.i18n.yaml @@ -36,8 +36,8 @@ en: b817e9907392f59c zh: e42feb97d572a989 /deepseek-ai-dsh-client-ui-subagent/understand-the-implementation/composer-election: - en: 1c15af4dd7c0b791 - zh: f789737ab4dd8cb2 + en: 13c33af89ba0942e + zh: 00374c7944728ae2 /deepseek-ai-dsh-client-ui-subagent/further-exploration: en: 1766e9012e307178 zh: f3ee637f5941aae5 diff --git a/packages/client/ui-subagent/README.md b/packages/client/ui-subagent/README.md index f648a3e345..5bd78ae5c9 100644 --- a/packages/client/ui-subagent/README.md +++ b/packages/client/ui-subagent/README.md @@ -71,6 +71,8 @@ One-shot children always elect a read-only composer. A continuable child elects Unknown-mode catalog rows remain visible and clickable, using the child id when no label is available. Their composer is read-only until child history establishes a supported mode; a read failure is reported in the child conversation. +Lineage-menu highlights follow the [standard menu edge geometry](../../../docs/ui-radius.md#nested-hover); tree disclosure controls retain their separate left gutter. + ----- diff --git a/packages/client/ui-subagent/README.zh.md b/packages/client/ui-subagent/README.zh.md index 8716960c61..15c6c7d685 100644 --- a/packages/client/ui-subagent/README.zh.md +++ b/packages/client/ui-subagent/README.zh.md @@ -71,6 +71,8 @@ one-shot child 始终选用只读编辑器。可继续 child 仅在其确切 par 模式未知的目录项仍可见、可点击,没有标签时显示子会话 id。读取子历史并确认受支持模式前,输入区保持只读;读取失败在该子会话中报告。 +会话树菜单高亮遵循[标准菜单边缘几何](../../../docs/ui-radius.zh.md#nested-hover);树形展开控件保留独立的左侧空间。 + ----- diff --git a/packages/client/ui-subagent/src/client/SubagentHeaderLineage.module.css b/packages/client/ui-subagent/src/client/SubagentHeaderLineage.module.css index 19e1378313..4fc2a6f8f5 100644 --- a/packages/client/ui-subagent/src/client/SubagentHeaderLineage.module.css +++ b/packages/client/ui-subagent/src/client/SubagentHeaderLineage.module.css @@ -97,7 +97,7 @@ width: 336px; max-width: min(400px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 140px)); - padding: 3px; + padding: 4px; overflow: hidden; border-radius: var(--dsw-radius-lg); --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2); @@ -146,7 +146,7 @@ min-height: 44px; padding: 6px 7px 6px 9px; border: 0; - border-radius: var(--dsw-radius-lg); + border-radius: var(--dsw-radius-md); background: transparent; color: var(--dsw-alias-label-primary); font-size: 12px; @@ -171,7 +171,7 @@ min-width: 0; margin: -6px -7px -6px; padding: 6px 7px; - border-radius: var(--dsw-radius-lg); + border-radius: var(--dsw-radius-md); } .rowActivitySlot { 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 2f962a9444..2726668d8e 100644 --- a/packages/client/ui-theme/tests/expected/radius-exceptions.expected.json +++ b/packages/client/ui-theme/tests/expected/radius-exceptions.expected.json @@ -5,6 +5,9 @@ "ui-deliverables/src/client/Deliverables.module.css": [ ".fileIcon: border-radius: 10px" ], + "ui-plan/src/client/PlanPreview.module.css": [ + ".cardIcon: border-radius: 10px" + ], "ui-schedule/src/client/ClockPicker.module.css": [ ".option: border-radius: 10px" ], @@ -42,10 +45,6 @@ ".delivery: border-radius: 8px", ".linkedSession: border-radius: 14px" ], - "ui-schedule/src/client/TaskMenu.module.css": [ - ".list: border-radius: 16px", - ".item: border-radius: 8px" - ], "ui-settings-account/src/client/AccountNotice.module.css": [ ".card: border-radius: 16px" ], From 5c5555eec10ef04ff6b8893d837023f3fb88007c Mon Sep 17 00:00:00 2001 From: kingwl Date: Sun, 4 Oct 2026 23:42:50 +0800 Subject: [PATCH 4/7] docs(web): link radius rules directly and tidy curve comment --- docs/web-styling.i18n.yaml | 4 ++-- docs/web-styling.md | 2 +- docs/web-styling.zh.md | 2 +- packages/client/ui-theme/src/styles/corner-shape.css | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/web-styling.i18n.yaml b/docs/web-styling.i18n.yaml index 0ab7b06830..c7be709181 100644 --- a/docs/web-styling.i18n.yaml +++ b/docs/web-styling.i18n.yaml @@ -9,8 +9,8 @@ en: dc8c41fbf9869179 zh: e45976a585cb9c86 /web-ui-style-reference/component-rules: - en: 17ccf65aec7f97b5 - zh: f2592e85e617b959 + en: 458da7f974517997 + zh: 8b45f816151c233d /web-ui-style-reference/corner-radii-and-settings-cards: en: 118972f6c2bd6ce4 zh: 85f8416b03e4dd8b diff --git a/docs/web-styling.md b/docs/web-styling.md index 9190ff74b2..3921af7fe9 100644 --- a/docs/web-styling.md +++ b/docs/web-styling.md @@ -21,7 +21,7 @@ Global style sheets belong in `ui-theme/src/styles/`. Component styles live besi - Keep source text, terminal output, and diff lines unwrapped when their component contract requires column preservation; use the shared scrollbar styles rather than component-specific scrollbar selectors. - Put presentation in CSS. Inline React styles may pass component-local custom-property values but must not encode theme branches. - Preserve keyboard focus visibility and reduced-motion behavior when adding transitions or hover-only controls. -- Rounded corners default to the global superellipse smoothing from ui-theme's `corner-shape.css` on supporting engines. Follow the [corner-radius standard](ui-radius.md#shapes) for circular shapes and component-specific curves; the ui-theme corner-shape spec enforces the full-round pairing. +- Rounded corners default to the global superellipse smoothing from ui-theme's `corner-shape.css` on supporting engines. Follow the radius standard's [circular-shape](ui-radius.md#shapes) and [nested-geometry](ui-radius.md#nested-hover) rules; the ui-theme corner-shape spec enforces the full-round pairing. - Elevated surfaces (menus, popovers, modals, panels, floating buttons, the composer) set `border: 0` and take `box-shadow: var(--dsw-elevation-panel)`, `var(--dsw-elevation-prominent)`, or the composer's `var(--dsw-elevation-soft)` (larger blur at lower alpha): the 0.5px hairline stroke is the first shadow layer, and `--dsw-elevation-stroke-color` rebinds or suppresses it per surface or state. Never pair a `--dsw-alias-border-*` border with an lv/elevation shadow — the ui-theme elevation spec rejects the pairing; state-colored borders (warn panels) stay real borders. - Existing and new dropdown, context, submenu, and selection menus use `Menu` or wrap custom content in `MenuSurface`. The material is the theme-owned `--dsw-menu-surface-fill` plus `--dsw-menu-backdrop-filter`; feature and platform CSS must not override either. The ui-theme menu spec rejects unwrapped menu/listbox renderers, material overrides, and token redefinitions. The schedule-owned `TaskMenu` and `ClockPicker` retain their existing containers and material as explicit exceptions ([owner](../packages/client/ui-schedule/README.md)). - Modal backdrops, including settings and confirmation dialogs, retain their translucent dark mask without blur. The theme sets `--dsw-mask-blur` to `none`; Desktop-owned modal overlays also leave the parent page unfiltered. diff --git a/docs/web-styling.zh.md b/docs/web-styling.zh.md index 6e351b81f7..23a85141d3 100644 --- a/docs/web-styling.zh.md +++ b/docs/web-styling.zh.md @@ -21,7 +21,7 @@ - 当组件约定要求保留列结构时,源码文本、终端输出和 diff 行不得换行;使用共享滚动条样式,不得定义组件专用滚动条选择器。 - 呈现规则写在 CSS 中。React 内联样式可以传递组件局部自定义属性值,但不得编码主题分支。 - 添加过渡动画或仅悬停可见的控件时,保留清晰可见的键盘焦点和减少动态效果行为。 -- 支持的引擎上,圆角默认使用 ui-theme `corner-shape.css` 的全局超级椭圆平滑。圆形与组件专用曲线遵循[圆角规范](ui-radius.zh.md#shapes);ui-theme 的 corner-shape spec 强制全圆声明的配对。 +- 支持的引擎上,圆角默认使用 ui-theme `corner-shape.css` 的全局超级椭圆平滑。遵循圆角规范中的[圆形](ui-radius.zh.md#shapes)与[嵌套几何](ui-radius.zh.md#nested-hover)规则;ui-theme 的 corner-shape spec 强制全圆声明的配对。 - 高层级表面(菜单、浮层、对话框、面板、悬浮按钮、输入框)设 `border: 0` 并使用 `box-shadow: var(--dsw-elevation-panel)`、`var(--dsw-elevation-prominent)` 或输入框专用的 `var(--dsw-elevation-soft)`(更大模糊、更低透明度):0.5px 发丝描边是第一层投影,`--dsw-elevation-stroke-color` 可按表面或状态重绑或抑制描边。不得将 `--dsw-alias-border-*` border 与 lv/elevation 投影配对——ui-theme 的 elevation spec 会拒绝;状态色 border(warn 面板)保持真 border。 - 存量和新增的下拉菜单、上下文菜单、子菜单及选择菜单使用 `Menu`,自定义内容用 `MenuSurface` 包裹。材质由主题的 `--dsw-menu-surface-fill` 和 `--dsw-menu-backdrop-filter` 组成;功能及平台 CSS 不得覆盖两者。ui-theme 菜单检查拒绝未使用共享容器的 menu/listbox 渲染、材质覆盖和 token 重定义。计划任务自有的 `TaskMenu` 与 `ClockPicker` 是明确例外,保留现有容器和材质([所属包](../packages/client/ui-schedule/README.zh.md))。 - 设置、确认框等模态弹窗保留黑色半透明遮罩,不模糊背景。主题将 `--dsw-mask-blur` 设为 `none`;Desktop 自有模态浮层也不对父页面施加模糊。 diff --git a/packages/client/ui-theme/src/styles/corner-shape.css b/packages/client/ui-theme/src/styles/corner-shape.css index fe848ddca6..1f6af00be3 100644 --- a/packages/client/ui-theme/src/styles/corner-shape.css +++ b/packages/client/ui-theme/src/styles/corner-shape.css @@ -1,8 +1,8 @@ /* Default smooth corner curvature. Inside the support guard, corners use * superellipse(1.5) — between a circular arc (round = superellipse(1)) and a - * squircle (superellipse(2)) — instead of the - * default arc; engines without corner-shape keep circular corners because the - * token and the rule exist only inside the guard. + * squircle (superellipse(2)) — instead of the default arc. Engines without + * corner-shape keep circular corners because the token and the rule exist + * only inside the guard. * * corner-shape does not inherit, so the universal selector applies the token * to elements and their ::before/::after; other pseudo-elements (for example From 401b810d5a7bfd27cbb9ebee7fa2a127ccce1821 Mon Sep 17 00:00:00 2001 From: kingwl Date: Mon, 5 Oct 2026 00:14:25 +0800 Subject: [PATCH 5/7] fix(web): align task and attachment card styling --- docs/ui-radius.i18n.yaml | 4 ++-- docs/ui-radius.md | 2 +- docs/ui-radius.zh.md | 2 +- packages/client/ui-chat/README.i18n.yaml | 4 ++-- packages/client/ui-chat/README.md | 2 ++ packages/client/ui-chat/README.zh.md | 2 ++ .../src/client/chat/MessageItem.module.css | 2 +- packages/client/ui-plan/README.i18n.yaml | 4 ++-- packages/client/ui-plan/README.md | 2 +- packages/client/ui-plan/README.zh.md | 2 +- .../ui-plan/src/client/PlanPreview.module.css | 3 ++- packages/client/ui-schedule/README.i18n.yaml | 4 ++-- packages/client/ui-schedule/README.md | 2 +- packages/client/ui-schedule/README.zh.md | 2 +- .../src/client/ScheduleCreateCard.module.css | 19 +++++++++---------- .../schedule-create-card.client.spec.tsx | 4 +--- .../expected/radius-exceptions.expected.json | 1 - 17 files changed, 31 insertions(+), 30 deletions(-) diff --git a/docs/ui-radius.i18n.yaml b/docs/ui-radius.i18n.yaml index 5fdd6c94a2..9e375c4184 100644 --- a/docs/ui-radius.i18n.yaml +++ b/docs/ui-radius.i18n.yaml @@ -15,8 +15,8 @@ en: cd8120cba5566e19 zh: 65359436088c8bc5 /dsh-unified-corner-radius-standard/select-the-radius: - en: 133f5ec603e88375 - zh: ef264171ceff69ed + en: 9a090e07e101251c + zh: 349596d7840d018d /dsh-unified-corner-radius-standard/reuse-tokens-and-preserve-deliberate-shapes: en: 855243d81b28eb13 zh: b66b63e4f5e793fa diff --git a/docs/ui-radius.md b/docs/ui-radius.md index 7434013541..8c01887378 100644 --- a/docs/ui-radius.md +++ b/docs/ui-radius.md @@ -40,7 +40,7 @@ Prefer an existing shared size variant when a proposed control falls between the Concrete defaults: `Button` uses H28/R8 for `sm` and H36/R12 for `md`, including outline variants. Standard H32 inputs and H36 selectors use R12. The Workspace files and New terminal guide entries both use R20, including title-only and described variants. Reserve R28 for their enclosing panel or dialog, not those entries. -Code blocks, diffs, and file previews share R16: changed-file entry cards, delivered-file cards, submitted-plan cards, generic file attachment cards, and hover preview panels. The 40px file-icon tiles inside changed-file, delivery, and submitted-plan cards use R10 on all four corners as a component-specific exception. Their hover fills keep the same contour. +Code blocks, diffs, and preview cards share R16: changed-file entry cards, delivered-file cards, submitted-plan cards, created-task cards, generic file attachment cards before and after sending, and hover preview panels. The 40px icon tiles inside changed-file, delivery, submitted-plan, and created-task cards use R10 on all four corners as a component-specific exception and share the same neutral tile fill and border in both themes. Their hover fills keep the same contour. ## Reuse tokens and preserve deliberate shapes diff --git a/docs/ui-radius.zh.md b/docs/ui-radius.zh.md index ad5534a6cb..f173dc3e9b 100644 --- a/docs/ui-radius.zh.md +++ b/docs/ui-radius.zh.md @@ -40,7 +40,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 具体默认值:`Button` 的 `sm` 使用 H28/R8,`md` 使用 H36/R12,包含描边变体。标准 H32 输入框和 H36 选择器使用 R12。“工作区文件”和“新建终端”引导入口统一使用 R20,包含仅标题与带描述的变体。R28 留给包围它们的面板或对话框,不用于这些入口。 -代码块、diff 与文件预览共用 R16:包括改动文件入口卡片、交付文件卡片、已提交计划卡片、通用附件文件卡片和悬停预览浮层。改动文件、交付文件与已提交计划卡片内部的 40px 文件图标底框作为组件特例,四角统一使用 R10。各自的 hover 保持同一轮廓。 +代码块、diff 与预览卡片共用 R16:包括改动文件入口卡片、交付文件卡片、已提交计划卡片、已创建任务卡片、发送前后的通用附件文件卡片和悬停预览浮层。改动文件、交付文件、已提交计划与已创建任务卡片内部的 40px 图标底框作为组件特例,四角统一使用 R10,并在明暗两种主题下分别共用相同的中性底色与边框。各自的 hover 保持同一轮廓。 ## 复用 token,保留有意设计的形状 diff --git a/packages/client/ui-chat/README.i18n.yaml b/packages/client/ui-chat/README.i18n.yaml index b2435fa8ab..6c2d3f163e 100644 --- a/packages/client/ui-chat/README.i18n.yaml +++ b/packages/client/ui-chat/README.i18n.yaml @@ -15,8 +15,8 @@ en: 41cd21266011d571 zh: 3172d1a2acbb27b7 /deepseek-ai-dsh-client-ui-chat/reference-previews: - en: 0a1948349b1fbfd9 - zh: 56256e4d695e5192 + en: 0e9c004b62fa2f77 + zh: d0b0e27f74747253 /deepseek-ai-dsh-client-ui-chat/hidden-chat-rows: en: cbf1f0a2205046a5 zh: 2e59d0815351349f diff --git a/packages/client/ui-chat/README.md b/packages/client/ui-chat/README.md index b8e1441864..47ad8e2a27 100644 --- a/packages/client/ui-chat/README.md +++ b/packages/client/ui-chat/README.md @@ -33,6 +33,8 @@ File-mention providers receive the viewed Session ID with the closing-turn owner ## Reference previews +Sent generic-file attachments retain the draft's [file-card radius](../../../docs/ui-radius.md#radius-scale). + Chat supplies file and HTTP(S) navigation through one `MarkdownDelegateProvider` around its node list. Assistant Markdown file links open in the right Sidebar after the message settles, including references to unmodified files. Relative paths resolve in the viewed Session's workspace; absolute paths retain the same Session's filesystem access. `#L24` and `#L24-L30` navigate to the first specified line and reuse an existing file tab. Missing files show the preview's error state. Standalone Markdown images show contained previews and open the shared image lightbox; local paths resolve against the viewed workspace after settlement. Image file links keep their sidebar activation and show a thumbnail after hover dwell or keyboard focus. Escape dismisses the thumbnail. Failed images retain a localized status and their description; no duplicate-image filtering is applied. diff --git a/packages/client/ui-chat/README.zh.md b/packages/client/ui-chat/README.zh.md index 607b3075a4..b54a57f676 100644 --- a/packages/client/ui-chat/README.zh.md +++ b/packages/client/ui-chat/README.zh.md @@ -33,6 +33,8 @@ kind: "package-reference" ## 引用预览 +已发送的普通文件附件保留草稿中的[文件卡片圆角](../../../docs/ui-radius.zh.md#radius-scale)。 + Chat 在节点列表外通过一个 `MarkdownDelegateProvider` 提供文件及 HTTP(S) 导航。Assistant Markdown 文件链接在消息落定后可于右侧栏打开,包括未修改文件的引用。相对路径基于当前查看的 Session 工作区解析;绝对路径仍使用同一 Session 的文件系统访问。`#L24` 和 `#L24-L30` 定位到指定起始行,并复用现有文件标签。文件缺失时显示预览错误状态。 独立的 Markdown 图片以内嵌预览显示,点击打开共享图片浮层;本地路径在消息落定后基于当前查看的工作区解析。图片文件链接保持点击打开侧栏,鼠标停留或键盘聚焦时显示缩略图,Esc 关闭缩略图。图片加载失败时保留本地化状态与图片说明;不执行重复图片过滤。 diff --git a/packages/client/ui-chat/src/client/chat/MessageItem.module.css b/packages/client/ui-chat/src/client/chat/MessageItem.module.css index 5d19483335..3bacafab47 100644 --- a/packages/client/ui-chat/src/client/chat/MessageItem.module.css +++ b/packages/client/ui-chat/src/client/chat/MessageItem.module.css @@ -326,7 +326,7 @@ min-height: 64px; padding: 8px 12px; border: 0.5px solid var(--dsw-alias-border-l2, rgba(0, 0, 0, 0.12)); - border-radius: var(--dsw-radius-xl); + border-radius: var(--dsw-radius-lg); background: var(--dsw-specific-input-major, transparent); box-sizing: border-box; } diff --git a/packages/client/ui-plan/README.i18n.yaml b/packages/client/ui-plan/README.i18n.yaml index c8cd16312e..925a4e8253 100644 --- a/packages/client/ui-plan/README.i18n.yaml +++ b/packages/client/ui-plan/README.i18n.yaml @@ -27,8 +27,8 @@ en: a13078ade4ef3b9d zh: 2c8b3e8b62ad5652 /deepseek-ai-dsh-client-ui-plan/understand-the-implementation: - en: 8f4efc68f61687a2 - zh: 917497a67dc2683e + en: 31edfe487dfa0c08 + zh: c687a5fa5391415a /deepseek-ai-dsh-client-ui-plan/further-exploration: en: 59f62ef6269abf82 zh: c8b4ee607be1e432 diff --git a/packages/client/ui-plan/README.md b/packages/client/ui-plan/README.md index 57e3519093..db2ea4266a 100644 --- a/packages/client/ui-plan/README.md +++ b/packages/client/ui-plan/README.md @@ -55,7 +55,7 @@ Plan cards derive from native `tool/call` or PTC dispatch arguments through a Co The framework-bound `usePlans(turn)` exposes only submitted-plan data for that Turn. Chat indexes membership on Node updates and orders this collection when read; card rendering neither scans the transcript nor subscribes to other Turns or Node kinds. -Submitted-plan cards follow the [file-card radius family](../../../docs/ui-radius.md#radius-scale). +Submitted-plan cards follow the [file-card family](../../../docs/ui-radius.md#radius-scale) for their radius and icon-tile material. diff --git a/packages/client/ui-plan/README.zh.md b/packages/client/ui-plan/README.zh.md index a4618ea8db..f3f5bc6203 100644 --- a/packages/client/ui-plan/README.zh.md +++ b/packages/client/ui-plan/README.zh.md @@ -55,7 +55,7 @@ kind: "package-reference" 框架绑定的 `usePlans(turn)` 只提供该回合的已提交计划数据。Chat 随节点更新维护成员索引,并在读取时排列该集合;卡片渲染不扫描整段对话,也不订阅其他回合或节点类型。 -已提交计划卡片遵循[文件卡片圆角家族](../../../docs/ui-radius.zh.md#radius-scale)。 +已提交计划卡片的圆角和图标底框材质遵循[文件卡片家族](../../../docs/ui-radius.zh.md#radius-scale)。 diff --git a/packages/client/ui-plan/src/client/PlanPreview.module.css b/packages/client/ui-plan/src/client/PlanPreview.module.css index 13f0d24081..02a272fcf3 100644 --- a/packages/client/ui-plan/src/client/PlanPreview.module.css +++ b/packages/client/ui-plan/src/client/PlanPreview.module.css @@ -23,7 +23,8 @@ :global(body[data-ds-dark-theme]) .card { --plan-card-fill: var(--dsw-static-neutral-850); --plan-card-hover: var(--dsw-static-neutral-800); } .card:hover { background: var(--plan-card-hover); } .card:focus-visible { outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary)); outline-offset: 3px; } -.cardIcon { box-sizing: border-box; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0.5px solid var(--dsw-alias-border-l1); border-radius: 10px; background: var(--plan-card-fill); } +.cardIcon { box-sizing: border-box; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0.5px solid var(--dsw-alias-border-l1); border-radius: 10px; background: color-mix(in srgb, var(--dsw-static-neutral-00) 50%, transparent); } +:global(body[data-ds-dark-theme]) .cardIcon { background: color-mix(in srgb, var(--dsw-static-neutral-00) 5%, transparent); } .cardDetails { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; } .cardTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; line-height: 20px; } .cardDescription { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-tertiary); font-size: 10px; line-height: 16px; } diff --git a/packages/client/ui-schedule/README.i18n.yaml b/packages/client/ui-schedule/README.i18n.yaml index aae91cb558..50241a25d1 100644 --- a/packages/client/ui-schedule/README.i18n.yaml +++ b/packages/client/ui-schedule/README.i18n.yaml @@ -21,8 +21,8 @@ en: 6bd6882dbbbefcb0 zh: 03aa15f1a65d13dc /deepseek-ai-dsh-client-ui-schedule/understand-the-implementation: - en: 5e640dad909768cc - zh: d25fee44d0550c90 + en: 959145f9a08c3913 + zh: caae642a82d2acd3 /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 ae2b0ffc6b..2731187fae 100644 --- a/packages/client/ui-schedule/README.md +++ b/packages/client/ui-schedule/README.md @@ -67,7 +67,7 @@ A restored task tab carries no navigation parameters, because the Sidebar persis Subscriptions exist only while the framework observes a source. The final unsubscribe releases event listeners and invalidates pending responses. Components receive framework-bound `useCatalog` hooks and explicit action callbacks. The mounted Records view reads `schedule.history` with the selected task's original Session binding; catalog and list responses omit full history. Components own disposable search, filtering, selection, confirmation, and history-page state. Reminder records remain Host-owned and do not come from historical Session projections or browser-local demo data. -Task menus use the [standard menu geometry](../../../docs/ui-radius.md#nested-hover), including keyboard-highlighted rows. +Task menus use the [standard menu geometry](../../../docs/ui-radius.md#nested-hover), including keyboard-highlighted rows. Created-task cards follow the [file-card family](../../../docs/ui-radius.md#radius-scale) for their radius and icon-tile material. diff --git a/packages/client/ui-schedule/README.zh.md b/packages/client/ui-schedule/README.zh.md index 9e616725a6..cd027ea2ea 100644 --- a/packages/client/ui-schedule/README.zh.md +++ b/packages/client/ui-schedule/README.zh.md @@ -67,7 +67,7 @@ kind: "package-reference" 仅在框架观察数据源期间订阅。最后一个订阅取消时释放事件监听,并使尚未完成的响应失效。组件接收框架绑定的 `useCatalog` hook 和明确的操作回调。已挂载的任务运行记录视图使用所选任务的原会话绑定读取 `schedule.history`;目录和列表响应不包含完整历史。组件拥有可丢弃的搜索、筛选、选择、确认和历史分页状态。提醒记录由 Host 拥有,不来自历史会话投影或浏览器本地演示数据。 -任务菜单使用[标准菜单几何](../../../docs/ui-radius.zh.md#nested-hover),包含键盘高亮行。 +任务菜单使用[标准菜单几何](../../../docs/ui-radius.zh.md#nested-hover),包含键盘高亮行。已创建任务卡片的圆角和图标底框材质遵循[文件卡片家族](../../../docs/ui-radius.zh.md#radius-scale)。 diff --git a/packages/client/ui-schedule/src/client/ScheduleCreateCard.module.css b/packages/client/ui-schedule/src/client/ScheduleCreateCard.module.css index 551dee0b93..a56588c1d4 100644 --- a/packages/client/ui-schedule/src/client/ScheduleCreateCard.module.css +++ b/packages/client/ui-schedule/src/client/ScheduleCreateCard.module.css @@ -1,7 +1,4 @@ -/* schedule_create transcript card: clock, task title, frequency, open action. - The box is the delivery card's (ui-deliverables Deliverables.module.css - `.file`): the same fill/hover pair, 60px row, 8/10 padding, and 18px corner, - with one inset overlay button making the whole row open the task. */ +/* Created-task cards follow the file-card treatment in docs/ui-radius.md. */ .card { --card-fill: var(--dsw-static-neutral-50); @@ -15,7 +12,7 @@ padding: 8px 10px; overflow: hidden; border: 0.5px solid var(--dsw-alias-border-l1); - border-radius: 18px; + border-radius: var(--dsw-radius-lg); background: var(--card-fill); color: var(--dsw-alias-label-primary); transition: background-color 120ms ease; @@ -59,8 +56,6 @@ pointer-events: none; } -/* The clock glyph sits in the delivery card's icon frame (`.fileIcon`): a - 40px bordered 10px-corner square on the card's own fill. */ .leading { display: grid; flex: none; @@ -68,12 +63,16 @@ box-sizing: border-box; width: 40px; height: 40px; - border: 0.5px solid var(--dsw-alias-border-l2); + border: 0.5px solid var(--dsw-alias-border-l1); border-radius: 10px; - background: var(--card-fill); + background: color-mix(in srgb, var(--dsw-static-neutral-00) 50%, transparent); color: var(--dsw-alias-label-secondary); } +:global(body[data-ds-dark-theme]) .leading { + background: color-mix(in srgb, var(--dsw-static-neutral-00) 5%, transparent); +} + .leading svg { flex: none; } @@ -118,7 +117,7 @@ white-space: nowrap; } -/* The open control keeps the primitive's outlined capsule geometry and stays +/* The open control keeps the primitive's compact outlined geometry and stays its own target over the row-wide overlay. */ .openButton { flex: none; diff --git a/packages/client/ui-schedule/tests/schedule-create-card.client.spec.tsx b/packages/client/ui-schedule/tests/schedule-create-card.client.spec.tsx index 9a295266ba..58a5f134a6 100644 --- a/packages/client/ui-schedule/tests/schedule-create-card.client.spec.tsx +++ b/packages/client/ui-schedule/tests/schedule-create-card.client.spec.tsx @@ -284,11 +284,9 @@ describe('ScheduleCreateCard', () => { expect(frequency).toMatch(/color:\s*var\(--dsw-alias-label-tertiary\);/) expect(frequency).toMatch(/font-size:\s*10px;/) expect(frequency).toMatch(/line-height:\s*16px;/) - // The box is the delivery card's (ui-deliverables `.file`): fill/hover pair, - // 8/10 padding, 18px corner, and a 60px row (8px insets around 44px). const card = /\.card\s*\{([^}]*)\}/.exec(stylesheet)?.[1] ?? '' expect(card).toMatch(/padding:\s*8px 10px;/) - expect(card).toMatch(/border-radius:\s*18px;/) + expect(card).toMatch(/border-radius:\s*var\(--dsw-radius-lg\);/) expect(card).toMatch(/background:\s*var\(--card-fill\);/) expect(stylesheet).toMatch(/\.card:has\(\.cardOpen\):hover\s*\{[^}]*background:\s*var\(--card-hover\);/) expect(stylesheet).toMatch(/\.row\s*\{[^}]*min-height:\s*44px;/) 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 2726668d8e..274fc5b552 100644 --- a/packages/client/ui-theme/tests/expected/radius-exceptions.expected.json +++ b/packages/client/ui-theme/tests/expected/radius-exceptions.expected.json @@ -26,7 +26,6 @@ ".deleteButton: border-radius: 6px" ], "ui-schedule/src/client/ScheduleCreateCard.module.css": [ - ".card: border-radius: 18px", ".leading: border-radius: 10px" ], "ui-schedule/src/client/TaskManagerPage.module.css": [ From dd87b0f82b5a66744f1bff7da00f8f0d47667682 Mon Sep 17 00:00:00 2001 From: kingwl Date: Fri, 9 Oct 2026 16:23:06 +0800 Subject: [PATCH 6/7] fix(web): preserve composer spacing and compact statistics corners --- docs/ui-radius.i18n.yaml | 12 ++++++------ docs/ui-radius.md | 6 +++--- docs/ui-radius.zh.md | 6 +++--- packages/client/ui-chat/README.i18n.yaml | 4 ++-- packages/client/ui-chat/README.md | 2 +- packages/client/ui-chat/README.zh.md | 2 +- .../ui-chat/src/client/chat/StatsPills.module.css | 8 +++----- packages/client/ui-conversation/README.i18n.yaml | 4 ++-- packages/client/ui-conversation/README.md | 2 +- packages/client/ui-conversation/README.zh.md | 2 +- .../src/client/skeleton/ContextMeter.module.css | 5 ++--- .../src/client/skeleton/InputBar.module.css | 5 +---- 12 files changed, 26 insertions(+), 32 deletions(-) diff --git a/docs/ui-radius.i18n.yaml b/docs/ui-radius.i18n.yaml index 9e375c4184..844e869e16 100644 --- a/docs/ui-radius.i18n.yaml +++ b/docs/ui-radius.i18n.yaml @@ -15,14 +15,14 @@ en: cd8120cba5566e19 zh: 65359436088c8bc5 /dsh-unified-corner-radius-standard/select-the-radius: - en: 9a090e07e101251c - zh: 349596d7840d018d + en: e656a4338333da37 + zh: 504abf8b0f5fc8f1 /dsh-unified-corner-radius-standard/reuse-tokens-and-preserve-deliberate-shapes: - en: 855243d81b28eb13 - zh: b66b63e4f5e793fa + en: 57074166ec5a6149 + zh: 3065680007c3a436 /dsh-unified-corner-radius-standard/nested-geometry-and-hover: - en: 8b4df9c033b66378 - zh: 6b9bcd19040ec0e5 + en: ffe2954cdba61ca6 + zh: 56bd59debb04fe34 /dsh-unified-corner-radius-standard/settings-card-materials: en: 85e7e63183df06d1 zh: 1da2b44083d7ebe2 diff --git a/docs/ui-radius.md b/docs/ui-radius.md index 8c01887378..226e6f6c05 100644 --- a/docs/ui-radius.md +++ b/docs/ui-radius.md @@ -38,7 +38,7 @@ H means designed outer height in CSS pixels, including borders. R means CSS `bor Prefer an existing shared size variant when a proposed control falls between these bands. A taller card remains a card: do not promote it to R28 merely because it exceeds a button's height. A multiline cell intentionally designed for multiple lines uses R16; an ordinary button whose label wraps retains its button variant. -Concrete defaults: `Button` uses H28/R8 for `sm` and H36/R12 for `md`, including outline variants. Standard H32 inputs and H36 selectors use R12. The Workspace files and New terminal guide entries both use R20, including title-only and described variants. Reserve R28 for their enclosing panel or dialog, not those entries. +Concrete defaults: `Button` uses H28/R8 for `sm` and H36/R12 for `md`, including outline variants. Standard H32 inputs and H36 selectors use R12. The Workspace files and New terminal guide entries both use R20, including title-only and described variants. Reserve R28 for their enclosing panel or dialog, not those entries. Composer statistics and the context-occupancy trigger use compact-control R8 with the theme curve, including hover, expanded, and focus states. Code blocks, diffs, and preview cards share R16: changed-file entry cards, delivered-file cards, submitted-plan cards, created-task cards, generic file attachment cards before and after sending, and hover preview panels. The 40px icon tiles inside changed-file, delivery, submitted-plan, and created-task cards use R10 on all four corners as a component-specific exception and share the same neutral tile fill and border in both themes. Their hover fills keep the same contour. @@ -51,7 +51,7 @@ Consume the named tokens instead of introducing local values such as 10px, 14px, Ordinary rounded surfaces use the theme's `superellipse(1.5)` curve where supported; the composer follows the circular [concentric-inset rule](#nested-hover). `corner-shape` is not inherited: the theme applies it to elements and their `::before`/`::after`. Unsupported engines retain ordinary circular corners. Do not introduce component-specific smoothing that makes a fill and its outline curve differently. -Preserve intentional circles and capsules: avatars and status dots use `50%`; explicit pills and full-round tracks may use `999px`. Pair every such full-round declaration with `corner-shape: round` in the same rule. Token/cache statistics and the context-occupancy trigger belong to one capsule family, including their hover, expanded, and focus states. Do not turn every button into a capsule just because its height is small. Tiny drawing details, such as glyph marks or miniature tracks, may retain their established local geometry; they do not justify arbitrary radii on surrounding controls. +Preserve intentional circles and capsules: avatars and status dots use `50%`; explicit pills and full-round tracks may use `999px`. Pair every such full-round declaration with `corner-shape: round` in the same rule. Do not turn every button into a capsule just because its height is small. Tiny drawing details, such as glyph marks or miniature tracks, may retain their established local geometry; they do not justify arbitrary radii on surrounding controls. Both the avatar container and its `img` must remain circular; an image that inherits only `border-radius` still needs an explicit `corner-shape: round` or must inherit the curve from its circular container. Keep equal width and height on both. See [Account settings](../packages/client/ui-settings-account/README.md#use-this-package) for account avatar sizes. @@ -68,7 +68,7 @@ Distinguish these three arrangements before changing a child radius: | Fill flush against an enclosing edge | The enclosure owns the visible corner; clip the fill or inherit the matching corner | A split-button card with two independent hover regions | | Separate card or form group inside another surface | Choose the child's semantic tier; do not subtract all parent padding mechanically | R16 editor within an R20 settings card | -The composer uses circular arcs at all four corners, with outer R = primary-button diameter / 2 + its equal right and bottom inset. A 34px button and 8px inset give R25. With the toolbar on one line, the lower-right arc and primary button share a center; the 28px attachment button shares the lower-left center with an 11px left and bottom inset. Each pair keeps its horizontal, vertical, and diagonal gaps equal. The workspace-picker outline inherits the card's radius and curve. +The composer uses circular arcs at all four corners, with outer R = primary-button diameter / 2 + its equal right and bottom inset. A 34px button and 8px inset give R25. With the toolbar on one line, the lower-right arc and primary button share a center. The 28px attachment button stays aligned with the smaller toolbar controls; its unequal left and bottom insets preserve the row's visual balance. The workspace-picker outline inherits the card's radius and curve. Standard menus use outer R16, 4px padding, and R12 items, including command selection, task menus, and the exposed highlights in subagent and background-job menus. Tree disclosure gutters retain their indentation; controls inside a filled job row keep their own compact geometry. Compact menus use outer R12, 4px padding, and R8 items. Shared `SegmentedControl` uses outer R12, 4px inset, and R8 segments/indicator; `SegmentedTabs` uses outer R16, 4px inset, and R12 segments/indicator. Keep indicator offsets, width calculations, submenu alignment, and pointer bridges consistent when changing padding. diff --git a/docs/ui-radius.zh.md b/docs/ui-radius.zh.md index f173dc3e9b..30a34e16fc 100644 --- a/docs/ui-radius.zh.md +++ b/docs/ui-radius.zh.md @@ -38,7 +38,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 拟定控件尺寸落在档位之间时,优先复用已有的公共尺寸变体。高卡片仍是卡片,不因高度超过按钮就升到 R28。专门设计为多行的 cell 使用 R16;普通按钮的文字发生换行时,仍保留其按钮变体。 -具体默认值:`Button` 的 `sm` 使用 H28/R8,`md` 使用 H36/R12,包含描边变体。标准 H32 输入框和 H36 选择器使用 R12。“工作区文件”和“新建终端”引导入口统一使用 R20,包含仅标题与带描述的变体。R28 留给包围它们的面板或对话框,不用于这些入口。 +具体默认值:`Button` 的 `sm` 使用 H28/R8,`md` 使用 H36/R12,包含描边变体。标准 H32 输入框和 H36 选择器使用 R12。“工作区文件”和“新建终端”引导入口统一使用 R20,包含仅标题与带描述的变体。R28 留给包围它们的面板或对话框,不用于这些入口。输入框统计控件与上下文占用率入口使用紧凑控件的 R8 和主题曲线,包含 hover、展开与焦点状态。 代码块、diff 与预览卡片共用 R16:包括改动文件入口卡片、交付文件卡片、已提交计划卡片、已创建任务卡片、发送前后的通用附件文件卡片和悬停预览浮层。改动文件、交付文件、已提交计划与已创建任务卡片内部的 40px 图标底框作为组件特例,四角统一使用 R10,并在明暗两种主题下分别共用相同的中性底色与边框。各自的 hover 保持同一轮廓。 @@ -51,7 +51,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 普通圆角表面在支持时使用主题的 `superellipse(1.5)` 曲线;对话输入框遵循圆弧的[同心内缩规则](#nested-hover)。`corner-shape` 不会继承:主题将它应用于元素及其 `::before`/`::after`。不支持的引擎保留普通圆弧。不要添加组件专用的平滑规则,导致底色与外框使用不同曲线。 -保留有意设计的圆形与胶囊:头像和状态点使用 `50%`;明确的胶囊与全圆轨道可使用 `999px`。每个此类全圆声明都在同一规则中配对 `corner-shape: round`。Token/缓存统计与上下文占用率入口属于同一胶囊家族,包含 hover、展开与焦点状态。不要因为高度较小就把所有按钮变成胶囊。图形标记或微型轨道等细小绘制细节可保留既有局部几何,但不能据此给外围控件使用任意圆角。 +保留有意设计的圆形与胶囊:头像和状态点使用 `50%`;明确的胶囊与全圆轨道可使用 `999px`。每个此类全圆声明都在同一规则中配对 `corner-shape: round`。不要因为高度较小就把所有按钮变成胶囊。图形标记或微型轨道等细小绘制细节可保留既有局部几何,但不能据此给外围控件使用任意圆角。 头像的容器和内部 `img` 都要保持正圆;图片不能只继承 `border-radius`,还必须显式使用 `corner-shape: round`,或从正圆容器继承曲线。图片和容器均保持宽高相等。账号头像的具体尺寸见[账号设置](../packages/client/ui-settings-account/README.zh.md#use-this-package)。 @@ -68,7 +68,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 | 底色紧贴容器边缘 | 由外框决定可见圆角;裁切底色或继承相应圆角 | 两个独立 hover 区域组成的分体按钮卡片 | | 容器内独立的卡片或表单组 | 按子元素用途选择档位;不机械减去全部父级内边距 | R20 设置卡片内的 R16 编辑器 | -对话输入框四角均使用圆弧,外层 R = 主按钮直径 / 2 + 按钮到右侧和底部的相等内缩距离。34px 按钮与 8px 内缩距离对应 R25。工具栏保持单行时,右下角圆弧与主按钮同心;28px 附件按钮距左侧和底部均为 11px,与左下角同心。每一对轮廓的水平、垂直和对角线间隙均相等。工作区选择状态的轮廓继承卡片的半径与曲线。 +对话输入框四角均使用圆弧,外层 R = 主按钮直径 / 2 + 按钮到右侧和底部的相等内缩距离。34px 按钮与 8px 内缩距离对应 R25。工具栏保持单行时,右下角圆弧与主按钮同心。28px 附件按钮与较小的工具栏控件保持对齐;左侧和底部采用不同内缩距离,以保持整行的视觉平衡。工作区选择状态的轮廓继承卡片的半径与曲线。 标准菜单使用外层 R16、4px 内边距、R12 菜单项,包含命令选择、任务菜单,以及子会话和后台任务菜单的外露高亮区域。树形展开操作保留缩进;带底色任务行内的控件保留各自的紧凑几何。紧凑菜单使用外层 R12、4px 内边距、R8 菜单项。公共 `SegmentedControl` 使用外层 R12、4px 内缩、R8 分段和指示器;`SegmentedTabs` 使用外层 R16、4px 内缩、R12 分段和指示器。修改内边距时,同步保持指示器偏移、宽度计算、子菜单对齐与指针桥接区域一致。 diff --git a/packages/client/ui-chat/README.i18n.yaml b/packages/client/ui-chat/README.i18n.yaml index 4cc1462e68..7dbea162e3 100644 --- a/packages/client/ui-chat/README.i18n.yaml +++ b/packages/client/ui-chat/README.i18n.yaml @@ -24,8 +24,8 @@ en: 2157fcd6b0d100b5 zh: 9e865ac3953ebe30 /deepseek-ai-dsh-client-ui-chat/turn-token-usage: - en: 14343dd14e493f4b - zh: 7cc7a25d05ea798f + en: 53fd2db200c9ea16 + zh: 65c7b5ef1eb4159c /deepseek-ai-dsh-client-ui-chat/completed-turn-footer: en: b4cd36e7ab91281e zh: 8ccf412b9dde61d5 diff --git a/packages/client/ui-chat/README.md b/packages/client/ui-chat/README.md index e0592e2304..c2c8688d19 100644 --- a/packages/client/ui-chat/README.md +++ b/packages/client/ui-chat/README.md @@ -62,7 +62,7 @@ A completed Turn shows an expandable usage row only when the loaded window inclu Settings → General → Performance & usage appears after Send behavior while busy and before Session Log upload, and stores `ui-chat.performanceUsage` as `detailed` (default) or `compact`. Compact shows only available output speed and cache-hit percentage beneath the composer, without interactive statistic dialogs or per-Turn usage. Detailed exposes session statistics and per-Turn token usage. Neither mode shows elapsed time in the completed-turn footer. The preference changes presentation only; accounting and Session events remain intact. -The composer statistics are two `conversation.composer.dock` list entries: `activity` (order 0, turn and step counts and output speed, with LLM time, tool time, and TTFT) and `usage` (order 1, token total and cache hit). Another plugin replaces one pill by registering the same id and the same `order`; the dock orders rows by `order`, while a lower `priority` picks the replacement: a dynamic plugin receives one automatically, and a statically composed plugin passes it explicitly. A new id adds a pill. Each pill carries its id in `data-composer-stat`. An open pill dialog closes on Escape or on a pointerdown or click outside it, so activating another pill by pointer or keyboard swaps dialogs instead of stacking them. +The composer statistics are two `conversation.composer.dock` list entries: `activity` (order 0, turn and step counts and output speed, with LLM time, tool time, and TTFT) and `usage` (order 1, token total and cache hit). The controls follow the shared [statistics-control radius](../../../docs/ui-radius.md#radius-scale). Another plugin replaces one control by registering the same id and the same `order`; the dock orders rows by `order`, while a lower `priority` picks the replacement: a dynamic plugin receives one automatically, and a statically composed plugin passes it explicitly. A new id adds a control. Each control carries its id in `data-composer-stat`. An open statistics dialog closes on Escape or on a pointerdown or click outside it, so activating another control by pointer or keyboard swaps dialogs instead of stacking them. On non-loopback browsers, the preference remains process-local because the settings scope cannot persist writes. Explicit selections update every consumer immediately; accepted Host settings reconcile the live value on loopback browsers. diff --git a/packages/client/ui-chat/README.zh.md b/packages/client/ui-chat/README.zh.md index f8ce763de0..8ff47d6de9 100644 --- a/packages/client/ui-chat/README.zh.md +++ b/packages/client/ui-chat/README.zh.md @@ -62,7 +62,7 @@ Assistant 尝试结束且没有可见消息时,Chat 隐藏已发布的 Node, 设置 → 通用设置 → 性能与用量位于繁忙时的发送行为之后、Session Log 上传之前,将 `ui-chat.performanceUsage` 保存为 `detailed`(默认)或 `compact`。简洁模式仅在输入框下方显示可用的输出速度和缓存命中率,不显示统计交互卡片或每轮用量。详细模式提供会话统计和每轮 token 用量。两种模式的已完成轮次页脚均不显示耗时。该偏好仅影响展示,记账和 Session 事件保持完整。 -输入框统计信息由两个 `conversation.composer.dock` 列表条目组成:`activity`(order 0,轮次数、步骤数与输出速度,以及 LLM 耗时、工具耗时与 TTFT)和 `usage`(order 1,token 总量与缓存命中)。其他插件以相同的 id 和相同的 `order` 注册即可替换某个胶囊;dock 按 `order` 排列各行,更低的 `priority` 决定由替换者渲染:动态插件会自动获得,静态组合的插件需显式传入。以新 id 注册则新增胶囊。每个胶囊在 `data-composer-stat` 中携带其 id。按下 Escape,或在已打开的对话框之外发生 pointerdown 或点击时,该对话框会关闭,因此用指针或键盘激活另一个胶囊会切换对话框,而不会叠加两个。 +输入框统计信息由两个 `conversation.composer.dock` 列表条目组成:`activity`(order 0,轮次数、步骤数与输出速度,以及 LLM 耗时、工具耗时与 TTFT)和 `usage`(order 1,token 总量与缓存命中)。这些控件遵循公共的[统计控件圆角规则](../../../docs/ui-radius.zh.md#radius-scale)。其他插件以相同的 id 和相同的 `order` 注册即可替换某个控件;dock 按 `order` 排列各行,更低的 `priority` 决定由替换者渲染:动态插件会自动获得,静态组合的插件需显式传入。以新 id 注册则新增控件。每个控件在 `data-composer-stat` 中携带其 id。按下 Escape,或在已打开的对话框之外发生 pointerdown 或点击时,该对话框会关闭,因此用指针或键盘激活另一个控件会切换对话框,而不会叠加两个。 在非回环地址浏览器中,设置作用域无法持久化写入,因此该偏好仅在当前进程内生效。明确选择会立即更新所有使用方;回环地址浏览器收到 Host 已接受的设置后会同步当前值。 diff --git a/packages/client/ui-chat/src/client/chat/StatsPills.module.css b/packages/client/ui-chat/src/client/chat/StatsPills.module.css index 44dab51430..dd9816e96e 100644 --- a/packages/client/ui-chat/src/client/chat/StatsPills.module.css +++ b/packages/client/ui-chat/src/client/chat/StatsPills.module.css @@ -1,6 +1,5 @@ -/* Icon pills under the composer, each one composer-dock entry laid out by the - dock's flex row; 12/20 tertiary text tier with a hover-pill affordance; each - pill's click-open panel wears the shared stat-dialog.module.css skin. */ +/* Composer statistics use compact controls; their click-open panels share + stat-dialog.module.css. */ /* Entry root and dialog anchor: shrink-wraps its pill so the panel clamp measures the pill. */ @@ -19,8 +18,7 @@ max-width: 100%; padding: 1px 8px; border: none; - border-radius: 999px; - corner-shape: round; + border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-tertiary); font: inherit; diff --git a/packages/client/ui-conversation/README.i18n.yaml b/packages/client/ui-conversation/README.i18n.yaml index 8de8f656fa..2d33f1aca3 100644 --- a/packages/client/ui-conversation/README.i18n.yaml +++ b/packages/client/ui-conversation/README.i18n.yaml @@ -18,8 +18,8 @@ en: 1d2a3a7f98c2cc9b zh: f895dd5e9f91e0a9 /deepseek-ai-dsh-client-ui-conversation/shell-and-standard-props: - en: 65eaed2aa22eb2f6 - zh: a9592e14fcac53c5 + en: 6eb1759355e1dec5 + zh: adb0f750012e3df4 /deepseek-ai-dsh-client-ui-conversation/temporary-composer-entries: en: bb1244310f5c0382 zh: 824b84077432b559 diff --git a/packages/client/ui-conversation/README.md b/packages/client/ui-conversation/README.md index de563aedfd..18d17c1eda 100644 --- a/packages/client/ui-conversation/README.md +++ b/packages/client/ui-conversation/README.md @@ -56,7 +56,7 @@ The shared image slot props keep display choices separate from durable reference The composer measures its expanded control groups after size, content, visibility, or font-loading changes. If they cannot share a line, the row sets `--dsh-composer-model-text-display: none` and `--dsh-composer-model-icon-display: block` for the model seat; their defaults are `block` and `none`. Wrapping remains available if even the icon cannot fit. -The composer card, its circular toolbar buttons, and the workspace-picker outline follow the [concentric-inset rule](../../../docs/ui-radius.md#nested-hover). The context meter follows the [statistics capsule rule](../../../docs/ui-radius.md#shapes). +The composer card, its toolbar controls, and the workspace-picker outline follow the [composer geometry](../../../docs/ui-radius.md#nested-hover). The context meter follows the [statistics-control radius](../../../docs/ui-radius.md#radius-scale). The context-occupancy button shows a ring and percentage below the input card, after the Session statistics. Clicking it opens the token breakdown in a panel kept inside the viewport, including when no statistics are shown; the button stays hidden until context usage and capacity are available. diff --git a/packages/client/ui-conversation/README.zh.md b/packages/client/ui-conversation/README.zh.md index 81310d730e..b91629901a 100644 --- a/packages/client/ui-conversation/README.zh.md +++ b/packages/client/ui-conversation/README.zh.md @@ -56,7 +56,7 @@ target package 通过 declaration merge 扩展 snapshot 与 Location data map, 控件组的尺寸、内容、可见性或字体加载状态变化后,composer 测量展开状态下的控件组。若无法排在同一行,控制栏为模型位设置 `--dsh-composer-model-text-display: none` 和 `--dsh-composer-model-icon-display: block`;两者默认值分别为 `block` 和 `none`。若连图标也放不下,仍允许换行。 -输入卡片、圆形工具栏按钮与工作区选择状态的轮廓遵循[同心内缩规则](../../../docs/ui-radius.zh.md#nested-hover)。上下文占用率入口遵循[统计胶囊规则](../../../docs/ui-radius.zh.md#shapes)。 +输入卡片、工具栏控件与工作区选择状态的轮廓遵循[输入框几何规则](../../../docs/ui-radius.zh.md#nested-hover)。上下文占用率入口遵循[统计控件圆角规则](../../../docs/ui-radius.zh.md#radius-scale)。 上下文占用按钮在输入卡片下方、会话统计右侧显示圆环和百分比。点击按钮可在视口内的面板查看 token 构成,没有统计项时面板也不会越界;上下文用量和容量尚不可用时,按钮保持隐藏。 diff --git a/packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css b/packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css index 52476cbd50..9d94b96e76 100644 --- a/packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/ContextMeter.module.css @@ -1,4 +1,4 @@ -/* Context-occupancy pill below the composer plus its click-open breakdown +/* Context-occupancy control below the composer plus its click-open breakdown panel (menu surface: elevation-prominent). */ .root { @@ -13,8 +13,7 @@ flex: none; padding: 1px 8px; border: none; - border-radius: 999px; - corner-shape: round; + border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-tertiary); font-family: inherit; 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 af3cb8fff7..2dca529dcc 100644 --- a/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css @@ -63,7 +63,7 @@ border: 0; --dsw-elevation-stroke-color: var(--dsw-alias-border-l2); border-radius: calc(var(--dsh-composer-primary-size) / 2 + var(--dsh-composer-control-inset)); - /* The lower arcs share centers with the circular toolbar buttons. */ + /* The lower-right arc shares a center with the primary button. */ corner-shape: round; background: var(--dsw-specific-input-major); box-shadow: var(--dsw-elevation-soft); @@ -323,15 +323,12 @@ flex: none; width: var(--dsh-composer-add-size); height: var(--dsh-composer-add-size); - /* The smaller circle needs the radius difference as extra left inset. */ - margin-left: calc((var(--dsh-composer-primary-size) - var(--dsh-composer-add-size)) / 2); border: none; border-radius: 999px; corner-shape: round; background: var(--dsw-specific-selector); color: var(--dsw-alias-label-primary); cursor: pointer; - transform: translateY(calc(-1 * var(--dsh-composer-row-shift))); } .add:hover:not(:disabled) { From a0d31a9f27fd0742f3008b445f95a8661315de79 Mon Sep 17 00:00:00 2001 From: kingwl Date: Fri, 9 Oct 2026 18:38:13 +0800 Subject: [PATCH 7/7] fix(web): restore master composer geometry --- docs/ui-radius.i18n.yaml | 12 +++---- docs/ui-radius.md | 6 ++-- docs/ui-radius.zh.md | 6 ++-- docs/web-styling.i18n.yaml | 4 +-- docs/web-styling.md | 2 +- docs/web-styling.zh.md | 2 +- .../client/ui-conversation/README.i18n.yaml | 4 +-- packages/client/ui-conversation/README.md | 2 +- packages/client/ui-conversation/README.zh.md | 2 +- .../src/client/skeleton/InputBar.module.css | 32 ++++++++----------- .../ui-theme/src/styles/corner-shape.css | 13 ++++---- 11 files changed, 38 insertions(+), 47 deletions(-) diff --git a/docs/ui-radius.i18n.yaml b/docs/ui-radius.i18n.yaml index 844e869e16..0c8d58fcd9 100644 --- a/docs/ui-radius.i18n.yaml +++ b/docs/ui-radius.i18n.yaml @@ -15,14 +15,14 @@ en: cd8120cba5566e19 zh: 65359436088c8bc5 /dsh-unified-corner-radius-standard/select-the-radius: - en: e656a4338333da37 - zh: 504abf8b0f5fc8f1 + en: e736416ec85d6e16 + zh: 0edf60fccc867295 /dsh-unified-corner-radius-standard/reuse-tokens-and-preserve-deliberate-shapes: - en: 57074166ec5a6149 - zh: 3065680007c3a436 + en: fb6d50f3139ad186 + zh: 668cb0c02bd22167 /dsh-unified-corner-radius-standard/nested-geometry-and-hover: - en: ffe2954cdba61ca6 - zh: 56bd59debb04fe34 + en: 7fe4eb7707e6a9f3 + zh: be7530a05c205e27 /dsh-unified-corner-radius-standard/settings-card-materials: en: 85e7e63183df06d1 zh: 1da2b44083d7ebe2 diff --git a/docs/ui-radius.md b/docs/ui-radius.md index 226e6f6c05..303e7c9382 100644 --- a/docs/ui-radius.md +++ b/docs/ui-radius.md @@ -34,7 +34,7 @@ H means designed outer height in CSS pixels, including borders. R means CSS `bor | Standard control or single-line cell | H32–40; buttons, inputs, selects, navigation rows | R12 | `--dsw-radius-md` | | Large control or grouped content | Large buttons, deliberately multiline cells, nested form groups | R16 | `--dsw-radius-lg` | | Independent content card | Settings cards, message bubbles, guide entry cards | R20 | `--dsw-radius-xl` | -| Main enclosing surface | Dialogs, main or floating panels | R28 | `--dsw-radius-panel` | +| Main enclosing surface | Composer, dialogs, main or floating panels | R28 | `--dsw-radius-panel` | Prefer an existing shared size variant when a proposed control falls between these bands. A taller card remains a card: do not promote it to R28 merely because it exceeds a button's height. A multiline cell intentionally designed for multiple lines uses R16; an ordinary button whose label wraps retains its button variant. @@ -49,7 +49,7 @@ Reuse `ui-primitives` controls before adding feature-owned geometry. Use `box-si Consume the named tokens instead of introducing local values such as 10px, 14px, 18px, or 24px for ordinary controls and cards. Schedule controls, Desktop onboarding, account notices, and shortcut controls retain their package-owned geometry; the [radius exception record](../packages/client/ui-theme/tests/expected/radius-exceptions.expected.json) pins each permitted file, selector, and declaration rather than exempting whole packages. A family-specific property may refer to a shared token, as `--dsl-guide-entry-radius` does. Geometry derived from a real inset may use `calc()`; it is not an additional scale tier. -Ordinary rounded surfaces use the theme's `superellipse(1.5)` curve where supported; the composer follows the circular [concentric-inset rule](#nested-hover). `corner-shape` is not inherited: the theme applies it to elements and their `::before`/`::after`. Unsupported engines retain ordinary circular corners. Do not introduce component-specific smoothing that makes a fill and its outline curve differently. +Ordinary rounded surfaces use the theme's `superellipse(1.5)` curve where supported. `corner-shape` is not inherited: the theme applies it to elements and their `::before`/`::after`. Unsupported engines retain ordinary circular corners. Do not introduce component-specific smoothing that makes a fill and its outline curve differently. Preserve intentional circles and capsules: avatars and status dots use `50%`; explicit pills and full-round tracks may use `999px`. Pair every such full-round declaration with `corner-shape: round` in the same rule. Do not turn every button into a capsule just because its height is small. Tiny drawing details, such as glyph marks or miniature tracks, may retain their established local geometry; they do not justify arbitrary radii on surrounding controls. @@ -68,8 +68,6 @@ Distinguish these three arrangements before changing a child radius: | Fill flush against an enclosing edge | The enclosure owns the visible corner; clip the fill or inherit the matching corner | A split-button card with two independent hover regions | | Separate card or form group inside another surface | Choose the child's semantic tier; do not subtract all parent padding mechanically | R16 editor within an R20 settings card | -The composer uses circular arcs at all four corners, with outer R = primary-button diameter / 2 + its equal right and bottom inset. A 34px button and 8px inset give R25. With the toolbar on one line, the lower-right arc and primary button share a center. The 28px attachment button stays aligned with the smaller toolbar controls; its unequal left and bottom insets preserve the row's visual balance. The workspace-picker outline inherits the card's radius and curve. - Standard menus use outer R16, 4px padding, and R12 items, including command selection, task menus, and the exposed highlights in subagent and background-job menus. Tree disclosure gutters retain their indentation; controls inside a filled job row keep their own compact geometry. Compact menus use outer R12, 4px padding, and R8 items. Shared `SegmentedControl` uses outer R12, 4px inset, and R8 segments/indicator; `SegmentedTabs` uses outer R16, 4px inset, and R12 segments/indicator. Keep indicator offsets, width calculations, submenu alignment, and pointer bridges consistent when changing padding. The radius subtraction is also the nominal sizing rule for nested superellipses. Equal exponents do not make them exact offset curves, so their diagonal gap may differ from the side inset. Keep the shared superellipse menu and segmented-control treatments; use circular arcs when strict equal radial spacing is required. diff --git a/docs/ui-radius.zh.md b/docs/ui-radius.zh.md index 30a34e16fc..80edb753c6 100644 --- a/docs/ui-radius.zh.md +++ b/docs/ui-radius.zh.md @@ -34,7 +34,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 | 标准控件或单行 cell | H32–40;按钮、输入框、选择器、导航行 | R12 | `--dsw-radius-md` | | 大控件或分组内容 | 大按钮、明确设计为多行的 cell、嵌套表单组 | R16 | `--dsw-radius-lg` | | 独立内容卡片 | 设置卡片、消息气泡、引导入口卡片 | R20 | `--dsw-radius-xl` | -| 主容器 | 对话框、主面板或悬浮面板 | R28 | `--dsw-radius-panel` | +| 主容器 | 对话输入框、对话框、主面板或悬浮面板 | R28 | `--dsw-radius-panel` | 拟定控件尺寸落在档位之间时,优先复用已有的公共尺寸变体。高卡片仍是卡片,不因高度超过按钮就升到 R28。专门设计为多行的 cell 使用 R16;普通按钮的文字发生换行时,仍保留其按钮变体。 @@ -49,7 +49,7 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 普通控件和卡片使用具名 token,不新增 10px、14px、18px、24px 等局部数值。计划任务控件、Desktop 引导、账号通知和快捷键控件保留所属包的几何规则;[圆角例外记录](../packages/client/ui-theme/tests/expected/radius-exceptions.expected.json)逐项固定允许的文件、选择器及声明,不豁免整个包。组件族专用属性可引用共享 token,例如 `--dsl-guide-entry-radius`。由真实内缩距离派生的几何可使用 `calc()`;它不构成新的尺度档位。 -普通圆角表面在支持时使用主题的 `superellipse(1.5)` 曲线;对话输入框遵循圆弧的[同心内缩规则](#nested-hover)。`corner-shape` 不会继承:主题将它应用于元素及其 `::before`/`::after`。不支持的引擎保留普通圆弧。不要添加组件专用的平滑规则,导致底色与外框使用不同曲线。 +普通圆角表面在支持时使用主题的 `superellipse(1.5)` 曲线。`corner-shape` 不会继承:主题将它应用于元素及其 `::before`/`::after`。不支持的引擎保留普通圆弧。不要添加组件专用的平滑规则,导致底色与外框使用不同曲线。 保留有意设计的圆形与胶囊:头像和状态点使用 `50%`;明确的胶囊与全圆轨道可使用 `999px`。每个此类全圆声明都在同一规则中配对 `corner-shape: round`。不要因为高度较小就把所有按钮变成胶囊。图形标记或微型轨道等细小绘制细节可保留既有局部几何,但不能据此给外围控件使用任意圆角。 @@ -68,8 +68,6 @@ H 表示以 CSS 像素计、包含边框的设计外部高度。R 表示浏览 | 底色紧贴容器边缘 | 由外框决定可见圆角;裁切底色或继承相应圆角 | 两个独立 hover 区域组成的分体按钮卡片 | | 容器内独立的卡片或表单组 | 按子元素用途选择档位;不机械减去全部父级内边距 | R20 设置卡片内的 R16 编辑器 | -对话输入框四角均使用圆弧,外层 R = 主按钮直径 / 2 + 按钮到右侧和底部的相等内缩距离。34px 按钮与 8px 内缩距离对应 R25。工具栏保持单行时,右下角圆弧与主按钮同心。28px 附件按钮与较小的工具栏控件保持对齐;左侧和底部采用不同内缩距离,以保持整行的视觉平衡。工作区选择状态的轮廓继承卡片的半径与曲线。 - 标准菜单使用外层 R16、4px 内边距、R12 菜单项,包含命令选择、任务菜单,以及子会话和后台任务菜单的外露高亮区域。树形展开操作保留缩进;带底色任务行内的控件保留各自的紧凑几何。紧凑菜单使用外层 R12、4px 内边距、R8 菜单项。公共 `SegmentedControl` 使用外层 R12、4px 内缩、R8 分段和指示器;`SegmentedTabs` 使用外层 R16、4px 内缩、R12 分段和指示器。修改内边距时,同步保持指示器偏移、宽度计算、子菜单对齐与指针桥接区域一致。 半径相减也用于嵌套超级椭圆的名义尺寸关系。相同指数不意味着两条曲线严格等距,因此对角线间隙可能不同于侧边内缩。菜单与分段控件保留公共的超级椭圆样式;要求径向严格等距时使用圆弧。 diff --git a/docs/web-styling.i18n.yaml b/docs/web-styling.i18n.yaml index c7be709181..26a4c7ade1 100644 --- a/docs/web-styling.i18n.yaml +++ b/docs/web-styling.i18n.yaml @@ -9,8 +9,8 @@ en: dc8c41fbf9869179 zh: e45976a585cb9c86 /web-ui-style-reference/component-rules: - en: 458da7f974517997 - zh: 8b45f816151c233d + en: 3a35065f2be9de06 + zh: 41291bba391fb515 /web-ui-style-reference/corner-radii-and-settings-cards: en: 118972f6c2bd6ce4 zh: 85f8416b03e4dd8b diff --git a/docs/web-styling.md b/docs/web-styling.md index 3921af7fe9..564801d476 100644 --- a/docs/web-styling.md +++ b/docs/web-styling.md @@ -21,7 +21,7 @@ Global style sheets belong in `ui-theme/src/styles/`. Component styles live besi - Keep source text, terminal output, and diff lines unwrapped when their component contract requires column preservation; use the shared scrollbar styles rather than component-specific scrollbar selectors. - Put presentation in CSS. Inline React styles may pass component-local custom-property values but must not encode theme branches. - Preserve keyboard focus visibility and reduced-motion behavior when adding transitions or hover-only controls. -- Rounded corners default to the global superellipse smoothing from ui-theme's `corner-shape.css` on supporting engines. Follow the radius standard's [circular-shape](ui-radius.md#shapes) and [nested-geometry](ui-radius.md#nested-hover) rules; the ui-theme corner-shape spec enforces the full-round pairing. +- Rounded corners inherit the global superellipse smoothing from ui-theme's `corner-shape.css` on supporting engines. Pair `corner-shape: round` with every full-round `border-radius` (`50%`, `100%`, or a pill radius) so circles and capsules keep circular arcs; the ui-theme corner-shape spec enforces the pairing. - Elevated surfaces (menus, popovers, modals, panels, floating buttons, the composer) set `border: 0` and take `box-shadow: var(--dsw-elevation-panel)`, `var(--dsw-elevation-prominent)`, or the composer's `var(--dsw-elevation-soft)` (larger blur at lower alpha): the 0.5px hairline stroke is the first shadow layer, and `--dsw-elevation-stroke-color` rebinds or suppresses it per surface or state. Never pair a `--dsw-alias-border-*` border with an lv/elevation shadow — the ui-theme elevation spec rejects the pairing; state-colored borders (warn panels) stay real borders. - Existing and new dropdown, context, submenu, and selection menus use `Menu` or wrap custom content in `MenuSurface`. The material is the theme-owned `--dsw-menu-surface-fill` plus `--dsw-menu-backdrop-filter`; feature and platform CSS must not override either. The ui-theme menu spec rejects unwrapped menu/listbox renderers, material overrides, and token redefinitions. The schedule-owned `TaskMenu` and `ClockPicker` retain their existing containers and material as explicit exceptions ([owner](../packages/client/ui-schedule/README.md)). - Modal backdrops, including settings and confirmation dialogs, retain their translucent dark mask without blur. The theme sets `--dsw-mask-blur` to `none`; Desktop-owned modal overlays also leave the parent page unfiltered. diff --git a/docs/web-styling.zh.md b/docs/web-styling.zh.md index 23a85141d3..e75def975c 100644 --- a/docs/web-styling.zh.md +++ b/docs/web-styling.zh.md @@ -21,7 +21,7 @@ - 当组件约定要求保留列结构时,源码文本、终端输出和 diff 行不得换行;使用共享滚动条样式,不得定义组件专用滚动条选择器。 - 呈现规则写在 CSS 中。React 内联样式可以传递组件局部自定义属性值,但不得编码主题分支。 - 添加过渡动画或仅悬停可见的控件时,保留清晰可见的键盘焦点和减少动态效果行为。 -- 支持的引擎上,圆角默认使用 ui-theme `corner-shape.css` 的全局超级椭圆平滑。遵循圆角规范中的[圆形](ui-radius.zh.md#shapes)与[嵌套几何](ui-radius.zh.md#nested-hover)规则;ui-theme 的 corner-shape spec 强制全圆声明的配对。 +- 支持的引擎上,圆角继承 ui-theme `corner-shape.css` 的全局超级椭圆平滑。每个正圆 `border-radius`(`50%`、`100%` 或胶囊半径)必须配对 `corner-shape: round`,使圆形与胶囊保持圆弧;ui-theme 的 corner-shape spec 强制这一配对。 - 高层级表面(菜单、浮层、对话框、面板、悬浮按钮、输入框)设 `border: 0` 并使用 `box-shadow: var(--dsw-elevation-panel)`、`var(--dsw-elevation-prominent)` 或输入框专用的 `var(--dsw-elevation-soft)`(更大模糊、更低透明度):0.5px 发丝描边是第一层投影,`--dsw-elevation-stroke-color` 可按表面或状态重绑或抑制描边。不得将 `--dsw-alias-border-*` border 与 lv/elevation 投影配对——ui-theme 的 elevation spec 会拒绝;状态色 border(warn 面板)保持真 border。 - 存量和新增的下拉菜单、上下文菜单、子菜单及选择菜单使用 `Menu`,自定义内容用 `MenuSurface` 包裹。材质由主题的 `--dsw-menu-surface-fill` 和 `--dsw-menu-backdrop-filter` 组成;功能及平台 CSS 不得覆盖两者。ui-theme 菜单检查拒绝未使用共享容器的 menu/listbox 渲染、材质覆盖和 token 重定义。计划任务自有的 `TaskMenu` 与 `ClockPicker` 是明确例外,保留现有容器和材质([所属包](../packages/client/ui-schedule/README.zh.md))。 - 设置、确认框等模态弹窗保留黑色半透明遮罩,不模糊背景。主题将 `--dsw-mask-blur` 设为 `none`;Desktop 自有模态浮层也不对父页面施加模糊。 diff --git a/packages/client/ui-conversation/README.i18n.yaml b/packages/client/ui-conversation/README.i18n.yaml index fd87ba4f3b..56b266e1a6 100644 --- a/packages/client/ui-conversation/README.i18n.yaml +++ b/packages/client/ui-conversation/README.i18n.yaml @@ -18,8 +18,8 @@ en: 1d2a3a7f98c2cc9b zh: f895dd5e9f91e0a9 /deepseek-ai-dsh-client-ui-conversation/shell-and-standard-props: - en: cf788f93d8b97b50 - zh: dd177c2a15bbf6bf + en: d541ae8b98468d34 + zh: f6899329498d97b8 /deepseek-ai-dsh-client-ui-conversation/temporary-composer-entries: en: bb1244310f5c0382 zh: 824b84077432b559 diff --git a/packages/client/ui-conversation/README.md b/packages/client/ui-conversation/README.md index ebf5e46f76..75b8df9d7e 100644 --- a/packages/client/ui-conversation/README.md +++ b/packages/client/ui-conversation/README.md @@ -56,7 +56,7 @@ The shared image slot props keep display choices separate from durable reference The composer measures its expanded control groups after size, content, visibility, or font-loading changes. If they cannot share a line, the row sets `--dsh-composer-model-text-display: none` and `--dsh-composer-model-icon-display: block` for the model seat; their defaults are `block` and `none`. Wrapping remains available if even the icon cannot fit. -The composer card, its toolbar controls, and the workspace-picker outline follow the [composer geometry](../../../docs/ui-radius.md#nested-hover). The context meter follows the [statistics-control radius](../../../docs/ui-radius.md#radius-scale). +The context meter follows the [statistics-control radius](../../../docs/ui-radius.md#radius-scale). The context-occupancy button shows a ring and percentage below the input card, after the Session statistics. Clicking it opens the token breakdown in a panel kept inside the viewport, including when no statistics are shown; the button stays hidden until context usage and capacity are available. diff --git a/packages/client/ui-conversation/README.zh.md b/packages/client/ui-conversation/README.zh.md index 80d3ff1ee2..6cfbe8ca6d 100644 --- a/packages/client/ui-conversation/README.zh.md +++ b/packages/client/ui-conversation/README.zh.md @@ -56,7 +56,7 @@ target package 通过 declaration merge 扩展 snapshot 与 Location data map, 控件组的尺寸、内容、可见性或字体加载状态变化后,composer 测量展开状态下的控件组。若无法排在同一行,控制栏为模型位设置 `--dsh-composer-model-text-display: none` 和 `--dsh-composer-model-icon-display: block`;两者默认值分别为 `block` 和 `none`。若连图标也放不下,仍允许换行。 -输入卡片、工具栏控件与工作区选择状态的轮廓遵循[输入框几何规则](../../../docs/ui-radius.zh.md#nested-hover)。上下文占用率入口遵循[统计控件圆角规则](../../../docs/ui-radius.zh.md#radius-scale)。 +上下文占用率入口遵循[统计控件圆角规则](../../../docs/ui-radius.zh.md#radius-scale)。 上下文占用按钮在输入卡片下方、会话统计右侧显示圆环和百分比。点击按钮可在视口内的面板查看 token 构成,没有统计项时面板也不会越界;上下文用量和容量尚不可用时,按钮保持隐藏。 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 2dca529dcc..4676f4cd7d 100644 --- a/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css +++ b/packages/client/ui-conversation/src/client/skeleton/InputBar.module.css @@ -43,10 +43,6 @@ } .card { - --dsh-composer-primary-size: 34px; - --dsh-composer-add-size: 28px; - --dsh-composer-control-inset: 8px; - --dsh-composer-row-shift: 2px; box-sizing: border-box; position: relative; /* overlay anchor positioning context */ display: flex; @@ -62,9 +58,7 @@ soft elevation tier. Fill: the input surface token (elevated in dark). */ border: 0; --dsw-elevation-stroke-color: var(--dsw-alias-border-l2); - border-radius: calc(var(--dsh-composer-primary-size) / 2 + var(--dsh-composer-control-inset)); - /* The lower-right arc shares a center with the primary button. */ - corner-shape: round; + border-radius: var(--dsw-radius-panel); background: var(--dsw-specific-input-major); box-shadow: var(--dsw-elevation-soft); /* The draft text follows the Settings font-size preference (the textarea, @@ -96,8 +90,7 @@ inset: 0; box-sizing: border-box; border: 1px dashed currentColor; - border-radius: inherit; - corner-shape: inherit; + border-radius: var(--dsw-radius-panel); color: var(--dsw-alias-border-l4); transition: color 100ms ease; pointer-events: none; @@ -261,9 +254,10 @@ align-items: center; justify-content: space-between; gap: 12px; - /* Smaller controls sit below the primary button's vertical center. */ - padding: var(--dsh-composer-row-shift) var(--dsh-composer-control-inset) - calc(var(--dsh-composer-control-inset) - var(--dsh-composer-row-shift)); + /* 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; 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 @@ -321,8 +315,8 @@ display: grid; place-items: center; flex: none; - width: var(--dsh-composer-add-size); - height: var(--dsh-composer-add-size); + width: 28px; + height: 28px; border: none; border-radius: 999px; corner-shape: round; @@ -379,8 +373,8 @@ display: grid; place-items: center; flex: none; - width: var(--dsh-composer-primary-size); - height: var(--dsh-composer-primary-size); + width: 34px; + height: 34px; border: none; border-radius: 999px; corner-shape: round; @@ -390,8 +384,10 @@ color: #fff; cursor: pointer; transition: background-color 100ms ease; - /* Cancel the row shift to preserve equal right and bottom insets. */ - transform: translateY(calc(-1 * var(--dsh-composer-row-shift))); + /* 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); } .primary:hover:not(:disabled) { diff --git a/packages/client/ui-theme/src/styles/corner-shape.css b/packages/client/ui-theme/src/styles/corner-shape.css index 1f6af00be3..70197aa6a3 100644 --- a/packages/client/ui-theme/src/styles/corner-shape.css +++ b/packages/client/ui-theme/src/styles/corner-shape.css @@ -1,8 +1,8 @@ -/* Default smooth corner curvature. Inside the support guard, corners use - * superellipse(1.5) — between a circular arc (round = superellipse(1)) and a - * squircle (superellipse(2)) — instead of the default arc. Engines without - * corner-shape keep circular corners because the token and the rule exist - * only inside the guard. +/* Smooth corner curvature for every rounded surface. Inside the support + * guard, all corners curve along superellipse(1.5) — between a circular arc + * (round = superellipse(1)) and a squircle (superellipse(2)) — instead of the + * default arc; engines without corner-shape keep circular corners because the + * token and the rule exist only inside the guard. * * corner-shape does not inherit, so the universal selector applies the token * to elements and their ::before/::after; other pseudo-elements (for example @@ -12,8 +12,7 @@ * circle into a squircle and squares off capsule ends, so every effectively * uncapped radius (50%, 100%, or a pill radius far above the box size) pairs * `corner-shape: round` with its `border-radius` in the owning component - * sheet. The corner-shape stylesheet spec enforces that pairing. - * Component-specific curve rules are documented in docs/ui-radius.md. */ + * sheet. The corner-shape stylesheet spec enforces that pairing. */ @supports (corner-shape: superellipse(1.5)) { :root { --dsw-corner-shape: superellipse(1.5);