diff --git a/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.i18n.yaml b/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.i18n.yaml
index b04f873a24..fdbd7de7cb 100644
--- a/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.i18n.yaml
+++ b/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.i18n.yaml
@@ -30,8 +30,8 @@
en: 99ee505e82fa9c7c
zh: 448bc0e160424cbf
/agent-note-boot-the-preview-worker-from-the-shipped-profile-and-fetch-lazy-chunks-on-demand/consequences:
- en: 53d72faa09e78410
- zh: a5224e4662a4846b
+ en: ed424571c81bcb91
+ zh: 9b79bf03741c1c21
/agent-note-boot-the-preview-worker-from-the-shipped-profile-and-fetch-lazy-chunks-on-demand/testing:
en: 532918df1acd147d
zh: e476c090d183d0a4
diff --git a/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.md b/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.md
index 71509500e5..b4c4c539ee 100644
--- a/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.md
+++ b/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.md
@@ -81,7 +81,7 @@ The Worker's structural stubs throw errors carrying `ERR_FEATURE_UNAVAILABLE_ON_
## Consequences
-The Preview boots the composition the served Web deployment boots. With no bundle enabled, the Worker composition differs from the served Web composition only by the jsonl platform override, and enabling any bundle skips no patch. The Plugins page and Settings → Built-in plugins list every `OPTIONAL_BUNDLES` entry with its title and icon and no metadata error. Switching each of the 11 optional bundles on and then off returns `applied` both times; after enabling, every enabled row it changes is active, and after disabling, the plugin list returns to its prior rows. Enabling session-titles disables `@deepseek-ai/dsh-session-title-first-prompt-llm` (row `session-title-llm`) and enables `@deepseek-ai/dsh-session-title-all-prompts-llm`, as in the served Web deployment; enabling inspector-profile runs Session Inspector and starts the NodeJS Inspector degraded. Degradation requires `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`, so a served `dsh web` runs the full Inspector.
+The Preview boots the composition the served Web deployment boots. With no bundle enabled, the Worker composition differs from the served Web composition only by the jsonl platform override, and enabling any bundle skips no patch. The Plugins page lists every `OPTIONAL_BUNDLES` entry with its title and icon and no metadata error. Switching each of the 11 optional bundles on and then off returns `applied` both times; after enabling, every enabled row it changes is active, and after disabling, the plugin list returns to its prior rows. Enabling session-titles disables `@deepseek-ai/dsh-session-title-first-prompt-llm` (row `session-title-llm`) and enables `@deepseek-ai/dsh-session-title-all-prompts-llm`, as in the served Web deployment; enabling inspector-profile runs Session Inspector and starts the NodeJS Inspector degraded. Degradation requires `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`, so a served `dsh web` runs the full Inspector.
Size (MiB, measured): the base image is 9.20 (12.79 with pack-time composition and eager chunks, −28%) including 11 optional bundles, plus 5 lazy tar archives totaling 4.45 (pdf 2.88, excel 1.39, terminal 0.13, frontmatter 0.05, Inspector bottom panel 0.00). The base image contains no lazily loaded chunk, and the page fetches an archive only when it requests the chunk.
diff --git a/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.zh.md b/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.zh.md
index 5c9b5bf233..a5344f8b01 100644
--- a/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.zh.md
+++ b/.agents/notes/implemented/architecture/2026-10-14-webworker-preview-profile-parity.zh.md
@@ -81,7 +81,7 @@ Worker 的结构化 stub 抛出带 `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` 的错
## 后果
-Preview 启动的组合与正式 Web 相同。不开 bundle 时,Worker 组合与正式 Web 只差 jsonl 的平台覆盖;开任一 bundle 都没有被跳过的补丁。插件页和“设置 → 内置插件”列出全部 `OPTIONAL_BUNDLES`,每个都显示标题和图标,没有元信息错误。11 个 optional bundle 逐个开启再关闭,两次都返回 `applied`;开启后它改动的每个启用行都是 active,关闭后插件列表恢复原样。启用 session-titles 会禁用 `@deepseek-ai/dsh-session-title-first-prompt-llm`(行 `session-title-llm`)并启用 `@deepseek-ai/dsh-session-title-all-prompts-llm`,与正式 Web 一致;启用 inspector-profile 后 Session Inspector 运行,NodeJS Inspector 降级启动。降级以 `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` 为前提,所以正常 `dsh web` 运行完整的 Inspector。
+Preview 启动的组合与正式 Web 相同。不开 bundle 时,Worker 组合与正式 Web 只差 jsonl 的平台覆盖;开任一 bundle 都没有被跳过的补丁。插件页列出全部 `OPTIONAL_BUNDLES`,每个都显示标题和图标,没有元信息错误。11 个 optional bundle 逐个开启再关闭,两次都返回 `applied`;开启后它改动的每个启用行都是 active,关闭后插件列表恢复原样。启用 session-titles 会禁用 `@deepseek-ai/dsh-session-title-first-prompt-llm`(行 `session-title-llm`)并启用 `@deepseek-ai/dsh-session-title-all-prompts-llm`,与正式 Web 一致;启用 inspector-profile 后 Session Inspector 运行,NodeJS Inspector 降级启动。降级以 `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` 为前提,所以正常 `dsh web` 运行完整的 Inspector。
体积(MiB,实测):基础镜像 9.20(打包期组合且 chunk 随启动下载时为 12.79,−28%),含 11 个 optional bundle;另有 5 个 lazy tar 共 4.45(pdf 2.88、excel 1.39、terminal 0.13、frontmatter 0.05、inspector 底部面板 0.00)。基础镜像不含懒加载 chunk,页面请求 chunk 时才拉取对应 archive。
diff --git a/apps/web/tests/client-plugin-live.e2e.ts b/apps/web/tests/client-plugin-live.e2e.ts
index 3e9bef0dff..0e4ff0df1d 100644
--- a/apps/web/tests/client-plugin-live.e2e.ts
+++ b/apps/web/tests/client-plugin-live.e2e.ts
@@ -17,13 +17,25 @@ const SESSION_ACTION_EXPECTED = join(EXPECTED, 'session-actions.expected.md')
const SESSION_SEED = fileURLToPath(new URL('../../../snapshots/web/seeded-history/session.v3.jsonl', import.meta.url))
const SESSION_TITLE = 'Session action extension'
-async function openInventory(page: Page, url: string) {
+/** Load the page on the Plugins page, which reports this page's client synchronization. */
+async function openPlugins(page: Page, url: string) {
await page.goto(url, { waitUntil: 'load' })
+ await page.getByRole('navigation', { name: '全局面板' }).getByRole('button', { name: '插件', exact: true }).click()
+ await page.locator('[data-plugin-body]').waitFor({ timeout: 10_000 })
+}
+
+/** Open the Models settings page's add-provider card and return its API key field, a page-local draft. */
+async function openDraft(page: Page) {
await openSettings(page, 'zh')
const dialog = page.getByRole('dialog', { name: '设置' })
- await dialog.getByRole('button', { name: '内置插件', exact: true }).click()
- await dialog.getByRole('searchbox', { name: '搜索插件' }).waitFor()
- return dialog
+ await dialog.getByRole('button', { name: '模型', exact: true }).click()
+ const add = dialog.getByRole('button', { name: '添加模型提供商', exact: true })
+ await expect.poll(() => add.isEnabled(), { timeout: 10_000 }).toBe(true)
+ await add.click()
+ await dialog.getByLabel('提供商', { exact: true }).selectOption('minimax-cn')
+ const draft = dialog.getByRole('textbox', { name: 'API 密钥', exact: true })
+ await draft.waitFor({ timeout: 10_000 })
+ return draft
}
it('keeps ordered legacy Session menu rows before Archive and removes them with their fiber', async () => {
@@ -237,8 +249,9 @@ it('synchronizes two pages, disposes effects and restores an offline page from t
const other = await otherContext.newPage()
const consoles = [watchConsole(page), watchConsole(other)]
onTestFailed(() => saveFailureShot(page, 'web-e2e-client-live'))
- await openInventory(page, scaffold.authenticatedUrl)
- const otherInventory = await openInventory(other, scaffold.authenticatedUrl)
+ await openPlugins(page, scaffold.authenticatedUrl)
+ await openPlugins(other, scaffold.authenticatedUrl)
+ const draft = await openDraft(other)
let entryId: string | undefined
const toggle = async () => {
if (entryId === undefined) entryId = await scaffold.ctx.loader.create({ name: '@fixture/live-client' })
@@ -265,9 +278,8 @@ it('synchronizes two pages, disposes effects and restores an offline page from t
}
await compareOrRefreshGolden(join(EXPECTED, 'enabled.expected.md'), await captureStableAria(page, '[data-live-client]', scaffold.workspaceCwd), webSnapshotMode())
- // The inventory filter is page-owned state that live composition must preserve.
- const draft = otherInventory.getByRole('searchbox', { name: '搜索插件' })
- await draft.fill('unfinished-filter')
+ // An unsaved Settings field is page-owned state that live composition must preserve.
+ await draft.fill('unfinished-draft')
await toggle()
for (const target of [page, other]) {
await expect.poll(() => live(target).count()).toBe(0)
@@ -276,7 +288,7 @@ it('synchronizes two pages, disposes effects and restores an offline page from t
expect((await dataset(target)).liveHits).toBe('1')
expect(await target.locator('style[data-plugin="@fixture/live-client"]').count()).toBe(0)
}
- expect(await draft.inputValue()).toBe('unfinished-filter')
+ expect(await draft.inputValue()).toBe('unfinished-draft')
await toggle()
for (const target of [page, other]) {
await live(target).waitFor()
@@ -299,7 +311,7 @@ it('synchronizes two pages, disposes effects and restores an offline page from t
expect(await live(other).count()).toBe(1)
await otherContext.setOffline(false)
await expect.poll(() => live(other).count(), { timeout: 20_000 }).toBe(0)
- expect(await draft.inputValue()).toBe('unfinished-filter')
+ expect(await draft.inputValue()).toBe('unfinished-draft')
expect(navigations).toBe(0)
expect(scaffold.ctx.loader.ctx.fiber.uid).toBe(host)
for (const console of consoles) expect(console.pageErrors).toEqual([])
@@ -315,7 +327,7 @@ it('keeps a failed client download local and retries without changing Host enabl
try {
const page = await browser.newPage({ locale: ZH_BROWSER_LOCALE })
onTestFailed(() => saveFailureShot(page, 'web-e2e-client-live-retry'))
- await openInventory(page, scaffold.authenticatedUrl)
+ await openPlugins(page, scaffold.authenticatedUrl)
const bundle = (url: URL) => url.pathname.startsWith('/plugins/') && url.search.includes('@fixture/live-client/client.js')
await page.route(bundle, route => route.abort())
const entryId = await scaffold.ctx.loader.create({ name: '@fixture/live-client' })
@@ -352,9 +364,9 @@ it('recovers an uncreated client entry with rebuilt factory code without navigat
try {
const page = await browser.newPage({ locale: ZH_BROWSER_LOCALE })
onTestFailed(() => saveFailureShot(page, 'web-e2e-client-factory-rebuild'))
- const inventory = await openInventory(page, scaffold.authenticatedUrl)
- const draft = inventory.getByRole('searchbox', { name: '搜索插件' })
- await draft.fill('unfinished-filter')
+ await openPlugins(page, scaffold.authenticatedUrl)
+ const draft = await openDraft(page)
+ await draft.fill('unfinished-draft')
let navigations = 0
page.on('framenavigated', () => { navigations++ })
const entryId = await scaffold.ctx.loader.create({ name: '@fixture/live-client' })
@@ -366,7 +378,7 @@ it('recovers an uncreated client entry with rebuilt factory code without navigat
await page.getByText('动态插件 r1 已启用', { exact: true }).waitFor()
await expect.poll(() => failure.count()).toBe(0)
await compareOrRefreshGolden(join(EXPECTED, 'recovered.expected.md'), await captureStableAria(page, '[data-live-client]', scaffold.workspaceCwd), webSnapshotMode())
- expect(await draft.inputValue()).toBe('unfinished-filter')
+ expect(await draft.inputValue()).toBe('unfinished-draft')
expect(await page.locator('style[data-plugin="@fixture/live-client"]').count()).toBe(1)
expect(await page.evaluate(() => document.documentElement.dataset.liveMounts)).toBe('1')
expect(scaffold.ctx.loader.resolve(entryId).fiber?.state).toBe(2)
@@ -386,9 +398,9 @@ it('reports bootstrap rebuilds without remounting the settings page or navigatin
const page = await browser.newPage({ locale: ZH_BROWSER_LOCALE })
const console = watchConsole(page)
onTestFailed(() => saveFailureShot(page, 'web-e2e-client-bootstrap-rebuild'))
- const inventory = await openInventory(page, scaffold.authenticatedUrl)
- const draft = inventory.getByRole('searchbox', { name: '搜索插件' })
- await draft.fill('unfinished-filter')
+ await openPlugins(page, scaffold.authenticatedUrl)
+ const draft = await openDraft(page)
+ await draft.fill('unfinished-draft')
const originalInput = await draft.elementHandle()
let navigations = 0
page.on('framenavigated', () => { navigations++ })
@@ -399,11 +411,12 @@ it('reports bootstrap rebuilds without remounting the settings page or navigatin
scaffold.ctx.clientModules.rebuilt('@deepseek-ai/dsh-client-modules')
const failure = page.locator('[data-client-sync-failure]')
await failure.getByText(/replacing bootstrap module .* requires a page reload/).waitFor()
- await failure.getByRole('button', { name: '重试本页面同步' }).click()
+ // The Settings dialog holding the draft covers the Plugins page, so the retry is dispatched to its button.
+ await failure.getByRole('button', { name: '重试本页面同步' }).dispatchEvent('click')
await failure.getByText(/replacing bootstrap module .* requires a page reload/).waitFor()
await compareOrRefreshGolden(join(EXPECTED, 'bootstrap-rebuild.expected.md'), await captureStableAria(page, '[data-client-sync-failure]', scaffold.workspaceCwd), webSnapshotMode())
expect(await originalInput!.evaluate(input => input.isConnected)).toBe(true)
- expect(await draft.inputValue()).toBe('unfinished-filter')
+ expect(await draft.inputValue()).toBe('unfinished-draft')
expect(scaffold.ctx.loader.ctx.fiber.uid).toBe(host)
expect(navigations).toBe(0)
expect(console.pageErrors).toEqual([])
@@ -421,7 +434,7 @@ it('removes the client UI and resources while Host cleanup is still pending', as
const browser = await chromium.launch()
try {
const page = await browser.newPage({ locale: ZH_BROWSER_LOCALE })
- await openInventory(page, scaffold.authenticatedUrl)
+ await openPlugins(page, scaffold.authenticatedUrl)
let navigations = 0
page.on('framenavigated', () => { navigations++ })
const entryId = await scaffold.ctx.loader.create({ name: '@fixture/live-client' })
diff --git a/apps/web/tests/expected/agent-preset-authoring/section.expected.md b/apps/web/tests/expected/agent-preset-authoring/section.expected.md
index 3b5ebf1b20..a7a52ff913 100644
--- a/apps/web/tests/expected/agent-preset-authoring/section.expected.md
+++ b/apps/web/tests/expected/agent-preset-authoring/section.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/deepseek-messages-settings/cards.expected.md b/apps/web/tests/expected/deepseek-messages-settings/cards.expected.md
index 5a3a367e7a..dfdf727205 100644
--- a/apps/web/tests/expected/deepseek-messages-settings/cards.expected.md
+++ b/apps/web/tests/expected/deepseek-messages-settings/cards.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/deepseek-messages-settings/clear-key.expected.md b/apps/web/tests/expected/deepseek-messages-settings/clear-key.expected.md
index b1c8c2f328..f8b52ac7f0 100644
--- a/apps/web/tests/expected/deepseek-messages-settings/clear-key.expected.md
+++ b/apps/web/tests/expected/deepseek-messages-settings/clear-key.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/desktop-locale/automatic.expected.md b/apps/web/tests/expected/desktop-locale/automatic.expected.md
index f657109584..7f3c40fb01 100644
--- a/apps/web/tests/expected/desktop-locale/automatic.expected.md
+++ b/apps/web/tests/expected/desktop-locale/automatic.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/desktop-locale/selected.expected.md b/apps/web/tests/expected/desktop-locale/selected.expected.md
index 885ad3b4f3..65a1696252 100644
--- a/apps/web/tests/expected/desktop-locale/selected.expected.md
+++ b/apps/web/tests/expected/desktop-locale/selected.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "General"
- button "Models"
- - button "Built-in plugins"
+ - button "Plugins"
- button "Agent presets"
- button "Open configuration file"
- button "Close"
diff --git a/apps/web/tests/expected/models-settings-recovery/stored-error.expected.md b/apps/web/tests/expected/models-settings-recovery/stored-error.expected.md
index c53b1d766f..f083571faa 100644
--- a/apps/web/tests/expected/models-settings-recovery/stored-error.expected.md
+++ b/apps/web/tests/expected/models-settings-recovery/stored-error.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/catalog-inputs.expected.md b/apps/web/tests/expected/models-settings/catalog-inputs.expected.md
index 3022f22a78..a80292169c 100644
--- a/apps/web/tests/expected/models-settings/catalog-inputs.expected.md
+++ b/apps/web/tests/expected/models-settings/catalog-inputs.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/configured.expected.md b/apps/web/tests/expected/models-settings/configured.expected.md
index 063bbf1550..ef72f1368d 100644
--- a/apps/web/tests/expected/models-settings/configured.expected.md
+++ b/apps/web/tests/expected/models-settings/configured.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/declared-edit.expected.md b/apps/web/tests/expected/models-settings/declared-edit.expected.md
index c8f652fbf3..e778917fbb 100644
--- a/apps/web/tests/expected/models-settings/declared-edit.expected.md
+++ b/apps/web/tests/expected/models-settings/declared-edit.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/declared.expected.md b/apps/web/tests/expected/models-settings/declared.expected.md
index 27749f1ca2..0f8f3831c9 100644
--- a/apps/web/tests/expected/models-settings/declared.expected.md
+++ b/apps/web/tests/expected/models-settings/declared.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/empty.expected.md b/apps/web/tests/expected/models-settings/empty.expected.md
index dd808d7f86..806f64fd67 100644
--- a/apps/web/tests/expected/models-settings/empty.expected.md
+++ b/apps/web/tests/expected/models-settings/empty.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/image-only.expected.md b/apps/web/tests/expected/models-settings/image-only.expected.md
index 051df42792..f06dd97c8a 100644
--- a/apps/web/tests/expected/models-settings/image-only.expected.md
+++ b/apps/web/tests/expected/models-settings/image-only.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/mobile-collapsed.expected.md b/apps/web/tests/expected/models-settings/mobile-collapsed.expected.md
index c052e8c61f..b48ffb633d 100644
--- a/apps/web/tests/expected/models-settings/mobile-collapsed.expected.md
+++ b/apps/web/tests/expected/models-settings/mobile-collapsed.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/mobile-expanded.expected.md b/apps/web/tests/expected/models-settings/mobile-expanded.expected.md
index 69444fb808..08aeef2cba 100644
--- a/apps/web/tests/expected/models-settings/mobile-expanded.expected.md
+++ b/apps/web/tests/expected/models-settings/mobile-expanded.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/native-keyless.expected.md b/apps/web/tests/expected/models-settings/native-keyless.expected.md
index 339655dde8..4fa4bb33e4 100644
--- a/apps/web/tests/expected/models-settings/native-keyless.expected.md
+++ b/apps/web/tests/expected/models-settings/native-keyless.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/models-settings/refreshing.expected.md b/apps/web/tests/expected/models-settings/refreshing.expected.md
index 52e4eb8439..995f26fac2 100644
--- a/apps/web/tests/expected/models-settings/refreshing.expected.md
+++ b/apps/web/tests/expected/models-settings/refreshing.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/onboarding-deepseek-config/default-models.expected.md b/apps/web/tests/expected/onboarding-deepseek-config/default-models.expected.md
index 3bd004257e..bd1e5afcd8 100644
--- a/apps/web/tests/expected/onboarding-deepseek-config/default-models.expected.md
+++ b/apps/web/tests/expected/onboarding-deepseek-config/default-models.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/onboarding-deepseek-config/models.expected.md b/apps/web/tests/expected/onboarding-deepseek-config/models.expected.md
index 5b10207801..a34bbb6a9e 100644
--- a/apps/web/tests/expected/onboarding-deepseek-config/models.expected.md
+++ b/apps/web/tests/expected/onboarding-deepseek-config/models.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/onboarding-native/models.expected.md b/apps/web/tests/expected/onboarding-native/models.expected.md
index 3d1f292685..b1ae231767 100644
--- a/apps/web/tests/expected/onboarding-native/models.expected.md
+++ b/apps/web/tests/expected/onboarding-native/models.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/onboarding-usable-provider/dismissed.expected.md b/apps/web/tests/expected/onboarding-usable-provider/dismissed.expected.md
index 15dfde8f44..3392307d86 100644
--- a/apps/web/tests/expected/onboarding-usable-provider/dismissed.expected.md
+++ b/apps/web/tests/expected/onboarding-usable-provider/dismissed.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/plugin-manager/touch-tooltips.expected.md b/apps/web/tests/expected/plugin-manager/touch-tooltips.expected.md
index 4df272e593..8446d5cf7d 100644
--- a/apps/web/tests/expected/plugin-manager/touch-tooltips.expected.md
+++ b/apps/web/tests/expected/plugin-manager/touch-tooltips.expected.md
@@ -2,7 +2,7 @@
Touch refresh: one refresh request; no tooltip
Touch explanation: visible within the 390px viewport
-- tooltip "在这里配置官方插件,安装和管理其他插件。内置插件列表及运行状态可在「设置 → 内置插件」中查看"
+- tooltip "在这里配置官方插件,安装、管理和配置其他插件。"
Explanation closes on another tap or an outside touch
Keyboard focus after touch: refresh tooltip visible
Mouse hover after touch: refresh tooltip visible
diff --git a/apps/web/tests/expected/settings-chrome/dialog-en.expected.md b/apps/web/tests/expected/settings-chrome/dialog-en.expected.md
index a51f5a125c..da3994fc7d 100644
--- a/apps/web/tests/expected/settings-chrome/dialog-en.expected.md
+++ b/apps/web/tests/expected/settings-chrome/dialog-en.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "General"
- button "Models"
- - button "Built-in plugins"
+ - button "Plugins"
- button "Agent presets"
- button "Open configuration file"
- button "Close"
diff --git a/apps/web/tests/expected/settings-chrome/dialog-no-browser.expected.md b/apps/web/tests/expected/settings-chrome/dialog-no-browser.expected.md
index a51f5a125c..da3994fc7d 100644
--- a/apps/web/tests/expected/settings-chrome/dialog-no-browser.expected.md
+++ b/apps/web/tests/expected/settings-chrome/dialog-no-browser.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "General"
- button "Models"
- - button "Built-in plugins"
+ - button "Plugins"
- button "Agent presets"
- button "Open configuration file"
- button "Close"
diff --git a/apps/web/tests/expected/settings-chrome/dialog.expected.md b/apps/web/tests/expected/settings-chrome/dialog.expected.md
index 9288e7fb27..342b02be59 100644
--- a/apps/web/tests/expected/settings-chrome/dialog.expected.md
+++ b/apps/web/tests/expected/settings-chrome/dialog.expected.md
@@ -3,7 +3,7 @@
- navigation:
- button "通用设置"
- button "模型"
- - button "内置插件"
+ - button "插件管理"
- button "Agent 预设"
- button "打开配置文件"
- button "关闭"
diff --git a/apps/web/tests/expected/settings-chrome/plugin-instances.expected.md b/apps/web/tests/expected/settings-chrome/plugin-instances.expected.md
deleted file mode 100644
index 7ed9dab306..0000000000
--- a/apps/web/tests/expected/settings-chrome/plugin-instances.expected.md
+++ /dev/null
@@ -1,16 +0,0 @@
-- list:
- - listitem:
- - button "子智能体控制工具, tool-subagent-control, 已启用":
- - strong: 子智能体控制工具
- - text: 让 AI 向子智能体发送消息或中断其运行。
- - code: tool-subagent-control
- - listitem:
- - button "子智能体委派工具, tool-subagent, 已启用":
- - strong: 子智能体委派工具
- - text: 让 AI 将任务交给子智能体,并获取运行结果。
- - code: tool-subagent
- - listitem:
- - button "子智能体委派工具, tool-subagent-fork, 已启用":
- - strong: 子智能体委派工具
- - text: 让 AI 将任务交给子智能体,并获取运行结果。
- - code: tool-subagent-fork
diff --git a/apps/web/tests/expected/settings-chrome/plugins.expected.md b/apps/web/tests/expected/settings-chrome/plugins.expected.md
deleted file mode 100644
index 22b5bc2c80..0000000000
--- a/apps/web/tests/expected/settings-chrome/plugins.expected.md
+++ /dev/null
@@ -1,5 +0,0 @@
-- listitem:
- - button "子智能体委派工具, tool-subagent, 已启用":
- - strong: 子智能体委派工具
- - text: 让 AI 将任务交给子智能体,并获取运行结果。
- - code: tool-subagent
diff --git a/apps/web/tests/fixtures/plugins/fixture-settings-section/client.js b/apps/web/tests/fixtures/plugins/fixture-settings-section/client.js
new file mode 100644
index 0000000000..fbdda149e3
--- /dev/null
+++ b/apps/web/tests/fixtures/plugins/fixture-settings-section/client.js
@@ -0,0 +1,16 @@
+/** Test package registering its own settings page into `settings.section`. */
+window.__ModuleLoader__.load({
+ id: '@fixture/settings-section',
+ factory(require) {
+ const React = require('react')
+ return {
+ inject: ['slots'],
+ apply(ctx) {
+ ctx.slots.inject('settings.section', () => ctx.slots.register({
+ name: 'settings.section', id: 'fixture-settings-section', label: 'Fixture settings',
+ }, () => React.createElement('section', { 'data-fixture-settings-section': '', 'aria-label': 'Fixture settings' },
+ React.createElement('p', null, 'Settings content from the fixture'))))
+ },
+ }
+ },
+})
diff --git a/apps/web/tests/fixtures/plugins/fixture-settings-section/cordis.patch.yml b/apps/web/tests/fixtures/plugins/fixture-settings-section/cordis.patch.yml
new file mode 100644
index 0000000000..2c97eb2558
--- /dev/null
+++ b/apps/web/tests/fixtures/plugins/fixture-settings-section/cordis.patch.yml
@@ -0,0 +1,4 @@
+# Web e2e fixture bundle whose browser half registers a plugin settings page.
+- insert:
+ - id: fixture-settings-section
+ name: '@fixture/settings-section'
diff --git a/apps/web/tests/fixtures/plugins/fixture-settings-section/index.js b/apps/web/tests/fixtures/plugins/fixture-settings-section/index.js
new file mode 100644
index 0000000000..118fdd58fd
--- /dev/null
+++ b/apps/web/tests/fixtures/plugins/fixture-settings-section/index.js
@@ -0,0 +1,2 @@
+/** Host companion for the plugin settings page fixture. */
+export function apply() {}
diff --git a/apps/web/tests/fixtures/plugins/fixture-settings-section/package.json b/apps/web/tests/fixtures/plugins/fixture-settings-section/package.json
new file mode 100644
index 0000000000..48a29fbedf
--- /dev/null
+++ b/apps/web/tests/fixtures/plugins/fixture-settings-section/package.json
@@ -0,0 +1,12 @@
+{
+ "name": "@fixture/settings-section",
+ "version": "0.0.1",
+ "private": true,
+ "type": "module",
+ "main": "index.js",
+ "exports": { ".": "./index.js", "./client": "./client.js" },
+ "dsh": {
+ "bundle": { "patch": "./cordis.patch.yml" },
+ "client": { "platform": "web" }
+ }
+}
diff --git a/apps/web/tests/plugin-config.e2e.ts b/apps/web/tests/plugin-config.e2e.ts
index a8982010de..b2bc6de81b 100644
--- a/apps/web/tests/plugin-config.e2e.ts
+++ b/apps/web/tests/plugin-config.e2e.ts
@@ -10,13 +10,13 @@ import { fileURLToPath } from 'node:url'
import type { Browser, Locator, Page } from 'playwright'
import { chromium } from 'playwright'
import { HIDDEN_BUNDLES } from '@deepseek-ai/dsh-official-bundles'
-import { afterAll, beforeAll, describe, expect, it, onTestFailed } from 'vitest'
+import { afterAll, beforeAll, describe, expect, it, onTestFailed, onTestFinished } from 'vitest'
import { join } from 'node:path'
import {
assertFixtureInventory, captureStableAria, compareOrRefreshGolden,
launchWebScaffold, watchConsole, webSnapshotMode, type WebScaffold,
} from './scaffold.ts'
-import { ZH_BROWSER_LOCALE, saveFailureShot } from './support.ts'
+import { ZH_BROWSER_LOCALE, openSettings, saveFailureShot } from './support.ts'
const SNAPSHOT_DIR = fileURLToPath(new URL('./expected/plugin-config', import.meta.url))
const OFFICIAL_EXPECTED = join(SNAPSHOT_DIR, 'official.expected.md')
@@ -503,6 +503,46 @@ describe('web e2e: plugin configuration pages', () => {
expect(tripwire.warnings).toEqual([])
await assertFixtureInventory(SNAPSHOT_DIR, ['bundle.expected.md', 'official.expected.md', 'row.expected.md', 'subagent.expected.md', 'web-search.expected.md'])
})
+})
+describe('web e2e: a community plugin settings page', () => {
+ it('shows a settings.section entry in Settings and on its bundle row', async () => {
+ const scaffold = await launchWebScaffold({
+ profile: { packages: [{ dir: join(FIXTURE_PLUGINS, 'fixture-settings-section') }] },
+ })
+ onTestFinished(() => scaffold.close())
+ const browser = await chromium.launch()
+ onTestFinished(() => browser.close())
+ const page = await browser.newPage({ viewport: { width: 1680, height: 1000 }, locale: ZH_BROWSER_LOCALE })
+ const console = watchConsole(page)
+ onTestFailed(() => saveFailureShot(page, 'web-e2e-plugin-config-settings-section'))
+ await page.goto(scaffold.authenticatedUrl, { waitUntil: 'load' })
+ await page.getByRole('navigation', { name: '全局面板' }).getByRole('button', { name: '插件', exact: true }).click()
+ const panel = page.locator('[data-plugin-panel]')
+ await panel.getByRole('button', { name: '查看 @fixture/settings-section', exact: true }).click({ timeout: 20_000 })
+ const row = panel.locator('[data-plugin-row]', { hasText: 'fixture-settings-section' })
+ await row.waitFor({ timeout: 10_000 })
+ const configure = panel.getByRole('button', { name: '配置 @fixture/settings-section' })
+ expect(await configure.count()).toBe(0)
+ // Switched on, the browser half mounts and its settings page claims the row.
+ await panel.getByRole('switch', { name: '启用 @fixture/settings-section' }).click()
+ await configure.waitFor({ timeout: 30_000 })
+ await configure.click()
+ const rowPage = panel.locator('[data-plugin-row-detail="@fixture/settings-section#fixture-settings-section"]')
+ await rowPage.waitFor({ timeout: 10_000 })
+ await rowPage.getByRole('region', { name: 'Fixture settings', exact: true })
+ .getByText('Settings content from the fixture', { exact: true }).waitFor({ timeout: 10_000 })
+
+ // Settings keeps the same page in its navigation.
+ await openSettings(page, 'zh')
+ const dialog = page.getByRole('dialog', { name: '设置', exact: true })
+ await dialog.getByRole('navigation').getByRole('button', { name: 'Fixture settings', exact: true }).click()
+ await dialog.getByRole('region', { name: 'Fixture settings', exact: true })
+ .getByText('Settings content from the fixture', { exact: true }).waitFor({ timeout: 10_000 })
+ await page.keyboard.press('Escape')
+ await expect.poll(() => dialog.count(), { timeout: 5_000 }).toBe(0)
+ expect(console.pageErrors).toEqual([])
+ expect(console.warnings).toEqual([])
+ }, 90_000)
})
diff --git a/apps/web/tests/plugin-manager.e2e.ts b/apps/web/tests/plugin-manager.e2e.ts
index 49658beb91..577beee782 100644
--- a/apps/web/tests/plugin-manager.e2e.ts
+++ b/apps/web/tests/plugin-manager.e2e.ts
@@ -792,14 +792,14 @@ describe('web e2e: plugin manager', () => {
await info.hover()
const hoverHelp = page.getByRole('tooltip')
await hoverHelp.waitFor()
- expect(await hoverHelp.textContent()).toBe('在这里配置官方插件,安装和管理其他插件。内置插件列表及运行状态可在「设置 → 内置插件」中查看')
+ expect(await hoverHelp.textContent()).toBe('在这里配置官方插件,安装、管理和配置其他插件。')
await panel.getByRole('heading', { name: '插件', exact: true }).hover()
await hoverHelp.waitFor({ state: 'hidden' })
await info.focus()
await page.keyboard.press('Enter')
const help = page.getByRole('tooltip')
await help.waitFor()
- expect(await help.textContent()).toContain('设置 → 内置插件')
+ expect(await help.textContent()).toBe('在这里配置官方插件,安装、管理和配置其他插件。')
await page.keyboard.press('Escape')
expect(await help.count()).toBe(0)
expect(await info.evaluate(element => element === document.activeElement)).toBe(true)
diff --git a/apps/web/tests/settings-appearance.e2e.ts b/apps/web/tests/settings-appearance.e2e.ts
index 26be4bdedc..0a79e44440 100644
--- a/apps/web/tests/settings-appearance.e2e.ts
+++ b/apps/web/tests/settings-appearance.e2e.ts
@@ -189,12 +189,6 @@ it('shares settings card materials and control sizes in both palettes', async ()
await compareOrRefreshGolden(join(EXPECTED, 'account.expected.md'),
await captureStableAria(page, 'section[aria-label="账号与余额"]', scaffold.workspaceCwd), webSnapshotMode())
- await dialog.getByRole('button', { name: '内置插件', exact: true }).click()
- await dialog.getByRole('button', { name: /^全局/ }).click()
- const plugin = dialog.locator('[data-plugin-scope="global"] [data-plugin-entry]').first()
- await plugin.waitFor()
- expect(await appearance(plugin)).toMatchObject(material)
-
await dialog.getByRole('button', { name: 'Agent 预设', exact: true }).click()
const preset = dialog.locator('li').first()
await preset.waitFor()
diff --git a/apps/web/tests/settings-chrome.e2e.ts b/apps/web/tests/settings-chrome.e2e.ts
index 1259e5253f..dea15ef684 100644
--- a/apps/web/tests/settings-chrome.e2e.ts
+++ b/apps/web/tests/settings-chrome.e2e.ts
@@ -24,11 +24,8 @@ import { brandString } from '@deepseek-ai/dsh-brand'
const SNAPSHOT_DIR = fileURLToPath(new URL('./expected/settings-chrome', import.meta.url))
const DIALOG_EXPECTED = join(SNAPSHOT_DIR, 'dialog.expected.md')
-const PLUGINS_EXPECTED = join(SNAPSHOT_DIR, 'plugins.expected.md')
-const PLUGIN_INSTANCES_EXPECTED = join(SNAPSHOT_DIR, 'plugin-instances.expected.md')
// The English fallback surface: a browser naming no shipped language.
const DIALOG_EN_EXPECTED = join(SNAPSHOT_DIR, 'dialog-en.expected.md')
-const PLUGIN_ROW_SELECTOR = '[data-plugin-scope="preset"] [data-plugin-entry="tool-subagent"]'
const MODE = webSnapshotMode()
const SCREENSHOTS = 'screenshots/collapse-timing-settings'
const SCREENSHOT_DIR = fileURLToPath(new URL(`../../../.artifacts/${SCREENSHOTS}`, import.meta.url))
@@ -140,84 +137,6 @@ describe('web e2e: settings modal and General preferences', () => {
await dialog.getByRole('button', { name: '模型', exact: true }).click()
await expect.poll(() => dialog.getByRole('button', { name: '模型', exact: true }).getAttribute('aria-current'), { timeout: 5_000 }).toBe('true')
expect(await dialog.getByRole('button', { name: '通用设置' }).getAttribute('aria-current')).toBeNull()
- // Built-in plugins: the read-only Plugin list, a projection of the same
- // assembled Loader tree, shown as the section's one page; management and
- // configuration live on the sidebar's Plugins panel (its own scenario files
- // drive that page over a profile runtime). Capture one stable shipped row
- // rather than the whole inventory so adding an unrelated plugin does not
- // rewrite this surface's golden.
- await dialog.getByRole('button', { name: '内置插件', exact: true }).click()
- await dialog.getByRole('heading', { name: '内置插件', exact: true }).waitFor({ timeout: 10_000 })
- // The preset group starts open under its display-only switcher; the global group starts folded.
- const presetSwitcher = dialog.getByRole('button', { name: '选择要查看的 Agent 预设' })
- await presetSwitcher.waitFor({ timeout: 10_000 })
- // The shipped default's zh display name comes from the zh dictionaries.
- expect(await presetSwitcher.textContent()).toBe('标准模式(默认)')
- const presetToggle = dialog.getByRole('button', { name: '会话插件', exact: true })
- expect(await presetToggle.getAttribute('aria-expanded')).toBe('true')
- expect(await dialog.locator('[data-plugin-scope="preset"] [data-plugin-entry]').count()).toBeGreaterThan(0)
- const globalToggle = dialog.getByRole('button', { name: /^全局/ })
- expect(await globalToggle.getAttribute('aria-expanded')).toBe('false')
- await globalToggle.click()
- const pluginRow = dialog.locator(PLUGIN_ROW_SELECTOR)
- await pluginRow.waitFor({ timeout: 10_000 })
- const expectedPluginCount = [...scaffold.ctx.loader.entries()]
- .filter(entry => !entry.options.group)
- .length
- const pluginSearch = dialog.getByRole('searchbox', { name: '搜索插件' })
- expect(await pluginSearch.count()).toBe(1)
- // Every Loader entry appears exactly once in the global group — rows the
- // presets took over included, preset compositions excluded.
- expect(await dialog.locator('[data-plugin-scope="global"] [data-plugin-entry]').count())
- .toBe(expectedPluginCount)
- // A plainly enabled row states its status only in its accessible name: it
- // carries no tag, and an active fiber draws no dot, so no global row shows
- // either. Guard the assertions against matching nothing because no row is enabled.
- const enabledRows = dialog.locator('[data-plugin-scope="global"] [data-plugin-entry] button[aria-label$="已启用"]')
- expect(await enabledRows.count()).toBeGreaterThan(0)
- expect(await enabledRows.getByText('已启用', { exact: true }).count()).toBe(0)
- expect(await dialog.locator('[data-plugin-scope="global"] [role="img"][aria-label="运行中"]').count()).toBe(0)
- expect(await dialog.getByText('由 Agent 预设按会话组成', { exact: true }).count()).toBe(1)
- expect(await dialog.getByText('系统与所有会话共用', { exact: true }).count()).toBe(1)
- expect(await dialog.getByRole('button', { name: '内置插件', exact: true }).getAttribute('aria-current')).toBe('true')
- // One contribution shows as the page itself, without a tab row.
- expect(await dialog.getByRole('tab').count()).toBe(0)
- expect(await dialog.getByRole('button', { name: '模型', exact: true }).getAttribute('aria-current')).toBeNull()
- const pluginsSnapshot = await captureStableAria(
- page,
- PLUGIN_ROW_SELECTOR,
- scaffold.workspaceCwd,
- )
- await compareOrRefreshGolden(PLUGINS_EXPECTED, pluginsSnapshot, MODE)
- await pluginSearch.fill('tool-subagent')
- const instanceRows = [
- ['tool-subagent', '已启用'],
- ['tool-subagent-fork', '已启用'],
- ] as const
- for (const [entryId, status] of instanceRows) {
- const row = dialog.locator(`[data-plugin-scope="preset"] [data-plugin-entry="${entryId}"]`)
- const name = `子智能体委派工具, ${entryId}, ${status}`
- const trigger = row.getByRole('button', { name, exact: true })
- await trigger.waitFor({ timeout: 10_000 })
- expect(await trigger.getAttribute('aria-expanded')).toBe('false')
- const identity = row.locator('code')
- expect(await identity.textContent()).toBe(entryId)
- expect(await identity.getAttribute('title')).toBe(entryId)
- }
- expect(await dialog.locator('[data-plugin-entry="tool-subagent-codex"], [data-plugin-entry="tool-subagent-claude-code"]').count()).toBe(0)
- const instancesSnapshot = await captureStableAria(
- page,
- '[data-plugin-scope="preset"] ul',
- scaffold.workspaceCwd,
- )
- await compareOrRefreshGolden(PLUGIN_INSTANCES_EXPECTED, instancesSnapshot, MODE)
- await dialog.getByRole('button', {
- name: '子智能体委派工具, tool-subagent-fork, 已启用',
- exact: true,
- }).click()
- expect(await dialog.locator('[data-plugin-entry="tool-subagent-fork"] button')
- .getAttribute('aria-expanded')).toBe('true')
- await pluginSearch.fill('')
// Close path 1: Escape.
await page.keyboard.press('Escape')
await expect.poll(() => page.getByRole('dialog', { name: '设置' }).count(), { timeout: 5_000 }).toBe(0)
@@ -229,6 +148,27 @@ describe('web e2e: settings modal and General preferences', () => {
expect(tripwire.pageErrors).toEqual([])
}, 60_000)
+ it('leaves Settings for the sidebar Plugins page from the Plugin management entry', async () => {
+ const linkPage = await browser.newPage({ viewport: { width: 1680, height: 1000 }, locale: ZH_BROWSER_LOCALE })
+ onTestFinished(() => linkPage.close())
+ onTestFailed(() => saveSettingsFailureShot(linkPage, 'settings-plugins-link'))
+ const linkConsole = watchConsole(linkPage)
+ await linkPage.goto(scaffold.authenticatedUrl, { waitUntil: 'load' })
+ await openSettings(linkPage, 'zh')
+ const dialog = linkPage.getByRole('dialog', { name: '设置', exact: true })
+ const sections = await dialog.getByRole('navigation').getByRole('button').allTextContents()
+ // The entry holds the position between Models and Agent presets.
+ expect(sections.indexOf('插件管理')).toBe(sections.indexOf('模型') + 1)
+ expect(sections.indexOf('Agent 预设')).toBe(sections.indexOf('插件管理') + 1)
+ await dialog.getByRole('button', { name: '插件管理', exact: true }).click()
+ await expect.poll(() => dialog.count(), { timeout: 5_000 }).toBe(0)
+ const pluginsEntry = linkPage.getByRole('navigation', { name: '全局面板' }).getByRole('button', { name: '插件', exact: true })
+ await expect.poll(() => pluginsEntry.getAttribute('aria-current'), { timeout: 10_000 }).toBe('page')
+ await linkPage.locator('[data-plugin-panel]').getByRole('heading', { name: '插件', exact: true }).waitFor({ timeout: 10_000 })
+ expect(linkConsole.pageErrors).toEqual([])
+ expect(linkConsole.warnings).toEqual([])
+ })
+
it('scrolls overflowing section navigation independently of the title and settings content', async () => {
const overflowPage = await browser.newPage({ viewport: { width: 1280, height: 768 }, locale: ZH_BROWSER_LOCALE })
onTestFinished(() => overflowPage.close())
@@ -953,17 +893,12 @@ describe('web e2e: settings modal and General preferences', () => {
const dialog = enPage.getByRole('dialog', { name: 'Settings' })
await dialog.waitFor({ timeout: 10_000 })
await dialog.getByRole('button', { name: 'English' }).waitFor({ timeout: 10_000 })
- // The plugin list resolves shipped preset names through the en
- // dictionaries instead of echoing the preset declarations' Chinese metadata.
- await dialog.getByRole('button', { name: 'Built-in plugins', exact: true }).click()
- const presetSwitcher = dialog.getByRole('button', { name: 'Choose the agent preset to inspect' })
- await presetSwitcher.waitFor({ timeout: 10_000 })
- expect(await presetSwitcher.textContent()).toBe('Standard mode (default)')
- // The plugin manager speaks the en dictionary too: its sidebar entry
- // and the unavailable notice a scaffold without a profile runtime shows.
- await enPage.keyboard.press('Escape')
+ // The plugin manager speaks the en dictionary too: its Settings entry
+ // leaves Settings for the Plugins page, whose header and the sidebar entry are English.
+ await dialog.getByRole('button', { name: 'Plugins', exact: true }).click()
await expect.poll(() => enPage.getByRole('dialog', { name: 'Settings' }).count(), { timeout: 5_000 }).toBe(0)
- await enPage.getByRole('navigation', { name: 'Global panels' }).getByRole('button', { name: 'Plugins', exact: true }).click()
+ await expect.poll(() => enPage.getByRole('navigation', { name: 'Global panels' })
+ .getByRole('button', { name: 'Plugins', exact: true }).getAttribute('aria-current'), { timeout: 10_000 }).toBe('page')
await enPage.getByRole('button', { name: 'Add plugin', exact: true })
.waitFor({ timeout: 10_000 })
// This page has no closing inventory spec to sweep its console, so the
@@ -1042,8 +977,6 @@ describe('web e2e: settings modal and General preferences', () => {
'dialog.expected.md',
'collapse-timing-en.expected.md',
'collapse-timing-zh.expected.md',
- 'plugin-instances.expected.md',
- 'plugins.expected.md',
])
})
})
diff --git a/docs/capability-seams.i18n.yaml b/docs/capability-seams.i18n.yaml
index 55afd2897b..9b3c206b7d 100644
--- a/docs/capability-seams.i18n.yaml
+++ b/docs/capability-seams.i18n.yaml
@@ -6,5 +6,5 @@
en: 41d772192075e133
zh: 5ef3da69b4de1d8a
/capability-seams-and-core-services:
- en: 377f8f047b34cfde
- zh: be08abadad0beb93
+ en: 0ae3b368d7fcde08
+ zh: 64c3cc22e17be96b
diff --git a/docs/capability-seams.md b/docs/capability-seams.md
index 6058d17b22..e087ec5b92 100644
--- a/docs/capability-seams.md
+++ b/docs/capability-seams.md
@@ -29,7 +29,6 @@ flowchart LR
svc_pluginRegistryProbe["ctx.pluginRegistryProbe Host registry response comparison"]
pkg_plugin_manager["plugin-manager"]
svc_pluginManager["ctx.pluginManager Current-profile plugin and bundle management"]
- pkg_ui_settings_plugin_inventory["ui-settings-plugin-inventory"]
pkg_plugin_market["plugin-market"]
svc_pluginMarket["ctx.pluginMarket Plugin market index reader"]
pkg_client_ui_plugin_market["client-ui-plugin-market"]
@@ -558,7 +557,6 @@ flowchart LR
svc_otel --> pkg_host_product_telemetry_otel
svc_otel --> pkg_session_telemetry_otel
svc_pluginManager --> pkg_plugin_manager
- svc_pluginManager --> pkg_ui_settings_plugin_inventory
svc_pluginMarket --> pkg_client_ui_plugin_market
svc_pluginMarket --> pkg_plugin_market
svc_pluginRecommendations --> pkg_client_ui_plugin_recommendations
@@ -677,7 +675,7 @@ flowchart LR
| `ctx.translator` | `service` | [`experimental-translator`](../packages/experimental/translator) | - | [`experimental-client-ui-cot-translation`](../packages/experimental/client-ui-cot-translation) | - | Resolves Google or Bing requests and retains shared experimental records through the active Session writer. |
| `ctx.hmr` | `core` | [`hmr`](../packages/boot/hmr) | - | [`app-boot`](../packages/boot/app-boot) | - | Owns module and exact configuration watchers; application mutations share its queue and automatic reloads await the application file lock. |
| `ctx.pluginRegistryProbe` | `core` | [`client-ui-plugin-manager`](../packages/client/ui-plugin-manager) | - | [`client-ui-plugin-manager`](../packages/client/ui-plugin-manager) | - | Races public registry responses on the Host; the Client owns the initial registry recommendation. |
-| `ctx.pluginManager` | `core` | [`plugin-manager`](../packages/boot/plugin-manager) | - | [`plugin-manager`](../packages/boot/plugin-manager), `ui-settings-plugin-inventory` | - | Shares profile package operations with the CLI and reports persisted and running state to Web and agent callers. |
+| `ctx.pluginManager` | `core` | [`plugin-manager`](../packages/boot/plugin-manager) | - | [`plugin-manager`](../packages/boot/plugin-manager) | - | Shares profile package operations with the CLI and reports persisted and running state to Web and agent callers. |
| `ctx.pluginMarket` | `core` | [`plugin-market`](../packages/boot/plugin-market) | - | [`client-ui-plugin-market`](../packages/client/ui-plugin-market), [`plugin-market`](../packages/boot/plugin-market) | - | Fetches and validates the index sources the user configures; installation goes through the plugin manager. |
| `ctx.profileContext` | `core` | [`app-boot`](../packages/boot/app-boot) | - | [`plugin-manager`](../packages/boot/plugin-manager) | - | The dsh launcher supplies data-only profile locations and composition inputs; reload scheduling belongs to dsh-hmr. |
| `ctx.connection` | `core` | [`client-connection`](../packages/client/connection) | - | [`api-gateway`](../packages/api/gateway), [`host-frontend-static`](../packages/host/frontend-static) | - | Applies source policy and shared HTTP request dispatch; credential verification belongs to ConnectionAuthentication, and API adapters register endpoints and streams. |
diff --git a/docs/capability-seams.zh.md b/docs/capability-seams.zh.md
index a7b44ce529..0d8d97e4ab 100644
--- a/docs/capability-seams.zh.md
+++ b/docs/capability-seams.zh.md
@@ -31,7 +31,6 @@ flowchart LR
svc_pluginRegistryProbe["ctx.pluginRegistryProbe Host registry response comparison"]
pkg_plugin_manager["plugin-manager"]
svc_pluginManager["ctx.pluginManager Current-profile plugin and bundle management"]
- pkg_ui_settings_plugin_inventory["ui-settings-plugin-inventory"]
pkg_plugin_market["plugin-market"]
svc_pluginMarket["ctx.pluginMarket Plugin market index reader"]
pkg_client_ui_plugin_market["client-ui-plugin-market"]
@@ -560,7 +559,6 @@ flowchart LR
svc_otel --> pkg_host_product_telemetry_otel
svc_otel --> pkg_session_telemetry_otel
svc_pluginManager --> pkg_plugin_manager
- svc_pluginManager --> pkg_ui_settings_plugin_inventory
svc_pluginMarket --> pkg_client_ui_plugin_market
svc_pluginMarket --> pkg_plugin_market
svc_pluginRecommendations --> pkg_client_ui_plugin_recommendations
@@ -679,7 +677,7 @@ flowchart LR
| `ctx.translator` | `service` | [`experimental-translator`](../packages/experimental/translator) | - | [`experimental-client-ui-cot-translation`](../packages/experimental/client-ui-cot-translation) | - | 解析 Google 或 Bing 请求,并可选保留统一的实验性 Session 记录。 |
| `ctx.hmr` | `core` | [`hmr`](../packages/boot/hmr) | - | [`app-boot`](../packages/boot/app-boot) | - | 负责模块和精确配置监听;应用修改共用其队列,自动重载等待应用文件锁。 |
| `ctx.pluginRegistryProbe` | `core` | [`client-ui-plugin-manager`](../packages/client/ui-plugin-manager) | - | [`client-ui-plugin-manager`](../packages/client/ui-plugin-manager) | - | 在 Host 上并发比较公共安装源响应;初始安装源推荐由 Client 负责。 |
-| `ctx.pluginManager` | `core` | [`plugin-manager`](../packages/boot/plugin-manager) | - | [`plugin-manager`](../packages/boot/plugin-manager), `ui-settings-plugin-inventory` | - | 与 CLI 共享 profile 包操作,并向 Web 和 Agent 调用方分别报告持久状态与运行状态。 |
+| `ctx.pluginManager` | `core` | [`plugin-manager`](../packages/boot/plugin-manager) | - | [`plugin-manager`](../packages/boot/plugin-manager) | - | 与 CLI 共享 profile 包操作,并向 Web 和 Agent 调用方分别报告持久状态与运行状态。 |
| `ctx.pluginMarket` | `core` | [`plugin-market`](../packages/boot/plugin-market) | - | [`client-ui-plugin-market`](../packages/client/ui-plugin-market), [`plugin-market`](../packages/boot/plugin-market) | - | 获取并校验用户配置的索引源;安装通过插件管理器完成。 |
| `ctx.profileContext` | `core` | [`app-boot`](../packages/boot/app-boot) | - | [`plugin-manager`](../packages/boot/plugin-manager) | - | dsh launcher 提供纯数据形式的 profile 位置与组合输入;重载调度由 dsh-hmr 负责。 |
| `ctx.connection` | `core` | [`client-connection`](../packages/client/connection) | - | [`api-gateway`](../packages/api/gateway), [`host-frontend-static`](../packages/host/frontend-static) | - | 执行来源策略与共享 HTTP 请求分发;凭据验证归 ConnectionAuthentication,API 适配器注册端点和流。 |
diff --git a/docs/config-catalog.md b/docs/config-catalog.md
index b28057a7af..f25b0c266d 100644
--- a/docs/config-catalog.md
+++ b/docs/config-catalog.md
@@ -5275,8 +5275,6 @@ These load from a `cordis.yml` entry with no `config:` block; they declare no co
| `@deepseek-ai/dsh-client-ui-settings` | — | [`packages/client/ui-settings/src/index.ts`](../packages/client/ui-settings/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-agent-loop` | — | [`packages/client/ui-settings-agent-loop/src/index.ts`](../packages/client/ui-settings-agent-loop/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-general` | — | [`packages/client/ui-settings-general/src/index.ts`](../packages/client/ui-settings-general/src/index.ts) |
-| `@deepseek-ai/dsh-client-ui-settings-plugin-inventory` | — | [`packages/client/ui-settings-plugin-inventory/src/index.ts`](../packages/client/ui-settings-plugin-inventory/src/index.ts) |
-| `@deepseek-ai/dsh-client-ui-settings-plugins` | — | [`packages/client/ui-settings-plugins/src/index.ts`](../packages/client/ui-settings-plugins/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-session-log` | — | [`packages/client/ui-settings-session-log/src/index.ts`](../packages/client/ui-settings-session-log/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-shell` | — | [`packages/client/ui-settings-shell/src/index.ts`](../packages/client/ui-settings-shell/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-subagent` | — | [`packages/client/ui-settings-subagent/src/index.ts`](../packages/client/ui-settings-subagent/src/index.ts) |
diff --git a/docs/config-catalog.zh.md b/docs/config-catalog.zh.md
index 2eca6e6bad..bf58508312 100644
--- a/docs/config-catalog.zh.md
+++ b/docs/config-catalog.zh.md
@@ -5277,8 +5277,6 @@ export interface Config {
| `@deepseek-ai/dsh-client-ui-settings` | — | [`packages/client/ui-settings/src/index.ts`](../packages/client/ui-settings/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-agent-loop` | — | [`packages/client/ui-settings-agent-loop/src/index.ts`](../packages/client/ui-settings-agent-loop/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-general` | — | [`packages/client/ui-settings-general/src/index.ts`](../packages/client/ui-settings-general/src/index.ts) |
-| `@deepseek-ai/dsh-client-ui-settings-plugin-inventory` | — | [`packages/client/ui-settings-plugin-inventory/src/index.ts`](../packages/client/ui-settings-plugin-inventory/src/index.ts) |
-| `@deepseek-ai/dsh-client-ui-settings-plugins` | — | [`packages/client/ui-settings-plugins/src/index.ts`](../packages/client/ui-settings-plugins/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-session-log` | — | [`packages/client/ui-settings-session-log/src/index.ts`](../packages/client/ui-settings-session-log/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-shell` | — | [`packages/client/ui-settings-shell/src/index.ts`](../packages/client/ui-settings-shell/src/index.ts) |
| `@deepseek-ai/dsh-client-ui-settings-subagent` | — | [`packages/client/ui-settings-subagent/src/index.ts`](../packages/client/ui-settings-subagent/src/index.ts) |
diff --git a/docs/cookbook/adding-a-settings-card.i18n.yaml b/docs/cookbook/adding-a-settings-card.i18n.yaml
index 7165774217..c358bef1ca 100644
--- a/docs/cookbook/adding-a-settings-card.i18n.yaml
+++ b/docs/cookbook/adding-a-settings-card.i18n.yaml
@@ -12,8 +12,8 @@
en: 9c2680c175632a58
zh: 46927fca484b5df0
/cookbook-live-configuration-forms/3-verify-editing:
- en: dc5dc7ab4c211b97
- zh: 88f8af745c576a6d
+ en: cf8d614d67a0ade6
+ zh: 92a7b53ce83e967a
/cookbook-live-configuration-forms/4-contribute-to-another-plugin-s-page:
en: 0abb582a1a25b3d9
zh: 6078a707324ec515
diff --git a/docs/cookbook/adding-a-settings-card.md b/docs/cookbook/adding-a-settings-card.md
index 3e473d8bbc..b8f870691a 100644
--- a/docs/cookbook/adding-a-settings-card.md
+++ b/docs/cookbook/adding-a-settings-card.md
@@ -39,7 +39,7 @@ Give each instance a unique profile entry id. The base bundle mounts settings an
Change a field in Plugins and save. Verify the profile patch, the next consumer operation, unchanged plugin instance identity, and restoration after restart. Reject an invalid value and verify that neither the file nor the live value changed.
-Custom plugin pages receive `form.state` and `form.mutate(operations, expectedRevision)` from the Plugins page owner. The Host validates full Config and applies edits through ConfigEditor and volatile HMR. The [plugin settings package](../../packages/client/ui-settings-plugins/README.md) owns the existing card examples.
+Custom plugin pages receive `form.state` and `form.mutate(operations, expectedRevision)` from the Plugins page owner. The Host validates full Config and applies edits through ConfigEditor and volatile HMR. The [Plugins page README](../../packages/client/ui-plugin-manager/README.md#configuration-pages) lists the slots such a page registers into and how a `settings.section` entry also appears there; [ui-settings-shell](../../packages/client/ui-settings-shell/README.md) is an existing page.
## 4. Contribute to another plugin's page
diff --git a/docs/cookbook/adding-a-settings-card.zh.md b/docs/cookbook/adding-a-settings-card.zh.md
index fd2c713661..064b1f24e8 100644
--- a/docs/cookbook/adding-a-settings-card.zh.md
+++ b/docs/cookbook/adding-a-settings-card.zh.md
@@ -39,7 +39,7 @@ export function apply(ctx: Context, config: Config): void {
在插件页面修改字段并保存。验证 profile patch、消费者下一次操作、插件实例标识不变,以及重启后的恢复。提交无效值,并确认文件和即时值均未改变。
-自定义插件页面从 Plugins 页面所有者接收 `form.state` 和 `form.mutate(operations, expectedRevision)`。Host 校验完整 Config,并通过 ConfigEditor 和 volatile HMR 应用修改。[插件设置包](../../packages/client/ui-settings-plugins/README.zh.md) 提供现有卡片示例。
+自定义插件页面从 Plugins 页面所有者接收 `form.state` 和 `form.mutate(operations, expectedRevision)`。Host 校验完整 Config,并通过 ConfigEditor 和 volatile HMR 应用修改。[插件页面 README](../../packages/client/ui-plugin-manager/README.zh.md#configuration-pages) 列出此类页面可注册的 slot,以及 `settings.section` 条目如何同时出现在那里;[ui-settings-shell](../../packages/client/ui-settings-shell/README.zh.md) 是一个现有页面。
## 4. 向其他插件的页面贡献内容
diff --git a/docs/module-graph.md b/docs/module-graph.md
index ec7e6d6328..c7da7cb5d9 100644
--- a/docs/module-graph.md
+++ b/docs/module-graph.md
@@ -202,8 +202,6 @@ flowchart TD
pkg_client_ui_settings_agent_loop["client-ui-settings-agent-loop"]
pkg_client_ui_settings_general["client-ui-settings-general"]
pkg_client_ui_settings_models["client-ui-settings-models"]
- pkg_client_ui_settings_plugin_inventory["client-ui-settings-plugin-inventory"]
- pkg_client_ui_settings_plugins["client-ui-settings-plugins"]
pkg_client_ui_settings_session_log["client-ui-settings-session-log"]
pkg_client_ui_settings_shell["client-ui-settings-shell"]
pkg_client_ui_settings_subagent["client-ui-settings-subagent"]
@@ -1666,8 +1664,6 @@ flowchart TD
| [`client-ui-settings-agent-loop`](../packages/client/ui-settings-agent-loop) | `client` | — |
| [`client-ui-settings-general`](../packages/client/ui-settings-general) | `client` | — |
| [`client-ui-settings-models`](../packages/client/ui-settings-models) | `client` | — |
-| [`client-ui-settings-plugin-inventory`](../packages/client/ui-settings-plugin-inventory) | `client` | — |
-| [`client-ui-settings-plugins`](../packages/client/ui-settings-plugins) | `client` | — |
| [`client-ui-settings-session-log`](../packages/client/ui-settings-session-log) | `client` | — |
| [`client-ui-settings-shell`](../packages/client/ui-settings-shell) | `client` | — |
| [`client-ui-settings-subagent`](../packages/client/ui-settings-subagent) | `client` | — |
diff --git a/docs/module-graph.zh.md b/docs/module-graph.zh.md
index 18b5f97bf0..683c615fd1 100644
--- a/docs/module-graph.zh.md
+++ b/docs/module-graph.zh.md
@@ -204,8 +204,6 @@ flowchart TD
pkg_client_ui_settings_agent_loop["client-ui-settings-agent-loop"]
pkg_client_ui_settings_general["client-ui-settings-general"]
pkg_client_ui_settings_models["client-ui-settings-models"]
- pkg_client_ui_settings_plugin_inventory["client-ui-settings-plugin-inventory"]
- pkg_client_ui_settings_plugins["client-ui-settings-plugins"]
pkg_client_ui_settings_session_log["client-ui-settings-session-log"]
pkg_client_ui_settings_shell["client-ui-settings-shell"]
pkg_client_ui_settings_subagent["client-ui-settings-subagent"]
@@ -1668,8 +1666,6 @@ flowchart TD
| [`client-ui-settings-agent-loop`](../packages/client/ui-settings-agent-loop) | `client` | — |
| [`client-ui-settings-general`](../packages/client/ui-settings-general) | `client` | — |
| [`client-ui-settings-models`](../packages/client/ui-settings-models) | `client` | — |
-| [`client-ui-settings-plugin-inventory`](../packages/client/ui-settings-plugin-inventory) | `client` | — |
-| [`client-ui-settings-plugins`](../packages/client/ui-settings-plugins) | `client` | — |
| [`client-ui-settings-session-log`](../packages/client/ui-settings-session-log) | `client` | — |
| [`client-ui-settings-shell`](../packages/client/ui-settings-shell) | `client` | — |
| [`client-ui-settings-subagent`](../packages/client/ui-settings-subagent) | `client` | — |
diff --git a/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.i18n.yaml b/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.i18n.yaml
new file mode 100644
index 0000000000..bf71157a82
--- /dev/null
+++ b/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.i18n.yaml
@@ -0,0 +1,16 @@
+# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
+# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
+# After editing either side, bring the other along and re-record with:
+# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.md
+/:
+ en: dab406781a6bcb3a
+ zh: 8d94c715bf9ec1b6
+/built-in-plugins-section-removal:
+ en: 2483533f0eab34cf
+ zh: 9e7be97df303c363
+/built-in-plugins-section-removal/change:
+ en: 513dfd0788a54e09
+ zh: 6b589f0dc07a85d7
+/built-in-plugins-section-removal/migration:
+ en: b7d0c582c0bfd1cd
+ zh: ac670eb81450b9ef
diff --git a/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.md b/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.md
new file mode 100644
index 0000000000..6532e26234
--- /dev/null
+++ b/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.md
@@ -0,0 +1,19 @@
+---
+kind: upgrade-guide
+description: "Settings → Built-in plugins, its two packages, and the `settings.plugins.tab` slot are removed; plugin settings pages also appear on the Plugins page."
+---
+
+# Built-in plugins section removal
+
+English | [中文](guide.zh.md)
+
+## Change
+
+**Settings → Built-in plugins** and its packages `@deepseek-ai/dsh-client-ui-settings-plugins` and `@deepseek-ai/dsh-client-ui-settings-plugin-inventory` are removed, together with the `settings.plugins.tab` slot and `SettingsPluginsTabOwnerProps`. **Settings → Plugins** opens the Plugins page instead. `settings.section` entries still appear in Settings. The Plugins page also shows an entry on the listed bundle row whose module is the registering package, or on that bundle's page, when the row or bundle registers no `plugins.row.config` or `plugins.bundle.config` of its own; there the entry's `close` returns to the view it was opened from instead of closing Settings. Both surfaces render entries through the `settings.section.view` Factory, which ui-settings-general registers and which declares `settings.section`.
+
+## Migration
+
+1. Remove both removed packages from profile manifests and from `cordis.yml` rows that name them.
+2. Move any `settings.plugins.tab` contribution to a `settings.section` page or a Plugins page slot such as `plugins.bundle.config`.
+3. A `settings.section` page whose `close()` call must leave Settings, such as after starting a Session, navigates there itself, because on the Plugins page `close()` only returns to the previous view.
+4. Open the plugin's bundle on the Plugins page and confirm its settings page appears there, unless the row or bundle registers its own configuration, and in Settings.
diff --git a/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.zh.md b/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.zh.md
new file mode 100644
index 0000000000..c9f7902957
--- /dev/null
+++ b/docs/upgrade-guide/v0.2.2-rc.3/settings-section-plugins-page/guide.zh.md
@@ -0,0 +1,19 @@
+---
+kind: upgrade-guide
+description: "删除「设置 → 内置插件」、它的两个包和 `settings.plugins.tab` slot;插件设置页同时出现在插件页面。"
+---
+
+# 删除内置插件分区
+
+[English](guide.md) | 中文
+
+## 变更
+
+「设置 → 内置插件」及其包 `@deepseek-ai/dsh-client-ui-settings-plugins` 和 `@deepseek-ai/dsh-client-ui-settings-plugin-inventory` 已删除,`settings.plugins.tab` slot 和 `SettingsPluginsTabOwnerProps` 也一并删除。「设置 → 插件管理」改为打开插件页面。`settings.section` 条目仍显示在设置中。当模块与注册包相同的已列出 bundle 行、或该 bundle 本身没有注册自己的 `plugins.row.config` 或 `plugins.bundle.config` 时,插件页面也会在该行或该 bundle 页面上显示这个条目;在插件页面上,条目的 `close` 回到打开它的视图,而不是关闭设置。两处都通过 `settings.section.view` Factory 渲染条目,该 Factory 由 ui-settings-general 注册并声明 `settings.section`。
+
+## 迁移
+
+1. 从 profile manifest 和 `cordis.yml` 中删除指向这两个已删除包的条目。
+2. 把 `settings.plugins.tab` 贡献改为 `settings.section` 页面,或 `plugins.bundle.config` 等插件页面 slot。
+3. 调用 `close()` 后必须离开设置的 `settings.section` 页面(例如启动 Session 之后)需要自行导航,因为在插件页面上 `close()` 只回到上一个视图。
+4. 在插件页面打开该插件的 bundle,确认其设置页出现在那里(该行或 bundle 注册了自己的配置时除外)和设置中。
diff --git a/packages/boot/plugin-manager/README.i18n.yaml b/packages/boot/plugin-manager/README.i18n.yaml
index b7f3256526..3aaf2eab14 100644
--- a/packages/boot/plugin-manager/README.i18n.yaml
+++ b/packages/boot/plugin-manager/README.i18n.yaml
@@ -15,8 +15,8 @@
en: 87679c51aa3693f5
zh: 11684a48a5806afb
/deepseek-ai-dsh-plugin-manager/use-this-package:
- en: 9dba73eeabe9887f
- zh: 19291d764da21077
+ en: ff51b012b845dd8a
+ zh: 1c6131057ff98844
/deepseek-ai-dsh-plugin-manager/use-this-package/version-compatibility-and-exemptions:
en: 483285658e267dd5
zh: 846bec2daac59a96
@@ -30,8 +30,8 @@
en: c224bfcb3eb3dbd2
zh: 8b9c96970a90dccc
/deepseek-ai-dsh-plugin-manager/further-exploration:
- en: c6538243d8702a0d
- zh: 04a82d923353c75f
+ en: b151a14acbf93f00
+ zh: f304e2ea5c7c7d0f
/deepseek-ai-dsh-plugin-manager/model-experience:
en: 215e7ba838619b7b
zh: a311da3843709f90
@@ -48,8 +48,8 @@
en: c29f60be7f3edc1a
zh: d9b9388b96ef95cc
/deepseek-ai-dsh-plugin-manager/known-limitations-and-deferred-work:
- en: 89306b478cb75b3b
- zh: f2f50c88114fec99
+ en: d8ea2d28e9e8c3e7
+ zh: 4efd7e073dde1b96
/deepseek-ai-dsh-plugin-manager/known-limitations-and-deferred-work/failure-behavior:
en: 3fde425e82bbd0f4
zh: 531e2365e7d67480
diff --git a/packages/boot/plugin-manager/README.md b/packages/boot/plugin-manager/README.md
index 3c95c6af1a..a010e6d6d5 100644
--- a/packages/boot/plugin-manager/README.md
+++ b/packages/boot/plugin-manager/README.md
@@ -28,7 +28,7 @@ Manage the current profile's plugins without editing configuration by hand. Enab
## Use this package
-Base-backed profiles provide the manager. In Web, the sidebar's **Plugins** page ([ui-plugin-manager](../../client/ui-plugin-manager/README.md)) manages the profile's bundles and their uniquely addressable rows; the Settings Plugin list stays read-only. Agent-preset rows remain read-only. The `plugin_manager` tool exposes the same operations and is enabled in the Standard and Creator presets. Other Web presets keep it disabled by default. The full SDK profile enables it at profile scope in native/PTC mode; without HMR, saved changes return `restart-required` with `no-hmr` and apply after the runtime restarts. Every tool action requires `danger-full-access` or approval for that call. Under lower sandbox modes, `ask` requests approval; `never`, rejection, cancellation, or an unavailable approval channel prevents execution. An approval leaves the session permission mode unchanged. Profile changes persist across sessions, and installed Host code executes in-process outside the workspace sandbox. Dependency build-script approval remains separate.
+Base-backed profiles provide the manager. In Web, the sidebar's **Plugins** page ([ui-plugin-manager](../../client/ui-plugin-manager/README.md)) manages the profile's bundles and their uniquely addressable rows. Agent-preset rows remain read-only. The `plugin_manager` tool exposes the same operations and is enabled in the Standard and Creator presets. Other Web presets keep it disabled by default. The full SDK profile enables it at profile scope in native/PTC mode; without HMR, saved changes return `restart-required` with `no-hmr` and apply after the runtime restarts. Every tool action requires `danger-full-access` or approval for that call. Under lower sandbox modes, `ask` requests approval; `never`, rejection, cancellation, or an unavailable approval channel prevents execution. An approval leaves the session permission mode unchanged. Profile changes persist across sessions, and installed Host code executes in-process outside the workspace sandbox. Dependency build-script approval remains separate.
For a deployment without agent presets other than the full SDK profile, enable the tool in the profile patch. Package installation/removal requires pnpm on `PATH` or an explicit `pnpmCommand`; a launcher-provided package manager takes precedence. Preset-backed sessions use their preset’s `tool-plugin-manager` entry.
@@ -143,7 +143,6 @@ The `@deepseek-ai/dsh-plugin-manager/diagnostic` entry supplies Desktop Host and
- [App boot](../app-boot/README.md) — profile layers and startup policy.
- [Plugin inventory](../../host/plugin-inventory/README.md) — current Loader and preset observations.
- [Plugin manager page](../../client/ui-plugin-manager/README.md) — the Web sidebar page over this service.
-- [Plugin settings](../../client/ui-settings-plugin-inventory/README.md) — the read-only Web inventory.
## Model Experience
@@ -178,7 +177,7 @@ Tool results append to the transcript. Enabling or disabling other tools can cha
- Startup-only profiles cannot remove packages used to start the current process; stop it and use `dsh plugin`.
- The manager cannot disable its own management components, change another profile, or edit an agent preset's composition.
- A failed removal may leave dependencies partially changed, and a failed or cancelled installation can leave downloaded files under `node_modules` or the pnpm store. Inactive dependencies with missing files remain removable. Diagnostic logs remain under the profile's `.plugin-manager/logs` directory.
-- Management results describe Host activation. Browser synchronization failures appear separately in the Settings plugin list.
+- Management results describe Host activation. Browser synchronization failures appear separately in the Plugins page's synchronization notice.
- Desktop package operations remain owned by the Desktop shell.
diff --git a/packages/boot/plugin-manager/README.zh.md b/packages/boot/plugin-manager/README.zh.md
index d39d317900..8bcea7e870 100644
--- a/packages/boot/plugin-manager/README.zh.md
+++ b/packages/boot/plugin-manager/README.zh.md
@@ -28,7 +28,7 @@ kind: "package-reference"
## 使用本包
-基于 base 的 profile 提供管理服务。在 Web 中,侧边栏的**插件**页([ui-plugin-manager](../../client/ui-plugin-manager/README.zh.md))管理 profile 的组合包及其能唯一定位的行;设置页的插件列表保持只读。Agent 预设条目保持只读。`plugin_manager` 工具提供相同操作,在标准和 Creator 预设中启用。其他 Web 预设仍默认禁用。完整 SDK profile 在 profile 作用域为 native/PTC 模式启用此工具;没有 HMR 时,保存的变更返回 `restart-required` 和 `no-hmr`,在运行时重启后应用。每个工具操作都要求 `danger-full-access` 或本次调用的批准。在较低沙箱模式下,`ask` 会请求审批;`never`、拒绝、取消或审批渠道不可用时均不执行。批准不改变会话的权限模式。profile 变更跨会话持久化,已安装的 Host 代码在宿主进程内运行,不受工作区沙箱限制。依赖构建脚本仍需单独批准。
+基于 base 的 profile 提供管理服务。在 Web 中,侧边栏的**插件**页([ui-plugin-manager](../../client/ui-plugin-manager/README.zh.md))管理 profile 的组合包及其能唯一定位的行。Agent 预设条目保持只读。`plugin_manager` 工具提供相同操作,在标准和 Creator 预设中启用。其他 Web 预设仍默认禁用。完整 SDK profile 在 profile 作用域为 native/PTC 模式启用此工具;没有 HMR 时,保存的变更返回 `restart-required` 和 `no-hmr`,在运行时重启后应用。每个工具操作都要求 `danger-full-access` 或本次调用的批准。在较低沙箱模式下,`ask` 会请求审批;`never`、拒绝、取消或审批渠道不可用时均不执行。批准不改变会话的权限模式。profile 变更跨会话持久化,已安装的 Host 代码在宿主进程内运行,不受工作区沙箱限制。依赖构建脚本仍需单独批准。
除完整 SDK profile 外,未使用 Agent 预设的部署在 profile patch 中启用工具;安装/移除包要求 PATH 中有 pnpm,或显式配置 `pnpmCommand`,启动器提供的包管理器优先;使用预设的会话由其预设中的 `tool-plugin-manager` 条目控制。
@@ -143,7 +143,6 @@ service 运行若在 `idleTimeoutMs` 内没有任何捕获输出即被终止,
- [App boot](../app-boot/README.zh.md)——profile 配置层与启动策略。
- [Plugin inventory](../../host/plugin-inventory/README.zh.md)——当前 Loader 和预设状态。
- [插件管理页](../../client/ui-plugin-manager/README.zh.md)——基于本服务的 Web 侧边栏页面。
-- [Plugin settings](../../client/ui-settings-plugin-inventory/README.zh.md)——只读的 Web 清单。
## 模型体验
@@ -178,7 +177,7 @@ service 运行若在 `idleTimeoutMs` 内没有任何捕获输出即被终止,
- 仅启动时加载的 profile 不能删除当前进程启动时使用的包;停止进程后使用 `dsh plugin`。
- 管理器不能关闭自身所需的管理组件、修改其他 profile 或编辑 agent 预设组合。
- 失败的删除可能留下部分依赖改动,失败或被取消的安装可能在 `node_modules` 或 pnpm 缓存中留下已下载文件。文件缺失的未启用依赖仍可删除。诊断日志保留在 profile 的 `.plugin-manager/logs` 目录中。
-- 管理结果描述 Host 激活状态。浏览器同步失败会在设置的插件列表中单独显示。
+- 管理结果描述 Host 激活状态。浏览器同步失败会在插件页面的同步提示中单独显示。
- Desktop 包管理操作仍由 Desktop shell 负责。
diff --git a/packages/bundle/web-app/cordis.patch.yml b/packages/bundle/web-app/cordis.patch.yml
index 7e6b973a9e..33d4db4333 100644
--- a/packages/bundle/web-app/cordis.patch.yml
+++ b/packages/bundle/web-app/cordis.patch.yml
@@ -348,11 +348,6 @@
- id: ui-plugin-manager
name: '@deepseek-ai/dsh-client-ui-plugin-manager'
- # Read-only Plugin list tab in the Settings Plugins section; the built-in
- # bundles the sidebar page leaves out are inspected here.
- - id: ui-settings-plugin-inventory
- name: '@deepseek-ai/dsh-client-ui-settings-plugin-inventory'
-
- id: ui-conversation
name: '@deepseek-ai/dsh-client-ui-conversation'
@@ -470,12 +465,6 @@
- id: ui-settings-session-log
name: '@deepseek-ai/dsh-client-ui-settings-session-log'
- # The Built-in plugins settings section: the navigation entry and the tab
- # row the inventory tab registers into. The official configuration pages
- # are the companion rows below.
- - id: ui-settings-plugins
- name: '@deepseek-ai/dsh-client-ui-settings-plugins'
-
# The official settings pages: one companion package per host-plane
# namespace, each registering its page into the Plugins page while the
# Host serves the namespace.
diff --git a/packages/bundle/web-app/package.json b/packages/bundle/web-app/package.json
index 30a41a9842..73efcb5d84 100644
--- a/packages/bundle/web-app/package.json
+++ b/packages/bundle/web-app/package.json
@@ -117,8 +117,6 @@
"@deepseek-ai/dsh-client-ui-settings-agent-loop": "workspace:*",
"@deepseek-ai/dsh-client-ui-settings-general": "workspace:*",
"@deepseek-ai/dsh-client-ui-settings-models": "workspace:*",
- "@deepseek-ai/dsh-client-ui-settings-plugin-inventory": "workspace:*",
- "@deepseek-ai/dsh-client-ui-settings-plugins": "workspace:*",
"@deepseek-ai/dsh-client-ui-settings-session-log": "workspace:*",
"@deepseek-ai/dsh-client-ui-settings-shell": "workspace:*",
"@deepseek-ai/dsh-client-ui-settings-subagent": "workspace:*",
diff --git a/packages/client/README.i18n.yaml b/packages/client/README.i18n.yaml
index 6d52c7f559..0e4d3960bb 100644
--- a/packages/client/README.i18n.yaml
+++ b/packages/client/README.i18n.yaml
@@ -15,8 +15,8 @@
en: 1eb35b015a6c423f
zh: a8a3dceee2c9e943
/client-web-gui-browser-half/packages:
- en: 45c1d8a1e1f44425
- zh: 47a5199bca1e7836
+ en: e6b93119ee411a50
+ zh: a9ed12dd8cc8864a
/client-web-gui-browser-half/related-documentation:
en: d1d506e68fab7333
zh: 1a90fe6f3f8f24a9
diff --git a/packages/client/README.md b/packages/client/README.md
index 4efbbb0710..20f96c17cc 100644
--- a/packages/client/README.md
+++ b/packages/client/README.md
@@ -72,7 +72,6 @@ The kernel packages boot and serve the page; the UI feature packages present it.
| [`ui-model-selection/`](ui-model-selection/README.md) | Provides model selection in conversation surfaces | — |
| [`ui-permission-presets/`](ui-permission-presets/README.md) | Configures default permissions and switches the current session's access | — |
| [`ui-plan/`](ui-plan/README.md) | Presents active plan-mode status and its exit control | — |
-| [`ui-settings-plugins/`](ui-settings-plugins/README.md) | Owns the Built-in plugins settings section shell and its tab extension point | — |
| [`ui-user-questions/`](ui-user-questions/README.md) | Presents interactive questions requested by the agent | — |
| [`ui-agent-preset/`](ui-agent-preset/README.md) | Selects a session's agent preset and authors preset compositions | — |
| [`ui-settings/`](ui-settings/README.md) | Hosts the settings interface and its extension areas | — |
@@ -86,7 +85,6 @@ The kernel packages boot and serve the page; the UI feature packages present it.
| [`ui-plugin-manager/`](ui-plugin-manager/README.md) | Contributes the sidebar Plugins panel: install, enable, disable, retry, and compose installed packages | — |
| [`ui-entry-customization/`](ui-entry-customization/README.md) | Adds region-local More menus that pin or unpin plugin launchers and start a plugin draft | — |
| [`ui-plugin-market/`](ui-plugin-market/README.md) | Contributes the Discover tab to the Plugins page: browse market indexes and install their bundles | — |
-| [`ui-settings-plugin-inventory/`](ui-settings-plugin-inventory/README.md) | Contributes the read-only Host Loader inventory tab to Plugins settings | — |
| [`ui-deliverables/`](ui-deliverables/README.md) | Produces the changed-files card with its comparison tabs, delivery cards, and clickable final-response file references | — |
| [`ui-message-feedback/`](ui-message-feedback/README.md) | Provides message ratings and feedback dialogs opened from ratings, `/feedback`, or the Session Header menu | `ctx.feedbackUi` |
| [`ui-directory-picker-browse/`](ui-directory-picker-browse/README.md) | In-app directory browsing surface for the workspace directory flow | — |
diff --git a/packages/client/README.zh.md b/packages/client/README.zh.md
index 1bb3677465..ca1c6018d0 100644
--- a/packages/client/README.zh.md
+++ b/packages/client/README.zh.md
@@ -72,7 +72,6 @@ kind: "package-group"
| [`ui-model-selection/`](ui-model-selection/README.zh.md) | 在对话界面中提供模型选择 | — |
| [`ui-permission-presets/`](ui-permission-presets/README.zh.md) | 配置默认权限并切换当前会话的访问模式 | — |
| [`ui-plan/`](ui-plan/README.zh.md) | 展示生效中的 plan mode 状态及其退出控件 | — |
-| [`ui-settings-plugins/`](ui-settings-plugins/README.zh.md) | 负责「内置插件」设置分区壳及其标签页扩展点 | — |
| [`ui-user-questions/`](ui-user-questions/README.zh.md) | 展示 agent 请求的交互式问题 | — |
| [`ui-agent-preset/`](ui-agent-preset/README.zh.md) | 选择会话的 agent 预设并编写预设组合 | — |
| [`ui-settings/`](ui-settings/README.zh.md) | 承载设置界面及其扩展区域 | — |
@@ -86,7 +85,6 @@ kind: "package-group"
| [`ui-plugin-manager/`](ui-plugin-manager/README.zh.md) | 贡献侧栏的“插件”面板:安装、启用、停用、重试与组合已安装的包 | — |
| [`ui-entry-customization/`](ui-entry-customization/README.zh.md) | 添加分区域的“更多”菜单,固定或收起插件入口,并开始创建插件的草稿 | — |
| [`ui-plugin-market/`](ui-plugin-market/README.zh.md) | 为“插件”页面贡献“发现”标签页:浏览市场索引并安装其中的组合包 | — |
-| [`ui-settings-plugin-inventory/`](ui-settings-plugin-inventory/README.zh.md) | 向「插件」设置贡献只读的 Host Loader 清单标签页 | — |
| [`ui-deliverables/`](ui-deliverables/README.zh.md) | 生成改动文件卡片及其对比 tab、交付文件卡片与可点击的最终响应文件引用 | — |
| [`ui-message-feedback/`](ui-message-feedback/README.zh.md) | 提供消息赞踩,以及从赞踩、`/feedback` 或会话标题栏菜单打开的反馈弹窗 | `ctx.feedbackUi` |
| [`ui-directory-picker-browse/`](ui-directory-picker-browse/README.zh.md) | 面向工作区目录流程的应用内目录浏览界面 | — |
diff --git a/packages/client/hmr/README.i18n.yaml b/packages/client/hmr/README.i18n.yaml
index a9c83d55bc..63402bfa3b 100644
--- a/packages/client/hmr/README.i18n.yaml
+++ b/packages/client/hmr/README.i18n.yaml
@@ -21,8 +21,8 @@
en: e1c5d886bc7da5bc
zh: da8f0c309e178b74
/deepseek-ai-dsh-client-hmr/use-this-package/what-a-reload-does:
- en: d3ac81d404b2d6c6
- zh: a9f9ad9dfa685ac7
+ en: 4c72f150b89c2bb7
+ zh: a6773cfd92c72f61
/deepseek-ai-dsh-client-hmr/use-this-package/configuration:
en: 8b4b8f929cf0ba25
zh: 626779afc1132e4f
@@ -42,8 +42,8 @@
en: 191b6aa1dfd7de08
zh: f7a4e65bea2e2bd8
/deepseek-ai-dsh-client-hmr/understand-the-implementation/failure-policy:
- en: 5c9939cd350c136d
- zh: 020159ec196f378f
+ en: cc2114489f83dc70
+ zh: 6268962333946c82
/deepseek-ai-dsh-client-hmr/understand-the-implementation/source-map:
en: 67728b630b30b9aa
zh: 55861de2169ecafe
diff --git a/packages/client/hmr/README.md b/packages/client/hmr/README.md
index 92bf0e43f2..93cdef6c0e 100644
--- a/packages/client/hmr/README.md
+++ b/packages/client/hmr/README.md
@@ -33,7 +33,7 @@ Run `pnpm run dev:web`, which starts the host and the rebuild watchers together
### What a reload does
-Each successful reload re-executes the plugin bundle and remounts the plugin with fresh state. Plugins that depend on the reloaded one reload with it automatically. Failures appear in the plugin list, where they can be retried without waiting for another rebuild.
+Each successful reload re-executes the plugin bundle and remounts the plugin with fresh state. Plugins that depend on the reloaded one reload with it automatically. Failures appear in the Plugins page's synchronization notice, where they can be retried without waiting for another rebuild.
### Configuration
@@ -71,7 +71,7 @@ A fiber's activation epoch strings its service providers' uids, so replacing a p
### Failure policy
-Download failures leave the running plugin active. After the old fiber is torn down, import or activation failure does not restore the previous bundle. Failures appear as page-local synchronization errors. Settings → Plugins → Plugin list retries the latest graph, even when its revision is unchanged; a later rebuild also retries the affected plugin. Successful unrelated plugins remain active.
+Download failures leave the running plugin active. After the old fiber is torn down, import or activation failure does not restore the previous bundle. Failures appear as page-local synchronization errors. **Retry this page** on the Plugins page retries the latest graph, even when its revision is unchanged; a later rebuild also retries the affected plugin. Successful unrelated plugins remain active.
### Source map
diff --git a/packages/client/hmr/README.zh.md b/packages/client/hmr/README.zh.md
index 84ca0a330d..cb893bd851 100644
--- a/packages/client/hmr/README.zh.md
+++ b/packages/client/hmr/README.zh.md
@@ -33,7 +33,7 @@ kind: "package-reference"
### 一次重载做什么
-每次成功的重载都会重新执行插件 bundle,并用全新状态重新挂载插件。依赖被重载插件的插件会随之自动重载。失败会显示在插件列表中,可直接重试,无需等待下一次重建。
+每次成功的重载都会重新执行插件 bundle,并用全新状态重新挂载插件。依赖被重载插件的插件会随之自动重载。失败会显示在插件页面的同步提示中,可直接重试,无需等待下一次重建。
### 配置
@@ -71,7 +71,7 @@ fiber 的激活 epoch 会串联其服务提供方的 uid,因此替换提供方
### 失败策略
-下载失败时,正在运行的插件保持活动。旧 fiber 被卸载后,导入或激活失败不会恢复先前的 bundle。失败会显示为当前页面的同步错误。「设置 → 插件 → 插件列表」会针对最新图重试,即使其 revision 未变化;后续重建也会重试受影响的插件。无关且已成功运行的插件保持活动。
+下载失败时,正在运行的插件保持活动。旧 fiber 被卸载后,导入或激活失败不会恢复先前的 bundle。失败会显示为当前页面的同步错误。插件页面的「重试本页面同步」会针对最新图重试,即使其 revision 未变化;后续重建也会重试受影响的插件。无关且已成功运行的插件保持活动。
### 源码地图
diff --git a/packages/client/modules/README.i18n.yaml b/packages/client/modules/README.i18n.yaml
index bae092537e..f7ba81c650 100644
--- a/packages/client/modules/README.i18n.yaml
+++ b/packages/client/modules/README.i18n.yaml
@@ -27,8 +27,8 @@
en: 1383d68472b3c057
zh: 94dd7d9abbdbccf3
/deepseek-ai-dsh-client-modules/use-this-package/live-plugin-composition:
- en: 252613c45e5e46f5
- zh: fa44cf77c86019af
+ en: 4487b06ddced3b71
+ zh: 26d0181fcf0229ca
/deepseek-ai-dsh-client-modules/use-this-package/host-release-changes:
en: 5c0aa6f1d8df8e1c
zh: 34005131c9bdce3b
diff --git a/packages/client/modules/README.md b/packages/client/modules/README.md
index 008775649d..78a7dad1e0 100644
--- a/packages/client/modules/README.md
+++ b/packages/client/modules/README.md
@@ -44,7 +44,7 @@ The application combo scripts carry only each plugin's `client.js` entry and reg
### Live plugin composition
-An open Web page follows the Host's complete module graph through the HMR transport. Enabling an ordinary plugin adds its Loader entry; disabling it removes the entry and waits for its asynchronous effects before evicting unused modules and styles. Re-enabling loads one instance with its styles. Other Loader contributors and shared modules still needed by active entries remain loaded. Settings → Plugins → Plugin list shows page-local synchronization failures and offers retry without changing Host enablement.
+An open Web page follows the Host's complete module graph through the HMR transport. Enabling an ordinary plugin adds its Loader entry; disabling it removes the entry and waits for its asynchronous effects before evicting unused modules and styles. Re-enabling loads one instance with its styles. Other Loader contributors and shared modules still needed by active entries remain loaded. The Plugins page shows page-local synchronization failures and offers retry without changing Host enablement.
### Host release changes
diff --git a/packages/client/modules/README.zh.md b/packages/client/modules/README.zh.md
index 5f50e15825..9a25d0372c 100644
--- a/packages/client/modules/README.zh.md
+++ b/packages/client/modules/README.zh.md
@@ -44,7 +44,7 @@ application combo 脚本只携带每个插件的 `client.js` 入口,并在启
### 插件动态组合
-已打开的 Web 页面通过 HMR 传输跟随 Host 的完整模块图。启用普通插件会添加其 Loader 条目;停用会移除条目,并在其异步 effect 完成清理后回收未使用的模块与样式。再次启用会加载一个带样式的实例。其他 Loader 贡献方的条目及活动条目仍需使用的共享模块会保留。「设置 → 插件 → 插件列表」显示当前页面的同步失败,并提供不改变 Host 启用状态的重试。
+已打开的 Web 页面通过 HMR 传输跟随 Host 的完整模块图。启用普通插件会添加其 Loader 条目;停用会移除条目,并在其异步 effect 完成清理后回收未使用的模块与样式。再次启用会加载一个带样式的实例。其他 Loader 贡献方的条目及活动条目仍需使用的共享模块会保留。插件页面显示当前页面的同步失败,并提供不改变 Host 启用状态的重试。
### Host release 变化
diff --git a/packages/client/ui-plugin-manager/README.i18n.yaml b/packages/client/ui-plugin-manager/README.i18n.yaml
index ee8881e956..7504ba8b5b 100644
--- a/packages/client/ui-plugin-manager/README.i18n.yaml
+++ b/packages/client/ui-plugin-manager/README.i18n.yaml
@@ -9,14 +9,14 @@
en: 719d90bd71d7b957
zh: 492767e7ea9f88f8
/deepseek-ai-dsh-client-ui-plugin-manager/summary:
- en: 0dc67850ca5358de
- zh: 4ff1bb5bdc184e3e
+ en: 3c168fb38c18d523
+ zh: 13c37617819af3fe
/deepseek-ai-dsh-client-ui-plugin-manager/table-of-contents:
en: d152484eb41ac6b4
zh: 09388d293f9be9cb
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package:
- en: c38847d0d4d5a7b6
- zh: b83f29416199098a
+ en: ee6b2fa96adc6fdb
+ zh: ef9a0371db1b78a7
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/installing-a-bundle:
en: 1fc6c5c2a54d8db4
zh: 9e53f5164e2b7161
@@ -24,14 +24,14 @@
en: 2a44a378364912db
zh: 8c514ce17469747f
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/switching-a-bundle:
- en: 188ebf6f1590bad1
- zh: e6d41e8586190fa0
+ en: 902e109f3315d1ca
+ zh: d508c17983d1fe2e
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/switching-one-row-of-a-bundle:
- en: 5f93ebe75d13b7cf
- zh: 9c28f150263d041e
+ en: 2c338faf806bd469
+ zh: fe947a1b27382e5d
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/configuration-pages:
- en: e9da90f03691101b
- zh: 902cda935a4ce3c8
+ en: 501cc3aaee34ea6c
+ zh: 36599c3a716fb4f2
/deepseek-ai-dsh-client-ui-plugin-manager/use-this-package/detail-page-extension-points:
en: 16dbfb0ab558c951
zh: adf098c0751a7144
@@ -48,8 +48,8 @@
en: ef7ab41b4119c7b9
zh: 3166661bf84415e5
/deepseek-ai-dsh-client-ui-plugin-manager/understand-the-implementation/configuration-slots:
- en: 45e324f5663be635
- zh: 674ddf55c1581569
+ en: a8efaca9e2f9616b
+ zh: cb42a9279f723bc2
/deepseek-ai-dsh-client-ui-plugin-manager/further-exploration:
en: f9a42dfed0360d6a
zh: 455a70bcb6c69624
diff --git a/packages/client/ui-plugin-manager/README.md b/packages/client/ui-plugin-manager/README.md
index 7d60c7f3c5..71c0508a0f 100644
--- a/packages/client/ui-plugin-manager/README.md
+++ b/packages/client/ui-plugin-manager/README.md
@@ -11,7 +11,7 @@ Desktop product events use the optional [product analytics service](../product-a
## Summary
-Use the **Plugins** entry in the Web sidebar to manage the profile's installed bundles and the official bundles the installation ships switched off. Switch bundles and their rows on and off, install a bundle after the Host has read what the spec names, watch pnpm's output, stop a run, and enable what it added. Uninstalling asks for confirmation. A plugin that registers a configuration page is edited here, on its own page; Settings keeps the read-only inventory.
+Use the **Plugins** entry in the Web sidebar to manage the profile's installed bundles and the official bundles the installation ships switched off. Switch bundles and their rows on and off, install a bundle after the Host has read what the spec names, watch pnpm's output, stop a run, and enable what it added. Uninstalling asks for confirmation. A plugin that registers a configuration page is edited here, on its own page; **Settings → Plugins** opens this page.
## Table of Contents
@@ -31,7 +31,9 @@ Below 768px, the page uses 20px horizontal insets to align with the conversation
[Ralph loops](../../experimental/ralph-bundle/README.md) and [Session search](../../experimental/session-search/README.md) remain bundled but are hidden from both plugin lists unless the profile enables or separately installs them. Existing selections remain manageable; switching off an installation-carried copy hides it again. Enter either exact package name in **Add plugin**, then choose **Enable now** to use the shipped copy without downloading it again. Sidebar session search is independent. LiveShare declares the same default-hidden intent in its bundle manifest (`dsh.bundle.listedByDefault: false`), so it stays out of both lists, including **More**, until a declared row runs or it is enabled. The page's manifest rule is generic: a bundle whose manifest does not declare `listedByDefault: false` is listed; one that does is listed only when the profile enables it, the installation carries it selected, or one of its declared rows runs; a hidden bundle is not opened by its ID either.
-Select **Plugins** in the sidebar. The information button uses an 11px caption-colored icon in a 20px square hover area, with a 4px gap after the subtitle. It explains that this page configures official plugins and installs or manages other plugins, while **Settings → Built-in plugins** shows the built-in inventory and runtime status. Hover or focus shows the shared tooltip; clicking keeps it open until another click, Escape, Tab, or an outside click. The page reads the inventory and the bundles through `api-remotes` when first opened; a Host without a managed profile shows the page as unavailable. **Built-in plugin settings** lists official configuration pages by their configured order: Subagent, web search and fetch, agent loop, then shell. **Experimental plugins** shows the primary optional bundles, with **More** beside its heading opening a separate page of the same title. That page lists the official bundles eligible for display, including those on the main list, with Codex and Claude Code subagents last. Its back button returns to the main list, where **Installed plugins** remains below Experimental plugins. Bundle details return to the list they were opened from. Catalog entries keep their position after installation or removal. **Installed plugins** lists other profile bundles. Installation-carried optional bundles have no uninstall action. Experimental packages retain the **Experimental** marker on both lists. Switching on a bundle that page holds back adds it to the main list in the position that page shows it, and switching it off leaves it on that page alone unless its manifest hides unselected bundles; other bundles keep their place on both. A dependency without a bundle patch is not a plugin and is not listed unless the profile selects it, in which case it carries a problem tag. Global configuration remains in the Settings **Built-in plugins** section.
+Select **Plugins** in the sidebar. The information button uses an 11px caption-colored icon in a 20px square hover area, with a 4px gap after the subtitle. It explains that this page configures official plugins, and installs, manages, and configures other plugins. Hover or focus shows the shared tooltip; clicking keeps it open until another click, Escape, Tab, or an outside click. The page reads the inventory and the bundles through `api-remotes` when first opened; a Host without a managed profile shows the page as unavailable. **Built-in plugin settings** lists official configuration pages by their configured order: Subagent, web search and fetch, agent loop, then shell. **Experimental plugins** shows the primary optional bundles, with **More** beside its heading opening a separate page of the same title. That page lists the official bundles eligible for display, including those on the main list, with Codex and Claude Code subagents last. Its back button returns to the main list, where **Installed plugins** remains below Experimental plugins. Bundle details return to the list they were opened from. Catalog entries keep their position after installation or removal. **Installed plugins** lists other profile bundles. Installation-carried optional bundles have no uninstall action. Experimental packages retain the **Experimental** marker on both lists. Switching on a bundle that page holds back adds it to the main list in the position that page shows it, and switching it off leaves it on that page alone unless its manifest hides unselected bundles; other bundles keep their place on both. A dependency without a bundle patch is not a plugin and is not listed unless the profile selects it, in which case it carries a problem tag.
+
+Every view of the page, whether or not the bundle list is available, shows this browser page's client plugin synchronization state at the top of the page body, below any header; the state comes from `ctx.modules.entries.state`. While synchronization runs, a status line reads **Syncing plugins on this page…**. When entries fail, a notice (`data-client-sync-failure`) says that some plugins could not sync on this page and that Host enablement is unchanged, lists each failure as `id: message`, and offers **Retry this page**, which calls `ctx.modules.entries.retry()` and is disabled while synchronization runs.
As available header width decreases, Refresh and Add plugin first become icon-only controls with accessible names and tooltips; the tabs then shrink from their usual minimum width to fit their labels, and the action group wraps only when necessary. The information button follows the subtitle text. The main page header and list share one scroll container. Header controls move with the scroll position until they reach their compact positions; scrolling back follows the same coordinates. The header wrapper retains its resting flow height to preserve the list's scroll range, while the draggable head's box matches its painted height so native drag geometry cannot extend into the list. A barely scrolling list can stop before the header is fully compact. The More list's back-and-title row stays fixed, and detail pages scroll their head row with the content. The Installed/Discover tabs use the compact 34px control with a 2px inset around the selection indicator. The subtitle scrolls out of view; with tabs present, the title also scrolls out, and the tabs settle beside Refresh and Add plugin where space permits. On narrow pages, the tabs and icon actions share a row beneath the heading where they fit; otherwise the tabs stay above the actions. Their relative order stays the same throughout scrolling. The resting and compact layouts retain their 28px and 16px page-top insets respectively, with 16px below the compact controls. macOS adds the frame's titlebar clearance while resting; its compact bar keeps 16px above and below with the sidebar expanded, and with the sidebar collapsed it also clears the frame's top strip so the controls stay below the native window controls. Only on macOS, when the sidebar is collapsed, the compact controls keep 8px rather than 16px above them in addition to the unchanged frame clearance, at every width. The resting layout and compact bottom spacing stay unchanged. Windows relies on the frame's caption offset without adding it again. The divider spans the page at the bottom of the compact header; the list's initial top spacing scrolls with its content. Hover styling applies only where the pointer can hover, so a tap leaves no card, row, or menu option in its hover state; cards and icon actions answer a touch-down with the pressed fill instead. The install, registry, and filter fields take a 16px face under a coarse pointer, which keeps iOS Safari from zooming a focused field.
@@ -78,12 +80,13 @@ After the checks, the list toolbar says how many plugins can be updated, that al
### Switching a bundle
-A bundle's page shows its full package name under the title. Its **Source** section, after the rows, names the spec that installs it elsewhere, as `pnpm add` accepts it, or **Built in** for an official bundle the installation ships, then its current version. A bundle's switch changes its layer selection. A displayed detail document stays visible while a profile change triggers a fresh read; the result replaces it when ready. While the Host applies the change, the switch stays disabled and a spinner appears beside it; the action area permanently reserves 22px to the left of the switch. A persistent status region announces the pending change to screen readers. A profile with HMR recomposes before the operation completes; one without HMR, and a bundle a higher layer overrides, say so in a toast. A bundle the Host cannot read carries a problem tag and its reason on its page and cannot be switched on; one that provides the management components stays locked. A selected bundle whose layer the Host skipped, reported as an error with none of its rows carrying a live entry, keeps its switch on and carries a not-running tag instead, and its card states the reason without the requirement list. A bundle's page omits the component list when the Host reports an error and no rows, since the Host may not have read its patch. The Host answers with error codes, which the page's dictionary words; pnpm's and the Loader's own diagnostics are shown as they are. The page excludes built-in profile bundles and the persistent-terminal bundle from cards and detail pages, regardless of activation, dependency declarations, or Host errors. Hiding a bundle preserves its Host availability and activation. The Host inventory remains complete; the Settings Plugins section's Plugin list tab inspects their plugins.
+A bundle's page shows its full package name under the title. Its **Source** section, after the rows, names the spec that installs it elsewhere, as `pnpm add` accepts it, or **Built in** for an official bundle the installation ships, then its current version. A bundle's switch changes its layer selection. A displayed detail document stays visible while a profile change triggers a fresh read; the result replaces it when ready. While the Host applies the change, the switch stays disabled and a spinner appears beside it; the action area permanently reserves 22px to the left of the switch. A persistent status region announces the pending change to screen readers. A profile with HMR recomposes before the operation completes; one without HMR, and a bundle a higher layer overrides, say so in a toast. A bundle the Host cannot read carries a problem tag and its reason on its page and cannot be switched on; one that provides the management components stays locked. A selected bundle whose layer the Host skipped, reported as an error with none of its rows carrying a live entry, keeps its switch on and carries a not-running tag instead, and its card states the reason without the requirement list. A bundle's page omits the component list when the Host reports an error and no rows, since the Host may not have read its patch. The Host answers with error codes, which the page's dictionary words; pnpm's and the Loader's own diagnostics are shown as they are. The page excludes built-in profile bundles and the persistent-terminal bundle from cards and detail pages, regardless of activation, dependency declarations, or Host errors. Hiding a bundle preserves its Host availability and activation. The Host inventory remains complete.
### Switching one row of a bundle
A row's switch on the bundle's page calls `pluginManager.setPluginEnabled`, which records the row's enablement in the profile's `cordis.patch.yml` under the [toggle rules](../../boot/plugin-manager/README.md#use-this-package). The tree recomposes at once on a profile with HMR, so the row's host half unmounts or mounts while the rest of the bundle keeps running, and the page follows the client module graph without reloading. Rows use the shared status marker for their Host fiber phase: pending and disabled are idle, loading and unloading are ongoing, active is done, and failed is error. The switch appears only on a bundle that is on; a row without a live entry, or one the Host will not address through the profile patch, is locked with the Host's reason. A list longer than ten rows gets a filter through the shared [text search](../../util/text-search/README.md): row ids, module names, and every declared language of titles match fuzzily, and every language of descriptions matches as a substring; rows display in the current language.
+
### Configuration pages
A plugin that carries its own configuration renders it on this page rather than in Settings, through three slots the page declares: `plugins.item` (list) for an official plugin, listed in Built-in plugin settings by its `label`; `plugins.bundle.config` (keyed by the bundle's package name) for a bundle's own configuration, shown on the bundle's page between its description and its rows; and `plugins.row.config` (keyed by `#`) for one row's configuration, which gives that row a **Configure** control opening the row's page. The page renders `view: 'page'` for forms with their own save controls. Official plugin cards also render `view: 'summary'` under the title; a row's detail page uses that view only when its package description is absent. Only a save writes: the page draws the title, icon, and crumb, and the entry's form drops its staged edits when the page is left. The four host-plane pages the installation ships — the shell executor, the agent loop, Subagent, and the DeepSeek search provider — come from one companion package each, [ui-settings-shell](../ui-settings-shell/README.md), [ui-settings-agent-loop](../ui-settings-agent-loop/README.md), [ui-settings-subagent](../ui-settings-subagent/README.md), and [ui-settings-web-search](../ui-settings-web-search/README.md), registered while the Host serves their namespaces. A bundle's browser half registers the same way:
@@ -98,6 +101,8 @@ ctx.slots.inject('plugins.row.config', () => ctx.slots.register({
The bundle's patch must declare the row under that id, and the registration exists while the bundle is on, so a bundle that is off shows no configure control.
+A plugin's own settings page is a `settings.section` entry, whose type lives in [ui-settings](../ui-settings/README.md#filling-the-settings-slots); Settings lists every entry, and this page also renders an entry, through the same `settings.section.view` Component Factory, where a listed bundle claims it. The listed bundle row whose module name equals the package that registered the entry claims it when that row has no `plugins.row.config` entry: that row gets a **Configure** control, and the row's page renders the entry with a `close` prop that returns to the bundle's page. When the registering package is a listed bundle's own package name, no listed row has that module, and the bundle has no `plugins.bundle.config` entry, the bundle's page renders the entry with a `close` that returns to the view the bundle's page was opened from. An entry that no listed row or bundle claims, or whose registering package is unknown, appears only in Settings. Settings' **Plugins** entry, a `settings.section` registration with id `plugins` and order 15, closes Settings and opens this page's main list.
+
### Detail page extension points
A plugin with something to say about a bundle, a row, or an official plugin it does not own contributes to that object's page through three list slots the page declares: `plugins.detail.actions` for a control at the head of the page, before the page's own switch and uninstall; `plugins.detail.badge` for a tag beside the title, after the version, experimental, and problem or not-running tags; and `plugins.detail.section` for a section under the page's own content — after the source on a bundle's page, after the configuration on a row's or an official plugin's page. Every entry is rendered with the page's `subject`: `{ kind: 'bundle', pkg }`, `{ kind: 'row', pkg, row }`, or `{ kind: 'item', id }`, where `pkg` and `row` carry the name, version, installed and enabled facts, and the row list a contribution decides on. An entry renders null for a subject it has nothing for and draws its own section chrome; the page orders entries by `order`.
@@ -148,7 +153,7 @@ While the Plugins page has access, other Client plugins can read `pluginNavigati
Custom item pages use the Host entry id as their registration id; row pages use the bundle package and row id. The page owner supplies `form.state` and `form.mutate(operations, expectedRevision)` when the entry exposes editable Config fields. A custom page owns its draft and validation display, and may reuse `ConfigField` from ui-primitives. Bundle-wide pages can contain several entries and have no single form.
-The page's `main` registration declares `plugins.item`, `plugins.bundle.config`, and `plugins.row.config` as its children, so the slots exist while the page does and a registrant's `ctx.slots.inject` waits for them. `configLedgerSource` projects the three ledgers into one observable — the official items in ledger order with their labels resolved in the active locale, and the bundle and row keys — cached until a ledger or the locale moves; the page binds it as `useConfigLedger` beside the store and never names a configurable plugin itself. The registration-owned navigation store selects the main list, the full experimental plugin list, a bundle, an official plugin, or a bundle row; switching away from the Plugins panel resets it to the list, while React remounts preserve the selected target. A fresh registration starts on the main list. Installation highlighting scrolls to a card only when it is on the current page; it does not change the selected page. Other Client plugins read `pluginNavigation` optionally, through `ctx.get` or `ctx.inject`, and call its `openBundle(packageName)` to open bundle details without changing the current Session; listing it in a plugin's `inject` keeps that plugin pending on a page without access. The target survives the initial inventory load; an absent bundle displays the list. A registration lives with the browser half that made it. `dsh-client-modules` attaches a package's browser half to the Loader row whose specifier is the bare package name, so every page a bundle registers, for itself or for any of its rows, goes away when that row is switched off; a sub-plugin whose page must outlive the other rows ships as its own package. Cards and detail pages show the Experimental marker only for packages in `EXPERIMENTAL_BUNDLES` in [`dsh-official-bundles`](../../util/official-bundles/README.md#plugin-manager-lists); package-name prefixes do not select the marker.
+The page's `main` registration declares `plugins.item`, `plugins.bundle.config`, and `plugins.row.config` as its children, so the slots exist while the page does and a registrant's `ctx.slots.inject` waits for them. `configLedgerSource` projects the four ledgers into one observable — the official items and the `settings.section` entries in ledger order with their labels resolved in the active locale, each section with its registering module when known, and the bundle and row keys — cached until a ledger or the locale moves; the page binds it as `useConfigLedger` beside the store and never names a configurable plugin itself. The registration-owned navigation store selects the main list, the full experimental plugin list, a bundle, an official plugin, or a bundle row; switching away from the Plugins panel resets it to the list, while React remounts preserve the selected target. A fresh registration starts on the main list. Installation highlighting scrolls to a card only when it is on the current page; it does not change the selected page. Other Client plugins read `pluginNavigation` optionally, through `ctx.get` or `ctx.inject`, and call its `openBundle(packageName)` to open bundle details without changing the current Session; listing it in a plugin's `inject` keeps that plugin pending on a page without access. The target survives the initial inventory load; an absent bundle displays the list. A registration lives with the browser half that made it. `dsh-client-modules` attaches a package's browser half to the Loader row whose specifier is the bare package name, so every page a bundle registers, for itself or for any of its rows, goes away when that row is switched off; a sub-plugin whose page must outlive the other rows ships as its own package. Cards and detail pages show the Experimental marker only for packages in `EXPERIMENTAL_BUNDLES` in [`dsh-official-bundles`](../../util/official-bundles/README.md#plugin-manager-lists); package-name prefixes do not select the marker.
`plugins.bundle.config` supplies bundle detail configuration, keyed by npm package name. Client plugins can subscribe to the read-only `ctx.pluginChanges.bundle(packageName)` source to pause their queries while a bundle or one of its rows is being changed. Notifications precede the management request and continue when the page closes; subscribers release their observation on disposal. `plugins.bundle.activation` offers bundle-owned guidance after explicit enablement from either the list or detail page, with callbacks to dismiss it or open the bundle details. It does not appear merely because an enabled bundle was listed.
diff --git a/packages/client/ui-plugin-manager/README.zh.md b/packages/client/ui-plugin-manager/README.zh.md
index 96349ef9d2..325815001f 100644
--- a/packages/client/ui-plugin-manager/README.zh.md
+++ b/packages/client/ui-plugin-manager/README.zh.md
@@ -11,7 +11,7 @@ kind: "package-reference"
## 概述
-使用 Web 侧栏的**插件**入口管理 profile 已安装的组合包,以及安装随附、默认关闭的官方组合包。可以启停组合包及其行、在 Host 读出 spec 指向什么之后安装组合包、查看 pnpm 输出、停止一次运行,并启用它新增的包。卸载会要求确认。注册了配置页的插件在这里、在它自己的页面上编辑;设置里只保留只读的插件列表。
+使用 Web 侧栏的**插件**入口管理 profile 已安装的组合包,以及安装随附、默认关闭的官方组合包。可以启停组合包及其行、在 Host 读出 spec 指向什么之后安装组合包、查看 pnpm 输出、停止一次运行,并启用它新增的包。卸载会要求确认。注册了配置页的插件在这里、在它自己的页面上编辑;「设置 → 插件管理」打开本页。
## 目录
@@ -31,7 +31,9 @@ kind: "package-reference"
[Ralph 循环](../../experimental/ralph-bundle/README.zh.md)和[会话搜索](../../experimental/session-search/README.zh.md)仍随包提供,但默认不在两个插件列表中展示,只有 profile 启用或另行安装后才显示。已有的启用状态仍可管理;关闭随安装提供的版本后,它会再次隐藏。在**添加插件**中输入准确包名,再选择**立即启用**,即可使用随包提供的版本,无需再次下载。侧栏会话搜索独立于此功能。LiveShare 在其 bundle manifest 中声明相同的默认隐藏意图(`dsh.bundle.listedByDefault: false`),因此在自身声明的行开始运行或被启用前,它不会出现在两个列表(含**更多**页)中。页面的 manifest 规则是通用的:未声明 `listedByDefault: false` 的组合包会列出;声明了的,只有在 profile 启用、安装随附版本被选中,或它声明的某一行开始运行时才列出;隐藏的组合包也不能通过 ID 打开详情。
-在侧栏选择**插件**。信息按钮使用 11px 的 caption 色图标和 20px 方形悬停区域,与副标题间隔 4px。它说明当前页用于配置官方插件、安装和管理其他插件,**设置 → 内置插件**则展示内置插件列表及运行状态。悬停或聚焦显示共享 tooltip;点击后保持展开,直至再次点击、Escape、Tab 或外部点击。页面首次打开时通过 `api-remotes` 读取清单与组合包;没有受管 profile 的 Host 上页面显示为不可用。**内置插件配置**按配置的顺序列出官方配置页:子智能体、网页搜索与获取、Agent 循环、终端。**实验性插件**展示主要的可选组合包,标题旁的**更多**打开同名的独立页面。该页列出符合展示条件的官方组合包,也包含主列表已有的条目,Codex 和 Claude Code 子智能体排在最后。返回按钮回到主列表,**已安装插件**保持在实验性插件下方。组合包详情返回打开它的列表。目录条目在安装或移除后保持原位置。**已安装插件**列出其他 profile 组合包。安装随附的可选组合包没有卸载操作。实验性包在两个列表中均保留**实验性**标签。开启仅在该页列出的组合包会按该页中的位置把它加入主列表,关闭后它只留在该页,但 manifest 声明默认隐藏的组合包会从该页消失;其他组合包在两个列表中均保持原位。没有组合包 patch 的依赖不是插件,除非 profile 选中了它才会带异常标签列出。全局配置仍在设置的**内置插件**分区中编辑。
+在侧栏选择**插件**。信息按钮使用 11px 的 caption 色图标和 20px 方形悬停区域,与副标题间隔 4px。它说明当前页用于配置官方插件,以及安装、管理和配置其他插件。悬停或聚焦显示共享 tooltip;点击后保持展开,直至再次点击、Escape、Tab 或外部点击。页面首次打开时通过 `api-remotes` 读取清单与组合包;没有受管 profile 的 Host 上页面显示为不可用。**内置插件配置**按配置的顺序列出官方配置页:子智能体、网页搜索与获取、Agent 循环、终端。**实验性插件**展示主要的可选组合包,标题旁的**更多**打开同名的独立页面。该页列出符合展示条件的官方组合包,也包含主列表已有的条目,Codex 和 Claude Code 子智能体排在最后。返回按钮回到主列表,**已安装插件**保持在实验性插件下方。组合包详情返回打开它的列表。目录条目在安装或移除后保持原位置。**已安装插件**列出其他 profile 组合包。安装随附的可选组合包没有卸载操作。实验性包在两个列表中均保留**实验性**标签。开启仅在该页列出的组合包会按该页中的位置把它加入主列表,关闭后它只留在该页,但 manifest 声明默认隐藏的组合包会从该页消失;其他组合包在两个列表中均保持原位。没有组合包 patch 的依赖不是插件,除非 profile 选中了它才会带异常标签列出。
+
+页面的每个视图(无论组合包列表是否可用)都在页面正文顶部(任何页头之下)显示本浏览器页面的客户端插件同步状态,该状态来自 `ctx.modules.entries.state`。同步进行时,状态行显示**正在同步本页面的插件…**。有条目失败时,提示(`data-client-sync-failure`)说明本页面的插件未能完成同步、服务端的启用状态保持不变,把每个失败列为 `id: message`,并提供**重试本页面同步**;该按钮调用 `ctx.modules.entries.retry()`,同步进行时禁用。
页头可用宽度缩小时,“刷新”和“添加插件”先变为保留可访问名称与 tooltip 的图标按钮;标签再从常规最小宽度收紧为文案所需宽度,仍不足时操作组才换行。信息按钮紧随副标题文字。主页面的页头和列表共用一个滚动容器。页头控件随滚动位置移动,到达紧凑态位置后停住;反向滚动沿同样的坐标返回。页头外层容器保留静止态的文档流高度,以保持列表滚动范围;可拖动页头的矩形与其绘制高度一致,使原生拖动区域不会延伸到列表中。只能滚动少量距离的列表可能在页头完全收拢前到达底部。“更多”列表的返回与标题行固定,详情页的页头随内容滚动。“已安装/发现”标签使用总高 34px 的紧凑控件,选中指示块与外框之间留 2px。副标题随滚动离开视口;有标签时标题也随之滚出,标签在空间足够时停靠到“刷新”“添加插件”旁边。窄页面中,标签与图标操作优先在标题下方共用一行;放不下时,标签始终在操作组上方。滚动过程中两组控件的相对顺序保持不变。静止态与紧凑态分别保留 28px 和 16px 的页面顶部留白,紧凑态控件下方保留 16px。macOS 静止态保留框架的标题栏安全区;折叠态在侧栏展开时上下各留 16px,侧栏收起时再避让框架顶部安全区,使控件位于原生窗口控件下方。仅在 macOS 侧栏收起时,紧凑态控件在原有框架安全区之外的顶部留白统一由 16px 减为 8px,不受窗口宽度影响;静止态布局与紧凑态底部留白均不变。Windows 使用框架已有的标题栏偏移,不重复叠加。分隔线在紧凑页头底部横跨页面,列表初始的顶部留白随内容滚动。悬停样式只在可悬停的指针下生效,点按不会让卡片、行或菜单项停留在悬停态;卡片与图标操作改以按下填充回馈触摸。安装、注册表与筛选输入框在粗指针下使用 16px 字号,iOS Safari 不会因聚焦而放大页面。
@@ -78,12 +80,13 @@ Host 将网络失败或超时归因于 GitHub 地址,且提供 npmmirror 时
### 切换一个组合包
-组合包页面在标题下方显示完整包名。组件列表之后的「来源信息」给出在别处安装它所需的 spec(`pnpm add` 接受的形式),安装随附的官方组合包显示「内置」,随后是当前版本。组合包开关改变其层选择。profile 变更触发重新读取时,已显示的详情文档保持可见,直到新结果返回。Host 应用更改期间,开关保持禁用,旁边显示旋转指示器;操作区在开关左侧固定预留 22px。常驻状态区域向屏幕阅读器播报进行中的更改。启用了 HMR 的 profile 在操作完成前重组;没有 HMR 的 profile,以及被更高层覆盖的组合包,会以 toast 说明。Host 读不了的组合包带异常标签,其页面给出原因,且不能打开;提供管理组件的组合包保持锁定。已选中组合包的层被 Host 跳过时(Host 将其报告为错误,且该组合包没有带存活条目的行),该组合包的开关保持打开,改带未运行标签,其卡片给出原因,但不列出未满足的版本要求。Host 报告错误且没有报告任何行时,组合包页面不显示组件列表,因为 Host 可能未读取其 patch。Host 以错误码作答,由页面字典措辞;pnpm 与 Loader 自己的诊断原样显示。页面从卡片和详情页中排除内置 profile 组合包和持久终端组合包,无论其启用状态、依赖声明或 Host 异常如何。隐藏组合包保留其在 Host 中的可用性和启用状态。Host 清单仍保留完整数据;设置中「插件」分区的「插件列表」标签页负责查看它们的插件。
+组合包页面在标题下方显示完整包名。组件列表之后的「来源信息」给出在别处安装它所需的 spec(`pnpm add` 接受的形式),安装随附的官方组合包显示「内置」,随后是当前版本。组合包开关改变其层选择。profile 变更触发重新读取时,已显示的详情文档保持可见,直到新结果返回。Host 应用更改期间,开关保持禁用,旁边显示旋转指示器;操作区在开关左侧固定预留 22px。常驻状态区域向屏幕阅读器播报进行中的更改。启用了 HMR 的 profile 在操作完成前重组;没有 HMR 的 profile,以及被更高层覆盖的组合包,会以 toast 说明。Host 读不了的组合包带异常标签,其页面给出原因,且不能打开;提供管理组件的组合包保持锁定。已选中组合包的层被 Host 跳过时(Host 将其报告为错误,且该组合包没有带存活条目的行),该组合包的开关保持打开,改带未运行标签,其卡片给出原因,但不列出未满足的版本要求。Host 报告错误且没有报告任何行时,组合包页面不显示组件列表,因为 Host 可能未读取其 patch。Host 以错误码作答,由页面字典措辞;pnpm 与 Loader 自己的诊断原样显示。页面从卡片和详情页中排除内置 profile 组合包和持久终端组合包,无论其启用状态、依赖声明或 Host 异常如何。隐藏组合包保留其在 Host 中的可用性和启用状态。Host 清单仍保留完整数据。
### 切换组合包里的一行
组合包页面上行的开关调用 `pluginManager.setPluginEnabled`,按[开关规则](../../boot/plugin-manager/README.zh.md#use-this-package)在 profile 的 `cordis.patch.yml` 中记录该行的启用状态。启用了 HMR 的 profile 的树随即重组,该行的宿主半区卸下或挂上,组合包其余部分照常运行,页面无需重载即跟随客户端模块图。行使用共享状态标记表示 Host fiber 阶段:pending 与 disabled 为 idle,loading 与 unloading 为 ongoing,active 为 done,failed 为 error。开关只出现在已打开的组合包上;没有存活条目的行,以及 Host 不通过 profile patch 寻址的行,带着 Host 的原因锁定。超过十行的列表带一个筛选框,使用共享的[文本搜索](../../util/text-search/README.zh.md):行 id、模块名和标题的所有声明语言模糊匹配,描述的所有语言按子串匹配;各行以当前语言显示。
+
### 配置页
自带配置的插件把配置渲染在本页而不是设置里,通过本页声明的三个 slot:`plugins.item`(list)用于官方插件,按其 `label` 列在内置插件配置分组里;`plugins.bundle.config`(以组合包的包名为键)用于组合包自己的配置,显示在组合包页面的描述与行之间;`plugins.row.config`(以 `<包名>#<行 id>` 为键)用于某一行的配置,这一行由此多出一个**配置**控件,打开该行自己的页面。页面用 `view: 'page'` 渲染带自己保存控件的表单。官方插件卡片还在标题下渲染 `view: 'summary'`;行详情页只在缺少包描述时使用该视图。只有保存才写入:页面负责画标题、图标与面包屑,条目的表单在离开页面时丢弃暂存的修改。安装随附的四个宿主平面配置页——shell 执行器、agent loop、子智能体、DeepSeek 搜索提供方——各来自一个伴生包:[ui-settings-shell](../ui-settings-shell/README.zh.md)、[ui-settings-agent-loop](../ui-settings-agent-loop/README.zh.md)、[ui-settings-subagent](../ui-settings-subagent/README.zh.md) 与 [ui-settings-web-search](../ui-settings-web-search/README.zh.md),在 Host 服务其命名空间期间注册。组合包的浏览器半侧用同样的方式注册:
@@ -98,6 +101,8 @@ ctx.slots.inject('plugins.row.config', () => ctx.slots.register({
组合包的 patch 必须以该 id 声明这一行;注册只在组合包开启期间存在,因此关闭的组合包不显示配置控件。
+插件自己的设置页面是一个 `settings.section` 条目,其类型位于 [ui-settings](../ui-settings/README.zh.md#filling-the-settings-slots);设置列出全部条目,本页也在已列出的组合包认领某个条目时,经同一个 `settings.section.view` Component Factory 渲染它。模块名等于注册该条目的包、且没有 `plugins.row.config` 条目的已列出组合包行认领该条目:该行多出一个**配置**控件,行页面渲染该条目,并传入返回组合包页面的 `close` prop。注册包是某个已列出组合包自身的包名、没有已列出的行使用该模块、且该组合包没有 `plugins.bundle.config` 条目时,组合包页面渲染该条目,其 `close` 返回打开该组合包页面的视图。没有已列出的行或组合包认领、或注册包未知的条目只出现在设置中。设置中的**插件管理**条目是 id 为 `plugins`、order 为 15 的 `settings.section` 注册,选择它会关闭设置并打开本页主列表。
+
### 详情页扩展点
对某个不属于自己的组合包、行或官方插件有话要说的插件,通过本页声明的三个 list slot 向该对象的页面贡献内容:`plugins.detail.actions` 在页头放一个控件,位于页面自己的开关和卸载之前;`plugins.detail.badge` 在标题旁放一个标签,位于版本、实验性和异常或未运行标签之后;`plugins.detail.section` 在页面自身内容之下放一个区块——组合包页在来源信息之后,行页和官方插件页在配置之后。每个条目都以页面的 `subject` 渲染:`{ kind: 'bundle', pkg }`、`{ kind: 'row', pkg, row }` 或 `{ kind: 'item', id }`,其中 `pkg` 与 `row` 携带包名、版本、是否已安装、是否启用以及行列表这些供贡献者判断的事实。条目对无话可说的 subject 返回 null,自绘区块外观;页面按 `order` 排列条目。
@@ -148,7 +153,7 @@ Host 入口通过生成的 Remote 接口暴露 `pluginRegistryProbe.fastest()`
自定义条目页以 Host 条目 id 作为注册 id;行页面使用 bundle 包名和行 id。当条目提供可编辑 Config 字段时,页面宿主传入 `form.state` 和 `form.mutate(operations, expectedRevision)`。自定义页面负责草稿和校验提示,并可复用 ui-primitives 的 `ConfigField`。整个 bundle 的页面可以包含多个条目,因此没有单一表单。
-页面的 `main` 注册把 `plugins.item`、`plugins.bundle.config` 与 `plugins.row.config` 声明为子 slot,因此它们与页面同生,注册方的 `ctx.slots.inject` 会等到它们出现。`configLedgerSource` 把三份账本投影成一个可观察对象——按账本顺序排列、标签按当前语言解析的官方条目,以及组合包与行的键——在账本或语言变化前保持缓存;页面把它作为 `useConfigLedger` 绑在 store 旁边,自身从不点名任何可配置插件。注册拥有的导航 store 选择主列表、完整的实验性插件列表、某个组合包、某个官方插件或组合包的某一行;切换离开插件面板时重置为列表,React 重新挂载则保留所选目标。新的注册从主列表开始。安装后的高亮仅在当前页面有对应卡片时滚动定位,不改变所选页面。其他 Client 插件经 `ctx.get` 或 `ctx.inject` 以可选方式读取 `pluginNavigation`,调用其 `openBundle(packageName)` 即可打开组合包详情,不改变当前 Session;把它写进插件的 `inject` 会让该插件在无权限的页面上一直等待。首次读取清单期间保留导航目标;组合包不存在时显示列表。注册与做出它的浏览器半侧同生共死。`dsh-client-modules` 只把一个包的浏览器半侧挂在说明符恰为包名的那一行 Loader 行上,所以组合包为自己或任一行注册的页面,都会在那一行被关闭时一起消失;需要在其他行关闭时仍保留页面的子插件,应作为独立的包发布。 卡片和详情页仅为 [`dsh-official-bundles`](../../util/official-bundles/README.zh.md#plugin-manager-lists) 中 `EXPERIMENTAL_BUNDLES` 名单内的包显示实验性标签,包名前缀不决定标签。
+页面的 `main` 注册把 `plugins.item`、`plugins.bundle.config` 与 `plugins.row.config` 声明为子 slot,因此它们与页面同生,注册方的 `ctx.slots.inject` 会等到它们出现。`configLedgerSource` 把四份账本投影成一个可观察对象——按账本顺序排列、标签按当前语言解析的官方条目与 `settings.section` 条目(每个条目在已知时带注册它的模块),以及组合包与行的键——在账本或语言变化前保持缓存;页面把它作为 `useConfigLedger` 绑在 store 旁边,自身从不点名任何可配置插件。注册拥有的导航 store 选择主列表、完整的实验性插件列表、某个组合包、某个官方插件或组合包的某一行;切换离开插件面板时重置为列表,React 重新挂载则保留所选目标。新的注册从主列表开始。安装后的高亮仅在当前页面有对应卡片时滚动定位,不改变所选页面。其他 Client 插件经 `ctx.get` 或 `ctx.inject` 以可选方式读取 `pluginNavigation`,调用其 `openBundle(packageName)` 即可打开组合包详情,不改变当前 Session;把它写进插件的 `inject` 会让该插件在无权限的页面上一直等待。首次读取清单期间保留导航目标;组合包不存在时显示列表。注册与做出它的浏览器半侧同生共死。`dsh-client-modules` 只把一个包的浏览器半侧挂在说明符恰为包名的那一行 Loader 行上,所以组合包为自己或任一行注册的页面,都会在那一行被关闭时一起消失;需要在其他行关闭时仍保留页面的子插件,应作为独立的包发布。 卡片和详情页仅为 [`dsh-official-bundles`](../../util/official-bundles/README.zh.md#plugin-manager-lists) 中 `EXPERIMENTAL_BUNDLES` 名单内的包显示实验性标签,包名前缀不决定标签。
`plugins.bundle.config` 以 npm 包名为 key,提供 Bundle 详情配置。Client 插件可订阅只读的 `ctx.pluginChanges.bundle(packageName)`,在组合包或其组件行变更期间暂停查询。通知先于管理请求发出,页面关闭后仍会更新;订阅方在卸载时释放观察。`plugins.bundle.activation` 在用户从列表或详情页显式启用后提供 Bundle 自有引导,并传入关闭引导和打开详情的回调。仅列出已启用的 Bundle 不会触发引导。
diff --git a/packages/client/ui-plugin-manager/package.json b/packages/client/ui-plugin-manager/package.json
index 35bd4f6de4..2a220d9544 100644
--- a/packages/client/ui-plugin-manager/package.json
+++ b/packages/client/ui-plugin-manager/package.json
@@ -39,6 +39,7 @@
"inject": [
"@deepseek-ai/dsh-api-remotes",
"@deepseek-ai/dsh-client-locale",
+ "@deepseek-ai/dsh-client-modules",
"@deepseek-ai/dsh-client-ui-layout",
"@deepseek-ai/dsh-client-ui-sidebar"
],
@@ -58,6 +59,7 @@
"@deepseek-ai/dsh-api-remote-access": "workspace:*",
"@deepseek-ai/dsh-api-remotes": "workspace:*",
"@deepseek-ai/dsh-client-locale": "workspace:*",
+ "@deepseek-ai/dsh-client-modules": "workspace:*",
"@deepseek-ai/dsh-client-store": "workspace:*",
"@deepseek-ai/dsh-client-test-runtime": "workspace:*",
"@deepseek-ai/dsh-client-ui-layout": "workspace:*",
diff --git a/packages/client/ui-plugin-manager/src/client/ClientSyncNotice.tsx b/packages/client/ui-plugin-manager/src/client/ClientSyncNotice.tsx
new file mode 100644
index 0000000000..d654d90c9a
--- /dev/null
+++ b/packages/client/ui-plugin-manager/src/client/ClientSyncNotice.tsx
@@ -0,0 +1,30 @@
+/** This page's client plugin synchronization: an ongoing line while it runs, and the failures with a retry. */
+import type { ReactNode } from 'react'
+import { Button, StateDot } from '@deepseek-ai/dsh-client-ui-primitives'
+import type { ClientEntryState } from '@deepseek-ai/dsh-client-modules/client'
+import type { Translate } from './presentation.ts'
+import css from './PluginManagerPage.module.css'
+
+/**
+ * Show what the page's module system reports; it is independent of the Host's bundle list.
+ * @param props - the latest synchronization state, the page copy, and the retry.
+ * @returns the status line, the failure notice, both, or nothing.
+ */
+export function ClientSyncNotice({ sync, t, retry }: {
+ readonly sync: ClientEntryState
+ readonly t: Translate
+ readonly retry: () => void
+}): ReactNode {
+ return (
+ <>
+ {sync.syncing ?
@@ -727,7 +744,7 @@ function RowDetail({ pkg, row, t, resolveText, onBack, renderSlot, form }: {
* and configure controls, unless the Host reports an error and no rows; and where it comes from.
*/
function PackageDetail({
- pkg, t, resolveText, busy, rowBusy, configured, configure, renderSlot, inMore, versions, detail,
+ pkg, t, resolveText, busy, rowBusy, configured, configure, sections, renderSlot, renderFactory, inMore, versions, detail,
onBack, onSetEnabled, onUninstall, onUpdate, onSetRowEnabled, onEnsureVersions, onCheckVersions, onUpdateVersion,
}: {
readonly pkg: PackageView
@@ -743,7 +760,13 @@ function PackageDetail({
/** Whether the bundle registered a configuration of its own. */
readonly configured: boolean
readonly configure: RowConfigure
+ /**
+ * The settings pages the bundle's own package registered, shown when the bundle has no configuration and no listed
+ * row's module is that package.
+ */
+ readonly sections: readonly SettingsSectionItem[]
readonly renderSlot: RenderConfig
+ readonly renderFactory: RenderFactory
readonly inMore: boolean
readonly onBack: () => void
readonly onSetEnabled: (enabled: boolean) => void
@@ -826,6 +849,11 @@ function PackageDetail({
)
: null}
+ {sections.map(section => (
+
+ {renderFactory('settings.section.view', { id: section.id, close: onBack })}
+
+ ))}
{/* A Host error with no rows can mean the Host never read the patch, so the page does not claim the bundle has no components. */}
{pkg.availability === 'missing' || (pkg.error !== undefined && pkg.rows.length === 0) ? null : ( !HIDDEN_BUNDLES.has(pkg.name)
&& (pkg.listedByDefault !== false || pkg.enabled || pkg.installed || rowsRunning(pkg))
&& (pkg.installed || pkg.official || pkg.error !== undefined))
@@ -1616,6 +1644,14 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
? listed.find(pkg => pkg.name === view.name)
: undefined
const openItem = view.kind === 'item' ? ledger.items.find(item => item.id === view.id) : undefined
+ // A plugin's settings page also shows on the listed row whose module registered it, or else on the bundle whose
+ // package registered it, when that row or bundle registers no configuration of its own; Settings shows it either way.
+ const rowModules = new Set(listed.flatMap(pkg => pkg.rows.map(row => row.moduleName)))
+ const sectionsOf = (pkg: PackageView, row: PackageRow): readonly SettingsSectionItem[] =>
+ ledger.rows.has(rowConfigKey(pkg.name, row.rowId)) ? [] : ledger.sections.filter(section => section.module === row.moduleName)
+ const bundleSections = (pkg: PackageView): readonly SettingsSectionItem[] => ledger.bundles.has(pkg.name) || rowModules.has(pkg.name)
+ ? []
+ : ledger.sections.filter(section => section.module === pkg.name)
const openRow = view.kind === 'row' && openPkg !== undefined ? openPkg.rows.find(row => row.rowId === view.rowId) : undefined
const onInstalled = tab === INSTALLED_TAB
const showsCards = !onInstalled || (openPkg === undefined && openItem === undefined)
@@ -1642,7 +1678,7 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
if (row.entryId !== undefined) props.setRowEnabled(row.entryId, enabled)
}
const configure = (pkg: PackageView): RowConfigure => ({
- has: row => ledger.rows.has(rowConfigKey(pkg.name, row.rowId)),
+ has: row => ledger.rows.has(rowConfigKey(pkg.name, row.rowId)) || sectionsOf(pkg, row).length > 0,
open: (row) => { setView({ kind: 'row', name: pkg.name, rowId: row.rowId, ...pkgOrigin }) },
})
const updates = updatesNote(mine, state.versions, t)
@@ -1753,7 +1789,7 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
)
: null}
-
+ snapshot)} t={t} retry={props.retryClient} />
{!onInstalled
? (
@@ -1802,6 +1838,8 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
pkg={openPkg}
row={openRow}
form={formFor(openRow.rowId)}
+ sections={sectionsOf(openPkg, openRow)}
+ renderFactory={props.renderFactorySlot}
t={t}
resolveText={resolveText}
renderSlot={renderSlot}
@@ -1819,6 +1857,8 @@ export function PluginManagerPage(props: PluginManagerPageProps): ReactNode {
rowBusy={row => row.entryId !== undefined && state.busy.includes(rowKey(row.entryId))}
configured={ledger.bundles.has(openPkg.name)}
configure={configure(openPkg)}
+ sections={bundleSections(openPkg)}
+ renderFactory={props.renderFactorySlot}
renderSlot={renderSlot}
inMore={backToMore}
detail={(
diff --git a/packages/client/ui-plugin-manager/src/client/PluginsSettingsLink.tsx b/packages/client/ui-plugin-manager/src/client/PluginsSettingsLink.tsx
new file mode 100644
index 0000000000..e91c04eb74
--- /dev/null
+++ b/packages/client/ui-plugin-manager/src/client/PluginsSettingsLink.tsx
@@ -0,0 +1,28 @@
+/** The Settings navigation entry that leaves Settings for the Plugins page. */
+import { useEffect, type ReactNode } from 'react'
+import type { InjectFace, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
+// Type-only: the `settings.section` declaration this entry registers into.
+import type {} from '@deepseek-ai/dsh-client-ui-settings/client'
+
+/** What the entry receives from the plugin manager. */
+export interface PluginsSettingsLinkInjected {
+ /** Show the Plugins page's main list. */
+ readonly openPlugins: () => void
+}
+
+/** Full component props assembled by the settings shell. */
+export type PluginsSettingsLinkProps = PropsRuntime<'settings.section'> & InjectFace
+
+/**
+ * Selecting the entry closes Settings and opens the Plugins page; the entry has no page of its own.
+ * @param props - the shell's close action and the injected navigation.
+ * @returns nothing; the entry renders no content.
+ */
+export function PluginsSettingsLink({ close, openPlugins }: PluginsSettingsLinkProps): ReactNode {
+ // Mounting is the selection: the shell mounts a page only when its navigation entry is chosen.
+ useEffect(() => {
+ close()
+ openPlugins()
+ }, [close, openPlugins])
+ return null
+}
diff --git a/packages/client/ui-plugin-manager/src/client/config-ledger.ts b/packages/client/ui-plugin-manager/src/client/config-ledger.ts
index 21f6d3d746..8ea49e75a7 100644
--- a/packages/client/ui-plugin-manager/src/client/config-ledger.ts
+++ b/packages/client/ui-plugin-manager/src/client/config-ledger.ts
@@ -1,14 +1,17 @@
/**
* Which plugins bring their own configuration to the Plugins page, read from
- * the three slots the page declares: the official plugins listed beside the
- * official bundles, the bundles with a form on their page, and the rows with a
- * page of their own. The projection follows the slot ledgers and the active
- * locale and keeps its snapshot until one of them moves.
+ * the three slots the page declares (the official plugins listed beside the
+ * official bundles, the bundles with a form on their page, the rows with a
+ * page of their own) and from the Factory-declared `settings.section` (the
+ * plugins' settings pages). The projection follows the slot ledgers and the
+ * active locale and keeps its snapshot until one of them moves.
*/
import type { Context as ClientContext } from '@deepseek-ai/cordis'
import { resolveSlotLabel, type HostObservable } from '@deepseek-ai/dsh-client-ui-slots'
import type {} from './slot-contract.ts'
+// Type-only: the `settings.section` declaration whose entries this page lists.
+import type {} from '@deepseek-ai/dsh-client-ui-settings/client'
/** One official plugin as the page lists it: its registration id and its title in the active locale. */
export interface OfficialItem {
@@ -16,15 +19,24 @@ export interface OfficialItem {
readonly label: string
}
+/** One `settings.section` entry: its id, its title in the active locale, and the package that registered it, when known. */
+export interface SettingsSectionItem {
+ readonly id: string
+ readonly label: string
+ readonly module?: string
+}
+
/**
* The plugins carrying configuration: the official plugins in ledger order,
- * the package names of the bundles with a page-level form, and the keys
- * ({@link rowConfigKey}) of the rows with a page.
+ * the package names of the bundles with a page-level form, the keys
+ * ({@link rowConfigKey}) of the rows with a page, and the plugins' settings
+ * pages in ledger order.
*/
export interface ConfigLedger {
readonly items: readonly OfficialItem[]
readonly bundles: ReadonlySet
readonly rows: ReadonlySet
+ readonly sections: readonly SettingsSectionItem[]
}
/**
@@ -37,7 +49,7 @@ export function rowConfigKey(bundle: string, rowId: string): string {
return `${bundle}#${rowId}`
}
-const SLOTS = ['plugins.item', 'plugins.bundle.config', 'plugins.row.config'] as const
+const SLOTS = ['plugins.item', 'plugins.bundle.config', 'plugins.row.config', 'settings.section'] as const
/**
* Project the configuration ledgers as one observable the page binds.
@@ -47,7 +59,7 @@ const SLOTS = ['plugins.item', 'plugins.bundle.config', 'plugins.row.config'] as
export function configLedgerSource(ctx: ClientContext): HostObservable {
let versions: readonly number[] = []
let revision = -1
- let ledger: ConfigLedger = { items: [], bundles: new Set(), rows: new Set() }
+ let ledger: ConfigLedger = { items: [], bundles: new Set(), rows: new Set(), sections: [] }
const keysOf = (name: 'plugins.bundle.config' | 'plugins.row.config'): ReadonlySet =>
new Set(ctx.slots.entries(name).flatMap(entry => entry.options.key === undefined ? [] : [entry.options.key]))
return {
@@ -65,6 +77,15 @@ export function configLedgerSource(ctx: ClientContext): HostObservable {
+ /* v8 ignore next -- list-slot registration requires id */
+ const id = entry.options.id ?? ''
+ return {
+ id,
+ label: resolveSlotLabel(entry.options.label) ?? id,
+ ...entry.module === undefined ? {} : { module: entry.module },
+ }
+ }),
}
}
return ledger
diff --git a/packages/client/ui-plugin-manager/src/client/index.ts b/packages/client/ui-plugin-manager/src/client/index.ts
index eadd359408..74dbb1d5f9 100644
--- a/packages/client/ui-plugin-manager/src/client/index.ts
+++ b/packages/client/ui-plugin-manager/src/client/index.ts
@@ -8,6 +8,8 @@
*/
import type {} from '@deepseek-ai/dsh-client-product-analytics/client'
import type {} from '@deepseek-ai/dsh-client-locale/client'
+// Type-only: the ctx.modules Context merge.
+import type {} from '@deepseek-ai/dsh-client-modules/client'
import type { Context as ClientContext } from '@deepseek-ai/cordis'
// Type-only: the root `main` keyed slot the page registers into, declared by
// ui-layout with the panel id brand, and the `sidebar.panellist` list the
@@ -27,6 +29,7 @@ import { PluginManagerPage } from './PluginManagerPage.tsx'
import { createPluginHeaderRef } from './header-scroll.ts'
import { PluginRefreshToast, type PluginRefreshToastFace } from './PluginRefreshToast.tsx'
import { PluginsPanelIcon } from './PluginsPanelIcon.tsx'
+import { PluginsSettingsLink, type PluginsSettingsLinkInjected } from './PluginsSettingsLink.tsx'
import { configLedgerSource } from './config-ledger.ts'
import { tabLedgerSource } from './tab-ledger.ts'
import { PluginManagerController } from './manager-store.ts'
@@ -61,7 +64,7 @@ declare module '@deepseek-ai/cordis' {
}
export type { PluginManagerPageProps } from './PluginManagerPage.tsx'
-export type { ConfigLedger, OfficialItem } from './config-ledger.ts'
+export type { ConfigLedger, OfficialItem, SettingsSectionItem } from './config-ledger.ts'
export type { PluginManagerFace } from './manager-store.ts'
export type { PluginManagerLocaleKey } from './locales.ts'
export type {
@@ -83,7 +86,7 @@ export const NS = 'pluginManager'
export const PANEL_ID = 'plugins' as MainPanelId
/** Services required by the sidebar registration, the Remote methods, and access; the inventory says whether the Host manages a profile. */
-export const inject = ['slots', 'locale', 'remote', 'remote.pluginManager', 'remote.pluginInventory', 'remote.pluginRegistryProbe', 'configForms', 'layout', 'remoteAccess']
+export const inject = ['slots', 'locale', 'remote', 'remote.pluginManager', 'remote.pluginInventory', 'remote.pluginRegistryProbe', 'configForms', 'layout', 'remoteAccess', 'modules']
/**
* Contribute the Plugins entry to the sidebar with the management page it
@@ -134,7 +137,12 @@ export function apply(ctx: ClientContext): void {
key: PANEL_ID,
locale: NS,
store,
- inject: () => ({ ...face, createHeaderRef: createPluginHeaderRef }),
+ inject: () => ({
+ ...face,
+ createHeaderRef: createPluginHeaderRef,
+ hooks: { ...face.hooks, clientSync: ctx.modules.entries.state },
+ retryClient: () => { void ctx.modules.entries.retry().catch((error: unknown) => { ctx.logger.error(error) }) },
+ }),
children: {
'plugins.add.actions': { kind: 'list', scope: 'root' },
'plugins.tab': { kind: 'list', scope: 'root' },
@@ -150,12 +158,13 @@ export function apply(ctx: ClientContext): void {
yield ctx.layout.panelInfo.subscribe(() => {
if (ctx.layout.panelInfo.getSnapshot().activePanelId !== PANEL_ID) instance.actions.setView({ kind: 'list' })
})
+ const openList = (): void => {
+ ctx.layout.selectPanel(PANEL_ID)
+ instance.actions.setTab('installed')
+ instance.actions.setView({ kind: 'list' })
+ }
const disposeNavigation = ctx.reflect.provide('pluginNavigation', {
- openList: () => {
- ctx.layout.selectPanel(PANEL_ID)
- instance.actions.setTab('installed')
- instance.actions.setView({ kind: 'list' })
- },
+ openList,
openBundle: (packageName: string) => {
ctx.layout.selectPanel(PANEL_ID)
instance.actions.setTab('installed')
@@ -163,6 +172,14 @@ export function apply(ctx: ClientContext): void {
},
})
yield () => { void disposeNavigation() }
+ // Settings lists one entry that leads here.
+ yield ctx.slots.inject('settings.section', () => ctx.slots.register({
+ name: 'settings.section',
+ id: PANEL_ID,
+ order: 15,
+ label: () => t('settingsEntry'),
+ inject: (): PluginsSettingsLinkInjected => ({ openPlugins: openList }),
+ }, PluginsSettingsLink))
})
yield ctx.slots.inject('sidebar.panellist', () => ctx.slots.register({
name: 'sidebar.panellist',
diff --git a/packages/client/ui-plugin-manager/src/client/locales.ts b/packages/client/ui-plugin-manager/src/client/locales.ts
index c70c32549f..3301b8b68b 100644
--- a/packages/client/ui-plugin-manager/src/client/locales.ts
+++ b/packages/client/ui-plugin-manager/src/client/locales.ts
@@ -8,10 +8,14 @@ export const INSTALL_PATH_EXAMPLE = '/Users/name/my-plugin'
/** Simplified Chinese dictionary and key source of truth. */
export const zh = {
panel: '插件',
+ settingsEntry: '插件管理',
+ clientSyncing: '正在同步本页面的插件…',
+ clientSyncFailed: '本页面的插件未能完成同步;服务端的启用状态保持不变。',
+ clientSyncRetry: '重试本页面同步',
title: '插件',
intro: '安装、启用和配置插件',
infoLabel: '插件说明',
- infoDescription: '在这里配置官方插件,安装和管理其他插件。内置插件列表及运行状态可在「设置 → 内置插件」中查看',
+ infoDescription: '在这里配置官方插件,安装、管理和配置其他插件。',
loading: '正在读取插件…',
error: '可能由于网络问题,无法读取全部插件',
unavailable: '本部署没有可管理的 profile,无法安装或启停插件。',
@@ -308,10 +312,14 @@ export type PluginManagerLocaleKey = keyof typeof zh
/** English dictionary checked against the Chinese key set. */
export const en = {
panel: 'Plugins',
+ settingsEntry: 'Plugins',
+ clientSyncing: 'Syncing plugins on this page…',
+ clientSyncFailed: 'Some plugins could not sync on this page. Host enablement is unchanged.',
+ clientSyncRetry: 'Retry this page',
title: 'Plugins',
intro: 'Install, enable, and configure plugins',
infoLabel: 'About plugins',
- infoDescription: 'Configure official plugins and install or manage other plugins here. View the built-in plugin list and runtime status in Settings → Built-in plugins.',
+ infoDescription: 'Configure official plugins, and install, manage, and configure other plugins here.',
loading: 'Reading plugins…',
error: 'Could not read all plugins, possibly due to a network problem',
unavailable: 'This deployment runs without a manageable profile, so plugins cannot be installed or switched here.',
@@ -606,10 +614,14 @@ export const en = {
export const ja = {
'reasonUnsupportedPlatform': 'このプラグインはDSHを実行しているホストOSに対応していません。',
'panel': 'プラグイン',
+ 'settingsEntry': 'プラグイン管理',
+ 'clientSyncing': 'このページでプラグインを同期中…',
+ 'clientSyncFailed': '一部のプラグインをこのページで同期できませんでした。ホスト側の有効化状態は変更されていません。',
+ 'clientSyncRetry': 'このページを再試行',
'title': 'プラグイン',
'intro': 'プラグインのインストール、有効化、設定',
'infoLabel': 'プラグインについて',
- 'infoDescription': '公式プラグインの設定や、その他のプラグインのインストール・管理はここで行えます。組み込みプラグインの一覧と実行状態は「設定 → 組み込みプラグイン」で確認できます。',
+ 'infoDescription': '公式プラグインの設定や、その他のプラグインのインストール・管理・設定はここで行えます。',
'loading': 'プラグインを読み込み中…',
'error': '一部のプラグインを読み込めませんでした。ネットワークの問題が考えられます',
'unavailable': 'このデプロイでは管理可能なプロファイルが実行されていないため、ここでプラグインのインストールや切り替えはできません。',
@@ -903,10 +915,14 @@ export const ja = {
export const es = {
reasonUnsupportedPlatform: 'Este complemento no es compatible con el sistema operativo que ejecuta DSH.',
panel: 'Complementos',
+ settingsEntry: 'Complementos',
+ clientSyncing: 'Sincronizando complementos en esta página…',
+ clientSyncFailed: 'Algunos complementos no se pudieron sincronizar en esta página. La habilitación del host no ha cambiado.',
+ clientSyncRetry: 'Reintentar esta página',
title: 'Complementos',
intro: 'Instalar, habilitar y configurar complementos',
infoLabel: 'Acerca de los complementos',
- infoDescription: 'Configure complementos oficiales e instale o administre otros complementos aquí. Vea la lista de complementos integrados y el estado del tiempo de ejecución en Configuración → Complementos integrados.',
+ infoDescription: 'Configure aquí los complementos oficiales e instale, administre y configure otros complementos.',
loading: 'Leyendo complementos…',
error: 'No se pudieron leer todos los complementos, posiblemente debido a un problema de red',
unavailable: 'Esta implementación se ejecuta sin un perfil manejable, por lo que los complementos no se pueden instalar ni cambiar aquí.',
@@ -1200,10 +1216,14 @@ export const es = {
export const fr = {
reasonUnsupportedPlatform: 'Ce plugin ne prend pas en charge le système d’exploitation sur lequel DSH s’exécute.',
panel: 'Plugins',
+ settingsEntry: 'Plugins',
+ clientSyncing: 'Synchronisation des plugins sur cette page…',
+ clientSyncFailed: "Certains plugins n'ont pas pu se synchroniser sur cette page. L'activation de l'hôte est inchangée.",
+ clientSyncRetry: 'Réessayez cette page',
title: 'Plugins',
intro: 'Installer, activer et configurer les plugins',
infoLabel: 'À propos des plugins',
- infoDescription: "Configurez les plugins officiels et installez ou gérez d'autres plugins ici. Affichez la liste des plugins intégrés et l'état d'exécution dans Paramètres → Plugins intégrés.",
+ infoDescription: "Configurez ici les plugins officiels, et installez, gérez et configurez d'autres plugins.",
loading: 'Plugins de lecture…',
error: "Impossible de lire tous les plugins, probablement à cause d'un problème de réseau",
unavailable: "Ce déploiement s'exécute sans profil gérable, les plugins ne peuvent donc pas être installés ou commutés ici.",
@@ -1497,10 +1517,14 @@ export const fr = {
export const de = {
reasonUnsupportedPlatform: 'Dieses Plugin unterstützt das Betriebssystem, auf dem DSH läuft, nicht.',
panel: 'Plugins',
+ settingsEntry: 'Plugins',
+ clientSyncing: 'Plugins auf dieser Seite werden synchronisiert…',
+ clientSyncFailed: 'Einige Plugins konnten auf dieser Seite nicht synchronisiert werden. Die Host-Aktivierung bleibt unverändert.',
+ clientSyncRetry: 'Versuchen Sie es erneut mit dieser Seite',
title: 'Plugins',
intro: 'Plugins installieren, aktivieren und konfigurieren',
infoLabel: 'Über Plugins',
- infoDescription: 'Konfigurieren Sie hier offizielle Plugins und installieren oder verwalten Sie andere Plugins. Sehen Sie sich die Liste der integrierten Plugins und den Laufzeitstatus unter Einstellungen → Integrierte Plugins an.',
+ infoDescription: 'Konfigurieren Sie hier offizielle Plugins und installieren, verwalten und konfigurieren Sie andere Plugins.',
loading: 'Plugins lesen…',
error: 'Es konnten nicht alle Plugins gelesen werden, möglicherweise aufgrund eines Netzwerkproblems',
unavailable: 'Diese Bereitstellung läuft ohne verwaltbares Profil, daher können hier keine Plugins installiert oder gewechselt werden.',
@@ -1794,10 +1818,14 @@ export const de = {
export const ru = {
reasonUnsupportedPlatform: 'Этот плагин не поддерживает операционную систему, в которой работает DSH.',
panel: 'Плагины',
+ settingsEntry: 'Плагины',
+ clientSyncing: 'Синхронизация плагинов на этой странице…',
+ clientSyncFailed: 'Некоторые плагины не смогли синхронизироваться на этой странице. Включение хоста не изменилось.',
+ clientSyncRetry: 'Повторить эту страницу',
title: 'Плагины',
intro: 'Установите, включите и настройте плагины',
infoLabel: 'О плагинах',
- infoDescription: 'Настройте официальные плагины, а также установите или управляйте другими плагинами здесь. Посмотреть список встроенных плагинов и статус выполнения можно в разделе «Настройки» → «Встроенные плагины».',
+ infoDescription: 'Здесь можно настраивать официальные плагины, а также устанавливать и настраивать другие плагины и управлять ими.',
loading: 'Чтение плагинов…',
error: 'Не удалось прочитать все плагины, возможно, из-за проблем с сетью.',
unavailable: 'Это развертывание выполняется без управляемого профиля, поэтому здесь нельзя устанавливать или переключать плагины.',
@@ -2091,10 +2119,14 @@ export const ru = {
export const pt = {
reasonUnsupportedPlatform: 'Este plugin não oferece suporte ao sistema operacional em que o DSH está sendo executado.',
panel: 'Plug-ins',
+ settingsEntry: 'Plug-ins',
+ clientSyncing: 'Sincronizando plug-ins nesta página…',
+ clientSyncFailed: 'Alguns plug-ins não puderam ser sincronizados nesta página. A ativação do host permanece inalterada.',
+ clientSyncRetry: 'Tente esta página novamente',
title: 'Plug-ins',
intro: 'Instalar, habilitar e configurar plug-ins',
infoLabel: 'Sobre plug-ins',
- infoDescription: 'Configure plugins oficiais e instale ou gerencie outros plugins aqui. Veja a lista de plug-ins integrados e o status do tempo de execução em Configurações → Plug-ins integrados.',
+ infoDescription: 'Configure aqui os plug-ins oficiais e instale, gerencie e configure outros plug-ins.',
loading: 'Lendo plug-ins…',
error: 'Não foi possível ler todos os plugins, possivelmente devido a um problema de rede',
unavailable: 'Esta implantação é executada sem um perfil gerenciável, portanto, os plug-ins não podem ser instalados ou trocados aqui.',
diff --git a/packages/client/ui-plugin-manager/tests/browser-plugin.client.spec.tsx b/packages/client/ui-plugin-manager/tests/browser-plugin.client.spec.tsx
index 9069ce355b..66cd778fd9 100644
--- a/packages/client/ui-plugin-manager/tests/browser-plugin.client.spec.tsx
+++ b/packages/client/ui-plugin-manager/tests/browser-plugin.client.spec.tsx
@@ -17,6 +17,8 @@ import { PluginRefreshToast, type PluginRefreshToastFace } from '../src/client/P
import { PluginsPanelIcon } from '../src/client/PluginsPanelIcon.tsx'
import type { PluginManagerFace } from '../src/client/manager-store.ts'
import type { createNavigationStore } from '../src/client/navigation-store.ts'
+import type { PluginsSettingsLinkInjected } from '../src/client/PluginsSettingsLink.tsx'
+import type { ClientSyncFace } from '../src/client/PluginManagerPage.tsx'
usePinnedBrowserLanguages('zh-CN')
beforeEach(() => { localStorage.clear() })
@@ -91,10 +93,13 @@ async function bench(allows: ((action: string) => boolean) | 'switchable' = () =
})
const panelInfo = createSnapshotStore({ activePanelId: null })
const selectPanel = vi.fn((activePanelId) => { panelInfo.set({ activePanelId }) })
+ const clientSync = createSnapshotStore({ syncing: false, failures: [] as { id: string; message: string }[] })
+ const retryClient = vi.fn(() => Promise.resolve())
+ ctx.provide('modules', { entries: { state: clientSync, retry: retryClient } })
ctx.provide('layout', { panelInfo, selectPanel, beginNavigation: () => new AbortController().signal,
toggleSidebar: vi.fn(), openRightbar: vi.fn(), closeRightbar: vi.fn() })
await ctx.plugin(settings).await()
- return { ctx, slots: ctx.get('slots') as SlotRegistry, locale, list, remote, selectPanel, panelInfo, access }
+ return { ctx, slots: ctx.get('slots') as SlotRegistry, locale, list, remote, selectPanel, panelInfo, access, clientSync, retryClient }
}
function declare(slots: SlotRegistry): () => void {
@@ -160,6 +165,42 @@ describe('ui-plugin-manager browser plugin', () => {
expect(b.list).not.toHaveBeenCalled()
})
+ it('keeps a Settings entry that opens the Plugins list while the page is registered', async () => {
+ const b = await bench()
+ const removeRoot = b.slots.register({
+ name: 'root',
+ children: {
+ 'main': { kind: 'keyed', scope: 'root' },
+ 'shell.overlay': { kind: 'list', scope: 'root' },
+ 'sidebar.panellist': { kind: 'list', scope: 'root' },
+ 'settings.section': { kind: 'list', scope: 'root' },
+ },
+ } as never, () => null)
+ await b.ctx.plugin({ inject: [...inject], apply }).await()
+ const link = b.slots.entries('settings.section')[0]!
+ expect(link.options).toMatchObject({ id: PANEL_ID, order: 15 })
+ expect(resolveSlotLabel(link.options.label)).toBe('插件管理')
+ const navigation = (b.slots.entries('main')[0]!.store as ReturnType).create()
+ navigation.actions.setView({ kind: 'more' })
+ const linkInjected: object = link.inject!()
+ ;(linkInjected as PluginsSettingsLinkInjected).openPlugins()
+ expect(b.panelInfo.getSnapshot().activePanelId).toBe(PANEL_ID)
+ expect(navigation.getSnapshot()).toEqual({ tab: 'installed', view: { kind: 'list' } })
+ // The page reads this page's client synchronization from the module system and retries through it.
+ const pageInjected: object = b.slots.entries('main')[0]!.inject!()
+ const sync = pageInjected as ClientSyncFace
+ expect(sync.hooks.clientSync).toBe(b.clientSync)
+ sync.retryClient()
+ expect(b.retryClient).toHaveBeenCalledOnce()
+ const logged = vi.spyOn(b.ctx.logger('ui-plugin-manager'), 'error')
+ b.retryClient.mockRejectedValueOnce(new Error('retry failed'))
+ sync.retryClient()
+ await vi.waitFor(() => { expect(b.retryClient).toHaveBeenCalledTimes(2) })
+ removeRoot()
+ expect(b.slots.entries('settings.section')).toEqual([])
+ logged.mockRestore()
+ })
+
it('shares refresh failures with the overlay after navigation and releases both registrations across reloads', async () => {
const b = await bench()
const fiber = b.ctx.plugin({ inject: [...inject], apply })
@@ -197,7 +238,7 @@ describe('ui-plugin-manager browser plugin', () => {
})
it('declares only the services the page and its Remote methods use', () => {
- expect(inject).toEqual(['slots', 'locale', 'remote', 'remote.pluginManager', 'remote.pluginInventory', 'remote.pluginRegistryProbe', 'configForms', 'layout', 'remoteAccess'])
+ expect(inject).toEqual(['slots', 'locale', 'remote', 'remote.pluginManager', 'remote.pluginInventory', 'remote.pluginRegistryProbe', 'configForms', 'layout', 'remoteAccess', 'modules'])
})
it('reads the Host again on a later grant after showing the page, and not while access is withdrawn', async () => {
@@ -284,7 +325,7 @@ describe('ui-plugin-manager browser plugin', () => {
b.locale.setLocale('en')
expect(face.resolveText(text)).toBe('Local tools')
b.locale.setLocale('zh')
- expect(face.hooks.configLedger.getSnapshot()).toEqual({ items: [], bundles: new Set(), rows: new Set() })
+ expect(face.hooks.configLedger.getSnapshot()).toEqual({ items: [], bundles: new Set(), rows: new Set(), sections: [] })
// A Host change before the first render is not a reason to read.
b.remote.emit('plugin-manager/changed', [{ reason: 'install' }])
b.ctx.emit('connection/reset')
diff --git a/packages/client/ui-plugin-manager/tests/components.client.spec.tsx b/packages/client/ui-plugin-manager/tests/components.client.spec.tsx
index 1445f86005..c75dac7440 100644
--- a/packages/client/ui-plugin-manager/tests/components.client.spec.tsx
+++ b/packages/client/ui-plugin-manager/tests/components.client.spec.tsx
@@ -7,8 +7,9 @@ import { Context } from '@deepseek-ai/cordis'
import { LocaleRuntime } from '@deepseek-ai/dsh-client-locale/client'
import type { ChangeResult, PluginEntryId, PluginInstallRequestId, PluginUpdateResult, PluginVersion, RegistryAttempt } from '@deepseek-ai/dsh-api-remotes/client'
import { allowAllAccess, bindSnapshotSelector, stubConfigForm } from '@deepseek-ai/dsh-client-test-runtime'
-import type { ConfigForm, ConfigFormSnapshot, SettingsMirrorSnapshot } from '@deepseek-ai/dsh-client-ui-settings/client'
+import type { ConfigForm, ConfigFormSnapshot, SettingsMirrorSnapshot, SettingsSectionOwnerProps, SettingsSectionViewProps } from '@deepseek-ai/dsh-client-ui-settings/client'
import { createSnapshotStore } from '@deepseek-ai/dsh-client-store'
+import type { ClientEntryState } from '@deepseek-ai/dsh-client-modules/client'
import { MenuItemButton } from '@deepseek-ai/dsh-client-ui-primitives'
import { StrictMode, type ReactNode } from 'react'
import type { LocaleSnapshot } from '@deepseek-ai/dsh-client-locale/client'
@@ -99,7 +100,7 @@ function subjectOf(owner: unknown): PluginsSubject | undefined {
return typeof owner === 'object' && owner !== null && 'subject' in owner ? (owner as PluginDetailProps).subject : undefined
}
-const NO_CONFIG: ConfigLedger = { items: [], bundles: new Set(), rows: new Set() }
+const NO_CONFIG: ConfigLedger = { items: [], bundles: new Set(), rows: new Set(), sections: [] }
function renderTab(
state: Partial = {}, config: Partial = {},
@@ -114,6 +115,8 @@ function renderTab(
const ledger = createSnapshotStore({ ...NO_CONFIG, ...config })
const tabLedger = createSnapshotStore(tabs)
const bundleDetails = createSnapshotStore({})
+ const clientSync = createSnapshotStore({ syncing: false, failures: [] })
+ const retryClient = vi.fn()
const actions = {
ensure: vi.fn(),
refresh: vi.fn(),
@@ -170,6 +173,8 @@ function renderTab(
t,
resolveText,
...actions,
+ useClientSync: bindSnapshotSelector(clientSync),
+ retryClient,
usePluginManager: bindSnapshotSelector(store),
useConfigLedger: bindSnapshotSelector(ledger),
usePluginTabs: bindSnapshotSelector(tabLedger),
@@ -186,6 +191,10 @@ function renderTab(
stub.publish(forms[id]!.state as ConfigFormSnapshot)
return { ...stub.scope, mutate: forms[id]!.mutate }
},
+ renderFactorySlot: ((name: string, factoryProps: SettingsSectionViewProps) => {
+ if (name !== 'settings.section.view') throw new Error(`Plugin manager fixture renders no Factory ${name}`)
+ return bodies[`settings.section:${factoryProps.id}`]?.('page', { close: factoryProps.close }) ?? null
+ }) as PluginManagerPageProps['renderFactorySlot'],
renderSlot: (name, owner, opts) => {
const body = bodies[`${name}:${opts?.only ?? opts?.entryKey ?? ''}`]
if (body === undefined) return null
@@ -219,6 +228,8 @@ function renderTab(
actions,
set: (next: Partial) => { act(() => { store.set({ ...store.getSnapshot(), ...next }) }) },
setDetails: (next: BundleDetailsState) => { act(() => { bundleDetails.set(next) }) },
+ setClientSync: (next: ClientEntryState) => { act(() => { clientSync.set(next) }) },
+ retryClient,
setLanguage: (dict: typeof en) => {
locale.setLocale(dict === zh ? 'zh' : 'en')
currentT = translate(dict)
@@ -228,6 +239,23 @@ function renderTab(
}
describe('PluginManagerPage', () => {
+ it('reports this page\'s client plugin synchronization on every view and retries it', () => {
+ const { setClientSync, retryClient } = renderTab({ status: 'unavailable', packages: [] })
+ expect(document.querySelector('[data-client-sync-failure]')).toBeNull()
+ expect(screen.queryByText(en.clientSyncing)).toBeNull()
+ setClientSync({ syncing: true, failures: [{ id: '@fixture/live', message: 'download failed' }] })
+ expect(screen.getByText(en.clientSyncing).getAttribute('role')).toBe('status')
+ const notice = document.querySelector('[data-client-sync-failure]') as HTMLElement
+ expect(within(notice).getByRole('alert').textContent).toBe(en.clientSyncFailed)
+ expect(within(notice).getByText('@fixture/live: download failed')).toBeTruthy()
+ const retry = within(notice).getByRole('button', { name: en.clientSyncRetry })
+ expect((retry as HTMLButtonElement).disabled).toBe(true)
+ setClientSync({ syncing: false, failures: [{ id: '@fixture/live', message: 'download failed' }] })
+ fireEvent.click(retry)
+ expect(retryClient).toHaveBeenCalledOnce()
+ expect(screen.queryByText(en.clientSyncing)).toBeNull()
+ })
+
it('shows no tabs without contributions, and switches between Installed and a contributed tab', () => {
const { actions, navigation, setTabs } = renderTab({ packages: [pkg()] }, {}, {
'plugins.tab:discover': (_view, owner) => {
@@ -1243,6 +1271,77 @@ describe('PluginManagerPage', () => {
expect(screen.getByRole('heading', { level: 3 }).textContent).toBe('个人工具')
})
+ describe('plugin settings pages', () => {
+ it('shows a settings page on the row whose module registered it, and its close returns to the bundle', () => {
+ renderTab(
+ { packages: [pkg({ rows: [row(), row({ rowId: 'other', entryId: 'include:other' as PluginEntryId, moduleName: 'dsh-other' })] })] },
+ { sections: [{ id: 'sidebar-settings', label: 'Sidebar settings', module: 'dsh-better-sidebar' }] },
+ { 'settings.section:sidebar-settings': (_view, owner) => (
+
+ ) },
+ )
+ fireEvent.click(screen.getByRole('button', { name: en.openDetail.replace('{name}', 'dsh-better-sidebar') }))
+ expect(screen.queryByRole('button', { name: en.configureRow.replace('{name}', 'dsh-other') })).toBeNull()
+ fireEvent.click(screen.getByRole('button', { name: en.configureRow.replace('{name}', 'dsh-better-sidebar') }))
+ const detail = document.querySelector('[data-plugin-row-detail="dsh-better-sidebar#sidebar"]') as HTMLElement
+ fireEvent.click(within(detail).getByRole('button', { name: 'Leave settings' }))
+ expect(document.querySelector('[data-plugin-row-detail]')).toBeNull()
+ expect(screen.getByRole('button', { name: en.configureRow.replace('{name}', 'dsh-better-sidebar') })).toBeTruthy()
+ })
+
+ it('keeps a row\'s own configuration instead of its settings page, and lists no unclaimed page', () => {
+ renderTab(
+ { packages: [pkg({ rows: [row()] })] },
+ {
+ rows: new Set(['dsh-better-sidebar#sidebar']),
+ sections: [
+ { id: 'sidebar-settings', label: 'Sidebar settings', module: 'dsh-better-sidebar' },
+ { id: 'loose', label: 'Loose settings', module: '@acme/loose' },
+ ],
+ },
+ {
+ 'plugins.row.config:dsh-better-sidebar#sidebar': view => view === 'page' ? : null,
+ 'settings.section:sidebar-settings': () => ,
+ 'settings.section:loose': () => ,
+ },
+ )
+ expect(screen.queryByText('Loose settings')).toBeNull()
+ fireEvent.click(screen.getByRole('button', { name: en.openDetail.replace('{name}', 'dsh-better-sidebar') }))
+ fireEvent.click(screen.getByRole('button', { name: en.configureRow.replace('{name}', 'dsh-better-sidebar') }))
+ expect(screen.getByRole('form', { name: 'own form' })).toBeTruthy()
+ expect(screen.queryByRole('form', { name: 'mirrored form' })).toBeNull()
+ expect(screen.queryByRole('form', { name: 'loose form' })).toBeNull()
+ })
+
+ it('shows a settings page the bundle package registered on the bundle page when no row is that package', () => {
+ renderTab(
+ { packages: [pkg({ rows: [row({ moduleName: 'dsh-other' })] })] },
+ { sections: [{ id: 'bundle-settings', label: 'Bundle settings', module: 'dsh-better-sidebar' }] },
+ { 'settings.section:bundle-settings': (_view, owner) => (
+
+ ) },
+ )
+ fireEvent.click(screen.getByRole('button', { name: en.openDetail.replace('{name}', 'dsh-better-sidebar') }))
+ expect(screen.queryByRole('button', { name: en.configureRow.replace('{name}', 'dsh-other') })).toBeNull()
+ fireEvent.click(screen.getByRole('button', { name: 'Leave bundle settings' }))
+ expect(screen.getByRole('button', { name: en.openDetail.replace('{name}', 'dsh-better-sidebar') })).toBeTruthy()
+ })
+
+ it('keeps a bundle\'s own configuration instead of the settings page its package registered', () => {
+ renderTab(
+ { packages: [pkg({ rows: [row({ moduleName: 'dsh-other' })] })] },
+ { bundles: new Set(['dsh-better-sidebar']), sections: [{ id: 'bundle-settings', label: 'Bundle settings', module: 'dsh-better-sidebar' }] },
+ {
+ 'plugins.bundle.config:dsh-better-sidebar': () => ,
+ 'settings.section:bundle-settings': () => ,
+ },
+ )
+ fireEvent.click(screen.getByRole('button', { name: en.openDetail.replace('{name}', 'dsh-better-sidebar') }))
+ expect(screen.getByRole('form', { name: 'bundle form' })).toBeTruthy()
+ expect(screen.queryByRole('form', { name: 'mirrored bundle form' })).toBeNull()
+ })
+ })
+
describe('configuration pages', () => {
const bodies: SlotBodies = {
'plugins.item:bash': view => view === 'summary' ? 'Limits every command.' : ,
diff --git a/packages/client/ui-plugin-manager/tests/config-ledger.client.spec.ts b/packages/client/ui-plugin-manager/tests/config-ledger.client.spec.ts
index 025fe9c16c..9caaa8e955 100644
--- a/packages/client/ui-plugin-manager/tests/config-ledger.client.spec.ts
+++ b/packages/client/ui-plugin-manager/tests/config-ledger.client.spec.ts
@@ -6,12 +6,13 @@ import { tabLedgerSource } from '../src/client/tab-ledger.ts'
interface Registration {
options: { id?: string; key?: string; label?: string | (() => string) }
+ module?: string
}
/** A slot registry and locale stand-in: ledgers by slot, versions that move on registration, and a locale revision. */
function bench() {
- const entries: Record = { 'plugins.item': [], 'plugins.bundle.config': [], 'plugins.row.config': [], 'plugins.tab': [] }
- const versions: Record = { 'plugins.item': 0, 'plugins.bundle.config': 0, 'plugins.row.config': 0, 'plugins.tab': 0 }
+ const entries: Record = { 'plugins.item': [], 'plugins.bundle.config': [], 'plugins.row.config': [], 'plugins.tab': [], 'settings.section': [] }
+ const versions: Record = { 'plugins.item': 0, 'plugins.bundle.config': 0, 'plugins.row.config': 0, 'plugins.tab': 0, 'settings.section': 0 }
const listeners = new Map void>>()
const localeListeners = new Set<() => void>()
let revision = 0
@@ -36,8 +37,8 @@ function bench() {
}
return {
ctx: ctx as never,
- register: (name: string, options: Registration['options']): void => {
- entries[name]?.push({ options })
+ register: (name: string, options: Registration['options'], module?: string): void => {
+ entries[name]?.push(module === undefined ? { options } : { options, module })
versions[name] = (versions[name] ?? 0) + 1
for (const listener of listeners.get(name) ?? []) listener()
},
@@ -53,18 +54,21 @@ describe('configLedgerSource', () => {
it('projects the official items in ledger order with locale-following labels, and the bundle and row keys', () => {
const b = bench()
const source = configLedgerSource(b.ctx)
- expect(source.getSnapshot()).toEqual({ items: [], bundles: new Set(), rows: new Set() })
+ expect(source.getSnapshot()).toEqual({ items: [], bundles: new Set(), rows: new Set(), sections: [] })
let title = 'Shell'
b.register('plugins.item', { id: 'bash', label: () => title })
b.register('plugins.item', { id: 'loop', label: 'Agent loop' })
b.register('plugins.bundle.config', { key: 'dsh-x' })
b.register('plugins.row.config', { key: rowConfigKey('dsh-x', 'row') })
+ b.register('settings.section', { id: 'timeline', label: () => title }, '@scope/dsh-timeline')
+ b.register('settings.section', { id: 'loose', label: 'Loose' })
expect(source.getSnapshot()).toEqual({
items: [{ id: 'bash', label: 'Shell' }, { id: 'loop', label: 'Agent loop' }],
bundles: new Set(['dsh-x']),
rows: new Set(['dsh-x#row']),
+ sections: [{ id: 'timeline', label: 'Shell', module: '@scope/dsh-timeline' }, { id: 'loose', label: 'Loose' }],
})
// A label thunk is re-read when the locale moves, not before.
title = '终端'
@@ -78,8 +82,11 @@ describe('configLedgerSource', () => {
const source = configLedgerSource(b.ctx)
b.register('plugins.item', { id: 'bare' })
b.register('plugins.bundle.config', {})
+ b.register('settings.section', { id: 'unlabelled' })
- expect(source.getSnapshot()).toEqual({ items: [{ id: 'bare', label: '' }], bundles: new Set(), rows: new Set() })
+ expect(source.getSnapshot()).toEqual({
+ items: [{ id: 'bare', label: '' }], bundles: new Set(), rows: new Set(), sections: [{ id: 'unlabelled', label: 'unlabelled' }],
+ })
})
it('keeps its snapshot until a ledger or the locale moves, and follows every source while subscribed', () => {
diff --git a/packages/client/ui-plugin-manager/tests/manager-store.client.spec.ts b/packages/client/ui-plugin-manager/tests/manager-store.client.spec.ts
index eb44f8eeb5..9a1a095633 100644
--- a/packages/client/ui-plugin-manager/tests/manager-store.client.spec.ts
+++ b/packages/client/ui-plugin-manager/tests/manager-store.client.spec.ts
@@ -73,7 +73,7 @@ function deferred() {
/** A configuration ledger with nothing registered, as the page binds it beside the store. */
const NO_CONFIG: HostObservable = {
- getSnapshot: () => ({ items: [], bundles: new Set(), rows: new Set() }),
+ getSnapshot: () => ({ items: [], bundles: new Set(), rows: new Set(), sections: [] }),
subscribe: () => () => {},
}
diff --git a/packages/client/ui-plugin-manager/tests/settings-link.client.spec.tsx b/packages/client/ui-plugin-manager/tests/settings-link.client.spec.tsx
new file mode 100644
index 0000000000..f33b6f093a
--- /dev/null
+++ b/packages/client/ui-plugin-manager/tests/settings-link.client.spec.tsx
@@ -0,0 +1,21 @@
+// @vitest-environment jsdom
+/** The Settings entry that leaves Settings for the Plugins page. */
+import { cleanup, render } from '@testing-library/react'
+import { afterEach, describe, expect, it, vi } from 'vitest'
+import { PluginsSettingsLink, type PluginsSettingsLinkProps } from '../src/client/PluginsSettingsLink.tsx'
+
+afterEach(cleanup)
+
+describe('PluginsSettingsLink', () => {
+ it('closes Settings and opens the Plugins page when selected, rendering nothing', () => {
+ const calls: string[] = []
+ const props = {
+ close: vi.fn(() => { calls.push('close') }),
+ openPlugins: vi.fn(() => { calls.push('open') }),
+ } satisfies Pick
+ // The entry reads only its owner and injected members; the standard seats stay unused.
+ const { container } = render()
+ expect(calls).toEqual(['close', 'open'])
+ expect(container.childElementCount).toBe(0)
+ })
+})
diff --git a/packages/client/ui-plugin-manager/tsconfig.client.json b/packages/client/ui-plugin-manager/tsconfig.client.json
index c69aa45d5d..e50ea12aeb 100644
--- a/packages/client/ui-plugin-manager/tsconfig.client.json
+++ b/packages/client/ui-plugin-manager/tsconfig.client.json
@@ -39,6 +39,9 @@
{
"path": "../ui-primitives"
},
+ {
+ "path": "../modules"
+ },
{
"path": "../ui-renderer"
},
diff --git a/packages/client/ui-primitives/README.i18n.yaml b/packages/client/ui-primitives/README.i18n.yaml
index 3f7f83c00e..008c6b8907 100644
--- a/packages/client/ui-primitives/README.i18n.yaml
+++ b/packages/client/ui-primitives/README.i18n.yaml
@@ -18,8 +18,8 @@
en: 33a5b39959a595c6
zh: efd1088e9f13ed67
/deepseek-ai-dsh-client-ui-primitives/use-this-package/component-catalog:
- en: 11686b52743a702d
- zh: d865bb79d8f56ee1
+ en: 320dba9d3737458f
+ zh: efd132302c7e17f4
/deepseek-ai-dsh-client-ui-primitives/use-this-package/controls-and-icons:
en: fd3499ef403a0594
zh: 3a17727316d3c666
diff --git a/packages/client/ui-primitives/README.md b/packages/client/ui-primitives/README.md
index 3e9d16c2a6..cc25340659 100644
--- a/packages/client/ui-primitives/README.md
+++ b/packages/client/ui-primitives/README.md
@@ -90,7 +90,7 @@ Four pairs are easy to confuse:
- **`Tag` against `Pill`.** Reach for `Tag` for a read-only badge at the 11px capsule size, and for `Pill` when the capsule is selectable (`active` and `onClick`, as view switchers and filters use) or when it must sit on a 24px text line — `TerminalBlock` renders its exit status as a static `Pill` for exactly that reason. Size decides as much as interactivity here; the two are not interchangeable.
- **`Pill` against `SegmentedControl`.** A row of `Pill`s is a set of independent chips — each one toggles on its own, and several may be active. `SegmentedControl` is one choice among a few mutually exclusive modes, drawn as a tablist with one indicator, and it comes with the tab keyboard pattern (arrow keys walk the segments, only the selected one is in the tab sequence); the Models settings add card switches its two forms with it.
-- **`DisclosureRow` against a card.** The row lays its title and content side by side at a fixed 24px. A card that stacks a name over a description is a different layout, and belongs in the feature package — `ui-settings-plugins`' `PluginCard` is the precedent and records why.
+- **`DisclosureRow` against a card.** The row lays its title and content side by side at a fixed 24px. A card that stacks a name over a description is a different layout, and belongs in the feature package — `ui-plugin-manager`'s `CardHead` is the precedent.
- **`FoldToggle` against the exported surface.** It is package-internal and not exported; the output cards use it for their head-tail fold.
Writing your own component in your own package is fine when the need is genuinely specific. What is not fine is copying a control that already exists here — and once a second package needs the same control, it belongs in this package.
diff --git a/packages/client/ui-primitives/README.zh.md b/packages/client/ui-primitives/README.zh.md
index 4cb97d0d12..9ca3abc2ba 100644
--- a/packages/client/ui-primitives/README.zh.md
+++ b/packages/client/ui-primitives/README.zh.md
@@ -90,7 +90,7 @@ kind: "package-library"
- **`Tag` 与 `Pill`。** 11px 胶囊尺寸的只读徽章用 `Tag`;胶囊可选中(`active` 与 `onClick`,视图切换与筛选器就是这样用的),或者必须落在 24px 文本行上时用 `Pill`——`TerminalBlock` 把退出状态渲染成静态 `Pill` 正是后一种情况。这里尺寸和是否可交互同样是判据,两者不可互换。
- **`Pill` 与 `SegmentedControl`。** 一排 `Pill` 是一组彼此独立的 chip——每个各自开关,可以同时激活多个。`SegmentedControl` 是在几种互斥模式中选一,画成带一个指示块的 tablist,并自带 tab 键盘模式(方向键在分段间移动,只有选中项在 Tab 序列里);模型设置页的新增卡片就用它切换两张表单。
-- **`DisclosureRow` 与卡片。** 该行以固定 24px 把标题与内容左右排列。把名称叠在描述之上的卡片是另一种布局,属于功能包——`ui-settings-plugins` 的 `PluginCard` 是先例,并记录了原因。
+- **`DisclosureRow` 与卡片。** 该行以固定 24px 把标题与内容左右排列。把名称叠在描述之上的卡片是另一种布局,属于功能包——`ui-plugin-manager` 的 `CardHead` 是先例。
- **`FoldToggle` 与对外导出面。** 它是包内组件,未导出;输出卡片用它做头尾折叠。
需求确实特殊时,在自己的包里写自己的组件没有问题。不可以的是复制这里已有的控件——而当第二个包需要同一个控件时,它就该住进本包。
diff --git a/packages/client/ui-renderer/src/client/registry.ts b/packages/client/ui-renderer/src/client/registry.ts
index 4c3f520c8a..a3e7b3e8c6 100644
--- a/packages/client/ui-renderer/src/client/registry.ts
+++ b/packages/client/ui-renderer/src/client/registry.ts
@@ -97,6 +97,7 @@ interface ErasedRegisterOptions {
/** Declared dictionary namespace (the renderer synthesizes the `t` seat from it). */
locale?: string
registrant?: string
+ module?: string
}
interface ErasedFactoryOptions {
@@ -116,6 +117,29 @@ interface ErasedFactoryCore { registerFactory(options: object, component: unknow
/** One synchronous effect installed while an injected slot declaration is live. */
type SlotInjectionEffect = (() => void) | Iterable<() => void, void, void>
+/**
+ * Name the Loader entry that owns a calling Context: the nearest fiber, walking
+ * up through nested plugins, that the Loader attached an entry to.
+ * @param ctx - the caller's Context.
+ * @returns the entry's module name, which the client module system sets to the package name.
+ */
+function entryName(ctx: Context): string | undefined {
+ // The Loader augments fibers with `entry`; this package does not depend on the Loader's types.
+ let fiber = ctx.fiber as EntryFiber
+ for (;;) {
+ if (fiber.entry !== undefined) return fiber.entry.options.name
+ const parent = fiber.parent.fiber
+ if (parent === fiber) return undefined
+ fiber = parent
+ }
+}
+
+/** The fiber members {@link entryName} reads: the Loader's entry and the parent chain ending at the root fiber. */
+interface EntryFiber {
+ readonly entry?: { readonly options: { readonly name: string } } | undefined
+ readonly parent: { readonly fiber: EntryFiber }
+}
+
/** cordis Service layer of the slot system; see the module doc for the split with SlotCore. */
export class SlotRegistry extends Service {
private readonly _core = new SlotCore()
@@ -479,10 +503,12 @@ export class SlotRegistry extends Service {
// core's shared-handle scope pinning applies to it harmlessly).
const store = typeof options.store === 'function' ? options.store() : options.store
const registrant = options.registrant ?? (this.ctx.fiber as { name?: string } | undefined)?.name
+ const module = entryName(this.ctx)
const erased: ErasedRegisterOptions = {
...options,
...(store !== undefined ? { store } : {}),
...(registrant !== undefined ? { registrant } : {}),
+ ...(module !== undefined ? { module } : {}),
}
// Core write first: all load-time validation (undeclared target,
// duplicate declaration, kind conflicts, cross-scope handle) throws
diff --git a/packages/client/ui-renderer/tests/registry.client.spec.ts b/packages/client/ui-renderer/tests/registry.client.spec.ts
index 43ee101f93..27de92ff74 100644
--- a/packages/client/ui-renderer/tests/registry.client.spec.ts
+++ b/packages/client/ui-renderer/tests/registry.client.spec.ts
@@ -245,6 +245,25 @@ describe('Factory definition ledger', () => {
})
})
+describe('registering package', () => {
+ it('stamps the nearest Loader entry name, walking up through nested plugins, and nothing outside an entry', async () => {
+ const b = await boot()
+ b.erased.register({ name: 'root', children: { 't.rows': { kind: 'list', scope: 'root' } } }, C)
+ let outer: Context | undefined, inner: Context | undefined
+ await b.ctx.plugin({ inject: ['slots'], apply: (ctx: Context) => {
+ outer = ctx
+ ctx.plugin({ inject: ['slots'], apply: (child: Context) => { inner = child } })
+ } })
+ Object.assign(outer!.fiber, { entry: { options: { name: '@acme/dsh-rows' } } })
+ inner!.slots.register({ name: 't.rows', id: 'nested' }, C)
+ outer!.slots.register({ name: 't.rows', id: 'outer' }, C)
+ b.erased.register({ name: 't.rows', id: 'root' }, C)
+ expect(b.svc.entries('t.rows').map(entry => [entry.options.id, entry.module])).toEqual([
+ ['nested', '@acme/dsh-rows'], ['outer', '@acme/dsh-rows'], ['root', undefined],
+ ])
+ })
+})
+
describe("built-in 'root'", () => {
it('is declared at construction: spec readable, occupancy open, no plugin needed', async () => {
const bench = await boot()
diff --git a/packages/client/ui-settings-general/README.i18n.yaml b/packages/client/ui-settings-general/README.i18n.yaml
index a3e6d06c2b..1bbfb63a97 100644
--- a/packages/client/ui-settings-general/README.i18n.yaml
+++ b/packages/client/ui-settings-general/README.i18n.yaml
@@ -15,8 +15,8 @@
en: 83760d53b3ee5fb8
zh: 30dd8802d4ffdcb7
/deepseek-ai-dsh-client-ui-settings-general/use-this-package:
- en: 8ae337011190f5f3
- zh: 508eca60c6fcdc34
+ en: 3f25debd8877c4bd
+ zh: 51f0c1d6924550f1
/deepseek-ai-dsh-client-ui-settings-general/use-this-package/the-general-section:
en: de35e867b2a56d73
zh: 6d4e5c912636f889
diff --git a/packages/client/ui-settings-general/README.md b/packages/client/ui-settings-general/README.md
index a7782b0518..8e5c7ef0d3 100644
--- a/packages/client/ui-settings-general/README.md
+++ b/packages/client/ui-settings-general/README.md
@@ -29,7 +29,7 @@ In browsers below 768px viewport width, the panel fills the viewport and navigat
## Use this package
-Users reach the shell through the sidebar's bottom Settings control; feature plugins contribute their pages and onboarding steps through the slot ledgers this shell projects. In both the expanded sidebar and collapsed rail, the control exposes the localized Settings label as its accessible name. A pale-yellow **Disconnected** action beside Settings indicates browser offline suspension; its permanent retry glyph marks the retry action, which the Chinese outage copy also names (连接异常,刷新重试). Every recovery attempt shows the shared ongoing loader beside **Reconnecting** with one to three dots advancing every 500ms, and an attempt stays visible for at least 800ms so brief retries do not flicker. Selecting either yellow state starts an immediate retry; press feedback stays within the warning palette. Recovery changes the region to pale-green **Connected** for two seconds from the moment the green pill becomes visible. The pill fades in on appearance, fades out over 150ms on removal, and sizes to its current label. Initial startup and uninterrupted healthy operation remain silent. The shell renders the modal panel, the navigation built from `settings.section` entries, and exactly one mounted onboarding step at a time.
+Users reach the shell through the sidebar's bottom Settings control; feature plugins contribute their pages and onboarding steps through the slot ledgers this shell projects. In both the expanded sidebar and collapsed rail, the control exposes the localized Settings label as its accessible name. A pale-yellow **Disconnected** action beside Settings indicates browser offline suspension; its permanent retry glyph marks the retry action, which the Chinese outage copy also names (连接异常,刷新重试). Every recovery attempt shows the shared ongoing loader beside **Reconnecting** with one to three dots advancing every 500ms, and an attempt stays visible for at least 800ms so brief retries do not flicker. Selecting either yellow state starts an immediate retry; press feedback stays within the warning palette. Recovery changes the region to pale-green **Connected** for two seconds from the moment the green pill becomes visible. The pill fades in on appearance, fades out over 150ms on removal, and sizes to its current label. Initial startup and uninterrupted healthy operation remain silent. The shell registers the `settings.section.view` Component Factory, which declares `settings.section`, and renders the modal panel, the navigation built from `settings.section` entries, the selected page through that Factory with a `close` that closes the panel, and exactly one mounted onboarding step at a time.
In a browser below 768px, the body-portaled panel fills the CSS layout viewport without additional safe-area padding and covers the mask. It keeps a fixed layout height rather than measuring the software keyboard; focused controls rely on the browser’s native viewport panning.
diff --git a/packages/client/ui-settings-general/README.zh.md b/packages/client/ui-settings-general/README.zh.md
index a9e949c08e..4012c252d6 100644
--- a/packages/client/ui-settings-general/README.zh.md
+++ b/packages/client/ui-settings-general/README.zh.md
@@ -29,7 +29,7 @@ kind: "package-reference"
## 使用本包
-用户通过侧边栏底部的 Settings 控件进入外壳;功能插件通过本外壳所投影的 slot 账本贡献自己的页面与引导步骤。在展开侧边栏和收起轨道中,该控件都会把本地化的 Settings 文案作为其可访问名称。Settings 右侧浅黄色的**连接异常**操作表示浏览器离线暂停;其常驻重试图形与中文文案「连接异常,刷新重试」都指明重试动作。每次恢复尝试都显示共享 ongoing loading 加**重新连接中**,其后一至三个点每 500ms 前进一次,且每次尝试至少可见 800ms,短暂重试不会闪动。选中任一黄色状态都会立即发起重试;按压反馈留在黄色色阶内。恢复后该区域变为浅绿色的**连接成功**,从绿色药丸可见起驻留 2 秒再消失。药丸出现时淡入、移除时以 150ms 淡出,宽度随当前文案自适应。首次启动与未曾中断的健康连接保持静默。外壳渲染模态面板、由 `settings.section` 条目构建的导航,以及每次只挂载一个的引导步骤。
+用户通过侧边栏底部的 Settings 控件进入外壳;功能插件通过本外壳所投影的 slot 账本贡献自己的页面与引导步骤。在展开侧边栏和收起轨道中,该控件都会把本地化的 Settings 文案作为其可访问名称。Settings 右侧浅黄色的**连接异常**操作表示浏览器离线暂停;其常驻重试图形与中文文案「连接异常,刷新重试」都指明重试动作。每次恢复尝试都显示共享 ongoing loading 加**重新连接中**,其后一至三个点每 500ms 前进一次,且每次尝试至少可见 800ms,短暂重试不会闪动。选中任一黄色状态都会立即发起重试;按压反馈留在黄色色阶内。恢复后该区域变为浅绿色的**连接成功**,从绿色药丸可见起驻留 2 秒再消失。药丸出现时淡入、移除时以 150ms 淡出,宽度随当前文案自适应。首次启动与未曾中断的健康连接保持静默。外壳注册声明 `settings.section` 的 `settings.section.view` Component Factory,并渲染模态面板、由 `settings.section` 条目构建的导航、经该 Factory 渲染且以关闭面板为 `close` 的所选页面,以及每次只挂载一个的引导步骤。
浏览器宽度低于 768px 时,挂载到 body 的面板铺满 CSS 布局视口并覆盖遮罩,不额外留出安全区边距。面板保持固定布局高度,不测量软键盘;获得焦点的控件依赖浏览器原生的视口平移来露出。
diff --git a/packages/client/ui-settings-general/src/client/SettingsRoot.tsx b/packages/client/ui-settings-general/src/client/SettingsRoot.tsx
index 95e74201b7..e461d65868 100644
--- a/packages/client/ui-settings-general/src/client/SettingsRoot.tsx
+++ b/packages/client/ui-settings-general/src/client/SettingsRoot.tsx
@@ -44,6 +44,7 @@ function navIcon(id: string) {
type PanelProps = {
rows: readonly SettingsSectionRow[]
renderSlot: SettingsRootComponentProps['renderSlot']
+ renderFactorySlot: SettingsRootComponentProps['renderFactorySlot']
activeId: string | undefined
onSelect: (id: string) => void
onClose: () => void
@@ -54,7 +55,7 @@ type PanelProps = {
* header button, a mask click, and document-level Escape (mounted only while
* open, so the listener lifetime is the panel's).
*/
-function SettingsPanel({ rows, renderSlot, activeId, onSelect, onClose }: PanelProps) {
+function SettingsPanel({ rows, renderSlot, renderFactorySlot, activeId, onSelect, onClose }: PanelProps) {
// Entries can unmount underneath the requested id, so the render-time
// projection falls back to the first row when the id is gone.
const active = rows.find(r => r.id === activeId)?.id ?? rows[0]?.id
@@ -106,7 +107,7 @@ function SettingsPanel({ rows, renderSlot, activeId, onSelect, onClose }: PanelP