From a6207eae635c4623668465a0d22d0fab544dfcaf Mon Sep 17 00:00:00 2001
From: "dsh-portal[bot]" <341800657+dsh-portal[bot]@users.noreply.github.com>
Date: Tue, 13 Oct 2026 14:18:47 +0800
Subject: [PATCH] fix(ui-subagent): order the header band preset, subagent
catalog, background tasks
The root-session descendant-count dropdown registered at order -30, which put
it ahead of the preset label at the start of the header actions band. Order 10
places the catalog between the preset label (-10) and background tasks (20),
after Team navigation (-20), and off the list slot's default 0 that unordered
registrations share.
The web e2e assertion and header golden that pin these contributors' relative
order move with it.
---
apps/web/tests/agent-preset-selection.e2e.ts | 2 +-
.../expected/agent-preset-selection/header.expected.md | 2 +-
packages/client/ui-subagent/README.i18n.yaml | 4 ++--
packages/client/ui-subagent/README.md | 2 +-
packages/client/ui-subagent/README.zh.md | 2 +-
.../ui-subagent/src/client/SubagentHeaderLineage.tsx | 2 +-
packages/client/ui-subagent/src/client/index.ts | 7 +++----
.../client/ui-subagent/tests/browser-plugin.client.spec.ts | 5 +++--
8 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/apps/web/tests/agent-preset-selection.e2e.ts b/apps/web/tests/agent-preset-selection.e2e.ts
index bdaad637f7..094047c701 100644
--- a/apps/web/tests/agent-preset-selection.e2e.ts
+++ b/apps/web/tests/agent-preset-selection.e2e.ts
@@ -422,7 +422,7 @@ describe('web e2e: agent-preset selection', () => {
await compareOrRefreshGolden(HEADER_EXPECTED, snapshot, MODE)
expect(snapshot).toContain('Minimal mode')
expect(snapshot).toContain('button "1 subagent"')
- expect(snapshot.indexOf('button "1 subagent"')).toBeLessThan(snapshot.indexOf('Minimal mode'))
+ expect(snapshot.indexOf('Minimal mode')).toBeLessThan(snapshot.indexOf('button "1 subagent"'))
expect(snapshot.indexOf('button "1 subagent"')).toBeLessThan(snapshot.indexOf('button "More actions"'))
// Static chrome, not a control: the header can only report a composition
// the host would refuse to change.
diff --git a/apps/web/tests/expected/agent-preset-selection/header.expected.md b/apps/web/tests/expected/agent-preset-selection/header.expected.md
index 81cc3c1175..2b87066124 100644
--- a/apps/web/tests/expected/agent-preset-selection/header.expected.md
+++ b/apps/web/tests/expected/agent-preset-selection/header.expected.md
@@ -1,5 +1,5 @@
- navigation "Session hierarchy": Seeded turn
-- button "1 subagent"
- text: Minimal mode
+- button "1 subagent"
- button "More actions"
- button "Open right sidebar"
diff --git a/packages/client/ui-subagent/README.i18n.yaml b/packages/client/ui-subagent/README.i18n.yaml
index 7cd80f156c..b12b090972 100644
--- a/packages/client/ui-subagent/README.i18n.yaml
+++ b/packages/client/ui-subagent/README.i18n.yaml
@@ -15,8 +15,8 @@
en: d152484eb41ac6b4
zh: 09388d293f9be9cb
/deepseek-ai-dsh-client-ui-subagent/use-this-package:
- en: 9a72f6fbd3828d1f
- zh: e8b23941cbd16036
+ en: 9aafcfbd6a33173c
+ zh: 6dbd48672f58cd2d
/deepseek-ai-dsh-client-ui-subagent/use-this-package/browsing-the-tree:
en: 3508631091820123
zh: ec7da9e5bedb22ba
diff --git a/packages/client/ui-subagent/README.md b/packages/client/ui-subagent/README.md
index 76e0106c68..ad56362a7a 100644
--- a/packages/client/ui-subagent/README.md
+++ b/packages/client/ui-subagent/README.md
@@ -25,7 +25,7 @@ Browse local subagent conversations and external tasks from the parent header. L
## Use this package
-The session header keeps the current session title as the lineage breadcrumb; when the session's direct catalog has entries or a read has failed, the descendant-count trigger renders at the start of the header actions band, with no breadcrumb separator. An absent catalog, an empty loading catalog, or a successfully loaded empty catalog hides the count trigger. The trigger opens that direct catalog, reports its total and running counts, and loads nested catalogs only when their rows expand. Select a local child at any depth to open that child's conversation with its exact `{parentSessionId, childSessionId, mode}` address, or use the row's trailing arrow to open the same address in the right Sidebar, preferring a separate pane when room permits.
+The session header keeps the current session title as the lineage breadcrumb; when the session's direct catalog has entries or a read has failed, the descendant-count trigger renders after the preset label in the header actions band, with no breadcrumb separator. An absent catalog, an empty loading catalog, or a successfully loaded empty catalog hides the count trigger. The trigger opens that direct catalog, reports its total and running counts, and loads nested catalogs only when their rows expand. Select a local child at any depth to open that child's conversation with its exact `{parentSessionId, childSessionId, mode}` address, or use the row's trailing arrow to open the same address in the right Sidebar, preferring a separate pane when room permits.
This package registers the `dsh-resource://subagentchat/session/?parent=&mode=` resource and builtin Sidebar tab type. The resource retains the child `SessionReference` directly from its address without refreshing the parent catalog, and releases the reference when the tab record closes. The tab renders the shared `conversation.content` Factory through `sidebar.chat.conversation`, fixes the local View to Chat, and omits the main Conversation header and width controls.
diff --git a/packages/client/ui-subagent/README.zh.md b/packages/client/ui-subagent/README.zh.md
index 6bb19ef56c..1c2048920b 100644
--- a/packages/client/ui-subagent/README.zh.md
+++ b/packages/client/ui-subagent/README.zh.md
@@ -25,7 +25,7 @@ kind: "package-reference"
## 使用本包
-会话页头把当前会话标题作为谱系面包屑;当会话的直接目录有子项或读取失败时,后代数量触发器渲染在页头操作区的最前方,不带任何面包屑分隔符。目录缺席、空目录加载中或成功加载为空时,均隐藏数量触发器。触发器打开该直接目录,报告总数与运行数,并且只在行展开时加载嵌套目录。选择任意深度,即可用该子会话的确切 `{parentSessionId, childSessionId, mode}` 地址打开其对话;也可以使用行尾箭头在右侧 Sidebar 打开同一地址,并在空间允许时优先使用独立分栏。
+会话页头把当前会话标题作为谱系面包屑;当会话的直接目录有子项或读取失败时,后代数量触发器渲染在页头操作区中预设标签之后,不带任何面包屑分隔符。目录缺席、空目录加载中或成功加载为空时,均隐藏数量触发器。触发器打开该直接目录,报告总数与运行数,并且只在行展开时加载嵌套目录。选择任意深度,即可用该子会话的确切 `{parentSessionId, childSessionId, mode}` 地址打开其对话;也可以使用行尾箭头在右侧 Sidebar 打开同一地址,并在空间允许时优先使用独立分栏。
本包注册 `dsh-resource://subagentchat/session/?parent=&mode=` 资源与 builtin Sidebar tab 类型。资源直接根据地址保留 child 的 `SessionReference`,不刷新 parent 目录,并在 tab 记录关闭时释放 reference。tab 通过 `sidebar.chat.conversation` 渲染共享 `conversation.content` Factory,把局部 View 固定为 Chat,并省略主 Conversation 的 Header 与宽度控制。
diff --git a/packages/client/ui-subagent/src/client/SubagentHeaderLineage.tsx b/packages/client/ui-subagent/src/client/SubagentHeaderLineage.tsx
index 611557c923..fa020060fa 100644
--- a/packages/client/ui-subagent/src/client/SubagentHeaderLineage.tsx
+++ b/packages/client/ui-subagent/src/client/SubagentHeaderLineage.tsx
@@ -751,7 +751,7 @@ export type SubagentCatalogActionProps =
/**
* Session-header catalog action for root sessions: the descendant count and
- * its dropdown at the start of the header actions band. Child sessions render nothing
+ * its dropdown after the preset label in the header actions band. Child sessions render nothing
* here — their breadcrumb switcher in the lineage slot owns the same
* navigation.
* @param props - Session standard props plus the catalog actions and translator.
diff --git a/packages/client/ui-subagent/src/client/index.ts b/packages/client/ui-subagent/src/client/index.ts
index e24490966d..6d4220ef9c 100644
--- a/packages/client/ui-subagent/src/client/index.ts
+++ b/packages/client/ui-subagent/src/client/index.ts
@@ -84,10 +84,9 @@ export function apply(ctx: ClientContext): void {
() => ctx.slots.register({
name: 'conversation.session.header.actions',
id: 'subagent-catalog',
- // Leads the band, directly after the title crumbs: subagent lineage is
- // the title's own continuation, ahead of Team navigation (-20) and the
- // preset label (-10).
- order: -30,
+ // Between the preset label (-10) and background tasks (20), after Team
+ // navigation (-20).
+ order: 10,
locale: NS,
inject: catalogActions,
}, SubagentCatalogAction),
diff --git a/packages/client/ui-subagent/tests/browser-plugin.client.spec.ts b/packages/client/ui-subagent/tests/browser-plugin.client.spec.ts
index 23aa61b015..d75c9d8639 100644
--- a/packages/client/ui-subagent/tests/browser-plugin.client.spec.ts
+++ b/packages/client/ui-subagent/tests/browser-plugin.client.spec.ts
@@ -134,10 +134,11 @@ describe('apply', () => {
])
// The root-session catalog seat registers in the actions band with the
- // same business face, leading the band directly after the title crumbs.
+ // same business face, between the preset label (-10) and background
+ // tasks (20).
const actionEntry = ctx.slots.entries('conversation.session.header.actions')
.find(entry => entry.options.id === 'subagent-catalog')!
- expect(actionEntry.options.order).toBe(-30)
+ expect(actionEntry.options.order).toBe(10)
expect(actionEntry.inject).toBe(catalogEntry.inject)
const composerEntry = ctx.slots.entries('conversation.composer')