-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
Prerequisites
-
I have checked the Wiki and Discussions and found no answer
-
I have searched other issues and found no duplicates
-
I want to request a feature or enhancement and not ask a question
The problem
Currently, when users add custom blocklists or allowlists to AdGuard Home, they need to manually:
- Enter the filter URL
- Manually type or copy-paste a descriptive name for the filter
This creates friction in the user experience, especially when:
- Adding multiple filters at once
- The filter list already has a descriptive title in its metadata (in comments like
! Title: Filter Name) - Users might not know what name to give to the filter
Proposed solution
Implement an automatic filter name fetching feature that:
-
Backend: Add a new endpoint
/control/filtering/check_urlthat:- Accepts a filter URL via POST request
- Fetches the content from the URL
- Parses the filter file to extract the title from metadata comments (e.g.,
! Title:,# Title:) - Returns the extracted title to the frontend
- Includes permissive URL validation that doesn't require file extensions (many valid filter lists don't have
.txtextensions)
-
Frontend: Enhance the "Add custom filter" form to:
- Automatically call the new endpoint when a user enters a URL (with debouncing, e.g., 800ms)
- Auto-populate the "Name" field with the fetched title
- Allow users to override the auto-fetched name if desired
- Only auto-fetch if the name field is empty or unchanged from previous auto-fetch
- Show appropriate loading states and error handling
Benefits
- Improved UX: Reduces manual work when adding filters
- Accuracy: Uses the official filter name from the list maintainer
- Speed: Faster filter configuration, especially for users adding multiple lists
- Accessibility: Makes it easier for less technical users to add custom filters
Technical Considerations
- The auto-fetch should be non-blocking and not prevent users from manually entering names
- Implement appropriate timeout handling for slow or unresponsive URLs
- Consider caching mechanisms to avoid repeated fetches of the same URL
- Ensure the feature works in development mode with appropriate debug logging
- Should respect existing user input (don't override if user has already typed something)
Additional Context
This feature would be similar to how many modern applications auto-populate metadata (like browser extensions that fetch titles from URLs, or music players that fetch track information).
Alternatives considered and additional information
- Pre-populate a database of known filter lists (but this requires maintenance and doesn't help with custom/private lists)
- Require users to always manually enter names (current behavior, but suboptimal UX)