Skip to content

Add read-only DSR policy detail page#7408

Merged
gilluminate merged 15 commits intomainfrom
gill/ENG-2716/fe-policy-detail-page
Feb 19, 2026
Merged

Add read-only DSR policy detail page#7408
gilluminate merged 15 commits intomainfrom
gill/ENG-2716/fe-policy-detail-page

Conversation

@gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Feb 18, 2026

Ticket ENG-2716

Description Of Changes

Add a read-only policy detail page with Rules and Conditions tabs. This lays the groundwork for future policy editing capabilities.

Code Changes

  • Add policies list page at /privacy-requests/policies/ with search by name/key, action type tags, and empty states
  • Add policy detail page at /privacy-requests/policies/[key] with PolicyBox header, RulesTab, and PolicyConditionsTab components
  • Extend policy.slice.ts with getPolicy
  • Add and update related type definitions
  • Update LinkCell so that href is correctly using the with Next.js Url type
  • Add Cypress E2E tests for the policy detail page

Steps to Confirm

  1. Navigate to Privacy Requests > Policies and click a policy name to navigate to the detail page
  2. Verify the detail page shows the policy name/key and has working Rules and Conditions tabs
    (Tabs are pretty basic right now but the next PR will populate those more)

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
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

@vercel
Copy link
Contributor

vercel bot commented Feb 18, 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 19, 2026 5:52pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Feb 19, 2026 5:52pm

Request Review

gilluminate added a commit that referenced this pull request Feb 18, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@gilluminate gilluminate force-pushed the gill/ENG-2716/fe-policy-detail-page branch from 12fc31e to 7a1e5ed Compare February 18, 2026 01:09
@gilluminate gilluminate changed the base branch from main to gill/ENG-2595/fe-policy-list-page February 18, 2026 01:10
gilluminate added a commit that referenced this pull request Feb 18, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@gilluminate gilluminate force-pushed the gill/ENG-2716/fe-policy-detail-page branch from 7a1e5ed to b13329e Compare February 18, 2026 01:19
@gilluminate gilluminate force-pushed the gill/ENG-2595/fe-policy-list-page branch from b1c929b to 5ea9eb6 Compare February 18, 2026 01:55
gilluminate added a commit that referenced this pull request Feb 18, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@gilluminate gilluminate force-pushed the gill/ENG-2716/fe-policy-detail-page branch from 1a88622 to 33f18df Compare February 18, 2026 01:55
@gilluminate gilluminate marked this pull request as ready for review February 18, 2026 04:26
@gilluminate gilluminate requested a review from a team as a code owner February 18, 2026 04:26
@gilluminate gilluminate requested review from jpople and removed request for a team February 18, 2026 04:26
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 18, 2026

Greptile Summary

This PR adds a read-only DSR policy detail page at /privacy-requests/policies/[key], including a PolicyBox header component, stub RulesTab and PolicyConditionsTab tabs, a new getPolicy RTK Query endpoint, and Cypress E2E tests. It also updates LinkCell to accept Next.js Url objects and adds navigation links from the policy list to detail pages.

  • The Cypress test visits a URL with key default_consent_policy but the stub always returns default_erasure_policy data — the test passes due to the wildcard intercept but is semantically misleading
  • The policies list page uses useState for search instead of the existing useSearch hook, which would provide URL state synchronization consistent with other pages
  • conditions?: any added to PolicyResponse bypasses type safety; a more specific type (e.g., ConditionGroup) would be preferable
  • New components (PolicyBox, RulesTab, PolicyConditionsTab) are clean and well-structured placeholder implementations

Confidence Score: 4/5

  • This PR is safe to merge with minor issues around test data consistency and type safety.
  • The core implementation is clean and follows existing patterns well. The issues found are a test data mismatch (misleading but not broken), a style suggestion to use the existing useSearch hook, and an untyped any field. None of these are blocking.
  • Pay attention to clients/admin-ui/cypress/e2e/policies/policy-detail.cy.ts (test key mismatch with stub data) and clients/admin-ui/src/types/api/models/PolicyResponse.ts (untyped any field).

Important Files Changed

Filename Overview
clients/admin-ui/cypress/e2e/policies/policy-detail.cy.ts New Cypress E2E tests for policy detail page. Test visits default_consent_policy but stub returns default_erasure_policy data — a mismatch that's masked by the wildcard intercept.
clients/admin-ui/src/features/common/table/cells/LinkCell.tsx Updates href prop to accept Next.js Url type (supporting object-based hrefs). Import is from next/dist/ internal path, which is pre-existing in the codebase.
clients/admin-ui/src/features/policy/policy.slice.ts Adds getPolicy RTK Query endpoint with proper providesTags for cache management. Clean implementation.
clients/admin-ui/src/pages/privacy-requests/policies/[key].tsx New policy detail page with loading, error, and success states. Uses useURLHashedTabs for tab navigation and proper skip on the query hook when key is undefined.
clients/admin-ui/src/pages/privacy-requests/policies/index.tsx Adds LinkCell navigation to policy detail pages. Uses local useState for search instead of the existing useSearch hook.
clients/admin-ui/src/types/api/models/PolicyResponse.ts Adds conditions?: any — an untyped field to an auto-generated type file. Should use a more specific type.

Last reviewed commit: 33f18df

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.

13 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 18, 2026

Additional Comments (1)

clients/admin-ui/src/pages/privacy-requests/policies/index.tsx
Consider using useSearch hook

The codebase has an existing useSearch hook (~/features/common/hooks/useSearch) that provides URL state synchronization via NuQS. Using useState here means search state is lost when navigating away and back. Consider using useSearch for consistency with the rest of the codebase.

Context Used: Rule from dashboard - Use the existing useSearch hook for search functionality to maintain URL state synchronization ins... (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

gilluminate added a commit that referenced this pull request Feb 18, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@gilluminate gilluminate force-pushed the gill/ENG-2716/fe-policy-detail-page branch from 33f18df to eeec4cb Compare February 18, 2026 19:06
@gilluminate gilluminate force-pushed the gill/ENG-2595/fe-policy-list-page branch from 1ec4460 to 4915ee2 Compare February 18, 2026 20:31
@gilluminate gilluminate force-pushed the gill/ENG-2716/fe-policy-detail-page branch from eeec4cb to 6c0f121 Compare February 18, 2026 20:32
Base automatically changed from gill/ENG-2595/fe-policy-list-page to main February 18, 2026 20:59
@gilluminate gilluminate added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit f8084e2 Feb 19, 2026
47 of 54 checks passed
@gilluminate gilluminate deleted the gill/ENG-2716/fe-policy-detail-page branch February 19, 2026 18:58
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.

2 participants

Comments