From b85c0a1851229595eacd73505159473378d8169e Mon Sep 17 00:00:00 2001 From: creatixchu Date: Mon, 3 Aug 2026 10:30:32 +0800 Subject: [PATCH 1/2] fix(ui-workspace): draw Archive session with the archive-box glyph MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The session row menu's Archive action carried ic_ds_download_outline_16, a download tray that reads as "save to disk" rather than "put away". Swap it for the design's archive glyph — a lidded box with a label slot — added to the ic_ds_* set as IconArchiveOutline20. The glyph is native 20, the first of that size in the set, so the menu's 16px icon slot asks for it explicitly. The figma export's 0.11px stroke ring around the box contour is dropped: it restates the same contour in the same ink, which currentColor already carries. --- packages/client/ui-primitives/src/icons/index.tsx | 15 +++++++++++++++ packages/client/ui-primitives/src/icons/props.ts | 2 +- .../client/ui-primitives/tests/icons.spec.tsx | 10 ++++++---- .../client/ui-workspace/src/client/rows/Rows.tsx | 5 +++-- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/client/ui-primitives/src/icons/index.tsx b/packages/client/ui-primitives/src/icons/index.tsx index 830ff4f642..74e3e757b2 100644 --- a/packages/client/ui-primitives/src/icons/index.tsx +++ b/packages/client/ui-primitives/src/icons/index.tsx @@ -728,3 +728,18 @@ export const IconQuestionOutline14 = ({ size = 14, className }: IconProps) => ( ) + +/** ic_ds_archive_outline_20 (figma extract): lidded box + label slot. The export's + * 0.11px stroke ring around the box contour is dropped — it restates the same + * contour in the same ink, which currentColor already carries. */ +export const IconArchiveOutline20 = ({ size = 20, className }: IconProps) => ( + + + + +) diff --git a/packages/client/ui-primitives/src/icons/props.ts b/packages/client/ui-primitives/src/icons/props.ts index 59b10c8492..d86245b550 100644 --- a/packages/client/ui-primitives/src/icons/props.ts +++ b/packages/client/ui-primitives/src/icons/props.ts @@ -1,6 +1,6 @@ /** Shared props for every ic_ds_* icon component. */ export interface IconProps { - /** Square edge in px; defaults to the glyph's native size (14 or 16). */ + /** Square edge in px; defaults to the glyph's native size (14, 16, or 20). */ size?: number | undefined /** Extra class for layout placement; color rides currentColor. * (`| undefined` for exactOptionalPropertyTypes: callers forward their own optional prop.) */ diff --git a/packages/client/ui-primitives/tests/icons.spec.tsx b/packages/client/ui-primitives/tests/icons.spec.tsx index 536d1b774f..fbc4b71e28 100644 --- a/packages/client/ui-primitives/tests/icons.spec.tsx +++ b/packages/client/ui-primitives/tests/icons.spec.tsx @@ -2,7 +2,7 @@ import { cleanup, render } from '@testing-library/react' import { afterEach, describe, expect, it } from 'vitest' import * as primitives from '@deepseek-ai/dsh-client-ui-primitives' -import { IconApiOutline14, IconFolderClose16, IconSendOutline16 } from '@deepseek-ai/dsh-client-ui-primitives' +import { IconApiOutline14, IconArchiveOutline20, IconFolderClose16, IconSendOutline16 } from '@deepseek-ai/dsh-client-ui-primitives' afterEach(cleanup) @@ -14,8 +14,8 @@ const icons = Object.fromEntries( const iconNames = Object.keys(icons) describe('ic_ds_ icon set', () => { - it('exports the full P-I set (45 deepsuite + 14 figma extracts + the hand-authored sparkle)', () => { - expect(iconNames.length).toBe(60) + it('exports the full P-I set (45 deepsuite + 15 figma extracts + the hand-authored sparkle)', () => { + expect(iconNames.length).toBe(61) }) it.each(iconNames)('%s renders an svg with currentColor fills and no hardcoded palette', (name) => { @@ -36,11 +36,13 @@ describe('ic_ds_ icon set', () => { expect(svg.classList.contains('x')).toBe(true) }) - it('native defaults: 14-glyphs default 14, 16-glyphs default 16', () => { + it('native defaults: 14-glyphs default 14, 16-glyphs default 16, 20-glyphs default 20', () => { const api = render() expect(api.container.querySelector('svg')!.getAttribute('width')).toBe('14') const folder = render() expect(folder.container.querySelector('svg')!.getAttribute('width')).toBe('16') + const archive = render() + expect(archive.container.querySelector('svg')!.getAttribute('width')).toBe('20') }) }) diff --git a/packages/client/ui-workspace/src/client/rows/Rows.tsx b/packages/client/ui-workspace/src/client/rows/Rows.tsx index 27a105df30..ab92e671ea 100644 --- a/packages/client/ui-workspace/src/client/rows/Rows.tsx +++ b/packages/client/ui-workspace/src/client/rows/Rows.tsx @@ -8,7 +8,7 @@ import { useState } from 'react' import clsx from 'clsx' import { - HoverCard, IconBranchOutline16, IconDownloadOutline16, IconEditOutline16, + HoverCard, IconArchiveOutline20, IconBranchOutline16, IconEditOutline16, IconEllipsisOutline16, IconFolderClose16, IconFolderOpen16, IconPlusOutline16, IconTrashOutline16, IconTriangleRightFill14, Menu, StateDot, } from '@deepseek-ai/dsh-client-ui-primitives' @@ -273,7 +273,8 @@ export function SessionNodeItem({ node, currentId, now, onOpen, onRename, onFork const sessionMenuItems = [ { id: 'rename', label: t('rename'), icon: }, { id: 'fork', label: t('menu.fork'), icon: }, - { id: 'archive', label: t('menu.archiveSession'), icon: }, + // 20-native glyph in the menu's 16px icon slot (Menu.module.css .itemIcon). + { id: 'archive', label: t('menu.archiveSession'), icon: }, ] // Figma session cell: pad 8, status slot 16, then a 4px title gap. const ownRow = ( From 3f34a72b661782b9e2f35b5182d86a4b00f15445 Mon Sep 17 00:00:00 2001 From: creatixchu Date: Mon, 3 Aug 2026 10:42:34 +0800 Subject: [PATCH 2/2] review(ui-primitives): stop the size doc from enumerating native sizes The parenthetical listed 14/16 and this branch added 20, but the set never held to it: IconRightUpOutline14 defaults to 8, IconTreeCorner8x10 to 10, and IconWarningOutline16 to 14. Drop the list rather than maintain one that drifts, and retitle the icons test that carried the same generalization. --- packages/client/ui-primitives/src/icons/props.ts | 2 +- packages/client/ui-primitives/tests/icons.spec.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/ui-primitives/src/icons/props.ts b/packages/client/ui-primitives/src/icons/props.ts index d86245b550..27dde23e4d 100644 --- a/packages/client/ui-primitives/src/icons/props.ts +++ b/packages/client/ui-primitives/src/icons/props.ts @@ -1,6 +1,6 @@ /** Shared props for every ic_ds_* icon component. */ export interface IconProps { - /** Square edge in px; defaults to the glyph's native size (14, 16, or 20). */ + /** Square edge in px; defaults to the glyph's own drawn size. */ size?: number | undefined /** Extra class for layout placement; color rides currentColor. * (`| undefined` for exactOptionalPropertyTypes: callers forward their own optional prop.) */ diff --git a/packages/client/ui-primitives/tests/icons.spec.tsx b/packages/client/ui-primitives/tests/icons.spec.tsx index fbc4b71e28..cc5175cba4 100644 --- a/packages/client/ui-primitives/tests/icons.spec.tsx +++ b/packages/client/ui-primitives/tests/icons.spec.tsx @@ -36,7 +36,7 @@ describe('ic_ds_ icon set', () => { expect(svg.classList.contains('x')).toBe(true) }) - it('native defaults: 14-glyphs default 14, 16-glyphs default 16, 20-glyphs default 20', () => { + it('each glyph defaults to its own drawn size, not one set-wide default', () => { const api = render() expect(api.container.querySelector('svg')!.getAttribute('width')).toBe('14') const folder = render()