Skip to content

ENG-3447: Add att_exempt support to FidesJS consent overlay#8030

Merged
thabofletcher merged 33 commits into
mainfrom
ENG-3447/att-fides-js
May 6, 2026
Merged

ENG-3447: Add att_exempt support to FidesJS consent overlay#8030
thabofletcher merged 33 commits into
mainfrom
ENG-3447/att-fides-js

Conversation

@thabofletcher
Copy link
Copy Markdown
Contributor

@thabofletcher thabofletcher commented Apr 24, 2026

Ticket ENG-3447

Description Of Changes

Adds fides_att_denied as a FidesJS override option. When true, privacy notices where att_exempt is false (or unset) are automatically disabled (toggle locked, opt_out) in both the standard and TCF overlay flows. Notices with att_exempt: true remain interactive regardless.

This is the FidesJS counterpart to the model/migration PR, and unblocks the Janus mobile SDK (ENG-3380) from implementing native ATT integration — the mobile SDK will pass fides_att_denied=true to the embedded consent URL after the user denies Apple's ATT prompt.

Depends on: #8029 (model + migration)

Code Changes

  • Added att_exempt?: boolean to PrivacyNotice type in consent-types.ts
  • Added fidesAttDenied: boolean to FidesInitOptions and FidesInitOptionsOverrides
  • Registered fides_att_denied in FIDES_OVERRIDE_OPTIONS_VALIDATOR_MAP (boolean, accepted as URL param)
  • Applied ATT disabled logic in NoticeOverlay.tsx and TcfOverlay.tsxdisabled is true when fidesAttDenied && !notice.att_exempt
  • Added default fidesAttDenied: false in init-utils.ts
  • Documented option in fides-options.ts

Steps to Confirm

  1. Load embedded-consent.html?fides_att_denied=true with an experience that has mixed att_exempt notices
  2. Confirm notices with att_exempt: false have their toggles disabled and locked
  3. Confirm notices with att_exempt: true remain interactive
  4. Confirm standard (non-TCF) overlay behaves identically

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
  • UX feedback:
    • No UX review needed
  • Followup issues:
    • No followup issues (Janus SDK work tracked in ENG-3380)
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

Adds a boolean att_exempt column to privacynotice, privacynoticehistory,
and privacynoticetemplate. When false (default), the notice is controlled
by Apple's ATT prompt — automatically disabled and locked when the user
denies tracking. When true, the notice is exempt and remains
user-toggleable regardless of ATT.

Includes Alembic migration and schema update.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 24, 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 May 6, 2026 4:55pm
fides-privacy-center Ignored Ignored May 6, 2026 4:55pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 8%
6.66% (3042/45615) 5.97% (1572/26303) 4.67% (630/13465)
fides-js Coverage: 78%
79.56% (2028/2549) 66.4% (1259/1896) 73.31% (349/476)
privacy-center Coverage: 85%
82.53% (364/441) 79.74% (189/237) 74.07% (60/81)

Adds a new fides_att_denied option that, when true, automatically disables
(locks to opt_out) any privacy notice where att_exempt is false or unset.
Notices with att_exempt: true remain interactive regardless of ATT status.

This enables the Janus mobile SDK to pass ATT denial status to the embedded
consent experience so that ATT-controlled notices are locked consistently
in both standard and TCF overlay flows.
When fides_att_denied=true, extend the UI lock beyond custom notices to
cover all IAB TCF purposes and vendors. Only notices with att_exempt=true
remain user-toggleable; everything else is disabled.

- TcfOverlay: pass fidesAttDenied down into TcfTabs
- TcfTabs: thread attDenied prop to TcfPurposes and TcfVendors
- TcfPurposes: set disabled=attDenied on all consent/legint purpose records
- TcfVendors: set disabled=attDenied on all vendor records in PagedVendorData
…Accept/Reject All

When fides_att_denied=true, non-exempt custom notices must be locked at opt-out.
The disabled flag correctly prevents UI interaction, but handleAcceptAll and
handleRejectAll both preserved disabled-but-opted-in notices (a pattern needed
for notice_only notices). For returning users whose FidesJS cookie had non-exempt
notices as opted-in, this caused Accept All and Reject All to silently save
those notices as opted-in despite ATT denial.

Fix: filterAttDeniedFromDraft() strips non-exempt ATT notices from the draft
at initialization, before the cookie value can pollute draftIds. The existing
accept/reject logic then works correctly without any ATT-specific branching —
the notices simply aren't in the draft to be "preserved".

notice_only and att_exempt notices are kept in the draft unchanged.
@thabofletcher thabofletcher force-pushed the ENG-3447/att-fides-js branch from 768a0b6 to 3e43d7a Compare May 5, 2026 21:21
@thabofletcher thabofletcher marked this pull request as ready for review May 5, 2026 21:28
@thabofletcher thabofletcher requested a review from a team as a code owner May 5, 2026 21:28
@thabofletcher thabofletcher requested review from gilluminate and removed request for a team May 5, 2026 21:28
Copy link
Copy Markdown
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.

This PR adds non-trivial state-stripping logic with two large explanatory comments, but no unit tests or e2e tests. Let's make sure to include those as passing before merging.

Comment thread clients/fides-js/docs/interfaces/FidesOptions.md Outdated
Comment thread clients/fides-js/src/docs/fides-options.ts Outdated
Comment thread clients/fides-js/src/components/tcf/TcfVendors.tsx
@thabofletcher thabofletcher requested a review from a team as a code owner May 6, 2026 02:01
@thabofletcher thabofletcher requested review from JadeCara and removed request for a team May 6, 2026 02:01
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (ENG-3447/att-notice-exempt-field@450bcc4). Learn more about missing BASE report.

Additional details and impacted files
@@                         Coverage Diff                         @@
##             ENG-3447/att-notice-exempt-field    #8030   +/-   ##
===================================================================
  Coverage                                    ?   85.17%           
===================================================================
  Files                                       ?      637           
  Lines                                       ?    41973           
  Branches                                    ?     4934           
===================================================================
  Hits                                        ?    35752           
  Misses                                      ?     5112           
  Partials                                    ?     1109           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thabofletcher
Copy link
Copy Markdown
Contributor Author

This PR adds non-trivial state-stripping logic with two large explanatory comments, but no unit tests or e2e tests. Let's make sure to include those as passing before merging.

Added tests and they are passing 👍

@thabofletcher thabofletcher requested a review from gilluminate May 6, 2026 03:40
Copy link
Copy Markdown
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

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

Can we actually prevent a notice-only notice from having att_exampt from being set? It might be confusing to the user if they can set it but it doesn't have an effect down the line?

@thabofletcher
Copy link
Copy Markdown
Contributor Author

Can we actually prevent a notice-only notice from having att_exampt from being set? It might be confusing to the user if they can set it but it doesn't have an effect down the line?

The validation becomes a little tricky for this because we would not only have to prevent att_exempt from being set to false for notice_only rows, we would also have to enforce it is true and stays true when they set that. Nothing the user sets though actually can create a bug condition though, so I think its ok

Base automatically changed from ENG-3447/att-notice-exempt-field to main May 6, 2026 15:31
Copy link
Copy Markdown
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

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

would be great to extract these fidesAttStatus strings as enum, but if this is too involved we can follow up in separate ticket

@thabofletcher thabofletcher enabled auto-merge May 6, 2026 17:26
@thabofletcher thabofletcher dismissed gilluminate’s stale review May 6, 2026 17:27

Made Jason's requested changes and also got another review. Jason is OOO

@thabofletcher thabofletcher added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 5cb99c1 May 6, 2026
45 checks passed
@thabofletcher thabofletcher deleted the ENG-3447/att-fides-js branch May 6, 2026 17:35
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