feat: implement smart notification filtering to reduce noise #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
,mv
trigger 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.