fix(workspace): capitalize Untitled and align title fixtures

This commit is contained in:
liyao committed 2026-09-24 16:49:23 +08:00
1 parent 3dc1e1a92f
commit be5a84ad0b
10 files changed
+27 -27

No files matched your search

@@ -1,18 +1,18 @@
- tree "Sessions":
- treeitem "{{workspace}}" [expanded]
- treeitem "New Session" [selected]
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} Session actions for {{workspace}} Archive session Pin session":
- text: {{workspace}}
- button "Session actions for {{workspace}}"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled Session actions for Untitled Archive session Pin session":
- text: Untitled
- button "Session actions for Untitled"
- button "Archive session"
- button "Pin session"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- button "Show 6 more sessions"
@@ -4,9 +4,9 @@
- button "Workspace actions for {{workspace}}"
- button "New session in {{workspace}}"
- treeitem "New Session" [selected]
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "{{workspace}} 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- treeitem "Untitled 1min"
- button "Show 11 more sessions"
@@ -71,7 +71,7 @@ describe('web e2e: blank New Session folding quota', () => {
const sidebar = page.getByRole('tree', { name: 'Sessions' })
await expect.poll(() => sidebar.getByRole('treeitem').count(), { timeout: 15_000 }).toBe(7)
expect(await sidebar.getByText('New Session', { exact: true }).count()).toBe(1)
expect(await sidebar.getByText(basename(scaffold.workspaceCwd), { exact: true }).count()).toBe(6)
expect(await sidebar.getByText('Untitled', { exact: true }).count()).toBe(5)
const showMore = sidebar.getByRole('button', { name: 'Show 11 more sessions' })
await showMore.waitFor({ timeout: 15_000 })
await compareOrRefreshGolden(
@@ -82,7 +82,7 @@ describe('web e2e: blank New Session folding quota', () => {
await showMore.click()
await expect.poll(() => sidebar.getByRole('treeitem').count(), { timeout: 10_000 }).toBe(12)
expect(await sidebar.getByText(basename(scaffold.workspaceCwd), { exact: true }).count()).toBe(11)
expect(await sidebar.getByText('Untitled', { exact: true }).count()).toBe(10)
await compareOrRefreshGolden(
join(EXPECTED_DIR, 'first-batch.expected.md'),
await captureStableAria(page, '[role="tree"][aria-label="Sessions"]', scaffold.workspaceCwd),
@@ -69,5 +69,5 @@
en: 00d7b1ddda7390f5
zh: 1e5a1055d1be4d1d
/deepseek-ai-dsh-client-ui-workspace/known-limitations-and-deferred-work/dev-note:
en: 77d2291f37844028
zh: b95797542a367620
en: 72e98246e3f8430c
zh: 5d17178d6122cc42
+1 -1
View File
@@ -223,4 +223,4 @@ None.
**Runtime invariant:** No companion is published. This is a pure-consumer plugin that registers presentational components into two host-declared slots and registers its locale dictionaries; its inject face consists of stateless RPC wrappers plus a create-and-open call. It emits no Cordis events and owns no cross-plugin mutable state.
History rows without a stored title use the localized unnamed label (未命名 / untitled), rather than a directory name. The current blank row remains New Session; other blank rows remain hidden.
History rows without a stored title use the localized unnamed label (未命名 / Untitled), rather than a directory name. The current blank row remains New Session; other blank rows remain hidden.
+1 -1
View File
@@ -223,4 +223,4 @@ Workspace 与 Session 悬浮卡片会复制对应行被截断的值:激活 Wor
**运行时不变式:** 不发布伴生入口。这是一个纯消费方插件,只向两个由宿主声明的 slot 注册展示组件,并注册自身的 locale dictionaries;inject face 由无状态 RPC 包装层和一次 create-and-open 调用组成;本插件不发出 Cordis 事件,也不持有跨插件可变状态。
未保存标题的历史会话显示本地化名称「未命名 / untitled」,不使用目录名兜底。当前空会话仍显示「新会话」,其他空会话仍隐藏。
未保存标题的历史会话显示本地化名称「未命名 / Untitled」,不使用目录名兜底。当前空会话仍显示「新会话」,其他空会话仍隐藏。
@@ -129,7 +129,7 @@ export const en = {
'defaultWorkspace.failed': 'Unable to create default workspace. Use Choose workspace to select a folder.',
'group.ungrouped': 'Ungrouped',
'session.new': 'New Session',
'session.untitled': 'untitled',
'session.untitled': 'Untitled',
'shortcut.hint': '{label} {keys}',
'shortcut.noSession': 'Select a session first',
'shortcut.noPicker': 'Directory picker unavailable',
@@ -1081,7 +1081,7 @@ describe('session row schedule seats', () => {
})
})
it.each([['未命名', t], ['untitled', tEn]])('labels unnamed history as %s', (label, translate) => {
it.each([['未命名', t], ['Untitled', tEn]])('labels unnamed history as %s', (label, translate) => {
const node: SessionNode = { id: sid('unnamed'), title: '', blank: false, running: false,
runningSubagentCount: 0, completed: false, updatedAt: 0, pinned: false, archived: false }
render(<SessionNodeItem node={node} currentId={node.id} now={0} onOpen={vi.fn()}
@@ -39,7 +39,7 @@ const t: WorkspaceBrowserProps['t'] = makeTranslate(zh, commonZh)
const sid = (id: string) => id as SessionId
const wid = (id: string) => id as WorkspaceId
const summary = (id: string, updatedAt: number, overrides: Partial<SessionSummary> = {}): SessionSummary => ({
id: sid(id), displayTitle: id, running: false, blank: false, updatedAt, ...overrides,
id: sid(id), title: overrides.displayTitle ?? id, displayTitle: id, running: false, blank: false, updatedAt, ...overrides,
retainedBy: overrides.retainedBy ?? {},
})
const sessionState = (
@@ -1,2 +1,2 @@
- tree "Search results":
- 'treeitem "{{workspace}} {{workspace}} ## Navigation Summary - alpha nav - beta nav ``` echo WATERFALL ```"'
- 'treeitem "Untitled {{workspace}} ## Navigation Summary - alpha nav - beta nav ``` echo WATERFALL ```"'