fix(c8): sidebar entry unity — DSH Icon*16 + order 40-50

Root cause of the visual split:
1. Icon system mismatch: apes used react-icons (FiCpu/FiGrid/FiUser,
   static 14px ReactNode) while native builtins use DSH's Icon*16
   components (function form, host-controlled size). Two different
   icon libraries → inconsistent visual style.
2. Order 901-903 pushed apes tabs far after native builtins (10-35),
   creating two visually separate groups in the tab strip.

Fix:
- icon: react-icons Fi* → @deepseek-ai/dsh-client-ui-primitives
  Icon*16 (function form, same as builtins):
    agents  → IconAgentPresetOutline16
    apps    → IconGaugeOutline16
    profile → IconUserOutline16
- order: 901/902/903 → 40/45/50 (immediately after native builtins)
- SIDEBAR_SERVICE_VERSION + dsh.plugin.json version → 1.1.0
  (lockstep with package.json, required by manifest tests)

Gate: typecheck ✓ / build ✓ / test 119 files · 1249 passed · 9 skipped · 0 failed ✓
This commit is contained in:
figmar
2026-09-16 02:44:35 +08:00
parent aa28c1fbc7
commit cebc21aef2
4 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"id": "dsh-external/dsh-apes-sidebar",
"version": "1.0.0",
"version": "1.1.0",
"main": "./lib/index.js",
"description": "VSCode 风格右侧侧边栏:文件资源管理器 / 编辑器 / 终端 / Git / 浏览器,按会话隔离。暴露服务供其他插件注册侧边栏页面和文件预览器",
"engines": {
+4 -4
View File
@@ -26,7 +26,7 @@
*/
import { useCallback, useMemo, useState, type CSSProperties } from 'react'
import { useSyncExternalStore } from 'react'
import { FiCpu, FiGrid, FiUser } from 'react-icons/fi'
import { IconAgentPresetOutline16, IconGaugeOutline16, IconUserOutline16 } from '@deepseek-ai/dsh-client-ui-primitives'
import type { TabComponentProps, TabDescriptor } from '../service.ts'
import type {
SidebarSessionList,
@@ -231,7 +231,7 @@ function ApesAppsView(props: TabComponentProps) {
* to `service.registerTab`. Information-layer tabs are single-instance.
*/
export const apesTabs: TabDescriptor[] = [
{ id: 'apes:agents', title: () => t('apesAgentsTitle'), icon: <FiCpu size={14} />, order: 901, single: true, component: ApesAgentsView },
{ id: 'apes:apps', title: () => t('apesAppsTitle'), icon: <FiGrid size={14} />, order: 902, single: true, component: ApesAppsView },
{ id: 'apes:profile', title: () => t('apesProfileTitle'), icon: <FiUser size={14} />, order: 903, single: true, component: ApesProfileView },
{ id: 'apes:agents', title: () => t('apesAgentsTitle'), icon: (size: number) => <IconAgentPresetOutline16 size={size} />, order: 40, single: true, component: ApesAgentsView },
{ id: 'apes:apps', title: () => t('apesAppsTitle'), icon: (size: number) => <IconGaugeOutline16 size={size} />, order: 45, single: true, component: ApesAppsView },
{ id: 'apes:profile', title: () => t('apesProfileTitle'), icon: (size: number) => <IconUserOutline16 size={size} />, order: 50, single: true, component: ApesProfileView },
]
+1 -1
View File
@@ -465,7 +465,7 @@ export function matchUrlTarget(tabs: readonly TabDescriptor[], url: URL): TabDes
* The plugin version this service instance reports. Keep in lockstep with
* `package.json`'s version — `tests/service.spec.ts` asserts the pair.
*/
export const SIDEBAR_SERVICE_VERSION = '1.0.0'
export const SIDEBAR_SERVICE_VERSION = '1.1.0'
/**
* Monotonic capability list consumers use to gate new API usage (features
+6 -4
View File
@@ -60,7 +60,7 @@ describe('apes:* tab registrations', () => {
}
})
it('apes tabs sort after the upstream builtins (order 900+)', () => {
it('apes tabs sort after the upstream builtins (order 40+)', () => {
const { service, dispose } = setup()
try {
const orders = {
@@ -68,9 +68,11 @@ describe('apes:* tab registrations', () => {
apps: service.getTab('apes:apps')?.order,
profile: service.getTab('apes:profile')?.order,
}
expect(orders.agents).toBeGreaterThanOrEqual(900)
expect(orders.apps).toBeGreaterThanOrEqual(900)
expect(orders.profile).toBeGreaterThanOrEqual(900)
// C8: order 40-50 places apes tabs immediately after the native builtins
// (10-35), not in a far-away 900+ band — visual unity in the tab strip.
expect(orders.agents).toBeGreaterThanOrEqual(40)
expect(orders.apps).toBeGreaterThanOrEqual(40)
expect(orders.profile).toBeGreaterThanOrEqual(40)
// Strictly ordered: agents < apps < profile.
expect(orders.agents!).toBeLessThan(orders.apps!)
expect(orders.apps!).toBeLessThan(orders.profile!)