Skip to content

Conversation

@erosselli
Copy link
Contributor

@erosselli erosselli commented Nov 24, 2025

no ticket

Description Of Changes

We recently made some changes to the consent v3 API, so we need to update the privacy notice sandbox accordingly. The API override_mode query param changed to policy . Old name -> new name:

  • descendants -> cascade_down
  • ancestors -> cascade_up
  • all -> cascade_up_and_down

This PR also removes a lot of the complex cascading logic the UI had and delegates it all to the backend; no cascading will be done in the privacy notice checkbox tree, but rather the tree is reloaded from the backend response after preferences are saved. It also removes the "simulated data" tab as that has fallen behind and is no longer needed now that we have a working API.

Code Changes

  • Update override_mode to policy
  • Remove complicated cascading logic from the UI
  • Add a property_id input to allow retrieving an experience configured on a specific property
  • Remove Simulated data tab and related components

Steps to Confirm

N/A

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 Nov 24, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Nov 24, 2025 7:33pm
fides-privacy-center Ignored Ignored Nov 24, 2025 7:33pm

@erosselli erosselli marked this pull request as ready for review November 24, 2025 18:30
@erosselli erosselli requested a review from a team as a code owner November 24, 2025 18:30
@erosselli erosselli requested review from gilluminate and removed request for a team November 24, 2025 18:30
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 24, 2025

Greptile Overview

Greptile Summary

This PR updates the privacy notice sandbox to align with recent Consent V3 API changes, replacing the override_mode query parameter with policy and updating the enum values (descendantscascade_down, ancestorscascade_up, allcascade_up_and_down).

Key changes:

  • Removed ~100 lines of complex client-side cascading logic from PrivacyNoticesTree.tsx - the tree now only tracks explicit user changes and delegates all cascading behavior to the backend
  • After saving preferences, the UI reloads the tree state from the backend response to reflect server-side cascading
  • Removed the "Simulated data" tab and ~70 lines of hardcoded mock data constants, simplifying the sandbox to only use real API calls
  • Added property_id input field to allow testing experiences configured on specific properties
  • Fixed timestamp format in collected_at metadata (now uses +00:00 instead of Z suffix)

Confidence Score: 5/5

  • This PR is safe to merge - it's a well-executed refactoring that simplifies the codebase by removing complex client-side logic
  • The changes are clean and focused: removing 873 lines while adding only 205 lines demonstrates effective simplification. The PR delegates cascading logic to the backend (eliminating client-side complexity), updates API parameters to match backend changes, and removes unused mock data. The code is more maintainable and follows proper separation of concerns. This is sandbox/testing code with limited production impact.
  • No files require special attention - all changes are straightforward refactoring and API updates

Important Files Changed

File Analysis

Filename Score Overview
clients/admin-ui/src/features/common/v3-api.slice.ts 5/5 Updated API parameter from override_mode to policy and added optional property_id parameter to experience query
clients/admin-ui/src/types/api/models/PropagationPolicyKey.ts 5/5 New enum defining propagation policy keys matching updated backend API (cascade_down, cascade_up, cascade_up_and_down)
clients/admin-ui/src/features/poc/privacy-notices-sandbox/components/PrivacyNoticesTree.tsx 5/5 Removed complex cascading logic (~100 lines), simplified to track explicit user changes only, delegates cascading to backend
clients/admin-ui/src/features/poc/privacy-notices-sandbox/components/SavePreferencesSection.tsx 5/5 Updated to use policy parameter, reloads tree from backend response after save to reflect server-side cascading, fixed timestamp format
clients/admin-ui/src/features/poc/privacy-notices-sandbox/components/PropagationPolicyDropdown.tsx 5/5 New dropdown component replacing OverrideModeDropdown with updated policy options and system_enforced default
clients/admin-ui/src/features/poc/privacy-notices-sandbox/PrivacyNoticeSandboxRealData.tsx 5/5 Updated to use new policy terminology, added propertyId input, tracks explicitly changed keys for backend submission

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.

20 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

}
const { noticeKeyToHistoryMap, parentNoticeKeys } = useMemo(() => {
const historyMap = new Map<string, string>();
const parentMap = new Map<string, string>();
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like parentMap is being used for anything anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah you're right, will remove. thanks!

Copy link
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

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

a couple of nit-picks, but otherwise looking good.

…onents/ExperienceConfigSection.tsx

Co-authored-by: Jason Gill <jason.gill@ethyca.com>
@erosselli erosselli added this pull request to the merge queue Nov 25, 2025
Merged via the queue into main with commit 4efdd53 Nov 25, 2025
46 of 47 checks passed
@erosselli erosselli deleted the erosselli/privacy-notice-sandbox-bugfixes branch November 25, 2025 01:33
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.

3 participants