Skip to content

ENG-2595: Add read-only DSR policies list page#7403

Open
gilluminate wants to merge 5 commits intomainfrom
gill/ENG-2595/fe-policy-list-page
Open

ENG-2595: Add read-only DSR policies list page#7403
gilluminate wants to merge 5 commits intomainfrom
gill/ENG-2595/fe-policy-list-page

Conversation

@gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Feb 17, 2026

Ticket ENG-2595

Description Of Changes

Add a new read-only policies list page under Privacy Requests at /privacy-requests/policies. The page displays all DSR policies with their name, key, execution timeframe, and action type tags from policy rules. Includes client-side search/filter by name or key, empty states, and loading skeletons.

Also adds MSW mock data (14 policies) for local development

Code Changes

  • New policies list page component with search, empty state, and loading skeleton
  • Add "Policies" nav item under Privacy Requests with POLICY_READ scope
  • Add POLICIES_ROUTE constant
  • Mock policy data for development
  • Cypress tests
  • New empty state fixture
  • Add stubDSRPolicies helper

Steps to Confirm

  1. Navigate to Privacy Requests → Policies in the admin UI
  2. Verify the page displays all policies with name, key, execution timeframe, and action type tags
  3. Type in the search bar and confirm policies filter by name
  4. Search by policy key and confirm filtering works
  5. Search for a nonexistent term and verify the "No policies match your search" empty state

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
  • UX feedback:
    • All UX related changes have been reviewed by a designer
  • Followup issues:
    • Followup issues created - detail page with conditions tab
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

@vercel
Copy link
Contributor

vercel bot commented Feb 17, 2026

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

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Feb 18, 2026 1:59am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Feb 18, 2026 1:59am

Request Review

gilluminate added a commit that referenced this pull request Feb 17, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
gilluminate added a commit that referenced this pull request Feb 17, 2026
@gilluminate gilluminate force-pushed the gill/ENG-2595/fe-policy-list-page branch from 4586b60 to a6d145a Compare February 17, 2026 18:42
gilluminate added a commit that referenced this pull request Feb 17, 2026
@gilluminate gilluminate force-pushed the gill/ENG-2595/fe-policy-list-page branch from a6d145a to f3965a0 Compare February 17, 2026 19:01
gilluminate added a commit that referenced this pull request Feb 17, 2026
Update 7403-dsr-policies-list-page.yaml
@gilluminate gilluminate force-pushed the gill/ENG-2595/fe-policy-list-page branch from f3965a0 to 8867f59 Compare February 17, 2026 19:04
gilluminate added a commit that referenced this pull request Feb 17, 2026
Update 7403-dsr-policies-list-page.yaml
@gilluminate gilluminate force-pushed the gill/ENG-2595/fe-policy-list-page branch from 8867f59 to ea5a12b Compare February 17, 2026 19:06
gilluminate added a commit that referenced this pull request Feb 17, 2026
Update 7403-dsr-policies-list-page.yaml
@gilluminate gilluminate force-pushed the gill/ENG-2595/fe-policy-list-page branch from ea5a12b to 099cc38 Compare February 17, 2026 19:07
gilluminate added a commit that referenced this pull request Feb 17, 2026
Update 7403-dsr-policies-list-page.yaml
@gilluminate gilluminate force-pushed the gill/ENG-2595/fe-policy-list-page branch from 099cc38 to c019a0f Compare February 17, 2026 19:08
@gilluminate gilluminate marked this pull request as ready for review February 17, 2026 19:46
@gilluminate gilluminate requested a review from a team as a code owner February 17, 2026 19:46
@gilluminate gilluminate requested review from lucanovera and removed request for a team February 17, 2026 19:46
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 17, 2026

Greptile Summary

This PR adds a read-only DSR policies list page at /privacy-requests/policies, with client-side search/filter, empty states, loading skeletons, MSW mock data, and Cypress test coverage. The implementation is clean and fits naturally into the existing RTK Query + Next.js page pattern used throughout the admin UI.

Key points:

  • The POLICIES_ROUTE (/privacy-requests/policies) is correctly positioned before PRIVACY_REQUESTS_ROUTE in the nav config, which is necessary because the findActiveNav function uses startsWith matching and PRIVACY_REQUESTS_ROUTE has no exact flag. However, no findActiveNav test case exists for this new route, leaving the ordering dependency untested and susceptible to a silent regression if routes are ever reordered.
  • getActionTypes is a pure helper defined inside the component, causing unnecessary recreation on each render — it should be moved outside.
  • A div wrapper at line 50 of index.tsx should be replaced with the Flex component already in scope, per project convention.
  • The policyHandlers are correctly wired into the top-level MSW handlers array (a previously flagged gap that has been addressed).

Confidence Score: 4/5

  • Safe to merge — the changes are additive and read-only with no data mutation risk.
  • All changes are additive (new page, new route, new mocks, new tests). The main risk is the untested findActiveNav ordering dependency between POLICIES_ROUTE and PRIVACY_REQUESTS_ROUTE, which could silently break nav highlighting if routes are reordered in the future. Remaining issues are minor style/convention items.
  • clients/admin-ui/src/features/common/nav/nav-config.test.ts — missing findActiveNav test case for the new route; clients/admin-ui/src/pages/privacy-requests/policies/index.tsx — helper function placement and div usage.

Important Files Changed

Filename Overview
clients/admin-ui/src/pages/privacy-requests/policies/index.tsx New policies list page with search, empty state, and loading skeleton. Minor issues: getActionTypes helper defined inside component (recreated on every render), div wrapper at line 50 instead of Flex per project convention. No pagination support for large policy lists. Previously flagged items about div and helper placement remain.
clients/admin-ui/src/features/common/nav/nav-config.tsx Adds "Policies" nav entry under Privacy requests with POLICY_READ scope. The POLICIES_ROUTE (/privacy-requests/policies) is correctly placed before PRIVACY_REQUESTS_ROUTE (/privacy-requests), which is important because findActiveNav uses startsWith matching and PRIVACY_REQUESTS_ROUTE lacks an exact flag. Ordering is currently correct but fragile with no guard against future reordering.
clients/admin-ui/src/features/common/nav/nav-config.test.ts Correctly adds Policies to the Privacy requests group assertion. However, no findActiveNav test case is added for the POLICIES_ROUTE path, leaving the fragile startsWith-based routing behavior untested for this specific route.
clients/admin-ui/src/mocks/handlers.ts Correctly registers policyHandlers in the main MSW handlers array. This was a previously flagged issue that has been addressed in this PR.
clients/admin-ui/src/mocks/policy/handlers.ts MSW handler for GET /api/v1/dsr/policy with pagination support. Clean implementation using a factory function pattern consistent with other mock handlers in the project.
clients/admin-ui/src/mocks/policy/data.ts 14 realistic mock policies covering access, erasure, and consent action types. Uses as RuleResponse type assertions to partially satisfy the RuleResponse interface. Clean and representative mock data.
clients/admin-ui/cypress/e2e/policies/policies-list.cy.ts Good Cypress test coverage for the policies list page including display, search/filter, and empty state scenarios. Uses closest("li") for scoping tag assertions, which relies on DOM structure but avoids internal Ant Design CSS classes (previously flagged .ant-list-item pattern has been addressed with this approach).
clients/admin-ui/cypress/support/stubs.ts Adds stubDSRPolicies helper with isEmpty option, using correct wildcard pattern for the intercept URL. Consistent with existing stub patterns in the file.

Last reviewed commit: b1c929b

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

10 files reviewed, 6 comments

Edit Code Review Agent Settings | Greptile

@gilluminate
Copy link
Contributor Author

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

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.

1 participant