feat: implement smart notification filtering to reduce noise#15
feat: implement smart notification filtering to reduce noise#15
Conversation
- Add minimal whitelist for dangerous commands (rm, sudo, chmod, chown, mv) - Move cp, curl, wget from dangerous to safe commands list - Add git commands and development tools to safe commands - Implement path-based filtering for external file operations - Add special messaging for system files and external projects - Improve apply_command_replacement with regex word boundaries Closes #14
|
Claude finished @Helmi's task —— View job Code Review Complete ✅I've thoroughly reviewed the smart notification filtering implementation. Here's my detailed feedback: Todo List:
🎯 Overall AssessmentThis PR implements a thoughtful solution to notification fatigue by intelligently filtering bash command notifications. The implementation is well-designed with good separation of concerns. ✅ StrengthsCode Quality & Architecture:
Security & Safety:
|
Summary
Implements intelligent notification filtering to solve notification fatigue from excessive bash command alerts. After several days of testing, the filtering significantly reduces noise while preserving important notifications.
Closes #14
Changes Made
Core Filtering Logic
rm,sudo,chmod,chown,mvtrigger notificationscp,curl,wget(moved from dangerous), plus git commands and development toolsEnhanced Messaging
/etc/,/usr/,/var/Technical Details
is_command_targeting_outside_project()function for external file detectionapply_command_replacement()with regex word boundary matchingTesting Results
✅ Significant noise reduction - Routine commands (
ls,git status,npm run) now silent✅ Safety preserved - Dangerous operations (
rm,sudo) still notify✅ External file detection - Commands targeting system files properly flagged
✅ No false negatives - All important events still captured
Files Modified
src/ccnotify/notify.py- Core filtering and messaging logicBreaking Changes
None - purely additive filtering that reduces notifications without removing important ones.