Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
test(bots): assert header member counts and correct platform notes
Chrisa2c69cf46c5b
diff --git a/apps/desktop/src/renderer/features/bots/__tests__/BotGroupChatView.test.tsx b/apps/desktop/src/renderer/features/bots/__tests__/BotGroupChatView.test.tsxindex 01e04b6031..c79003b95d 100644--- a/apps/desktop/src/renderer/features/bots/__tests__/BotGroupChatView.test.tsx+++ b/apps/desktop/src/renderer/features/bots/__tests__/BotGroupChatView.test.tsx@@ -26,7 +26,8 @@ import type {const mocks = vi.hoisted(() => ({// Keep translation identity stable so attachment effects do not reload on every render.t: (key: string, options?: Record<string, unknown>) =>- options && 'name' in options ? `${key}:${String(options.name)}` : key,+ options && 'name' in options ? `${key}:${String(options.name)}`+ : key === 'bots.groupChat.memberCount' ? `${key}:${String(options?.count)}` : key,groupId: 'g1',navigate: vi.fn(),getBotGroup: vi.fn(),@@ -1148,7 +1149,7 @@ describe('BotGroupChatView', () => {const header = screen.getByTestId('content-header');expect(header.textContent).toContain('周末出游');// The line under the name reads the group's size, not every member; the names stay in the tooltip.- expect(within(header).getByTestId('bot-group-header-summary').textContent).toBe('bots.groupChat.memberCount');+ expect(within(header).getByTestId('bot-group-header-summary').textContent).toBe('bots.groupChat.memberCount:2');expect(header.querySelector('button[title]')?.getAttribute('title')).toBe('咪咪bots.groupChat.memberSeparator小满');fireEvent.click(screen.getByRole('button', { name: 'bots.groupChat.settings.open' }));expect(mocks.navigate).toHaveBeenCalledWith('/bots/groups/g1?groupSettings=1');@@ -1364,7 +1365,7 @@ describe('BotGroupChatView', () => {renderView();const header = screen.getByTestId('content-header');expect(header.textContent).toContain('周末出游');- expect(within(header).getByTestId('bot-group-header-summary').textContent).toBe('bots.groupChat.memberCount');+ expect(within(header).getByTestId('bot-group-header-summary').textContent).toBe('bots.groupChat.memberCount:2');expect(screen.queryByTestId('bot-group-timeline-loading')).toBeNull();expect(screen.queryByRole('textbox')).toBeNull();expect(await screen.findByRole('status', { name: 'ccAgent.common.loading' })).toBeTruthy();diff --git a/docs/design-rules/design-decision-log.md b/docs/design-rules/design-decision-log.mdindex b306f304ca..4fe5e5e762 100644--- a/docs/design-rules/design-decision-log.md+++ b/docs/design-rules/design-decision-log.md@@ -12,7 +12,7 @@## 2026-10-- **10-26 群聊顶栏群名下一行改为人数,不再列出所有成员**——用户指出群名下面把成员名用「、」平铺列满,跨账号的群里「Miao (dash)、Cindy (chris)、dash、Opus (dash)…」又长又乱,要求「不能列满」。现行:Desktop 与 Mobile 群聊顶栏群名下只写「N 位成员」(人与伙伴一起算,Desktop 用等宽数字),不再在这一行标「负责人」;有人在发言、安排或做某一步时,这一行换成原有的进行中状态(✨「X 正在说…」),结束后回到人数,与 Telegram/Slack 的群头一致。完整名单移到悬停提示(Desktop)与读屏标签(Mobile),群设置的成员列表不变;私聊仍显示对方名字。`memberCount` 文案由「N 位伙伴」改为「N 位成员」,因为群里也有人类成员,群设置抽屉同步受益。被取代:bot-group-chat.md §5「成员名单(负责人带标)」。落点:`BotGroupChatView.tsx` 顶栏、`BotGroupChatScreen.tsx` 副标题;单页场景 `group-chat --case crowded`。+- **10-26 群聊顶栏群名下一行改为人数,不再列出所有成员**——用户指出群名下面把成员名用「、」平铺列满,跨账号的群里「Miao (dash)、Cindy (chris)、dash、Opus (dash)…」又长又乱,要求「不能列满」。现行:Desktop 与 Mobile 群聊顶栏群名下只写「N 位成员」(人与伙伴一起算,Desktop 用等宽数字),不再在这一行标「负责人」;Desktop 有人在发言、安排或做某一步时,这一行换成原有的进行中状态(✨「X 正在说…」),结束后回到人数;Mobile 群聊主界面始终显示人数,不做该状态切换。完整名单移到悬停提示(Desktop)与读屏标签(Mobile),群设置的成员列表不变;私聊仍显示对方名字。`memberCount` 文案由「N 位伙伴」改为「N 位成员」,因为群里也有人类成员,群设置抽屉同步受益。被取代:bot-group-chat.md §5「成员名单(负责人带标)」。落点:`BotGroupChatView.tsx` 顶栏、`BotGroupChatScreen.tsx` 副标题;单页场景 `group-chat --case crowded`。- **10-24 手机退役「任务/伙伴」两种首页模式:伙伴与任务完全打平,和电脑一致**——用户指出伙伴段上线后抽屉里的「任务 | 伙伴」切换和标题范围菜单里的「伙伴」仍是一套独立筛选,既然伙伴已经并入任务首页就不应再有独立筛选。现行:首页只有一种;抽屉不再放任务/伙伴分段控件,标题范围菜单不再列出伙伴;首页搜索同时列出匹配的伙伴;伙伴未读显示在伙伴段行与头像条蓝点上。被取代:10-13 的任务/伙伴左右滑动切换、伙伴首页、分段计数与菜单键注意点(`menu-attention` 资源已删除)。旧版本存下的「上次停在伙伴页」偏好在下次写入时清除,不再恢复。落点:`DESIGN.md` 手机首页段落;`apps/mobile/src/session/HomeSurface.tsx`、`HomeTeammatesSection.tsx`、`useHomeMode.ts`。