Skip to content

fix(whitelabel): fix privacy policy & terms, remove unused/unnecessary envvars for whitelabeling#969

Merged
waleedlatif1 merged 7 commits into
stagingfrom
fix/whitelabel
Aug 15, 2025
Merged

fix(whitelabel): fix privacy policy & terms, remove unused/unnecessary envvars for whitelabeling#969
waleedlatif1 merged 7 commits into
stagingfrom
fix/whitelabel

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

fix privacy policy & terms, remove unused/unnecessary envvars for whitelabeling

Type of Change

  • Bug fix

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 15, 2025

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

Project Deployment Preview Comments Updated (UTC)
sim Ready Preview Comment Aug 15, 2025 3:01am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs ⬜️ Skipped Aug 15, 2025 3:01am

Copy link
Copy Markdown
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.

Greptile Summary

This PR cleans up the whitelabeling configuration system by removing three unused environment variables (NEXT_PUBLIC_HIDE_BRANDING, NEXT_PUBLIC_CUSTOM_FOOTER_TEXT, and NEXT_PUBLIC_SUPPORT_URL) and fixes redirect handling for privacy policy and terms pages. The changes span multiple files:

  1. Environment Configuration Cleanup: Removes the unused variables from env.ts, which were defined in both the client schema and experimental runtime environment mapping but weren't actually consumed by the branding system.

  2. Branding Interface Simplification: Updates the BrandConfig interface in branding.ts by removing the corresponding hideBranding, footerText, and supportUrl properties, streamlining the interface from 14 to 11 properties.

  3. Next.js Redirect Logic Enhancement: Restructures the redirects function in next.config.ts to properly handle whitelabel deployments by:

    • Adding conditional redirects for /terms and /privacy pages when external URLs are configured
    • Implementing a self-hosted deployment redirect from / to /login
    • Fixing domain redirect syntax by adding the required key property to has conditions
  4. Helm Configuration Updates: Removes the unused variables from both the main values.yaml, the schema validation in values.schema.json, and the example whitelabel configuration in values-whitelabeled.yaml.

The changes integrate well with the existing codebase architecture, where the getBrandConfig() function in branding.ts serves as the central point for branding configuration, and the Next.js redirects enable whitelabel deployments to point users to external privacy/terms pages when configured.

Confidence score: 4/5

  • This PR is safe to merge with low risk of issues
  • Score reflects clean removal of unused code and proper redirect implementation, with minor complexity in the Next.js config restructuring
  • Pay close attention to next.config.ts to ensure redirect logic works correctly across different deployment scenarios

6 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@vercel vercel Bot temporarily deployed to Preview – docs August 15, 2025 02:54 Inactive
@waleedlatif1 waleedlatif1 merged commit 72c07e8 into staging Aug 15, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/whitelabel branch August 15, 2025 03:03
waleedlatif1 added a commit that referenced this pull request Aug 15, 2025
…y envvars for whitelabeling (#969)

* fix(whitelabel): fix privacy policy & terms for whitelabeling

* remove unused hide branding url

* removed support email envvar, remove landing page except for hosted version

* remove unnecessary comments

* removed primary, secondary, accent color envvars and standardized usage of brand colors in css file

* fix primaryColor refernce

* fix invalid css
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…y envvars for whitelabeling (simstudioai#969)

* fix(whitelabel): fix privacy policy & terms for whitelabeling

* remove unused hide branding url

* removed support email envvar, remove landing page except for hosted version

* remove unnecessary comments

* removed primary, secondary, accent color envvars and standardized usage of brand colors in css file

* fix primaryColor refernce

* fix invalid css
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.

1 participant