Переглянути джерело

fix(web): draw the changed-files header tile with the design's angle-bracket mark

creatixchu 1 місяць тому
батько
коміт
51de5bbc4d

+ 2 - 2
packages/client/ui-deliverables/README.i18n.yaml

@@ -2,5 +2,5 @@
 # side as of the last confirmed-consistent state. Both languages carry equal authority;
 # side as of the last confirmed-consistent state. Both languages carry equal authority;
 # after editing either side, bring the other along and re-record with:
 # after editing either side, bring the other along and re-record with:
 #   pnpm run verify-translation-pairing --write packages/client/ui-deliverables/README.md
 #   pnpm run verify-translation-pairing --write packages/client/ui-deliverables/README.md
-README.md: 2af21786f4e66b96cc72e907e0791b1e263755c1
-README.zh.md: 609a82070b0ce5424fab2b4a9fe396f9b487df29
+README.md: 0effc0f608365c56dc79de77abcf7d0458f2f893
+README.zh.md: b338fc9cb590f002ecd99f1af045ef96f195ff35

+ 1 - 0
packages/client/ui-deliverables/README.md

@@ -100,6 +100,7 @@ These limits define the current deliverables vocabulary. They are current packag
 - **Terminal-created files require explicit delivery** — the card lists them once git records the change, but delivery cards and clickable references still require `present`.
 - **Terminal-created files require explicit delivery** — the card lists them once git records the change, but delivery cards and clickable references still require `present`.
 - **Declarations do not preserve file contents** — reopening or transferring a Session requires source files accessible through the viewed Session’s filesystem. Missing files, directories, and final symbolic links return 404.
 - **Declarations do not preserve file contents** — reopening or transferring a Session requires source files accessible through the viewed Session’s filesystem. Missing files, directories, and final symbolic links return 404.
 - **Folder opening needs a Host desktop** — without one the card header is inert and rows fall back to the right Sidebar's text preview, which shows files only.
 - **Folder opening needs a Host desktop** — without one the card header is inert and rows fall back to the right Sidebar's text preview, which shows files only.
+- **Package-local header glyph** — the card's angle-bracket mark lives in `src/client/icons.tsx` until the shared icon set carries it; its props already match the shared icon contract.
 - **Files outside the workspace open by absolute path only** — the recorded path is the Host path at recording time; a moved workspace or a different viewing Session cannot relocate it.
 - **Files outside the workspace open by absolute path only** — the recorded path is the Host path at recording time; a moved workspace or a different viewing Session cannot relocate it.
 
 
 <a id="dev-note"></a>
 <a id="dev-note"></a>

+ 1 - 0
packages/client/ui-deliverables/README.zh.md

@@ -100,6 +100,7 @@ Node 半部注册静态 `ui:deliverable-file-references` 系统提示词段,
 - **终端创建的文件需要显式交付**——git 记录到改动后卡片会列出它们,但交付卡片和可点击引用仍需调用 `present`。
 - **终端创建的文件需要显式交付**——git 记录到改动后卡片会列出它们,但交付卡片和可点击引用仍需调用 `present`。
 - **声明不保存文件内容**:重新打开或转移 Session 后,源文件仍需能被当前查看的 Session 文件系统访问。文件缺失、为目录或最终路径为符号链接时返回 404。
 - **声明不保存文件内容**:重新打开或转移 Session 后,源文件仍需能被当前查看的 Session 文件系统访问。文件缺失、为目录或最终路径为符号链接时返回 404。
 - **打开文件夹需要 Host 桌面**——没有桌面时卡片标题不可点击,行退回到右侧 Sidebar 的文本预览,该预览仅支持文件。
 - **打开文件夹需要 Host 桌面**——没有桌面时卡片标题不可点击,行退回到右侧 Sidebar 的文本预览,该预览仅支持文件。
+- **包内的标题字形**——卡片的尖括号标记放在 `src/client/icons.tsx` 中,直到共享图标集收录它;其 props 已与共享图标契约一致。
 - **工作区外的文件只按绝对路径打开**——记录的路径是记录时的 Host 路径;工作区移动或换一个查看 Session 都无法重新定位它。
 - **工作区外的文件只按绝对路径打开**——记录的路径是记录时的 Host 路径;工作区移动或换一个查看 Session 都无法重新定位它。
 
 
 <a id="dev-note"></a>
 <a id="dev-note"></a>

