Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Sep 16, 2025

This PR adds GDPR-compliant cookie banner to web-roo-code, ensuring cookie-driven analytics scripts are added only after consent.

Changes

  • Implemented CookieConsent component with proper styling (white background by default, inverted in dark mode)
  • Integrated cookie consent into web-roo-code layout

Screenshots

image

image
image

Important

Adds GDPR-compliant cookie consent banner and updates analytics providers to respect user consent.

  • Behavior:
    • Adds CookieConsentWrapper component in CookieConsentWrapper.tsx for GDPR-compliant cookie consent.
    • Integrates CookieConsentWrapper into layout.tsx to display consent banner.
    • Updates GoogleAnalyticsProvider and PostHogProvider to load analytics only after consent.
  • Consent Management:
    • Implements consent management in consent-manager.ts to handle consent events.
    • Defines CONSENT_COOKIE_NAME and COOKIE_CONSENT_EVENTS in cookie-consent.ts.
  • Dependencies:
    • Adds react-cookie-consent and tldts to package.json.

This description was created by Ellipsis for 9fc5f6c. You can customize this summary. It will automatically update as commits are pushed.

- Created shared @roo-code/cookie-consent package with react-cookie-consent
- Implemented CookieConsent component with proper styling (white bg, inverted in dark mode)
- Integrated cookie consent into web-roo-code layout
- Created basic Next.js app structure for web-docs
- Integrated cookie consent into web-docs layout
- Used shared component approach for consistency and maintainability
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Reviewing my own code because apparently I trust no one, not even myself.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 16, 2025
@brunobergher
Copy link
Collaborator

@roomote-agent there's a lot of PR feedback for you to address here.

@roomote
Copy link
Contributor Author

roomote bot commented Sep 16, 2025

Thanks for the feedback @brunobergher! I see the review comments and I'm on it. Here's what I'll be addressing:

  1. Remove shared package approach - Will duplicate the cookie consent component directly in each app instead
  2. Fix hydration issues - Replace DOM manipulation with next-themes useTheme hook for dark mode detection
  3. Use Tailwind classes - Replace all inline styles with Tailwind utility classes
  4. Add accessibility - Include proper ARIA attributes for screen reader support
  5. Remove unused dependency - Remove js-cookie from dependencies
  6. Align ESLint versions - Update to ESLint v9 across all apps

I'll have these changes ready shortly!

- Remove shared package approach, duplicate component in each app
- Replace DOM manipulation with next-themes useTheme hook for dark mode
- Replace all inline styles with Tailwind utility classes
- Add proper ARIA attributes for accessibility
- Remove unused js-cookie dependency
- Align ESLint version to v9 across all apps

Addresses all review comments from @brunobergher
@github-actions
Copy link
Contributor

🚀 Preview deployed!

Your changes have been deployed to Vercel:

Preview URL: https://roo-code-website-hqgul24g8-roo-code.vercel.app

This preview will be updated automatically when you push new commits to this PR.

@roomote
Copy link
Contributor Author

roomote bot commented Sep 16, 2025

Hey @brunobergher! All requested changes have been implemented and pushed ✅

Changes Made:

  • Removed shared package approach - Deleted packages/cookie-consent and duplicated the component directly in each app
  • Fixed hydration issues - Replaced DOM manipulation with useTheme hook from next-themes for dark mode detection
  • Replaced inline styles - All styles now use Tailwind utility classes instead of React.CSSProperties
  • Added accessibility - Included proper ARIA attributes (role="banner", aria-label, aria-live)
  • Removed unused dependency - js-cookie was not included in the new implementation
  • Aligned ESLint versions - Updated web-docs to use ESLint v9 to match other apps

CI Status:

Most checks are passing. The Windows unit test failure appears to be a pre-existing issue unrelated to these changes (all other platform tests pass).

The cookie consent implementation is now cleaner, more maintainable, and follows best practices for SSR/hydration. Ready for your review!

@brunobergher brunobergher changed the title feat: add GDPR-compliant cookie consent banners feat: add GDPR-compliant cookie consent banner Sep 16, 2025
@brunobergher brunobergher marked this pull request as ready for review September 16, 2025 15:05
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Enhancement New feature or request labels Sep 16, 2025
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should probably remove this apps/web-docs folder and everything in it

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dosubot dosubot bot removed the size:XL This PR changes 500-999 lines, ignoring generated files. label Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants