Skip to content

ENG-2338 - Configure when Banners resurface#7292

Draft
tina-zimnicki wants to merge 4 commits intomainfrom
ENG-2338
Draft

ENG-2338 - Configure when Banners resurface#7292
tina-zimnicki wants to merge 4 commits intomainfrom
ENG-2338

Conversation

@tina-zimnicki
Copy link
Contributor

@tina-zimnicki tina-zimnicki commented Feb 2, 2026

Ticket ENG-2338

Description Of Changes

This PR serves to implement a configurable banner resurfacing feature that allows privacy experiences to automatically re-display consent banners after users reject or dismiss them.

Code Changes

  • Added resurface_behavior ARRAY column to privacyexperienceconfig table with migration
  • Updated models and API endpoints to support the new field
  • Added multi-select component to Privacy Experience form for configuring resurface triggers
  • Added API endpoint tests

TODO

  • Add cypress tests

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

@tina-zimnicki tina-zimnicki requested review from a team as code owners February 2, 2026 19:29
@tina-zimnicki tina-zimnicki added do not merge Please don't merge yet, bad things will happen if you do db-migration This indicates that a change includes a database migration labels Feb 2, 2026
@tina-zimnicki tina-zimnicki requested review from erosselli and gilluminate and removed request for a team February 2, 2026 19:29
@vercel
Copy link
Contributor

vercel bot commented Feb 2, 2026

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Feb 12, 2026 6:20pm
fides-privacy-center Ignored Ignored Feb 12, 2026 6:20pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 2, 2026

Greptile Overview

Greptile Summary

This PR implements a configurable banner resurfacing feature that allows privacy experiences to automatically re-display consent banners after users reject or dismiss them.

Key Changes:

  • Added resurface_behavior ARRAY column to three experience config tables (privacyexperienceconfig, experienceconfigtemplate, privacyexperienceconfighistory) with proper PostgreSQL enum type
  • Created ResurfaceBehavior enum with values "reject" and "dismiss"
  • Updated privacy experience models to support the new field through create/update/history flows
  • Added multi-select UI component in Privacy Experience form with intelligent UX (disables "Dismiss" option when banner isn't dismissable)
  • Implemented client-side logic in shouldResurfaceBanner function to check the config and resurface based on user's consent method
  • Added comprehensive test coverage on both backend (4 new tests) and frontend (11 new test cases)
  • Included API documentation for the new resurface_behavior property

Implementation Quality:
The implementation is clean and follows established patterns throughout the codebase. The database migration properly creates enum types and handles upgrade/downgrade. The field is correctly integrated into all three experience config tables and their history. The UI thoughtfully disables invalid options and provides helpful descriptions. The client-side logic integrates seamlessly into the existing banner display logic.

Confidence Score: 5/5

  • This PR is safe to merge with no critical issues found
  • The implementation is well-structured with comprehensive test coverage, proper database migration patterns, clean integration across the full stack (database, backend models, API schemas, frontend UI, and client-side logic), and thoughtful UX considerations. All previous review comments about manual test cleanup and enum value mismatches have been addressed.
  • No files require special attention

Important Files Changed

Filename Overview
src/fides/api/alembic/migrations/versions/xx_2026_01_13_1934_ea20059aee77_add_resurface_behavior_to_experience_.py Adds resurface_behavior ARRAY column with proper enum type to three experience config tables. Clean migration with proper upgrade and downgrade logic.
src/fides/api/models/privacy_experience.py Adds ResurfaceBehavior enum and resurface_behavior column to base experience config class. Properly handles the field in create/update/history methods.
tests/api/models/test_privacy_experience.py Comprehensive test coverage for resurface_behavior field including create, update, single/multiple values, and null cases.
clients/admin-ui/src/features/privacy-experience/PrivacyExperienceForm.tsx Adds UI for configuring resurface behavior with checkbox group. Properly disables "Dismiss" option when dismissable is false, includes helpful descriptions.
clients/fides-js/src/lib/consent-utils.ts Implements logic to check resurface_behavior config and resurface banner based on consent method (reject/dismiss).

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.

5 files reviewed, 8 comments

Edit Code Review Agent Settings | Greptile

@gilluminate gilluminate requested review from JadeCara and removed request for erosselli February 3, 2026 16:19
@tina-zimnicki tina-zimnicki marked this pull request as draft February 3, 2026 18:26
@tina-zimnicki
Copy link
Contributor Author

@greptileai review

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, no 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

db-migration This indicates that a change includes a database migration do not merge Please don't merge yet, bad things will happen if you do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant