makecindy / makecindy/cindy

bug:远程电脑任务完成后,点击任务条目无法清除左侧绿色未读点

Open Beginner friendly
#4,529 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

### 问题描述 / What happened

在当前窗口查看远程电脑会话时,远程任务执行完成后,左侧会话条目会显示绿色未读状态点。

点击右侧「后台任务」中的已完成任务条目后,任务详情可以正常打开,但左侧会话条目的绿色未读点仍然存在,没有被清除。
### 初步原因分析

初步定位为两个点击入口的状态处理不一致:

1. 左侧会话条目点击时,会调用会话 attention 清除逻辑。
2. 右侧「后台任务」条目点击时,只执行任务定位或打开详情,没有调用 attention 清除逻辑。

相关代码:

- `apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/BackgroundTasksBody.tsx`
- `TaskRow.handleClick` 目前只调用 `onOpenWorkflow` 或 `requestChatTaskFocus`。
- 未调用 `clearSystemSessionAttention` 或等价的已读处理逻辑。
- `apps/desktop/src/renderer/features/cc-agent/CCAgentSidebarUpper.tsx`
- 左侧会话点击路径会调用 `clearNotification` 和 `clearSystemSessionAttention`。
- `apps/desktop/src/renderer/features/cc-agent/sidebar/SessionStatusIcon.tsx`
- 左侧绿色小点由 `hasAttentionNotification` 控制。
- `apps/desktop/src/renderer/features/device-link/remoteSessionActivityStore.ts`
- 远程任务完成且 `attention=true` 时,会保留远程活动镜像。
- 只有收到 `attention=false` 的收尾状态后,绿色状态点才会消失。

因此,右侧后台任务条目点击没有触发“已读/清除 attention”流程,是当前现象的主要原因。

### 环境 / Environment

产品:Cindy Desktop 0.1.83
- 功能:远程电脑 / Device Link
- 页面:当前会话窗口
- 任务类型:远程后台任务
- 复现日期:2026-09-16

### 复现步骤 / Steps to reproduce

1. 通过 Device Link 打开一个远程电脑会话。
2. 在该会话中执行一个后台任务。
3. 等待远程任务执行完成。
4. 观察左侧会话条目,显示绿色未读状态点。
5. 打开右侧「后台任务」面板。
6. 点击该已完成的任务条目。
7. 返回观察左侧会话条目。

### 日志与截图 / Logs & screenshots

https://github.com/user-attachments/assets/bfd01810-8c22-4b56-997a-e62dac377764

Contributor guide

Open the contributing guide

Research direction

Start in apps/desktop/src/renderer/features/right-sidebar/plugins/background-tasks/BackgroundTasksBody.tsx at TaskRow.handleClick, then compare its behavior with the session click path in CCAgentSidebarUpper.tsx. Read SessionStatusIcon.tsx and remoteSessionActivityStore.ts to trace attention state. Done means clicking a completed remote task opens its details and clears the session’s green attention dot.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.