Skip to content

Conversation

@lucanovera
Copy link
Contributor

@lucanovera lucanovera commented Jan 7, 2026

Ticket ENG-2302

Description Of Changes

Reimplements the csv download functionality for the new request manager.

Code Changes

  • Add download csv functionality in a hook

Steps to Confirm

  1. Login to admin-ui and go to Request manager
  2. Click the download icon in the header of the list
  3. Check the file downloads, the filename is privacy-request-report.csv and that the row count matches the results shown in the screen
  4. Use the header filters to filter results, download again and check the row count matches

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Jan 7, 2026 4:38pm
1 Skipped Deployment
Project Deployment Review Updated (UTC)
fides-privacy-center Ignored Ignored Jan 7, 2026 4:38pm

@lucanovera lucanovera marked this pull request as ready for review January 7, 2026 16:40
@lucanovera lucanovera requested a review from a team as a code owner January 7, 2026 16:40
@lucanovera lucanovera requested review from speaker-ender and removed request for a team January 7, 2026 16:40
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Greptile Summary

This PR refactors the CSV download functionality for privacy requests by extracting the logic into a reusable custom hook. The implementation consolidates the download, error handling, blob management, and success messaging into useDownloadPrivacyRequestReport, removing inline logic from the dashboard component. The hook follows established patterns from similar download features (manual tasks, consent reporting) and properly exports the SearchFilterParams type for reuse.

  • Extracts download logic into dedicated custom hook (useDownloadPrivacyRequestReport)
  • Consolidates error handling using getErrorMessage helper
  • Properly manages blob lifecycle with cleanup (revokeObjectURL)
  • Uses useMessage from fidesui for toast notifications
  • Follows patterns from existing download hooks in the codebase
  • Exports SearchFilterParams interface for type reuse in hook

Confidence Score: 5/5

  • This PR is safe to merge with no functional or security concerns
  • The PR involves a straightforward refactoring that extracts existing download logic into a reusable hook. The implementation properly handles blob creation and cleanup, uses established error handling patterns with getErrorMessage, and follows conventions from similar download features already in the codebase. The type export is minimal and non-breaking. CI has passed and the changes align with established patterns in the privacy requests module.
  • No files require special attention

Important Files Changed

Filename Overview
clients/admin-ui/src/features/privacy-requests/dashboard/PrivacyRequestsDashboard.tsx Refactored to extract download logic into custom hook, removing inline message handling and RTK Query usage. Import cleanup and simplified component logic. No functional issues found.
clients/admin-ui/src/features/privacy-requests/dashboard/hooks/useDownloadPrivacyRequestReport.ts New hook properly encapsulates CSV download logic including blob handling, cleanup, and error/success messaging. Follows existing patterns from similar download hooks in the codebase (manual tasks, consent reporting).
clients/admin-ui/src/features/privacy-requests/privacy-requests.slice.ts Exports SearchFilterParams interface to allow type reuse in the new download hook. Minimal change with no logic modifications.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 7, 2026

Greptile's behavior is changing!

From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good and tested in Vercel environment, all looking good to me.

@lucanovera lucanovera added this pull request to the merge queue Jan 7, 2026
Merged via the queue into main with commit 76bbb79 Jan 7, 2026
48 of 49 checks passed
@lucanovera lucanovera deleted the ENG-2302-Download-button-on-new-request-manager-doesn-t-work branch January 7, 2026 17:05
lucanovera added a commit that referenced this pull request Jan 7, 2026
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.

4 participants