+ 3 - 2
packages/client/ui-deliverables/src/client/ChangedFiles.tsx

@@ -1,12 +1,13 @@
 /** The changed-files card: a folder-opening header, per-file line counts, and a three-row fold. */
 /** The changed-files card: a folder-opening header, per-file line counts, and a three-row fold. */
 import { useState } from 'react'
 import { useState } from 'react'
 import { resolveWorkspacePath } from '@deepseek-ai/dsh-util-workspace-path'
 import { resolveWorkspacePath } from '@deepseek-ai/dsh-util-workspace-path'
-import { IconChevronDownOutline14, IconChevronUpOutline14, IconCodeOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'
+import { IconChevronDownOutline14, IconChevronUpOutline14 } from '@deepseek-ai/dsh-client-ui-primitives'
 import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'
 import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'
 import type { SessionId } from '@deepseek-ai/dsh-session/types'
 import type { SessionId } from '@deepseek-ai/dsh-session/types'
 import type { WorkspaceChangedFile } from '@deepseek-ai/dsh-workspace-changes/types'
 import type { WorkspaceChangedFile } from '@deepseek-ai/dsh-workspace-changes/types'
 import { changedFileUrl } from '../changes.ts'
 import { changedFileUrl } from '../changes.ts'
 import type { PresentedHost } from '../presented.ts'
 import type { PresentedHost } from '../presented.ts'
+import { IconCodeBracketsOutline16 } from './icons.tsx'
 import type { PresentedOpenPhase } from './present-open.ts'
 import type { PresentedOpenPhase } from './present-open.ts'
 import type { ChangesTurnData } from './turn-deliverables.ts'
 import type { ChangesTurnData } from './turn-deliverables.ts'
 import type { NS } from './locales.ts'
 import type { NS } from './locales.ts'
@@ -64,7 +65,7 @@ export function ChangedFiles({ changes, cwd, sessionId, host, phases, onOpen, op
     : folderPhase === 'opened' ? t('changes.folderOpened')
     : folderPhase === 'opened' ? t('changes.folderOpened')
       : folderPhase === undefined ? undefined : t('changes.folderError')
       : folderPhase === undefined ? undefined : t('changes.folderError')
   const summary = <>
   const summary = <>
-    <span className={css.tile}><IconCodeOutline16 /></span>
+    <span className={css.tile}><IconCodeBracketsOutline16 size={18} /></span>
     <span className={css.titles}>
     <span className={css.titles}>
       <span className={css.title}>{t('changes.title', { count: String(changes.total) })}</span>
       <span className={css.title}>{t('changes.title', { count: String(changes.total) })}</span>
       <span className={css.stat} role={folderStatus === undefined ? undefined : 'status'} data-error={folderPhase === 'error' || folderPhase === 'nativeUnavailable' ? true : undefined}>
       <span className={css.stat} role={folderStatus === undefined ? undefined : 'status'} data-error={folderPhase === 'error' || folderPhase === 'nativeUnavailable' ? true : undefined}>

+ 26 - 0
packages/client/ui-deliverables/src/client/icons.tsx

@@ -0,0 +1,26 @@
+/**
+ * Package-local glyph for the changed-files card until the shared icon set
+ * carries it; its props already match the shared icon contract.
+ */
+import type { IconProps } from '@deepseek-ai/dsh-client-ui-primitives'
+
+/** Angle brackets, the code mark the card's header tile shows. */
+export const IconCodeBracketsOutline16 = ({ size = 16, className }: IconProps) => (
+  <svg
+    width={size}
+    height={size}
+    className={className}
+    viewBox="0 0 16 16"
+    fill="none"
+    xmlns="http://www.w3.org/2000/svg"
+    aria-hidden="true"
+  >
+    <path
+      d="M5.6 3.4 1 8l4.6 4.6M10.4 3.4 15 8l-4.6 4.6"
+      stroke="currentColor"
+      strokeWidth="1.8"
+      strokeLinecap="round"
+      strokeLinejoin="round"
+    />
+  </svg>
+)