-
Notifications
You must be signed in to change notification settings - Fork 84
Add setting to enable duplicate request detection #6936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setting to enable duplicate request detection #6936
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…rt-duplicate-detection-config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR adds UI controls for duplicate privacy request detection settings. The changes reorganize the privacy request settings page into two sections: "Redaction patterns" (existing) and "Duplicate detection" (new).
Key Changes:
- Added new
PrivacyRequestDuplicateDetectionSettingscomponent with toggle for enabling/disabling duplicate detection and input for configuring the detection time window (1-3650 days) - Updated page title from "Privacy request redaction patterns" to "Privacy request settings" to reflect multiple sections
- Added Redux selector for duplicate detection settings following existing patterns
- Auto-generated TypeScript types for new API models
Implementation Details:
- Uses Ant Design Form with proper validation (time window must be between 1-3650 days)
- Conditionally shows time window input only when duplicate detection is enabled
- Follows existing code patterns for config settings (selector structure, form handling, error/success alerts)
- Uses Tailwind CSS classes consistently with custom instruction guidelines
Confidence Score: 4/5
- This PR is safe to merge with minimal risk
- Clean implementation that follows existing patterns and coding standards. The component properly handles form validation, loading states, and error handling. One minor issue: the
match_identity_fieldsfield exists in the API type but isn't exposed in the UI, which could lead to inconsistency if that field is set elsewhere. - clients/admin-ui/src/features/settings/PrivacyRequestDuplicateDetectionSettings.tsx - verify whether
match_identity_fieldsshould be configurable through the UI
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| clients/admin-ui/src/features/settings/PrivacyRequestDuplicateDetectionSettings.tsx | 4/5 | New component for duplicate detection settings. Clean implementation using Ant Design Form with proper validation, but doesn't handle the match_identity_fields from the API type. |
| clients/admin-ui/src/features/config-settings/config-settings.slice.ts | 5/5 | Adds selector for duplicate detection settings with proper defaults. Implementation follows existing patterns in the file. |
| clients/admin-ui/src/pages/settings/privacy-requests/index.tsx | 5/5 | Updates page to display both redaction patterns and duplicate detection settings. Uses Ant Design Flex component properly. |
8 files reviewed, 1 comment
clients/admin-ui/src/features/settings/PrivacyRequestDuplicateDetectionSettings.tsx
Show resolved
Hide resolved
speaker-ender
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When updating setting, the switch first goes back to the previously selected value and then updates to the new value.
Screen.Recording.2025-11-10.at.9.50.58.AM.mov
…rt-duplicate-detection-config
|
@speaker-ender Thanks for testing and nice catch with the loading states. It should be fixed now, I added an skeleton for the initial loading state and improved the way initialValues are handled. |
|
Nit UX but I think we should start developing patterns for async interactions that look really intentional. Screen.Recording.2025-11-10.at.1.34.29.PM.movI think having an inline success indicator that persists would keep it from bouncing back + give more direct feedback for the action. Screen.Recording.2025-11-10.at.2.22.30.PM.movThis would also give us the opportunity to "reset" the success state when a user makes a change instead of always showing the submit button in the enabled state. I think there is also a skeleton specifically for inputs that might be more appropriate for the initial loading state |
I've replaced the skeleton with input skeleton. I agree with the patterns for async interactions 💯 , and the example you show looks very good. |
Ticket ENG-1805
Description Of Changes
Adds a section to the privacy request settings page to enable/disable duplicate detection and to set the detection period.
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works