mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-11 23:35:25 -05:00
Implements a cookie consent banner and settings modal for GDPR compliance, allowing users to manage preferences for analytics and monitoring cookies. Integrates consent checks with Sentry, Vercel Analytics, and Google Analytics, ensuring tracking is only enabled with user permission. Refactors dialog components for improved layout and adds consent management utilities and hooks. #### For code changes: - [x] Banner appears at bottom of page on first visit with rounded corners and proper spacing (40px margins) - [x] Banner shows three buttons: "Reject All", "Settings", and "Accept All" - [x] Clicking "Accept All" hides banner and enables analytics/monitoring - [x] Clicking "Reject All" hides banner and keeps analytics/monitoring disabled - [x] Banner does not reappear after consent is given (check localStorage: `autogpt_cookie_consent`) **Cookie Settings Modal:** - [x] Clicking "Settings" button opens the Cookie Settings modal - [x] Modal displays three categories: Essential Cookies (always active), Analytics & Performance (toggle), Error Monitoring & Session Replay (toggle) - [x] Clicking "Save Preferences" saves custom settings and closes modal - [x] Clicking "Accept All" enables all cookies and closes modal - [x] Clicking "Reject All" disables optional cookies and closes modal - [x] Modal can be closed with X button or clicking outside **Consent Persistence:** - [x] Refresh page after giving consent - banner should not reappear - [x] Clear localStorage and refresh - banner should reappear - [x] Consent choices persist across browser sessions <img width="1123" height="126" alt="image" src="https://github.com/user-attachments/assets/7425efab-b5cc-4449-802d-0e12bd65053b" /> <img width="1124" height="372" alt="image" src="https://github.com/user-attachments/assets/2f28919a-97e8-44f5-9021-70d3836bb996" />