fix(web): clarify coding view settings copy
This commit is contained in:
1 parent
167fea0723
commit
e1cbde3af1
11 files changed
+23
-23
No files matched your search
@@ -354,7 +354,7 @@ describe('web e2e: agent-preset selection', () => {
|
||||
await dialog.getByRole('button', { name: 'New task default: Minimal mode' }).waitFor({ timeout: 10_000 })
|
||||
await expect.poll(() => livePreset(scaffold), { timeout: 15_000 }).toBe('minimal')
|
||||
await dialog.getByRole('button', { name: 'General', exact: true }).click()
|
||||
const developerTools = dialog.getByRole('switch', { name: 'Coding Tools' })
|
||||
const developerTools = dialog.getByRole('switch', { name: 'Show coding view' })
|
||||
await developerTools.click()
|
||||
await expect.poll(() => developerTools.getAttribute('aria-checked')).toBe('false')
|
||||
await dialog.getByRole('button', { name: 'Close' }).last().click()
|
||||
@@ -366,7 +366,7 @@ describe('web e2e: agent-preset selection', () => {
|
||||
await openSettings(page, 'en')
|
||||
const reopened = page.getByRole('dialog', { name: 'Settings' })
|
||||
await reopened.getByRole('button', { name: 'General', exact: true }).click()
|
||||
const reopenedDeveloperTools = reopened.getByRole('switch', { name: 'Coding Tools' })
|
||||
const reopenedDeveloperTools = reopened.getByRole('switch', { name: 'Show coding view' })
|
||||
await reopenedDeveloperTools.click()
|
||||
await expect.poll(() => reopenedDeveloperTools.getAttribute('aria-checked')).toBe('true')
|
||||
await reopened.getByRole('button', { name: 'Agent presets' }).click()
|
||||
|
||||
@@ -175,8 +175,8 @@ describe('web e2e: a git workspace turn ends with its changed files', () => {
|
||||
expect(compactHeight).toBeLessThan(60)
|
||||
await openSettings(page, 'zh')
|
||||
const settings = page.getByRole('dialog', { name: '设置' })
|
||||
await settings.getByRole('switch', { name: '代码工作工具' }).click()
|
||||
await expect.poll(() => settings.getByRole('switch', { name: '代码工作工具' }).getAttribute('aria-checked')).toBe('true')
|
||||
await settings.getByRole('switch', { name: '显示代码工作视图' }).click()
|
||||
await expect.poll(() => settings.getByRole('switch', { name: '显示代码工作视图' }).getAttribute('aria-checked')).toBe('true')
|
||||
await settings.getByRole('button', { name: '关闭', exact: true }).click()
|
||||
await header.getByRole('tablist').waitFor({ state: 'visible' })
|
||||
expect(await header.evaluate(element => element.getBoundingClientRect().height)).toBeGreaterThan(compactHeight)
|
||||
|
||||
@@ -14,7 +14,7 @@ it('persists developer tools in the Host settings document and restores the acce
|
||||
const page = await newEnglishPage(browser)
|
||||
await page.goto(scaffold.authenticatedUrl)
|
||||
await openSettings(page, 'en')
|
||||
const toggle = page.getByRole('switch', { name: 'Coding Tools' })
|
||||
const toggle = page.getByRole('switch', { name: 'Show coding view' })
|
||||
expect(await toggle.getAttribute('aria-checked')).toBe('true')
|
||||
expect(await readFile(join(scaffold.harnessHome, 'profiles', 'scaffold', 'cordis.patch.yml'), 'utf8')).not.toMatch(/id: ui-settings(?:\r?\n|$)/)
|
||||
await toggle.click()
|
||||
|
||||
@@ -849,8 +849,8 @@ else process.exit(1);
|
||||
].join('\n'))
|
||||
await openSettings(page, 'en')
|
||||
const settings = page.getByRole('dialog', { name: 'Settings' })
|
||||
await settings.getByRole('switch', { name: 'Coding Tools' }).click()
|
||||
await expect.poll(() => settings.getByRole('switch', { name: 'Coding Tools' }).getAttribute('aria-checked')).toBe('true')
|
||||
await settings.getByRole('switch', { name: 'Show coding view' }).click()
|
||||
await expect.poll(() => settings.getByRole('switch', { name: 'Show coding view' }).getAttribute('aria-checked')).toBe('true')
|
||||
await successShot(page, 'developer-tools-setting')
|
||||
await settings.getByRole('button', { name: 'Close', exact: true }).click()
|
||||
await expect.poll(() => iframe.getAttribute('sandbox')).toBe('allow-scripts')
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
- button "减小字号"
|
||||
- text: px 工作步骤展示 选择希望看到多少工具调用细节
|
||||
- button "标准"
|
||||
- text: 代码工作工具 开启后显示轨迹、本轮代码差异,新对话中的 Agent 预设切换
|
||||
- switch "代码工作工具" [checked]
|
||||
- text: 显示代码工作视图 开启后,显示轨迹、本轮代码差异,可选择完整的 Agent 预设切换
|
||||
- switch "显示代码工作视图" [checked]
|
||||
- text: 快捷键
|
||||
- paragraph: 查看和编辑当前可用的快捷键和输入操作
|
||||
- button "编辑快捷键"
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
- button "Decrease font size"
|
||||
- text: px Work details Choose how much detail to show for tool calls
|
||||
- button "Standard"
|
||||
- text: Coding Tools Shows trajectory, code diffs, and Agent preset switching in new chats
|
||||
- switch "Coding Tools" [checked]
|
||||
- text: Show coding view Shows trajectory, code diffs, and all Agent presets
|
||||
- switch "Show coding view" [checked]
|
||||
- text: Keyboard shortcuts
|
||||
- paragraph: View and edit available shortcuts and input actions
|
||||
- button "Edit shortcuts"
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
- button "Decrease font size"
|
||||
- text: px Work details Choose how much detail to show for tool calls
|
||||
- button "Detailed"
|
||||
- text: Coding Tools Shows trajectory, code diffs, and Agent preset switching in new chats
|
||||
- switch "Coding Tools"
|
||||
- text: Show coding view Shows trajectory, code diffs, and all Agent presets
|
||||
- switch "Show coding view"
|
||||
- text: Keyboard shortcuts
|
||||
- paragraph: View and edit available shortcuts and input actions
|
||||
- button "Edit shortcuts"
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
- button "Decrease font size"
|
||||
- text: px Work details Choose how much detail to show for tool calls
|
||||
- button "Detailed"
|
||||
- text: Coding Tools Shows trajectory, code diffs, and Agent preset switching in new chats
|
||||
- switch "Coding Tools"
|
||||
- text: Show coding view Shows trajectory, code diffs, and all Agent presets
|
||||
- switch "Show coding view"
|
||||
- text: Keyboard shortcuts
|
||||
- paragraph: View and edit available shortcuts and input actions
|
||||
- button "Edit shortcuts"
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
- button "减小字号"
|
||||
- text: px 工作步骤展示 选择希望看到多少工具调用细节
|
||||
- button "详细"
|
||||
- text: 代码工作工具 开启后显示轨迹、本轮代码差异,新对话中的 Agent 预设切换
|
||||
- switch "代码工作工具"
|
||||
- text: 显示代码工作视图 开启后,显示轨迹、本轮代码差异,可选择完整的 Agent 预设切换
|
||||
- switch "显示代码工作视图"
|
||||
- text: 快捷键
|
||||
- paragraph: 查看和编辑当前可用的快捷键和输入操作
|
||||
- button "编辑快捷键"
|
||||
|
||||
@@ -28,9 +28,9 @@ export const zh = {
|
||||
'openDocument.error': '无法打开配置文件',
|
||||
'general.nav': '通用设置',
|
||||
'general.currentVersion': '当前版本:{version}',
|
||||
'developerTools.title': '代码工作工具',
|
||||
'developerTools.title': '显示代码工作视图',
|
||||
'developerTools.error': '保存失败,请重试',
|
||||
'developerTools.description': '开启后显示轨迹、本轮代码差异,新对话中的 Agent 预设切换',
|
||||
'developerTools.description': '开启后,显示轨迹、本轮代码差异,可选择完整的 Agent 预设切换',
|
||||
'connection.error': '连接异常,刷新重试',
|
||||
'connection.connecting': '重新连接中',
|
||||
'connection.connected': '连接成功',
|
||||
@@ -69,9 +69,9 @@ export const en = {
|
||||
'openDocument.error': 'Could not open configuration file',
|
||||
'general.nav': 'General',
|
||||
'general.currentVersion': 'Current version: {version}',
|
||||
'developerTools.title': 'Coding Tools',
|
||||
'developerTools.title': 'Show coding view',
|
||||
'developerTools.error': 'Could not save. Please try again.',
|
||||
'developerTools.description': 'Shows trajectory, code diffs, and Agent preset switching in new chats',
|
||||
'developerTools.description': 'Shows trajectory, code diffs, and all Agent presets',
|
||||
'connection.error': 'Disconnected',
|
||||
'connection.connecting': 'Reconnecting',
|
||||
'connection.connected': 'Connected',
|
||||
|
||||
@@ -81,7 +81,7 @@ it('toggles developer tools using the accepted setting and disables duplicate wr
|
||||
finish = () => { state.set(enabled); resolve() }
|
||||
}))
|
||||
render(<DeveloperToolsRow {...kit} t={t} useDeveloperTools={bindSnapshotSelector(state)} setEnabled={setEnabled} />)
|
||||
const toggle = screen.getByRole('switch', { name: 'Coding Tools' })
|
||||
const toggle = screen.getByRole('switch', { name: 'Show coding view' })
|
||||
expect(toggle.getAttribute('aria-checked')).toBe('false')
|
||||
fireEvent.click(toggle)
|
||||
expect(setEnabled).toHaveBeenCalledWith(true)
|
||||
@@ -214,7 +214,7 @@ it('reports a failed developer-tool write and allows retry', async () => {
|
||||
const state = createSnapshotStore(false)
|
||||
const setEnabled = vi.fn().mockRejectedValueOnce(new Error('offline')).mockImplementation(async (enabled: boolean) => { state.set(enabled) })
|
||||
render(<DeveloperToolsRow {...kit} t={t} useDeveloperTools={bindSnapshotSelector(state)} setEnabled={setEnabled} />)
|
||||
const toggle = screen.getByRole('switch', { name: 'Coding Tools' })
|
||||
const toggle = screen.getByRole('switch', { name: 'Show coding view' })
|
||||
fireEvent.click(toggle)
|
||||
expect((await screen.findByRole('alert')).textContent).toBe('Could not save. Please try again.')
|
||||
expect(toggle.hasAttribute('disabled')).toBe(false)
|
||||
|
||||
Reference in new issue
Block a user