mirror of
https://github.com/karant-dev/AutoRedact.git
synced 2026-04-26 00:05:52 +03:00
[PR #14] [MERGED] Add granular detection control with Settings dropdown #17
Labels
No labels
bug
enhancement
enhancement
enhancement
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AutoRedact#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/karant-dev/AutoRedact/pull/14
Author: @Copilot
Created: 12/12/2025
Status: ✅ Merged
Merged: 12/12/2025
Merged by: @karant-dev
Base:
main← Head:copilot/add-settings-sidebar-for-detection📝 Commits (4)
03d400eInitial planb27c5a8Initial plan for granular detection control featuref78553dAdd granular detection control with Settings dropdown7af8d40Refactor processImageForBatch to use options object📊 Changes
9 files changed (+250 additions, -63 deletions)
View changed files
📝
package-lock.json(+0 -12)📝
src/App.tsx(+9 -5)📝
src/components/Header.tsx(+10 -1)➕
src/components/SettingsDropdown.tsx(+76 -0)📝
src/hooks/useBatch.ts(+3 -3)➕
src/hooks/useDetectionSettings.ts(+49 -0)📝
src/hooks/useOCR.ts(+40 -21)📝
src/types/index.ts(+8 -0)📝
src/utils/ocr.ts(+55 -21)📄 Description
Users currently cannot selectively enable/disable detection types—AutoRedact redacts everything. This adds a Settings dropdown with toggles for each detection type, persisted to localStorage.
Changes
DetectionSettingstype — Boolean flags foremail,ip,creditCard,secret,piiuseDetectionSettingshook — Manages settings state with localStorage persistenceSettingsDropdowncomponent — Header dropdown with checkboxes for each typeuseOCR/useBatchhooks — Accept settings, filter pattern matching accordinglyprocessImageForBatch— Refactored to options object pattern:{ onProgress, detectionSettings }Usage
Settings are applied at detection time. Unchecking "IPv4 / IPv6" skips IP detection:
Screenshots
Settings dropdown with toggles:
IPv4/IPv6 disabled:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.