Skip to content

Add ability to untrust IPs from the rules view - #46

Merged
TheZupZup merged 1 commit into
mainfrom
claude/add-rules-trust-toggle-GNu1b
May 1, 2026
Merged

Add ability to untrust IPs from the rules view#46
TheZupZup merged 1 commit into
mainfrom
claude/add-rules-trust-toggle-GNu1b

Conversation

@TheZupZup

Copy link
Copy Markdown
Owner

Summary

This PR adds functionality to remove IPs from the trusted list in the rules view, complementing the existing block/unblock operations.

Key Changes

  • Added untrust_ip_in_rules() function in monitor.py to remove IPs from the trusted IPs list in the rules file
  • Added new keybinding T in the TUI to trigger the untrust action
  • Implemented action_toggle_trust() method in SilentGuardTUI to handle untrusting IPs from the rules view
  • Updated help text to document the new T keybinding for untrusting IPs
  • Added validation to prevent untrusting blocked IPs (they must be unblocked first)

Implementation Details

  • The untrust_ip_in_rules() function mirrors the pattern of unblock_ip_in_rules(), loading rules, removing the IP from the trusted list, and persisting changes
  • The action only works in rules view mode and provides appropriate status messages for different scenarios (success, IP not found, blocked IP attempt, invalid selection)
  • Status updates include current counts of blocked IPs, trusted IPs, and known processes for user feedback

https://claude.ai/code/session_01CcHv2bypYA1NEgPWB2oWAy

Adds an untrust_ip_in_rules helper mirroring unblock_ip_in_rules and
wires a T binding in the TUI Rules view that removes a trusted IP,
refreshes the view, and updates the status bar. Selecting a blocked
or non-IP row shows a helpful hint instead of acting.
@TheZupZup
TheZupZup merged commit 273fb98 into main May 1, 2026
1 check passed
@TheZupZup
TheZupZup deleted the claude/add-rules-trust-toggle-GNu1b branch May 1, 2026 15:05
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.

2 participants