Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): remove connected device green dot (#2888)

Dashdc3aa57701e4
diff --git a/apps/desktop/src/renderer/__tests__/sidebarRemoteProjectIcon.test.ts b/apps/desktop/src/renderer/__tests__/sidebarRemoteProjectIcon.test.ts
index 92c3def9e7..6abb6b020b 100644
--- a/apps/desktop/src/renderer/__tests__/sidebarRemoteProjectIcon.test.ts
+++ b/apps/desktop/src/renderer/__tests__/sidebarRemoteProjectIcon.test.ts
@@ -91,6 +91,16 @@ describe('sidebar remote project icon', () => {
);
});
+ // 2026-08-17 用户裁决:绿点容易被误认成未读标记。在线是设备段的常态,不额外画点;
+ // 离线仍保留灰点 + 文字,异常状态不能静默。
+ it('shows a status dot only for offline device group headers', () => {
+ expect(projectsSectionSource).not.toContain('bg-[var(--card-status-done)]');
+ expect(projectsSectionSource).toMatch(
+ /\{!online && \([\s\S]*?bg-\[var\(--text-tertiary\)\][\s\S]*?\)\}/,
+ );
+ expect(projectsSectionSource).toContain("t('ccAgent.sidebar.deviceGroup.offline')");
+ });
+
// 2026-08-12 用户裁决:按设备分组时列表已按设备切段、段头写着设备名,项目行不再
// 重复标注归属;远程图标保留(表达「远程 + 连接状态」,不重复归属信息)。
it('drops the per-row machine label while device grouping is active, keeping the remote icon', () => {
diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsx
index 82c757a85b..024b64d39c 100644
--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsx
+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsx
@@ -809,7 +809,7 @@ export function ProjectsSection({
const sectionCollapsed = collapsedDevices.has(key);
return (
<div key={key} className="flex flex-col gap-1">
- {/* 设备分组头:可折叠,在线状态点(绿/灰)+ 名称 + 条数。 */}
+ {/* 设备分组头:可折叠。在线设备不画状态点;离线设备保留灰点与文字提示。 */}
<button
type="button"
onClick={() => toggleDeviceSection(key)}
@@ -831,13 +831,12 @@ export function ProjectsSection({
)}
<MonitorSmartphone size={13} strokeWidth={2} className="shrink-0" />
<span className="min-w-0 truncate text-xs font-medium">{name}</span>
- <span
- aria-hidden
- className={cn(
- 'size-1.5 shrink-0 rounded-full',
- online ? 'bg-[var(--card-status-done)]' : 'bg-[var(--text-tertiary)]',
- )}
- />
+ {!online && (
+ <span
+ aria-hidden
+ className="size-1.5 shrink-0 rounded-full bg-[var(--text-tertiary)]"
+ />
+ )}
{/* 条数已去掉(2026-08-12 用户裁决):它数的是顶层条目
(项目行 + 散排对话 + 对话组),不是任务数,读起来只会误导;
段展开后内容本身就是答案。「离线」接手 ml-auto 保持靠右。 */}