设备上下线通知在合盖睡眠时反复抖动推送,应做去抖/合并并提供开关
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: 董乐Roger
**客户端版本**: 0.1.26
---
## 现象
Mac 合盖睡眠后,macOS 会周期性短暂唤醒(Power Nap / 定时维护唤醒)。Cindy 后台在每个唤醒窗口重连中继 → 推一条 “back online”;随后机器睡回去 → 推一条 “offline”。结果是每隔约 10 分钟就往 Slack 推一条“离线/上线”交替消息,持续刷屏。
## 复现步骤
1. 将连接了 Slack 通知的 Mac 合盖(不关机,尤其接电源时)
2. 放置一段时间,观察 Slack 里 Cindy 的推送
## 实际表现
出现连续的上下线交替推送(实例:8:32 离线 → 8:42 上线 → 8:51 离线 → 9:00 上线 → 9:16 离线 → 9:34 上线),间隔不规则,纯噪音刷屏。
## 期望行为
1. 去抖:离线持续超过阈值(如 5–10 分钟)才推 offline,避免瞬时抖动误报。
2. 合并:短时间内来回跳不逐条推送,收敛成一条状态摘要。
3. 开关:设置里提供“设备上下线通知”开关(可关闭或按渠道配置)。
## 影响
纯噪音刷屏;用户被迫 mute 整个 Slack 渠道,从而可能漏掉同渠道里真正重要的任务/确认/报错通知。
---
**版本区域**: CN
**OS**: darwin arm64 (25.5.0)
**界面语言**: zh-CN
Contributor guide
Research direction
No files, tests, or entry points are mentioned. Start by locating the device online/offline state handling and Slack notification path, then determine where debounce, summary delivery, and the settings toggle belong. Done means brief wake/sleep transitions no longer produce repeated Slack messages and the notification can be disabled or configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, macos, typescript
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100