Draft
Conversation
Cherry-picks the final state of the data-purposes feature and page directories from the inventory_and_purposes branch onto a fresh branch cut from main. Excludes unrelated work from that branch (system-inventory v2, data-consumers, access-control-v2, etc.). Pages are still mock-backed via features/data-purposes/mockData.ts; wiring to real backend endpoints will follow in a separate PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket ENG-3158
Description Of Changes
Adds a new Purpose Management UI at
/data-purposes, gated behind the existingalphaPurposeBasedAccessControlflag (dev-only by default; same flag alreadygating the nav entry). The list page groups purposes by data use and supports a
card grid or network-diagram view; the detail page surfaces data consumers,
assigned datasets, and a governance-insight agent alert.
CRUD is wired to the existing fidesplus
/api/v1/data-purpose[/{fides_key}]endpoints. Per-purpose enrichment (summaries, systems, datasets, category
actions) is served by MSW handlers under
src/mocks/data-purposes/— these/api/v1/plus/data-purpose/...endpoints do not exist in fidesplus yet(verified against
main). Run withnpm run dev:mockto exercise the fullflow end-to-end. When the flag is off, both pages render a disabled-state
shell and do not fire any queries.
No new form fields are introduced; every input on the create modal and config
form maps 1:1 to existing
DataPurposeResponsefields.Code Changes
src/features/data-purposes/withPurposeCardGrid,PurposeNetworkView,PurposeDetail,PurposeDashboard,PurposeConfigForm,NewPurposeModal,AssignedSystemsSection,AssignedDatasetsSection,AssignSystemsPickerModal,AddDatasetsModal,PurposeGovernanceAlert.pages/data-purposes/index.tsxandpages/data-purposes/[fidesKey].tsx,both gated by
flags.alphaPurposeBasedAccessControl.data-purpose.slice.tsinjects CRUD + 12 plus-gap endpoints;getPurposeSummariesprovides list-level + per-id tags so scoped mutation invalidations refresh
the card grid counts.
src/mocks/data-purposes/with in-memory stores that persistfor the session;
available-*endpoints exclude already-assigned items.window.openreplaced with
router.push; at-risk/dataset-count gating derived from datarather than hardcoded system names.
changelog/8014-purpose-management-ui.yaml.Steps to Confirm
cd clients/admin-ui && npm run dev:mock/settings/about/alpha, enable Alpha purpose-based access control./data-purposes— verify card grid, search, filters (status,consumer, category, data use), and the grid/network toggle.
picker modals show only unassigned items and that list-page counts refresh
after close.
categories not in its defined list; verify the "agent" alert renders and
"Approve categories" merges them.
/data-purposesand/data-purposes/{key}shouldrender a "not enabled" shell and fire no queries (check Network tab).
Pre-Merge Checklist
CHANGELOG.mdupdated