fix: align supervisor settings layout and default model naming

Group settings tabs and forms in a single surface with consistent spacing. Rename the model section to cover model selection and execution limits, and use Default model for the default connection option.

Release note: 修复监督者设置页签与表单贴边的问题,统一设置布局,并将默认模型选项名称改为默认模型。
This commit is contained in:
mesalogo
2026-10-03 23:43:58 +08:00
parent 352da66dbd
commit 0e9c9d4927
6 changed files with 99 additions and 10 deletions
+3 -3
View File
@@ -579,10 +579,10 @@ describe('HeartbeatCenter', () => {
expect(screen.queryByRole('heading', { name })).not.toBeInTheDocument()
}
fireEvent.click(screen.getByRole('tab', { name: '设置' }))
expect(screen.getByRole('heading', { level: 2, name: '模型超时与并发' })).toBeInTheDocument()
expect(screen.getByRole('heading', { level: 2, name: '模型与运行限制' })).toBeInTheDocument()
fireEvent.click(screen.getByRole('tab', { name: '回顾整理' }))
expect(screen.getByRole('heading', { level: 2, name: '回顾算法' })).toBeInTheDocument()
expect(screen.queryByRole('heading', { name: '模型超时与并发' })).not.toBeInTheDocument()
expect(screen.queryByRole('heading', { name: '模型与运行限制' })).not.toBeInTheDocument()
fireEvent.click(screen.getByRole('tab', { name: '故事与经验' }))
expect(screen.getByRole('switch', { name: '跨项目关联' })).toBeVisible()
fireEvent.click(screen.getByRole('tab', { name: '建议' }))
@@ -691,7 +691,7 @@ describe('HeartbeatCenter', () => {
expect(screen.queryByRole('region', { name: '心跳计划' })).not.toBeInTheDocument()
fireEvent.click(screen.getByRole('tab', { name: '设置' }))
expect(screen.getAllByRole('heading', { level: 1 })).toHaveLength(1)
expect(screen.getByRole('heading', { name: '模型超时与并发' })).toBeInTheDocument()
expect(screen.getByRole('heading', { name: '模型与运行限制' })).toBeInTheDocument()
})
it('keeps an unsaved draft when switching settings tabs', () => {
@@ -44,10 +44,10 @@ export const heartbeat = {
},
timeouts: {
model: 'Model',
followDefault: 'Follow app default',
followDefault: 'Default model',
unavailableModel: 'Selected model is unavailable',
modelHelp: 'Uses an existing text model for reviews, summaries, stories, experiences, and suggestions. Saving affects the next execution, including continue or retry; a review already running keeps its model.',
title: 'Model timeouts and concurrency',
title: 'Model and execution limits',
report: 'Heartbeat report timeout (seconds)',
organize: 'Supervisor organize timeout (seconds)',
help: 'The organize timeout defaults to 240 seconds, adjustable from 30 to 600. Reviews save it at creation and retain it when continued; suggestions use the same limit.',
@@ -41,10 +41,10 @@ export const heartbeat = {
},
timeouts: {
model: '模型',
followDefault: '跟随应用默认',
followDefault: '默认模型',
unavailableModel: '所选模型已不可用',
modelHelp: '复用已有文本模型,用于回顾、汇总、故事、经验和建议。保存后从下次执行生效,包括继续或重试;正在运行的回顾保持原模型。',
title: '模型超时与并发',
title: '模型与运行限制',
report: '心跳报告超时(秒)',
organize: '监督者整理超时(秒)',
help: '整理超时默认 240 秒,可设置为 30 至 600 的整数秒。回顾在创建时保存整理超时,继续时沿用;生成建议使用同一上限。',
+31 -1
View File
@@ -1116,6 +1116,36 @@
gap: var(--space-3);
}
.supervisor-settings {
display: flex;
flex: 0 0 auto;
min-width: 0;
flex-direction: column;
gap: var(--space-6);
padding: var(--space-4);
border: 1px solid var(--border-default);
border-radius: var(--radius-card);
background: var(--surface-raised);
}
.supervisor-settings > .page-tabs {
align-self: flex-start;
}
.supervisor-settings .heartbeat-settings__editor {
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
gap: var(--space-4);
overflow-wrap: anywhere;
}
.supervisor-settings .heartbeat-settings__editor > p {
margin: 0;
color: var(--text-secondary);
}
.supervisor-center__sections .heartbeat-settings__editor > h2 {
margin: 0;
font-size: var(--font-section-title);
@@ -1326,4 +1356,4 @@
margin: var(--space-1) 0 0;
padding-inline-start: 1.1em;
color: var(--text-muted);
}
}