Skip to content

fix: prevent repeated notifications, filter plugin sessions, and fix resource leaks#3

Merged
expAdd3 merged 4 commits into
expAdd3:mainfrom
w59227c:fix/notify-and-cleanup
Jun 24, 2026
Merged

fix: prevent repeated notifications, filter plugin sessions, and fix resource leaks#3
expAdd3 merged 4 commits into
expAdd3:mainfrom
w59227c:fix/notify-and-cleanup

Conversation

@w59227c

@w59227c w59227c commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

改动

cc_hook.py

  • 通知触发从状态驱动改为事件驱动:Stop/StopFailure→DONE,Notification→NEEDS_INPUT
  • SessionStart 不再误触发「已完成」通知

cc_monitor.py

  • 通知死循环修复merge_log_fallback 从电平触发(MAX)改为边沿触发(CASE WHEN),只在 RUNNING→WAITING 转换时通知一次
  • 插件会话过滤_is_internal_project() 通过编码路径中的 -- 通用识别隐藏目录下的内部会话,不再硬编码插件名
  • 目录级提前过滤:跳过 claude-mem observer 文件,避免每 2 秒无效遍历
  • ENDED 会话隐藏:已结束的会话不再显示在菜单栏
  • Retina 图标:手动合成 1x+@2x NSImage,菜单栏图标不再模糊
  • 资源泄漏cleanup_quit 关闭 DB 连接、run_cli finally 保证关闭

install_hooks.py / uninstall.py

  • json.load/dump 使用 with 上下文管理器,防止文件句柄泄漏

项目结构

  • 图片移至 assets/,构建脚本移至 scripts/,添加 .gitignore

Closes #1

w59227c added 4 commits June 24, 2026 15:26
Stop/StopFailure trigger DONE, Notification triggers NEEDS_INPUT.
SessionStart no longer maps to a notification trigger.
- merge_log_fallback: edge-triggered (CASE WHEN) instead of level-
  triggered (MAX); directory-level filter to avoid 486 observer files
- summarize: exclude ENDED sessions and internal plugin projects
- build_app: load 1x+@2x icons for Retina clarity; cleanup_quit hook
- run_cli: close DB connection in finally block
- drain: restore if-rows guard
@expAdd3 expAdd3 merged commit 7f8b16e into expAdd3:main Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource leaks: unclosed files and DB connections in multiple modules

2 participants