{renderSlot('settings.launcher', {
wide, settingsOpen: open, openSettings,
diff --git a/packages/client/ui-settings-general/tests/settings-root.client.spec.tsx b/packages/client/ui-settings-general/tests/settings-root.client.spec.tsx
index 5401b7f1ca..0d37968a37 100644
--- a/packages/client/ui-settings-general/tests/settings-root.client.spec.tsx
+++ b/packages/client/ui-settings-general/tests/settings-root.client.spec.tsx
@@ -563,7 +563,7 @@ it('passes current Settings key labels to the launcher and removes them when unb
it('renders the notice row before the launcher row and opens the requested section', () => {
const { renderSlot } = mount({ rows: [{ id: 'general', order: 0, label: 'General' }, { id: 'account', order: 1, label: 'Account' }] })
- const notice = screen.getByText('Account notice')
+ const notice = screen.getByText('Account notice').parentElement!
expect(notice.nextElementSibling?.contains(screen.getByRole('button', { name: 'Settings' }))).toBe(true)
const owner = renderSlot.mock.calls.find(call => call[0] === 'settings.notice')!
act(() => { (owner[1] as { openSettings: (sectionId?: string) => void }).openSettings('account') })
@@ -572,12 +572,12 @@ it('renders the notice row before the launcher row and opens the requested secti
it('hides the notice row in the collapsed rail and keeps the same node', () => {
const { setWide } = mount()
- const notice = screen.getByText('Account notice')
+ const notice = screen.getByText('Account notice').parentElement!
expect(notice.hidden).toBe(false)
setWide(false)
- expect(screen.getByText('Account notice')).toBe(notice)
+ expect(screen.getByText('Account notice').parentElement).toBe(notice)
expect(notice.hidden).toBe(true)
setWide(true)
- expect(screen.getByText('Account notice')).toBe(notice)
+ expect(screen.getByText('Account notice').parentElement).toBe(notice)
expect(notice.hidden).toBe(false)
})
diff --git a/packages/client/ui-settings/README.i18n.yaml b/packages/client/ui-settings/README.i18n.yaml
index e5d13e8d74..6c4ca00638 100644
--- a/packages/client/ui-settings/README.i18n.yaml
+++ b/packages/client/ui-settings/README.i18n.yaml
@@ -30,8 +30,8 @@
en: 9767f17ca0f02ae3
zh: 8e475d6d3d670702
/deepseek-ai-dsh-client-ui-settings/understand-the-implementation:
- en: 7a9fc968f3dd3f3c
- zh: 7b01a38e40fbed24
+ en: 6741f576de0585c2
+ zh: 5b621d137e52b63e
/deepseek-ai-dsh-client-ui-settings/understand-the-implementation/the-describe-mirror:
en: 0cd270ddcac46776
zh: 4e03bf1d153b3f04
diff --git a/packages/client/ui-settings/README.md b/packages/client/ui-settings/README.md
index ef17bb5079..6cb716d1dc 100644
--- a/packages/client/ui-settings/README.md
+++ b/packages/client/ui-settings/README.md
@@ -55,7 +55,7 @@ A committed write folds its answer into the shared mirror. Refused writes refres
## Understand the implementation
-The optional `settings.launcher` contribution receives sidebar geometry, whether the open Settings panel covers the sidebar, the settings navigation callbacks, and the effective Settings key labels and accessible combination. The shell omits shortcut presentation for an unbound command and retains its plain Settings trigger when no launcher is registered. The launcher can pass a section ID to openSettings to open that section directly; an absent ID uses the default section. The optional `settings.notice` contribution receives openSettings and renders in a full-width row above the launcher row; the shell hides that row in the collapsed rail without unmounting it.
+The optional `settings.launcher` contribution receives sidebar geometry, whether the open Settings panel covers the sidebar, the settings navigation callbacks, and the effective Settings key labels and accessible combination. The shell omits shortcut presentation for an unbound command and retains its plain Settings trigger when no launcher is registered. The launcher can pass a section ID to openSettings to open that section directly; an absent ID uses the default section. The optional `settings.notice` contribution receives openSettings and renders in a zero-height, full-width row above the launcher row, floating over the sidebar list; the shell hides that row in the collapsed rail without unmounting it.
Implementation internals — click to expand
diff --git a/packages/client/ui-settings/README.zh.md b/packages/client/ui-settings/README.zh.md
index 31f67d216a..ba4e030086 100644
--- a/packages/client/ui-settings/README.zh.md
+++ b/packages/client/ui-settings/README.zh.md
@@ -55,7 +55,7 @@ kind: "package-reference"
## 理解实现
-可选的 `settings.launcher` 贡献接收侧栏布局、设置面板是否覆盖侧栏、设置导航回调,以及有效的设置键位标签和无障碍组合。命令未绑定时,外壳不传快捷键展示信息;未注册入口时,外壳保留普通设置按钮。 入口可以向 openSettings 传入分区 ID,直接打开对应分区;未传 ID 时使用默认分区。可选的 `settings.notice` 贡献接收 openSettings,渲染在入口行上方的满宽行中;折叠轨道中外壳隐藏该行但不卸载它。
+可选的 `settings.launcher` 贡献接收侧栏布局、设置面板是否覆盖侧栏、设置导航回调,以及有效的设置键位标签和无障碍组合。命令未绑定时,外壳不传快捷键展示信息;未注册入口时,外壳保留普通设置按钮。 入口可以向 openSettings 传入分区 ID,直接打开对应分区;未传 ID 时使用默认分区。可选的 `settings.notice` 贡献接收 openSettings,渲染在入口行上方零高度的满宽行中,浮在侧栏列表之上;折叠轨道中外壳隐藏该行但不卸载它。
实现细节——点击展开
diff --git a/packages/client/ui-settings/src/client/contract/slots.ts b/packages/client/ui-settings/src/client/contract/slots.ts
index 8df37d3abc..d1b72304d5 100644
--- a/packages/client/ui-settings/src/client/contract/slots.ts
+++ b/packages/client/ui-settings/src/client/contract/slots.ts
@@ -31,8 +31,9 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
/** Optional sidebar account launcher; opens the shell-owned settings panel. */
'settings.launcher': { kind: 'single'; scope: 'root'; owner: SettingsLauncherOwnerProps }
/**
- * Optional row above the launcher row, at the launcher row's full width;
- * the shell hides it in the rail without unmounting it.
+ * Optional content anchored above the launcher row at its full width. The
+ * row takes no height, so the content floats over the sidebar list; the
+ * shell hides it in the rail without unmounting it.
*/
'settings.notice': { kind: 'single'; scope: 'root'; owner: SettingsNoticeOwnerProps }
diff --git a/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts b/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts
index 7d8e90533c..ec48da6877 100644
--- a/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts
+++ b/packages/extensions/cordis-client-runner/src/client/slot-catalog.ts
@@ -3952,7 +3952,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.action\', () => ctx.slots.register(\n { name: \'settings.action\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:59',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:60',
},
{
key: 'settings.close',
@@ -3986,7 +3986,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'shadows-shipped-ui',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.close\', () => ctx.slots.register(\n { name: \'settings.close\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:65',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:66',
},
{
key: 'settings.general.item',
@@ -4051,7 +4051,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.general.item\', () => ctx.slots.register(\n { name: \'settings.general.item\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:114',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:115',
},
{
key: 'settings.header',
@@ -4085,7 +4085,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'shadows-shipped-ui',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.header\', () => ctx.slots.register(\n { name: \'settings.header\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:53',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:54',
},
{
key: 'settings.launcher',
@@ -4283,8 +4283,8 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
key: 'settings.notice',
kind: 'single',
scope: 'root',
- summary: 'Optional row above the launcher row, at the launcher row\'s full width; the shell hides it in the rail without unmounting it.',
- doc: 'Optional row above the launcher row, at the launcher row\'s full width;\nthe shell hides it in the rail without unmounting it.',
+ summary: 'Optional content anchored above the launcher row at its full width.',
+ doc: 'Optional content anchored above the launcher row at its full width. The\nrow takes no height, so the content floats over the sidebar list; the\nshell hides it in the rail without unmounting it.',
registerOptions: [],
ownerProps: [
'/** Settings navigation for the row above the launcher row. */\nexport interface SettingsNoticeOwnerProps {\n /** @param sectionId - section to open; absent uses the shell\'s default section. */\n openSettings: (sectionId?: string) => void\n}',
@@ -4311,7 +4311,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'shadows-shipped-ui',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.notice\', () => ctx.slots.register(\n { name: \'settings.notice\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:37',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:38',
},
{
key: 'settings.onboarding',
@@ -4365,7 +4365,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.onboarding\', () => ctx.slots.register(\n { name: \'settings.onboarding\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:99',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:100',
},
{
key: 'settings.section',
@@ -4422,7 +4422,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.section\', () => ctx.slots.register(\n { name: \'settings.section\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:80',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:81',
},
{
key: 'settings.section.icon',
@@ -4473,7 +4473,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
occupants: [],
replaceRisk: 'none',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.section.icon\', () => ctx.slots.register(\n { name: \'settings.section.icon\', id: \'my-entry\', order: 100, label: \'My entry\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:88',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:89',
},
{
key: 'settings.trigger',
@@ -4507,7 +4507,7 @@ export const CLIENT_SLOT_API: readonly ClientSlotEntry[] = [
],
replaceRisk: 'shadows-shipped-ui',
example: 'return {\n inject: [\'slots\'],\n apply(ctx) {\n ctx.slots.inject(\'settings.trigger\', () => ctx.slots.register(\n { name: \'settings.trigger\' },\n () => React.createElement(\'div\', null, \'hello\'),\n ))\n },\n}',
- source: 'packages/client/ui-settings/src/client/contract/slots.ts:47',
+ source: 'packages/client/ui-settings/src/client/contract/slots.ts:48',
},
{
key: 'shell.bottom',