fix(whitelabel): fix privacy policy & terms, remove unused/unnecessary envvars for whitelabeling#969
Conversation
There was a problem hiding this comment.
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:
-
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. -
Branding Interface Simplification: Updates the
BrandConfiginterface inbranding.tsby removing the correspondinghideBranding,footerText, andsupportUrlproperties, streamlining the interface from 14 to 11 properties. -
Next.js Redirect Logic Enhancement: Restructures the
redirectsfunction innext.config.tsto properly handle whitelabel deployments by:- Adding conditional redirects for
/termsand/privacypages when external URLs are configured - Implementing a self-hosted deployment redirect from
/to/login - Fixing domain redirect syntax by adding the required
keyproperty tohasconditions
- Adding conditional redirects for
-
Helm Configuration Updates: Removes the unused variables from both the main
values.yaml, the schema validation invalues.schema.json, and the example whitelabel configuration invalues-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.tsto ensure redirect logic works correctly across different deployment scenarios
6 files reviewed, no comments
…ge of brand colors in css file
fb56d01 to
e702731
Compare
e702731 to
76b5b5c
Compare
76b5b5c to
4f8a39f
Compare
4f8a39f to
ae9bfb1
Compare
ae9bfb1 to
e596110
Compare
…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
…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
Summary
fix privacy policy & terms, remove unused/unnecessary envvars for whitelabeling
Type of Change
Testing
Tested manually.
Checklist