diff --git a/.claude/rules/sim-styling.md b/.claude/rules/sim-styling.md index 2c5e16be354..3db6e6c0fc9 100644 --- a/.claude/rules/sim-styling.md +++ b/.claude/rules/sim-styling.md @@ -99,7 +99,7 @@ The chip family is the canonical chrome: `ChipInput`, `ChipTextarea`, `ChipModal - **Errors** → `error` prop. Never `className={cn(err && 'border-[var(--text-error)]')}`. - **Leading icon** → `icon` prop (rendered 14px in `--text-icon`). - **Trailing buttons** (reveal/copy/fetch) → `endAdornment`. -- **Inner-input styling** (e.g. `font-mono`, number-spinner reset) → `inputClassName` (ChipInput only). See `ee/whitelabeling/components/whitelabeling-settings.tsx`. +- **Inner-input styling** (e.g. `font-mono`, number-spinner reset) → `inputClassName` (ChipInput only). - **`ChipModalField` controls take NO className.** Pass `title`/`value`/`onChange`/`error`/`hint`/`required`/`flush`. The field owns label, control, and error/hint rendering. See `app/workspace/[workspaceId]/skills/components/skill-modal/skill-modal.tsx`. ### What className MAY carry diff --git a/.cursor/rules/sim-styling.mdc b/.cursor/rules/sim-styling.mdc index f016cfc5b3f..2569d96c9d1 100644 --- a/.cursor/rules/sim-styling.mdc +++ b/.cursor/rules/sim-styling.mdc @@ -98,7 +98,7 @@ The chip family is the canonical chrome: `ChipInput`, `ChipTextarea`, `ChipModal - **Errors** → `error` prop. Never `className={cn(err && 'border-[var(--text-error)]')}`. - **Leading icon** → `icon` prop (rendered 14px in `--text-icon`). - **Trailing buttons** (reveal/copy/fetch) → `endAdornment`. -- **Inner-input styling** (e.g. `font-mono`, number-spinner reset) → `inputClassName` (ChipInput only). See `ee/whitelabeling/components/whitelabeling-settings.tsx`. +- **Inner-input styling** (e.g. `font-mono`, number-spinner reset) → `inputClassName` (ChipInput only). - **`ChipModalField` controls take NO className.** Pass `title`/`value`/`onChange`/`error`/`hint`/`required`/`flush`. The field owns label, control, and error/hint rendering. See `app/workspace/[workspaceId]/skills/components/skill-modal/skill-modal.tsx`. ### What className MAY carry diff --git a/apps/docs/content/docs/platform/enterprise/index.mdx b/apps/docs/content/docs/platform/enterprise/index.mdx index 0e30e3f342e..7ccf39afa11 100644 --- a/apps/docs/content/docs/platform/enterprise/index.mdx +++ b/apps/docs/content/docs/platform/enterprise/index.mdx @@ -3,7 +3,7 @@ title: Enterprise description: Configure organization access, provisioning, security, and operations --- -Sim Enterprise adds controls for organization access, member provisioning, security, operations, and branding. On Sim Cloud, these features require an Enterprise subscription. Organization owners and admins manage organization controls in **Settings → Organization**. +Sim Enterprise adds controls for organization access, member provisioning, security, and operations. On Sim Cloud, these features require an Enterprise subscription. Organization owners and admins manage organization controls in **Settings → Organization**. | Feature | Use it to | | --- | --- | @@ -19,7 +19,6 @@ Sim Enterprise adds controls for organization access, member provisioning, secur | [Data drains](/platform/enterprise/data-drains) | Export logs and Chat records to your own destination | | [Custom blocks](/platform/enterprise/custom-blocks) | Share a workflow as a block across the organization | | [Workspace forks](/platform/enterprise/forks) | Copy a workspace and sync deployed workflow changes | -| [White-labeling](/platform/enterprise/whitelabeling) | Configure organization branding | ## Self-hosted setup diff --git a/apps/docs/content/docs/platform/enterprise/meta.json b/apps/docs/content/docs/platform/enterprise/meta.json index 40747acf94a..374972b72e9 100644 --- a/apps/docs/content/docs/platform/enterprise/meta.json +++ b/apps/docs/content/docs/platform/enterprise/meta.json @@ -13,8 +13,7 @@ "audit-logs", "usage-tracking", "data-retention", - "data-drains", - "whitelabeling" + "data-drains" ], "defaultOpen": false } diff --git a/apps/docs/content/docs/platform/enterprise/self-hosted.mdx b/apps/docs/content/docs/platform/enterprise/self-hosted.mdx index 3e607e3e7a0..8ac8b0e825f 100644 --- a/apps/docs/content/docs/platform/enterprise/self-hosted.mdx +++ b/apps/docs/content/docs/platform/enterprise/self-hosted.mdx @@ -7,7 +7,7 @@ import { Callout } from '@/components/ui/callout' import { Step, Steps } from '@/components/ui/steps' import { Tab, Tabs } from '@/components/ui/tabs' -On a self-hosted deployment with billing disabled, enable enterprise features through environment variables. Then create an organization and attach its workspaces: branding, PII redaction, permission groups, custom blocks, data drains, and organization audit scope depend on the organization that owns a workspace. +On a self-hosted deployment with billing disabled, enable enterprise features through environment variables. Then create an organization and attach its workspaces: PII redaction, permission groups, custom blocks, data drains, and organization audit scope depend on the organization that owns a workspace. This guide covers the standard billing-disabled configuration. If billing is enabled, subscription gates apply and instance-organization variables are ignored. @@ -144,15 +144,7 @@ curl "https://sim.example.com/api/v1/admin/dashboard/workspaces/$WORKSPACE_ID/mo Use the Settings UI or these API requests: - - -```bash -curl -X PATCH https://sim.example.com/api/v1/admin/organizations/$ORG_ID/whitelabel \ - -H "x-admin-key: $ADMIN_API_KEY" \ - -H "Content-Type: application/json" \ - -d '{"brandName": "Acme AI", "hidePoweredBySim": true}' -``` - + ```bash curl -X PATCH https://sim.example.com/api/v1/admin/organizations/$ORG_ID/data-retention \ @@ -244,7 +236,7 @@ OAuth token cleanup removes expired and revoked credentials independently of sig ## Feature flag reference -Explicit individual flags override the master switch, including when set to `false`. With billing disabled and no enterprise flags set, custom branding, session policies, and the Sim Mailer inbox remain enabled by default. Other features require opt-in. +Explicit individual flags override the master switch, including when set to `false`. With billing disabled and no enterprise flags set, session policies and the Sim Mailer inbox remain enabled by default. Other features require opt-in. | Feature | Server variable | Browser variable | | --- | --- | --- | @@ -253,7 +245,6 @@ Explicit individual flags override the master switch, including when set to `fal | Permission groups | `ACCESS_CONTROL_ENABLED` | `NEXT_PUBLIC_ACCESS_CONTROL_ENABLED` | | SAML and OIDC sign-in | `SSO_ENABLED` | `NEXT_PUBLIC_SSO_ENABLED` | | Directory provisioning | `SCIM_ENABLED` | `NEXT_PUBLIC_SCIM_ENABLED` | -| Custom branding — enabled by default | `WHITELABELING_ENABLED` | `NEXT_PUBLIC_WHITELABELING_ENABLED` | | Audit logs | `AUDIT_LOGS_ENABLED` | `NEXT_PUBLIC_AUDIT_LOGS_ENABLED` | | Insights | `USAGE_MONITORING_ENABLED` | `NEXT_PUBLIC_USAGE_MONITORING_ENABLED` | | Custom blocks | `CUSTOM_BLOCKS_ENABLED` | `NEXT_PUBLIC_CUSTOM_BLOCKS_ENABLED` | @@ -289,7 +280,7 @@ To inspect workspace ownership: SELECT id, name, workspace_mode, organization_id FROM workspace; ``` -A workspace with `personal` mode or a null `organization_id` does not inherit organization branding, PII redaction, permission groups, or drains. +A workspace with `personal` mode or a null `organization_id` does not inherit organization PII redaction, permission groups, or drains. ## Related docs diff --git a/apps/docs/content/docs/platform/enterprise/whitelabeling.mdx b/apps/docs/content/docs/platform/enterprise/whitelabeling.mdx deleted file mode 100644 index 046bc2b223a..00000000000 --- a/apps/docs/content/docs/platform/enterprise/whitelabeling.mdx +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: White-labeling -description: Set organization branding or a self-hosted deployment's default identity, colors, and links ---- - -Organization white-labeling sets the logo, colors, and links shown inside your organization's workspaces. Authorized external workspace members also see the workspace's organization branding. Public login, manifest, and file-share surfaces use the separate [instance-wide branding](#instance-wide-branding) baseline. - -Organization owners and admins configure white-labeling. Billing-enabled deployments require Enterprise. On billing-disabled deployments, organization white-labeling defaults on; explicit `WHITELABELING_ENABLED=false` and `NEXT_PUBLIC_WHITELABELING_ENABLED=false` disable it. See [self-hosted enterprise setup](/platform/enterprise/self-hosted). - -## Configure organization branding - -1. Open **Settings → Organization → White-labeling**. -2. Set identity, colors, and links using the fields below. -3. Click **Save**. Refresh other open tabs to pick up changes. - -### Identity - -| Field | Use and limit | -| --- | --- | -| **Logo** | Square image in the collapsed sidebar. PNG, JPEG, SVG, or WebP; maximum 5 MiB. | -| **Wordmark** | Wide image in the expanded sidebar and loading screens. Same formats and 5 MiB limit. | -| **Brand name** | Sidebar and selected UI labels; maximum 64 characters. | - -Loading screens use the wordmark rather than the square logo. Without a wordmark, they use the brand name; the default name Sim uses the built-in Sim wordmark. - -### Colors - -Use valid hex values, such as `#701ffc`. - -| Field | Use | -| --- | --- | -| **Primary color** | Buttons and active states. | -| **Primary hover color** | Hover state for primary elements. | -| **Accent color** | Highlights and secondary interactive elements. | -| **Accent hover color** | Hover state for accent elements. | - -### Links - -| Field | Use | -| --- | --- | -| **Support email** | Help prompts; must be a valid email address. | -| **Documentation URL** | Documentation link. | -| **Terms of service URL** | Terms link. | -| **Privacy policy URL** | Privacy link. | - -The URL fields require valid URLs. Check the collapsed and expanded sidebar, a loading screen, and the support/legal links after saving. - -## Scope and fallback - -Saved organization values override the instance baseline inside that organization's workspace. Clearing an organization value restores the corresponding instance or Sim default. The settings read requires organization membership; updates require an owner or admin. Workspace visitors receive branding through their authorized workspace context. - -Organization branding does not replace the signed-out login identity, PWA manifest, or public file-share identity. Those surfaces read instance settings. The manifest retains built-in icons; public file shares hide the Sim wordmark when an instance logo is configured rather than rendering a custom wordmark there. - -## Instance-wide branding - -Instance settings need no organization or `WHITELABELING_ENABLED`. They supply a deployment baseline and reach signed-out surfaces as well as workspace fallback values. Set the environment variables on your self-hosted app and apply them through your deployment's update process. - -### Identity variables - -```bash -NEXT_PUBLIC_BRAND_NAME=Acme -NEXT_PUBLIC_BRAND_LOGO_URL=/branding/logo.png -NEXT_PUBLIC_BRAND_WORDMARK_URL=/branding/wordmark.svg -NEXT_PUBLIC_BRAND_FAVICON_URL=/branding/favicon.ico -NEXT_PUBLIC_CUSTOM_CSS_URL=/branding/custom.css -``` - -Favicon and custom CSS have no organization-setting equivalent. Asset URLs reference files; they do not upload them. Custom CSS must be same-origin under the current `style-src` policy, which permits the app origin and Google Fonts rather than configurable external stylesheet hosts. - -### Color variables - -```bash -NEXT_PUBLIC_BRAND_PRIMARY_COLOR="#701ffc" -NEXT_PUBLIC_BRAND_PRIMARY_HOVER_COLOR="#6518e6" -NEXT_PUBLIC_BRAND_ACCENT_COLOR="#9d54ff" -NEXT_PUBLIC_BRAND_ACCENT_HOVER_COLOR="#8c3dff" -NEXT_PUBLIC_BRAND_BACKGROUND_COLOR="#0c0c0c" -``` - -`NEXT_PUBLIC_BRAND_BACKGROUND_COLOR` helps choose contrasting text for your brand's background. It does not paint the application background and has no organization equivalent. - -### Link variables - -```bash -NEXT_PUBLIC_SUPPORT_EMAIL=support@acme.com -NEXT_PUBLIC_DOCUMENTATION_URL=https://docs.acme.com -NEXT_PUBLIC_TERMS_URL=https://acme.com/terms -NEXT_PUBLIC_PRIVACY_URL=https://acme.com/privacy -``` - -Setting the brand name, logo URL, wordmark URL, or primary color marks the deployment as branded. The other values refine its appearance and links. - -### Serve assets on Kubernetes - -The Helm chart can mount branding files into the app's public directory: - -```yaml -branding: - enabled: true - mountPath: /app/apps/sim/public/branding - files: - wordmark.svg: | - Acme - binaryFiles: - logo.png: "" - favicon.ico: "" -``` - -Use plain text for CSS, JSON, or SVG in `files`; use base64 for PNG, JPEG, or ICO in `binaryFiles`. Replace the example binary placeholders with the actual encodings. With the default mount path, `logo.png` is served at `/branding/logo.png`. - -Outside Helm, serve the assets yourself and use URLs reachable by your users' browsers and allowed by your deployment's content security policy. Keep custom CSS same-origin. Verify signed-out login and a public file share separately from the organization's workspace. - -## Related docs - -- [Self-hosted enterprise setup](/platform/enterprise/self-hosted) -- [Kubernetes deployment](/platform/self-hosting/kubernetes) -- [Self-hosting security](/platform/self-hosting/security) diff --git a/apps/docs/content/docs/platform/self-hosting/index.mdx b/apps/docs/content/docs/platform/self-hosting/index.mdx index 0822e7f2fe3..f5bb49c276a 100644 --- a/apps/docs/content/docs/platform/self-hosting/index.mdx +++ b/apps/docs/content/docs/platform/self-hosting/index.mdx @@ -78,7 +78,7 @@ ENTERPRISE_ENABLED=true NEXT_PUBLIC_ENTERPRISE_ENABLED=true ``` -Organizations, SSO, permission groups, audit logs, whitelabeling, session policies, retention, and data drains also need their feature-specific configuration. Most read settings from the organization that owns a workspace. Enabling the suite can enable retention processing; review the configured policy before turning it on. +Organizations, SSO, permission groups, audit logs, session policies, retention, and data drains also need their feature-specific configuration. Most read settings from the organization that owns a workspace. Enabling the suite can enable retention processing; review the configured policy before turning it on. See [Self-hosted enterprise features](/platform/enterprise/self-hosted) for organization setup, per-feature flags, and billing-enabled differences. diff --git a/apps/docs/lib/redirects.ts b/apps/docs/lib/redirects.ts index 51b214455ca..be04cce4921 100644 --- a/apps/docs/lib/redirects.ts +++ b/apps/docs/lib/redirects.ts @@ -113,6 +113,12 @@ const PATH_REDIRECTS: DocsRedirect[] = [ // copilot deprecated and removed { source: '/copilot', destination: '/chat', permanent: true }, { source: '/copilot/:path*', destination: '/chat', permanent: true }, + // white-labeling removed + { + source: '/platform/enterprise/whitelabeling', + destination: '/platform/enterprise', + permanent: true, + }, // mothership/* renamed to chat/* — the surface is "Chat", the agent is "Sim" { source: '/mothership', destination: '/chat', permanent: true }, { source: '/mothership/:path*', destination: '/chat/:path*', permanent: true }, diff --git a/apps/docs/scripts/fixtures/content-baseline.json b/apps/docs/scripts/fixtures/content-baseline.json index 54cc31249cc..8b0dea6725e 100644 --- a/apps/docs/scripts/fixtures/content-baseline.json +++ b/apps/docs/scripts/fixtures/content-baseline.json @@ -169941,7 +169941,6 @@ "/platform/enterprise/data-drains", "/platform/enterprise/custom-blocks", "/platform/enterprise/forks", - "/platform/enterprise/whitelabeling", "/platform/enterprise/self-hosted" ], "media": [] @@ -171057,13 +171056,6 @@ "bytes": 179, "line": 132 }, - { - "lang": "bash", - "meta": null, - "sha256": "5f943c8dc3ae17edeee35961bc6c1c53d8b2f5cb9b1100941cb813c552358c34", - "bytes": 220, - "line": 145 - }, { "lang": "bash", "meta": null, @@ -171750,115 +171742,6 @@ } ] }, - { - "source": "platform/enterprise/whitelabeling.mdx", - "url": "/platform/enterprise/whitelabeling", - "sha256": "a159e4c7f51e4110cb75bcf01107c0cf36c35bdb6d2377476986dcec5ad6414e", - "bytes": 5696, - "frontmatter": { - "title": "White-labeling", - "description": "Set organization branding or a self-hosted deployment's default identity, colors, and links" - }, - "headings": [ - { - "title": "Configure organization branding", - "url": "#configure-organization-branding", - "depth": 2 - }, - { - "title": "Identity", - "url": "#identity", - "depth": 3 - }, - { - "title": "Colors", - "url": "#colors", - "depth": 3 - }, - { - "title": "Links", - "url": "#links", - "depth": 3 - }, - { - "title": "Scope and fallback", - "url": "#scope-and-fallback", - "depth": 2 - }, - { - "title": "Instance-wide branding", - "url": "#instance-wide-branding", - "depth": 2 - }, - { - "title": "Identity variables", - "url": "#identity-variables", - "depth": 3 - }, - { - "title": "Color variables", - "url": "#color-variables", - "depth": 3 - }, - { - "title": "Link variables", - "url": "#link-variables", - "depth": 3 - }, - { - "title": "Serve assets on Kubernetes", - "url": "#serve-assets-on-kubernetes", - "depth": 3 - }, - { - "title": "Related docs", - "url": "#related-docs", - "depth": 2 - } - ], - "explicitIds": [], - "imports": [], - "components": [], - "expressions": [], - "codeFences": [ - { - "lang": "bash", - "meta": null, - "sha256": "8e80f47a93dcce528eb103fa840efe537ec09a49a2866f2848cfca56b0f4d219", - "bytes": 227, - "line": 56 - }, - { - "lang": "bash", - "meta": null, - "sha256": "4913154073ff05d86b2a8aee6597f8822ad68280ac52c4d619e447c2bfba4095", - "bytes": 222, - "line": 68 - }, - { - "lang": "bash", - "meta": null, - "sha256": "b4a7bebd4c1cd1a2bbe88a2c7941e44688512aa8e0695032868cb7ac9484548e", - "bytes": 188, - "line": 80 - }, - { - "lang": "yaml", - "meta": null, - "sha256": "e9721cad54b2890cb2e9598b82ac45dd7e5e7f95fdd8c729d7c9e5fa1f09067d", - "bytes": 287, - "line": 93 - } - ], - "links": [ - "#instance-wide-branding", - "/platform/enterprise/self-hosted", - "/platform/enterprise/self-hosted", - "/platform/self-hosting/kubernetes", - "/platform/self-hosting/security" - ], - "media": [] - }, { "source": "platform/organization.mdx", "url": "/platform/organization", @@ -232204,8 +232087,7 @@ "audit-logs", "usage-tracking", "data-retention", - "data-drains", - "whitelabeling" + "data-drains" ], "defaultOpen": false }, diff --git a/apps/sim/.env.example b/apps/sim/.env.example index 1bacb5f98a9..687acd09473 100644 --- a/apps/sim/.env.example +++ b/apps/sim/.env.example @@ -198,8 +198,8 @@ CRON_SECRET=your_cron_secret # Use `openssl rand -hex 32` to generate. Authentic # Usage: curl -H "x-admin-key: your_key" https://your-instance/api/v1/admin/workspaces # Enterprise Features (Optional - self-hosted). One switch enables organizations, SSO, -# permission groups, audit logs, custom blocks, whitelabeling, session policies, data -# retention, data drains, forks, and the inbox. Set both — the server value grants access, the +# permission groups, audit logs, custom blocks, session policies, data retention, data +# drains, forks, and the inbox. Set both — the server value grants access, the # NEXT_PUBLIC_ value decides what the settings UI shows. # Docs: https://docs.sim.ai/platform/enterprise/self-hosted # ENTERPRISE_ENABLED=true @@ -209,7 +209,6 @@ CRON_SECRET=your_cron_secret # Use `openssl rand -hex 32` to generate. Authentic # to enable one feature on its own or to switch a single feature back off. # ACCESS_CONTROL_ENABLED= / NEXT_PUBLIC_ACCESS_CONTROL_ENABLED= # Permission groups # SSO_ENABLED= / NEXT_PUBLIC_SSO_ENABLED= # SAML and OIDC sign-in -# WHITELABELING_ENABLED= / NEXT_PUBLIC_WHITELABELING_ENABLED= # Custom branding # AUDIT_LOGS_ENABLED= / NEXT_PUBLIC_AUDIT_LOGS_ENABLED= # Audit logging # CUSTOM_BLOCKS_ENABLED= / NEXT_PUBLIC_CUSTOM_BLOCKS_ENABLED= # Reusable org-wide blocks # SESSION_POLICIES_ENABLED= / NEXT_PUBLIC_SESSION_POLICIES_ENABLED= diff --git a/apps/sim/app/(auth)/components/auth-legal-footer.tsx b/apps/sim/app/(auth)/components/auth-legal-footer.tsx index e271ba3acd6..12cbe81f8c7 100644 --- a/apps/sim/app/(auth)/components/auth-legal-footer.tsx +++ b/apps/sim/app/(auth)/components/auth-legal-footer.tsx @@ -1,16 +1,8 @@ import { AuthLegal } from '@sim/auth-ui' -import { getBrandConfig } from '@/ee/whitelabeling' interface AuthLegalFooterProps { action: string } export function AuthLegalFooter({ action }: AuthLegalFooterProps) { - const brand = getBrandConfig() - return ( - - ) + return } diff --git a/apps/sim/app/(auth)/components/auth-shell.tsx b/apps/sim/app/(auth)/components/auth-shell.tsx index a3126be1a9f..409a5331326 100644 --- a/apps/sim/app/(auth)/components/auth-shell.tsx +++ b/apps/sim/app/(auth)/components/auth-shell.tsx @@ -3,7 +3,6 @@ import { AuthRoot, AuthShellView, AuthWordmark } from '@sim/auth-ui' import { DesktopTitleBarController } from '@/app/_shell/desktop-title-bar' import { AuthNavigation } from '@/app/(auth)/components/auth-navigation' import { SupportFooter } from '@/app/(auth)/components/support-footer' -import { getBrandConfig } from '@/ee/whitelabeling' interface AuthShellProps { children: ReactNode @@ -13,18 +12,11 @@ interface AuthShellProps { /** Application adapter for identity and native chrome; all visual rules belong to Auth. */ export function AuthShell({ children, footer, registrationDisabled = false }: AuthShellProps) { - const brand = getBrandConfig() return ( - ) : ( - - ) - } + logo={} navigation={ diff --git a/apps/sim/app/(auth)/components/support-footer.tsx b/apps/sim/app/(auth)/components/support-footer.tsx index ed36968e03d..70609de8af1 100644 --- a/apps/sim/app/(auth)/components/support-footer.tsx +++ b/apps/sim/app/(auth)/components/support-footer.tsx @@ -1,9 +1,8 @@ 'use client' import { AuthTextLink } from '@sim/auth-ui' -import { useBrandConfig } from '@/ee/whitelabeling' +import { SUPPORT_EMAIL } from '@/lib/branding/contact' export function SupportFooter() { - const brand = useBrandConfig() - return Contact support + return Contact support } diff --git a/apps/sim/app/(interfaces)/chat/components/header/header.tsx b/apps/sim/app/(interfaces)/chat/components/header/header.tsx index 49b5164822e..57f5a0cb56c 100644 --- a/apps/sim/app/(interfaces)/chat/components/header/header.tsx +++ b/apps/sim/app/(interfaces)/chat/components/header/header.tsx @@ -5,7 +5,6 @@ import Image from 'next/image' import Link from 'next/link' import { GithubIcon } from '@/components/icons' import { SITE_URL } from '@/lib/core/utils/urls' -import { useBrandConfig } from '@/ee/whitelabeling' interface ChatHeaderProps { chatConfig: { @@ -21,7 +20,6 @@ interface ChatHeaderProps { } export function ChatHeader({ chatConfig, starCount }: ChatHeaderProps) { - const brand = useBrandConfig() const customImage = chatConfig?.customizations?.imageUrl || chatConfig?.customizations?.logoUrl return ( @@ -49,31 +47,27 @@ export function ChatHeader({ chatConfig, starCount }: ChatHeaderProps) { - {!brand.logoUrl && ( -
- - - {/* Only show Sim logo if no custom branding is set */} - - - - -
- )} + ) } diff --git a/apps/sim/app/(interfaces)/components/interfaces-shell/interfaces-support-footer.tsx b/apps/sim/app/(interfaces)/components/interfaces-shell/interfaces-support-footer.tsx index eab0f931aa0..8c91848c415 100644 --- a/apps/sim/app/(interfaces)/components/interfaces-shell/interfaces-support-footer.tsx +++ b/apps/sim/app/(interfaces)/components/interfaces-shell/interfaces-support-footer.tsx @@ -1,14 +1,13 @@ 'use client' -import { useBrandConfig } from '@/ee/whitelabeling' +import { SUPPORT_EMAIL } from '@/lib/branding/contact' export function InterfacesSupportFooter() { - const brand = useBrandConfig() return (
Need help?{' '} Contact support diff --git a/apps/sim/app/(landing)/comparisons/comparison-sections.ts b/apps/sim/app/(landing)/comparisons/comparison-sections.ts index 93f82aa5ca0..377ea8ae3a1 100644 --- a/apps/sim/app/(landing)/comparisons/comparison-sections.ts +++ b/apps/sim/app/(landing)/comparisons/comparison-sections.ts @@ -99,7 +99,6 @@ export const COMPARISON_SECTIONS: ComparisonSectionDef[] = [ { key: 'thirdPartyVetting', label: 'Vetted first-party integrations' }, { key: 'piiRedaction', label: 'PII redaction' }, { key: 'dataRetention', label: 'Custom data retention' }, - { key: 'whiteLabeling', label: 'White-labeling' }, ], }), defineSection({ diff --git a/apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx b/apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx index 2dd7df0a750..371865563bf 100644 --- a/apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx +++ b/apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx @@ -25,7 +25,6 @@ import { APP_ENTRY_PATH } from '@/lib/navigation/paths' import { captureClientEvent } from '@/lib/posthog/client' import type { PostHogEventMap } from '@/lib/posthog/events' import colorMixFallbacks from '@/app/(landing)/components/shared/color-mix-fallbacks/color-mix-fallbacks.module.css' -import { getBrandConfig } from '@/ee/whitelabeling' const logger = createLogger('AuthModal') @@ -80,7 +79,6 @@ export function AuthModal({ children, defaultView = 'login', source }: AuthModal const [view, setView] = useState(defaultView) const [providerStatus, setProviderStatus] = useState(null) const [socialLoading, setSocialLoading] = useState(null) - const brand = getBrandConfig() useEffect(() => { fetchProviderStatus().then(setProviderStatus) @@ -196,8 +194,8 @@ export function AuthModal({ children, defaultView = 'login', source }: AuthModal <>
{brand.name} {fullScreen && } - {brand.wordmarkUrl ? ( - - ) : brand.name !== defaultBrandConfig.name ? ( - {brand.name} - ) : ( - - )} +
) } diff --git a/apps/sim/app/api/organizations/[id]/whitelabel/route.ts b/apps/sim/app/api/organizations/[id]/whitelabel/route.ts deleted file mode 100644 index 6f18ee9c73b..00000000000 --- a/apps/sim/app/api/organizations/[id]/whitelabel/route.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { - getOrganizationWhitelabelContract, - updateOrganizationWhitelabelContract, -} from '@/lib/api/contracts/organization' -import { validationErrorResponse } from '@/lib/api/server' -import { - defineInternalJsonRoute, - internalOrchestrationErrorPolicy, - internalRateLimits, - internalSessionAuth, -} from '@/lib/api/server/routes' -import { - getOrganizationWhitelabel, - updateOrganizationWhitelabel, -} from '@/lib/organizations/application/configuration' -import { organizationConfigurationOperations } from '@/lib/organizations/application/configuration-operations' - -export const GET = defineInternalJsonRoute({ - contract: getOrganizationWhitelabelContract, - auth: internalSessionAuth, - operation: organizationConfigurationOperations.readWhitelabel, - rateLimit: internalRateLimits.none({ - reason: 'Existing member-only organization configuration read', - }), - errorPolicy: internalOrchestrationErrorPolicy, - mapInput: ({ params }) => ({ organizationId: params.id }), - useCase: getOrganizationWhitelabel, - present: ({ settings, isEnterprise }) => ({ success: true, data: settings, isEnterprise }), -}) - -export const PUT = defineInternalJsonRoute({ - contract: updateOrganizationWhitelabelContract, - auth: internalSessionAuth, - operation: organizationConfigurationOperations.updateWhitelabel, - rateLimit: internalRateLimits.none({ - reason: 'Existing administrator-only organization configuration update', - }), - errorPolicy: internalOrchestrationErrorPolicy, - parseOptions: { - validationErrorResponse: (error) => validationErrorResponse(error, 'Invalid request body'), - }, - mapInput: ({ params, body }) => ({ organizationId: params.id, settings: body }), - useCase: updateOrganizationWhitelabel, - present: ({ data }) => ({ success: true, data }), -}) diff --git a/apps/sim/app/api/v1/admin/organizations/[id]/whitelabel/route.ts b/apps/sim/app/api/v1/admin/organizations/[id]/whitelabel/route.ts deleted file mode 100644 index 0bc3df3a527..00000000000 --- a/apps/sim/app/api/v1/admin/organizations/[id]/whitelabel/route.ts +++ /dev/null @@ -1,119 +0,0 @@ -/** - * PATCH /api/v1/admin/organizations/[id]/whitelabel - * - * Set an organization's whitelabel settings without going through the settings - * UI, so a self-hosted deployment can provision branding from its own - * configuration management. - * - * Body: partial whitelabel settings; provided keys are merged over the current - * value and an explicit `null` clears a key. - * - * Response: AdminSingleResponse<{ success, organizationId }> - */ - -import { AuditAction, AuditResourceType, recordAudit } from '@sim/audit' -import { db } from '@sim/db' -import { organization } from '@sim/db/schema' -import { createLogger } from '@sim/logger' -import { eq } from 'drizzle-orm' -import { adminV1UpdateOrganizationWhitelabelContract } from '@/lib/api/contracts/v1/admin' -import { parseRequest } from '@/lib/api/server' -import { isOrganizationFeatureEntitled } from '@/lib/billing/core/subscription' -import type { OrganizationWhitelabelSettings } from '@/lib/branding/types' -import { isBillingEnabled, isWhitelabelingEnabled } from '@/lib/core/config/env-flags' -import { withRouteHandler } from '@/lib/core/utils/with-route-handler' -import { withAdminAuthParams } from '@/app/api/v1/admin/middleware' -import { - adminForbiddenResponse, - adminInternalErrorResponse, - adminInvalidJsonResponse, - adminNotFoundResponse, - adminValidationErrorResponse, - singleResponse, -} from '@/app/api/v1/admin/responses' - -const logger = createLogger('AdminOrganizationWhitelabelAPI') - -interface RouteParams { - id: string -} - -export const PATCH = withRouteHandler( - withAdminAuthParams(async (request, context) => { - const parsed = await parseRequest( - adminV1UpdateOrganizationWhitelabelContract, - request, - context, - { - validationErrorResponse: adminValidationErrorResponse, - invalidJsonResponse: adminInvalidJsonResponse, - } - ) - if (!parsed.success) return parsed.response - - const { id: organizationId } = parsed.data.params - const incoming = parsed.data.body - - try { - const [existing] = await db - .select({ name: organization.name, whitelabelSettings: organization.whitelabelSettings }) - .from(organization) - .where(eq(organization.id, organizationId)) - .limit(1) - - if (!existing) { - return adminNotFoundResponse('Organization') - } - - /** - * Same entitlement gate the settings UI applies. An admin key - * authenticates an operator, not an entitlement, so without this it would - * be a way to set branding the product has not granted this organization. - */ - const entitled = await isOrganizationFeatureEntitled(organizationId, isWhitelabelingEnabled) - if (!entitled) { - return adminForbiddenResponse( - isBillingEnabled - ? 'Whitelabeling is available on Enterprise plans only' - : 'Whitelabeling is disabled. Set ENTERPRISE_ENABLED or WHITELABELING_ENABLED to enable it.' - ) - } - - const merged: OrganizationWhitelabelSettings = { ...(existing.whitelabelSettings ?? {}) } - for (const key of Object.keys(incoming) as Array) { - const value = incoming[key] - if (value === null || value === undefined) { - delete merged[key] - } else { - Object.assign(merged, { [key]: value }) - } - } - - await db - .update(organization) - .set({ whitelabelSettings: merged, updatedAt: new Date() }) - .where(eq(organization.id, organizationId)) - - logger.info(`Admin API: Updated whitelabel settings for organization ${organizationId}`, { - fields: Object.keys(incoming), - }) - - recordAudit({ - workspaceId: null, - actorId: 'admin-api', - action: AuditAction.ORGANIZATION_UPDATED, - resourceType: AuditResourceType.ORGANIZATION, - resourceId: organizationId, - resourceName: existing.name, - description: `Admin API updated whitelabel settings for "${existing.name}"`, - metadata: { fields: Object.keys(incoming) }, - request, - }) - - return singleResponse({ success: true as const, organizationId }) - } catch (error) { - logger.error('Admin API: Failed to update whitelabel settings', { error, organizationId }) - return adminInternalErrorResponse('Failed to update whitelabel settings') - } - }) -) diff --git a/apps/sim/app/extension/[workspaceId]/workspace.tsx b/apps/sim/app/extension/[workspaceId]/workspace.tsx index 6c5f61f72cb..87a5cbb6606 100644 --- a/apps/sim/app/extension/[workspaceId]/workspace.tsx +++ b/apps/sim/app/extension/[workspaceId]/workspace.tsx @@ -14,7 +14,6 @@ import { WorkspaceHostProvider } from '@/app/workspace/[workspaceId]/providers/w import { WorkspacePermissionsProvider } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { WorkspaceScopeSync } from '@/app/workspace/[workspaceId]/providers/workspace-scope-sync' import { PermissionAccessBoundary } from '@/ee/access-requests/components/permission-access-boundary' -import { BrandingProvider } from '@/ee/whitelabeling/components/branding-provider' import { useWorkspaceHostContextQuery, WORKSPACE_HOST_CONTEXT_STALE_TIME, @@ -50,25 +49,20 @@ export function ExtensionWorkspace({ workspaceId }: ExtensionWorkspaceProps) { } return ( - - - - - - - - Back to chat} - > - - - - - + + + + + + + Back to chat} + > + + + + ) } diff --git a/apps/sim/app/f/[token]/page.tsx b/apps/sim/app/f/[token]/page.tsx index e0172687298..8671bae827e 100644 --- a/apps/sim/app/f/[token]/page.tsx +++ b/apps/sim/app/f/[token]/page.tsx @@ -10,7 +10,6 @@ import { PublicFileEmailAuth } from '@/app/f/[token]/public-file-email-auth' import { PublicFileSSOAuth } from '@/app/f/[token]/public-file-sso-auth' import { PublicFileView } from '@/app/f/[token]/public-file-view' import { buildProvenance } from '@/app/f/[token]/utils' -import { getBrandConfig } from '@/ee/whitelabeling' export const dynamic = 'force-dynamic' @@ -45,12 +44,11 @@ export async function generateMetadata({ params }: PublicFilePageProps): Promise `Shared file · ${title}` } - const brand = getBrandConfig() return { title, description, robots: NOINDEX, - openGraph: { type: 'website', title, description, siteName: brand.name }, + openGraph: { type: 'website', title, description, siteName: 'Sim' }, twitter: { card: 'summary_large_image', title, description }, } } diff --git a/apps/sim/app/f/[token]/public-file-view.tsx b/apps/sim/app/f/[token]/public-file-view.tsx index 11d67c49e73..feaac46fdb1 100644 --- a/apps/sim/app/f/[token]/public-file-view.tsx +++ b/apps/sim/app/f/[token]/public-file-view.tsx @@ -10,7 +10,6 @@ import type { EditableFileOwner } from '@/lib/workspace-files/ownership' import { DesktopTitleBarLane } from '@/app/_shell/desktop-title-bar' import { buildProvenance } from '@/app/f/[token]/utils' import { FileViewer } from '@/app/workspace/[workspaceId]/files/components/file-viewer' -import { useBrandConfig } from '@/ee/whitelabeling' import { createPublicFileContentSource } from '@/hooks/use-file-content-source' interface PublicFileViewProps { @@ -36,7 +35,6 @@ export function PublicFileView({ ownerName, }: PublicFileViewProps) { const contentUrl = `/api/files/public/${token}/content` - const brand = useBrandConfig() const provenance = buildProvenance(workspaceName, ownerName) // The public viewer reuses the in-app FileViewer; the content source seam swaps @@ -73,20 +71,16 @@ export function PublicFileView({
- {!brand.logoUrl && ( - <> - - - -
- - )} + + + +
{provenance ? ( diff --git a/apps/sim/app/layout.tsx b/apps/sim/app/layout.tsx index 3556366d9ff..354fe958f39 100644 --- a/apps/sim/app/layout.tsx +++ b/apps/sim/app/layout.tsx @@ -1,13 +1,12 @@ +import { INTEGRATION_COUNT_LABEL } from '@sim/deployment-config/integration-claims' import { ToastProvider } from '@sim/emcn' import type { Metadata, Viewport } from 'next' import Script from 'next/script' import { NuqsAdapter } from 'nuqs/adapters/next/app' -import { BrandedLayout } from '@/components/branded-layout' import { SettingsNavigationGuard } from '@/components/settings/settings-navigation-guard' import { PasteAdmissionGuard } from '@/app/_shell/paste-admission-guard' import { BrowserTelemetry } from '@/app/_shell/providers/browser-telemetry' import { PostHogProvider } from '@/app/_shell/providers/posthog-provider' -import { generateBrandedMetadata, generateThemeCSS } from '@/ee/whitelabeling' import '@/app/_styles/globals.css' import { env } from '@/lib/core/config/env' import { @@ -16,6 +15,7 @@ import { isReactGrabEnabled, isReactScanEnabled, } from '@/lib/core/config/env-flags' +import { getBaseUrl } from '@/lib/core/utils/urls' import { ConsentProvider } from '@/app/_shell/consent/consent-provider' import { DesktopUpdateGate } from '@/app/_shell/desktop-update-gate' import { DesktopUpdateNotification } from '@/app/_shell/desktop-update-notification' @@ -41,10 +41,120 @@ export const viewport: Viewport = { ], } -export const metadata: Metadata = generateBrandedMetadata() +const SUMMARY_FULL = `Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect ${INTEGRATION_COUNT_LABEL} integrations and every major LLM to create agents that automate real work — visually, conversationally, or with code. Trusted by over 100,000 builders — from startups to Fortune 500 companies. SOC2 compliant.` +const SUMMARY_SHORT = `Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect ${INTEGRATION_COUNT_LABEL} integrations and every major LLM to create agents that automate real work.` + +/** + * Root metadata every route inherits. Deliberately sets no `alternates.canonical` + * or `openGraph.url`: a fixed value would make each page claim the home page as + * its canonical. Landing pages emit their own canonical URLs. + */ +export const metadata: Metadata = { + title: { + template: '%s | Sim', + default: 'Sim', + }, + description: SUMMARY_SHORT, + applicationName: 'Sim', + authors: [{ name: 'Sim' }], + generator: 'Next.js', + keywords: [ + 'AI workspace', + 'AI agent builder', + 'AI agent workflow builder', + 'build AI agents', + 'visual workflow builder', + 'AI agents', + 'AI agent platform', + 'open-source AI agents', + 'agentic workflows', + 'LLM orchestration', + 'AI integrations', + 'knowledge base', + 'AI automation', + 'workflow builder', + 'AI workflow orchestration', + 'enterprise AI', + 'AI agent deployment', + 'intelligent automation', + 'AI tools', + ], + referrer: 'origin-when-cross-origin', + creator: 'Sim', + publisher: 'Sim', + metadataBase: new URL(getBaseUrl()), + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + 'max-image-preview': 'large', + 'max-video-preview': -1, + 'max-snippet': -1, + }, + }, + openGraph: { + type: 'website', + locale: 'en_US', + title: 'Sim', + description: SUMMARY_FULL, + siteName: 'Sim', + images: [ + { + url: '/logo/426-240/reverse/small.png', + width: 2130, + height: 1200, + alt: 'Sim', + }, + ], + }, + twitter: { + card: 'summary_large_image', + title: 'Sim', + description: SUMMARY_FULL, + images: ['/logo/426-240/reverse/small.png'], + creator: '@simdotai', + site: '@simdotai', + }, + manifest: '/manifest.webmanifest', + icons: { + icon: [ + { url: '/icon.svg', type: 'image/svg+xml', sizes: 'any' }, + { url: '/favicon/favicon-16x16.png', sizes: '16x16', type: 'image/png' }, + { url: '/favicon/favicon-32x32.png', sizes: '32x32', type: 'image/png' }, + { + url: '/favicon/android-chrome-192x192.png', + sizes: '192x192', + type: 'image/png', + }, + { + url: '/favicon/android-chrome-512x512.png', + sizes: '512x512', + type: 'image/png', + }, + ], + apple: '/favicon/apple-touch-icon.png', + shortcut: '/icon.svg', + }, + appleWebApp: { + capable: true, + statusBarStyle: 'default', + title: 'Sim', + }, + formatDetection: { + telephone: false, + }, + category: 'technology', + other: { + 'apple-mobile-web-app-capable': 'yes', + 'mobile-web-app-capable': 'yes', + 'msapplication-TileColor': '#33C482', + 'msapplication-config': 'none', + }, +} export default function RootLayout({ children }: { children: React.ReactNode }) { - const themeCSS = generateThemeCSS() const application = ( @@ -58,9 +168,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) disabled={env.NEXT_TELEMETRY_DISABLED === '1'} consentRequired={isHosted} /> - - {children} - + {children} @@ -248,16 +356,6 @@ export default function RootLayout({ children }: { children: React.ReactNode }) }} /> - {/* Theme CSS Override */} - {themeCSS && ( - } - {children} - - ) -} - -/** - * Returns the merged brand config (org settings overlaid on instance defaults). - * Use this inside the workspace instead of `getBrandConfig()`. - */ -export function useOrgBrandConfig(): BrandConfig { - return useContext(BrandingContext).config -} diff --git a/apps/sim/ee/whitelabeling/components/whitelabeling-settings.tsx b/apps/sim/ee/whitelabeling/components/whitelabeling-settings.tsx deleted file mode 100644 index 7b97e302832..00000000000 --- a/apps/sim/ee/whitelabeling/components/whitelabeling-settings.tsx +++ /dev/null @@ -1,478 +0,0 @@ -'use client' - -import { useState } from 'react' -import { Button, ChipInput, cn, Label, toast, UploadPreviewButton } from '@sim/emcn' -import { X } from '@sim/emcn/icons' -import { createLogger } from '@sim/logger' -import { getErrorMessage, toError } from '@sim/utils/errors' -import Image from 'next/image' -import { saveDiscardActions } from '@/components/settings/save-discard-actions' -import { useSettingsUnsavedGuard } from '@/components/settings/use-settings-unsaved-guard' -import { HEX_COLOR_REGEX } from '@/lib/branding' -import type { OrganizationWhitelabelSettings } from '@/lib/branding/types' -import { DropZone } from '@/app/workspace/[workspaceId]/components/drop-zone' -import { SettingsEmptyState } from '@/app/workspace/[workspaceId]/settings/components/settings-empty-state' -import { SettingsPanel } from '@/app/workspace/[workspaceId]/settings/components/settings-panel' -import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section' -import { useProfilePictureUpload } from '@/app/workspace/[workspaceId]/settings/hooks/use-profile-picture-upload' -import { SettingRow } from '@/ee/components/setting-row' -import { - useUpdateWhitelabelSettings, - useWhitelabelSettings, - type WhitelabelSettingsPayload, -} from '@/ee/whitelabeling/hooks/whitelabel' -import { useWorkspacesQuery } from '@/hooks/queries/workspace' - -const logger = createLogger('WhitelabelingSettings') - -interface ColorInputProps { - label: string - value: string - onChange: (value: string) => void - placeholder?: string -} - -function ColorInput({ label, value, onChange, placeholder = '#000000' }: ColorInputProps) { - const isValidHex = !value || HEX_COLOR_REGEX.test(value) - const showColor = Boolean(value) && isValidHex - - return ( -
- - - } - value={value} - onChange={(e) => { - let v = e.target.value.trim() - if (v && !v.startsWith('#')) { - v = `#${v}` - } - v = v.slice(0, 1) + v.slice(1).replace(/[^0-9a-fA-F]/g, '') - onChange(v.slice(0, 7)) - }} - onFocus={(e) => e.target.select()} - placeholder={placeholder} - maxLength={7} - inputClassName='font-mono' - /> - {!isValidHex && ( -

- Must be a valid hex color (e.g. #33c482) -

- )} -
- ) -} - -interface WhitelabelingSettingsProps { - organizationId: string -} - -interface WhitelabelingFormProps { - initialSettings: OrganizationWhitelabelSettings - orgId: string - uploadWorkspaceId?: string -} - -function WhitelabelingForm({ initialSettings, orgId, uploadWorkspaceId }: WhitelabelingFormProps) { - const updateSettings = useUpdateWhitelabelSettings() - - const [brandName, setBrandName] = useState(initialSettings.brandName ?? '') - const [primaryColor, setPrimaryColor] = useState(initialSettings.primaryColor ?? '') - const [primaryHoverColor, setPrimaryHoverColor] = useState( - initialSettings.primaryHoverColor ?? '' - ) - const [accentColor, setAccentColor] = useState(initialSettings.accentColor ?? '') - const [accentHoverColor, setAccentHoverColor] = useState(initialSettings.accentHoverColor ?? '') - const [supportEmail, setSupportEmail] = useState(initialSettings.supportEmail ?? '') - const [documentationUrl, setDocumentationUrl] = useState(initialSettings.documentationUrl ?? '') - const [termsUrl, setTermsUrl] = useState(initialSettings.termsUrl ?? '') - const [privacyUrl, setPrivacyUrl] = useState(initialSettings.privacyUrl ?? '') - const [logoUrl, setLogoUrl] = useState(initialSettings.logoUrl ?? null) - const [wordmarkUrl, setWordmarkUrl] = useState(initialSettings.wordmarkUrl ?? null) - const [savedBrandName, setSavedBrandName] = useState(initialSettings.brandName ?? '') - const [savedPrimaryColor, setSavedPrimaryColor] = useState(initialSettings.primaryColor ?? '') - const [savedPrimaryHoverColor, setSavedPrimaryHoverColor] = useState( - initialSettings.primaryHoverColor ?? '' - ) - const [savedAccentColor, setSavedAccentColor] = useState(initialSettings.accentColor ?? '') - const [savedAccentHoverColor, setSavedAccentHoverColor] = useState( - initialSettings.accentHoverColor ?? '' - ) - const [savedSupportEmail, setSavedSupportEmail] = useState(initialSettings.supportEmail ?? '') - const [savedDocumentationUrl, setSavedDocumentationUrl] = useState( - initialSettings.documentationUrl ?? '' - ) - const [savedTermsUrl, setSavedTermsUrl] = useState(initialSettings.termsUrl ?? '') - const [savedPrivacyUrl, setSavedPrivacyUrl] = useState(initialSettings.privacyUrl ?? '') - const [savedLogoUrl, setSavedLogoUrl] = useState(initialSettings.logoUrl ?? null) - const [savedWordmarkUrl, setSavedWordmarkUrl] = useState( - initialSettings.wordmarkUrl ?? null - ) - - const logoUpload = useProfilePictureUpload({ - currentImage: logoUrl, - onUpload: (url) => setLogoUrl(url), - onError: (error) => toast.error(error), - context: 'workspace-logos', - workspaceId: uploadWorkspaceId, - }) - - const wordmarkUpload = useProfilePictureUpload({ - currentImage: wordmarkUrl, - onUpload: (url) => setWordmarkUrl(url), - onError: (error) => toast.error(error), - context: 'workspace-logos', - workspaceId: uploadWorkspaceId, - }) - - const hasChanges = - brandName !== savedBrandName || - primaryColor !== savedPrimaryColor || - primaryHoverColor !== savedPrimaryHoverColor || - accentColor !== savedAccentColor || - accentHoverColor !== savedAccentHoverColor || - supportEmail !== savedSupportEmail || - documentationUrl !== savedDocumentationUrl || - termsUrl !== savedTermsUrl || - privacyUrl !== savedPrivacyUrl || - (logoUpload.previewUrl || null) !== savedLogoUrl || - (wordmarkUpload.previewUrl || null) !== savedWordmarkUrl - - const isUploading = logoUpload.isUploading || wordmarkUpload.isUploading - const saving = updateSettings.isPending || isUploading - useSettingsUnsavedGuard({ - isDirty: hasChanges, - navigationBlocked: saving, - onDiscard: handleDiscard, - }) - - async function handleSave() { - if (!orgId || saving) return - - const colorFields: Array<[string, string]> = [ - ['Primary color', primaryColor], - ['Primary hover color', primaryHoverColor], - ['Accent color', accentColor], - ['Accent hover color', accentHoverColor], - ] - - for (const [fieldName, value] of colorFields) { - if (value && !HEX_COLOR_REGEX.test(value)) { - toast.error(`${fieldName} must be a valid hex color (e.g. #33c482)`) - return - } - } - - const settings: WhitelabelSettingsPayload = { - brandName: brandName || null, - logoUrl: logoUpload.previewUrl || null, - wordmarkUrl: wordmarkUpload.previewUrl || null, - primaryColor: primaryColor || null, - primaryHoverColor: primaryHoverColor || null, - accentColor: accentColor || null, - accentHoverColor: accentHoverColor || null, - supportEmail: supportEmail || null, - documentationUrl: documentationUrl || null, - termsUrl: termsUrl || null, - privacyUrl: privacyUrl || null, - } - - try { - await updateSettings.mutateAsync({ orgId, settings }) - setSavedBrandName(brandName) - setSavedPrimaryColor(primaryColor) - setSavedPrimaryHoverColor(primaryHoverColor) - setSavedAccentColor(accentColor) - setSavedAccentHoverColor(accentHoverColor) - setSavedSupportEmail(supportEmail) - setSavedDocumentationUrl(documentationUrl) - setSavedTermsUrl(termsUrl) - setSavedPrivacyUrl(privacyUrl) - setSavedLogoUrl(logoUpload.previewUrl || null) - setSavedWordmarkUrl(wordmarkUpload.previewUrl || null) - toast.success('Whitelabeling settings saved.') - } catch (error) { - logger.error('Failed to save whitelabel settings', { error }) - toast.error(toError(error).message) - } - } - - function handleDiscard() { - if (saving) return - logoUpload.reset() - wordmarkUpload.reset() - setBrandName(savedBrandName) - setPrimaryColor(savedPrimaryColor) - setPrimaryHoverColor(savedPrimaryHoverColor) - setAccentColor(savedAccentColor) - setAccentHoverColor(savedAccentHoverColor) - setSupportEmail(savedSupportEmail) - setDocumentationUrl(savedDocumentationUrl) - setTermsUrl(savedTermsUrl) - setPrivacyUrl(savedPrivacyUrl) - setLogoUrl(savedLogoUrl) - setWordmarkUrl(savedWordmarkUrl) - } - - const actions = saveDiscardActions({ - dirty: hasChanges, - saving, - saveDisabled: isUploading, - onSave: handleSave, - onDiscard: handleDiscard, - }) - - return ( - - -
- - setBrandName(e.target.value)} - placeholder='Your Company' - className='max-w-[320px]' - maxLength={64} - /> - -
- -
- { - event.preventDefault() - if (!saving) logoUpload.handleFileDrop(event) - }} - > - - {logoUpload.previewUrl ? ( - Logo - ) : null} - - - {logoUpload.previewUrl && ( - - )} - { - if (!saving) logoUpload.handleFileChange(event) - }} - className='hidden' - /> -
-
- - -
- { - event.preventDefault() - if (!saving) wordmarkUpload.handleFileDrop(event) - }} - className='min-w-0 flex-1' - > - - {wordmarkUpload.previewUrl ? ( - Wordmark - ) : null} - - - {wordmarkUpload.previewUrl && ( - - )} - { - if (!saving) wordmarkUpload.handleFileChange(event) - }} - className='hidden' - /> -
-
-
-
-
- - -
- - - - -
-
- - -
- - setSupportEmail(e.target.value)} - placeholder='support@yourcompany.com' - /> - - - setDocumentationUrl(e.target.value)} - placeholder='https://docs.yourcompany.com' - /> - - - setTermsUrl(e.target.value)} - placeholder='https://yourcompany.com/terms' - /> - - - setPrivacyUrl(e.target.value)} - placeholder='https://yourcompany.com/privacy' - /> - -
-
-
- ) -} - -/** Gates on the entitlement returned by the whitelabel read — the same check saving enforces. */ -export function WhitelabelingSettings({ organizationId: orgId }: WhitelabelingSettingsProps) { - const { data: workspaces } = useWorkspacesQuery(true) - const uploadWorkspaceId = workspaces?.find((workspace) => workspace.organizationId === orgId)?.id - const { data: whitelabel, error: settingsError, isLoading } = useWhitelabelSettings(orgId) - - if (isLoading) { - return ( - undefined, - onDiscard: () => undefined, - })} - /> - ) - } - - if (!whitelabel) { - return ( - - {getErrorMessage(settingsError, 'Failed to load whitelabeling settings')} - - ) - } - - if (!whitelabel.isEnterprise) { - return ( - Whitelabeling requires an active Enterprise plan. - ) - } - - return ( - - ) -} diff --git a/apps/sim/ee/whitelabeling/hooks/whitelabel.ts b/apps/sim/ee/whitelabeling/hooks/whitelabel.ts deleted file mode 100644 index ee893b3c3b9..00000000000 --- a/apps/sim/ee/whitelabeling/hooks/whitelabel.ts +++ /dev/null @@ -1,86 +0,0 @@ -'use client' - -import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query' -import { requestJson } from '@/lib/api/client/request' -import { - getOrganizationWhitelabelContract, - updateOrganizationWhitelabelContract, -} from '@/lib/api/contracts/organization' -import type { OrganizationWhitelabelSettings } from '@/lib/branding/types' -import { organizationKeys } from '@/hooks/queries/organization' - -export const WHITELABEL_STALE_TIME = 60 * 1000 - -/** PUT payload — string fields accept null to clear a previously-set value. */ -export type WhitelabelSettingsPayload = { - [K in keyof OrganizationWhitelabelSettings]: OrganizationWhitelabelSettings[K] extends - | string - | undefined - ? string | null - : OrganizationWhitelabelSettings[K] -} - -/** - * Query key factories for whitelabel-related queries - */ -export const whitelabelKeys = { - all: ['whitelabel'] as const, - settingsList: () => [...whitelabelKeys.all, 'settings'] as const, - settings: (orgId: string) => [...whitelabelKeys.settingsList(), orgId] as const, -} - -export interface OrganizationWhitelabel { - /** Whether the organization may save whitelabel settings: the entitlement the update enforces. */ - isEnterprise: boolean - settings: OrganizationWhitelabelSettings -} - -async function fetchWhitelabelSettings( - orgId: string, - signal?: AbortSignal -): Promise { - const { data, isEnterprise } = await requestJson(getOrganizationWhitelabelContract, { - params: { id: orgId }, - signal, - }) - // A server from before the field omits it; saving still enforces the entitlement. - return { isEnterprise: isEnterprise ?? true, settings: data } -} - -/** - * Hook to fetch an organization's whitelabel settings and whether it is entitled to change them. - */ -export function useWhitelabelSettings(orgId: string | undefined) { - return useQuery({ - queryKey: whitelabelKeys.settings(orgId ?? ''), - queryFn: ({ signal }) => fetchWhitelabelSettings(orgId as string, signal), - enabled: Boolean(orgId), - staleTime: WHITELABEL_STALE_TIME, - }) -} - -interface UpdateWhitelabelVariables { - orgId: string - settings: WhitelabelSettingsPayload -} - -/** - * Hook to update whitelabel settings for an organization. - */ -export function useUpdateWhitelabelSettings() { - const queryClient = useQueryClient() - - return useMutation({ - mutationFn: async ({ orgId, settings }: UpdateWhitelabelVariables) => { - const result = await requestJson(updateOrganizationWhitelabelContract, { - params: { id: orgId }, - body: settings, - }) - return result.data - }, - onSettled: (_data, _error, { orgId }) => { - queryClient.invalidateQueries({ queryKey: whitelabelKeys.settings(orgId) }) - queryClient.invalidateQueries({ queryKey: organizationKeys.detail(orgId) }) - }, - }) -} diff --git a/apps/sim/ee/whitelabeling/index.ts b/apps/sim/ee/whitelabeling/index.ts deleted file mode 100644 index d0344b915c1..00000000000 --- a/apps/sim/ee/whitelabeling/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type { OrganizationWhitelabelSettings } from '@/lib/branding/types' -export type { BrandConfig, ThemeColors } from './branding' -export { getBrandConfig, useBrandConfig } from './branding' -export { generateThemeCSS } from './inject-theme' -export { generateBrandedMetadata } from './metadata' -export { generateOrgThemeCSS, mergeOrgBrandConfig } from './org-branding-utils' diff --git a/apps/sim/ee/whitelabeling/inject-theme.ts b/apps/sim/ee/whitelabeling/inject-theme.ts deleted file mode 100644 index 3dc48801801..00000000000 --- a/apps/sim/ee/whitelabeling/inject-theme.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { getContrastTextColor, isDarkColor } from '@/lib/colors' - -export function generateThemeCSS(): string { - const cssVars: string[] = [] - - if (process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR) { - cssVars.push(`--brand: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR};`) - cssVars.push(`--brand-agent: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR};`) - cssVars.push(`--brand-accent: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR};`) - cssVars.push(`--auth-primary-btn-bg: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR};`) - cssVars.push(`--auth-primary-btn-border: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR};`) - cssVars.push(`--auth-primary-btn-hover-bg: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR};`) - cssVars.push(`--auth-primary-btn-hover-border: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR};`) - const primaryTextColor = getContrastTextColor(process.env.NEXT_PUBLIC_BRAND_PRIMARY_COLOR) - cssVars.push(`--auth-primary-btn-text: ${primaryTextColor};`) - cssVars.push(`--auth-primary-btn-hover-text: ${primaryTextColor};`) - } - - if (process.env.NEXT_PUBLIC_BRAND_PRIMARY_HOVER_COLOR) { - cssVars.push(`--brand-hover: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_HOVER_COLOR};`) - cssVars.push(`--brand-accent-hover: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_HOVER_COLOR};`) - cssVars.push( - `--auth-primary-btn-hover-bg: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_HOVER_COLOR};` - ) - cssVars.push( - `--auth-primary-btn-hover-border: ${process.env.NEXT_PUBLIC_BRAND_PRIMARY_HOVER_COLOR};` - ) - cssVars.push( - `--auth-primary-btn-hover-text: ${getContrastTextColor(process.env.NEXT_PUBLIC_BRAND_PRIMARY_HOVER_COLOR)};` - ) - } - - if (process.env.NEXT_PUBLIC_BRAND_ACCENT_COLOR) { - cssVars.push(`--brand-accent: ${process.env.NEXT_PUBLIC_BRAND_ACCENT_COLOR};`) - } - - if (process.env.NEXT_PUBLIC_BRAND_ACCENT_HOVER_COLOR) { - cssVars.push(`--brand-accent-hover: ${process.env.NEXT_PUBLIC_BRAND_ACCENT_HOVER_COLOR};`) - } - - if (process.env.NEXT_PUBLIC_CUSTOM_CSS_URL) { - cssVars.push('--brand-agent: var(--brand);') - } - - if (process.env.NEXT_PUBLIC_BRAND_BACKGROUND_COLOR) { - const isDark = isDarkColor(process.env.NEXT_PUBLIC_BRAND_BACKGROUND_COLOR) - if (isDark) { - cssVars.push(`--brand-is-dark: 1;`) - } - } - - return cssVars.length > 0 ? `:root { ${cssVars.join(' ')} }` : '' -} diff --git a/apps/sim/ee/whitelabeling/metadata.ts b/apps/sim/ee/whitelabeling/metadata.ts deleted file mode 100644 index 19d284f66fd..00000000000 --- a/apps/sim/ee/whitelabeling/metadata.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { INTEGRATION_COUNT_LABEL } from '@sim/deployment-config/integration-claims' -import type { Metadata } from 'next' -import { getBaseUrl } from '@/lib/core/utils/urls' -import { getBrandConfig } from '@/ee/whitelabeling/branding' - -/** - * Generate dynamic metadata based on brand configuration. - * - * Deliberately sets no `alternates.canonical` or `openGraph.url`: every route - * inherits this, so a fixed value would make each page claim the home page as - * its canonical. Landing pages emit their own canonical URLs. - */ -export function generateBrandedMetadata(override: Partial = {}): Metadata { - const brand = getBrandConfig() - - const defaultTitle = brand.name - const summaryFull = `Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect ${INTEGRATION_COUNT_LABEL} integrations and every major LLM to create agents that automate real work — visually, conversationally, or with code. Trusted by over 100,000 builders — from startups to Fortune 500 companies. SOC2 compliant.` - const summaryShort = `Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Connect ${INTEGRATION_COUNT_LABEL} integrations and every major LLM to create agents that automate real work.` - - return { - title: { - template: `%s | ${brand.name}`, - default: defaultTitle, - }, - description: summaryShort, - applicationName: brand.name, - authors: [{ name: brand.name }], - generator: 'Next.js', - keywords: [ - 'AI workspace', - 'AI agent builder', - 'AI agent workflow builder', - 'build AI agents', - 'visual workflow builder', - 'AI agents', - 'AI agent platform', - 'open-source AI agents', - 'agentic workflows', - 'LLM orchestration', - 'AI integrations', - 'knowledge base', - 'AI automation', - 'workflow builder', - 'AI workflow orchestration', - 'enterprise AI', - 'AI agent deployment', - 'intelligent automation', - 'AI tools', - ], - referrer: 'origin-when-cross-origin', - creator: brand.name, - publisher: brand.name, - metadataBase: new URL(getBaseUrl()), - robots: { - index: true, - follow: true, - googleBot: { - index: true, - follow: true, - 'max-image-preview': 'large', - 'max-video-preview': -1, - 'max-snippet': -1, - }, - }, - openGraph: { - type: 'website', - locale: 'en_US', - title: defaultTitle, - description: summaryFull, - siteName: brand.name, - images: [ - { - url: brand.logoUrl || '/logo/426-240/reverse/small.png', - width: 2130, - height: 1200, - alt: brand.name, - }, - ], - }, - twitter: { - card: 'summary_large_image', - title: defaultTitle, - description: summaryFull, - images: [brand.logoUrl || '/logo/426-240/reverse/small.png'], - creator: '@simdotai', - site: '@simdotai', - }, - manifest: '/manifest.webmanifest', - icons: { - icon: [ - ...(brand.faviconUrl ? [] : [{ url: '/icon.svg', type: 'image/svg+xml', sizes: 'any' }]), - { url: '/favicon/favicon-16x16.png', sizes: '16x16', type: 'image/png' }, - { url: '/favicon/favicon-32x32.png', sizes: '32x32', type: 'image/png' }, - { - url: '/favicon/android-chrome-192x192.png', - sizes: '192x192', - type: 'image/png', - }, - { - url: '/favicon/android-chrome-512x512.png', - sizes: '512x512', - type: 'image/png', - }, - ...(brand.faviconUrl ? [{ url: brand.faviconUrl, sizes: 'any', type: 'image/png' }] : []), - ], - apple: '/favicon/apple-touch-icon.png', - shortcut: brand.faviconUrl || '/icon.svg', - }, - appleWebApp: { - capable: true, - statusBarStyle: 'default', - title: brand.name, - }, - formatDetection: { - telephone: false, - }, - category: 'technology', - other: { - 'apple-mobile-web-app-capable': 'yes', - 'mobile-web-app-capable': 'yes', - 'msapplication-TileColor': '#33C482', - 'msapplication-config': 'none', - }, - ...override, - } -} diff --git a/apps/sim/ee/whitelabeling/org-branding-utils.ts b/apps/sim/ee/whitelabeling/org-branding-utils.ts deleted file mode 100644 index daaf44a4c0c..00000000000 --- a/apps/sim/ee/whitelabeling/org-branding-utils.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { BrandConfig, OrganizationWhitelabelSettings } from '@/lib/branding/types' -import { getContrastTextColor } from '@/lib/colors' - -/** - * Merge org-level whitelabel settings over the instance-level brand config. - * Org settings take priority for any field they define. - */ -export function mergeOrgBrandConfig( - orgSettings: OrganizationWhitelabelSettings | null, - instanceConfig: BrandConfig -): BrandConfig { - if (!orgSettings) { - return instanceConfig - } - - return { - ...instanceConfig, - name: orgSettings.brandName || instanceConfig.name, - logoUrl: orgSettings.logoUrl || instanceConfig.logoUrl, - wordmarkUrl: orgSettings.wordmarkUrl || instanceConfig.wordmarkUrl, - supportEmail: orgSettings.supportEmail || instanceConfig.supportEmail, - documentationUrl: orgSettings.documentationUrl || instanceConfig.documentationUrl, - termsUrl: orgSettings.termsUrl || instanceConfig.termsUrl, - privacyUrl: orgSettings.privacyUrl || instanceConfig.privacyUrl, - theme: { - ...instanceConfig.theme, - ...(orgSettings.primaryColor && { primaryColor: orgSettings.primaryColor }), - ...(orgSettings.primaryHoverColor && { primaryHoverColor: orgSettings.primaryHoverColor }), - ...(orgSettings.accentColor && { accentColor: orgSettings.accentColor }), - ...(orgSettings.accentHoverColor && { accentHoverColor: orgSettings.accentHoverColor }), - }, - isWhitelabeled: - instanceConfig.isWhitelabeled || - Boolean( - orgSettings.brandName || - orgSettings.logoUrl || - orgSettings.wordmarkUrl || - orgSettings.primaryColor - ), - } -} - -/** - * Generate CSS variable overrides from org whitelabel settings. - * Returns an empty string when no color overrides are set. - */ -export function generateOrgThemeCSS(settings: OrganizationWhitelabelSettings): string { - const vars: string[] = [] - - if (settings.primaryColor) { - vars.push(`--brand: ${settings.primaryColor};`) - vars.push(`--brand-agent: ${settings.primaryColor};`) - vars.push(`--brand-accent: ${settings.primaryColor};`) - vars.push(`--auth-primary-btn-bg: ${settings.primaryColor};`) - vars.push(`--auth-primary-btn-border: ${settings.primaryColor};`) - vars.push(`--auth-primary-btn-hover-bg: ${settings.primaryColor};`) - vars.push(`--auth-primary-btn-hover-border: ${settings.primaryColor};`) - const textColor = getContrastTextColor(settings.primaryColor) - vars.push(`--auth-primary-btn-text: ${textColor};`) - vars.push(`--auth-primary-btn-hover-text: ${textColor};`) - } - - if (settings.primaryHoverColor) { - vars.push(`--brand-hover: ${settings.primaryHoverColor};`) - vars.push(`--brand-accent-hover: ${settings.primaryHoverColor};`) - vars.push(`--auth-primary-btn-hover-bg: ${settings.primaryHoverColor};`) - vars.push(`--auth-primary-btn-hover-border: ${settings.primaryHoverColor};`) - vars.push(`--auth-primary-btn-hover-text: ${getContrastTextColor(settings.primaryHoverColor)};`) - } - - if (settings.accentColor) { - vars.push(`--brand-accent: ${settings.accentColor};`) - } - - if (settings.accentHoverColor) { - vars.push(`--brand-accent-hover: ${settings.accentHoverColor};`) - } - - return vars.length > 0 ? `:root { ${vars.join(' ')} }` : '' -} diff --git a/apps/sim/ee/whitelabeling/org-branding.ts b/apps/sim/ee/whitelabeling/org-branding.ts deleted file mode 100644 index cefec6dc4a4..00000000000 --- a/apps/sim/ee/whitelabeling/org-branding.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { db } from '@sim/db' -import { organization } from '@sim/db/schema' -import { createLogger } from '@sim/logger' -import { eq } from 'drizzle-orm' -import type { OrganizationWhitelabelSettings } from '@/lib/branding/types' - -const logger = createLogger('OrgBranding') - -/** - * Fetch whitelabel settings for an organization from the database. - */ -export async function getOrgWhitelabelSettings( - orgId: string -): Promise { - try { - const [org] = await db - .select({ whitelabelSettings: organization.whitelabelSettings }) - .from(organization) - .where(eq(organization.id, orgId)) - .limit(1) - - return org?.whitelabelSettings ?? null - } catch (error) { - logger.error('Failed to fetch org whitelabel settings', { error, orgId }) - return null - } -} diff --git a/apps/sim/lib/api/contracts/organization.ts b/apps/sim/lib/api/contracts/organization.ts index b3dd8c38da7..2ae74ed9898 100644 --- a/apps/sim/lib/api/contracts/organization.ts +++ b/apps/sim/lib/api/contracts/organization.ts @@ -9,7 +9,6 @@ import { import { organizationBillingDataSchema } from '@/lib/api/contracts/subscription' import { defineRouteContract } from '@/lib/api/contracts/types' import { memberCreditLimitUpdateSchema } from '@/lib/billing/application/usage-limit-validation' -import { HEX_COLOR_REGEX } from '@/lib/branding' import { organizationRosterSchema as domainOrganizationRosterSchema, rosterMemberSchema as domainRosterMemberSchema, @@ -238,46 +237,6 @@ export const revokeOrganizationSessionsResponseSchema = z.object({ }), }) -export const updateOrganizationWhitelabelBodySchema = z.object({ - brandName: z - .string() - .trim() - .max(64, 'Brand name must be 64 characters or fewer') - .nullable() - .optional(), - logoUrl: z.string().min(1).nullable().optional(), - wordmarkUrl: z.string().min(1).nullable().optional(), - primaryColor: z - .string() - .regex(HEX_COLOR_REGEX, 'Primary color must be a valid hex color (e.g. #33c482)') - .nullable() - .optional(), - primaryHoverColor: z - .string() - .regex(HEX_COLOR_REGEX, 'Primary hover color must be a valid hex color') - .nullable() - .optional(), - accentColor: z - .string() - .regex(HEX_COLOR_REGEX, 'Accent color must be a valid hex color') - .nullable() - .optional(), - accentHoverColor: z - .string() - .regex(HEX_COLOR_REGEX, 'Accent hover color must be a valid hex color') - .nullable() - .optional(), - supportEmail: z - .string() - .email('Support email must be a valid email address') - .nullable() - .optional(), - documentationUrl: z.string().url('Documentation URL must be a valid URL').nullable().optional(), - termsUrl: z.string().url('Terms URL must be a valid URL').nullable().optional(), - privacyUrl: z.string().url('Privacy URL must be a valid URL').nullable().optional(), - hidePoweredBySim: z.boolean().optional(), -}) - export const transferOwnershipBodySchema = z.object({ newOwnerUserId: z.string().min(1), alsoLeave: z.boolean().optional().default(false), @@ -658,62 +617,6 @@ export const removeOrganizationDomainContract = defineRouteContract({ }, }) -// Read shape mirrors `OrganizationWhitelabelSettings` from -// `@/lib/branding/types`. All fields are optional (nullable on the way in -// for the PUT contract, but stored without nulls on the way out — the -// route deletes keys that are explicitly cleared). -export const organizationWhitelabelSettingsResponseSchema = z.object({ - brandName: z.string().optional(), - logoUrl: z.string().optional(), - wordmarkUrl: z.string().optional(), - primaryColor: z.string().optional(), - primaryHoverColor: z.string().optional(), - accentColor: z.string().optional(), - accentHoverColor: z.string().optional(), - supportEmail: z.string().optional(), - documentationUrl: z.string().optional(), - termsUrl: z.string().optional(), - privacyUrl: z.string().optional(), - hidePoweredBySim: z.boolean().optional(), -}) - -const organizationWhitelabelEnvelopeResponseSchema = z.object({ - success: z.boolean(), - data: organizationWhitelabelSettingsResponseSchema, -}) - -/** - * The read also carries the entitlement the update enforces, so the settings page can gate on it - * without a separate billing read. It sits beside `data` rather than inside it: `data` keeps the - * settings shape clients already parse, so a client from before this field reads the same response. - * It is optional so a client reading a server from before this field still parses the settings. - */ -const organizationWhitelabelReadResponseSchema = - organizationWhitelabelEnvelopeResponseSchema.extend({ - isEnterprise: z.boolean().optional(), - }) - -export const getOrganizationWhitelabelContract = defineRouteContract({ - method: 'GET', - path: '/api/organizations/[id]/whitelabel', - params: organizationParamsSchema, - response: { - mode: 'json', - schema: organizationWhitelabelReadResponseSchema, - }, -}) - -export const updateOrganizationWhitelabelContract = defineRouteContract({ - method: 'PUT', - path: '/api/organizations/[id]/whitelabel', - params: organizationParamsSchema, - body: updateOrganizationWhitelabelBodySchema, - response: { - mode: 'json', - schema: organizationWhitelabelEnvelopeResponseSchema, - }, -}) - export const createOrganizationContract = defineRouteContract({ method: 'POST', path: '/api/organizations', diff --git a/apps/sim/lib/api/contracts/v1/admin/dashboard-workspaces.ts b/apps/sim/lib/api/contracts/v1/admin/dashboard-workspaces.ts index f59fc4af528..56a83e1879d 100644 --- a/apps/sim/lib/api/contracts/v1/admin/dashboard-workspaces.ts +++ b/apps/sim/lib/api/contracts/v1/admin/dashboard-workspaces.ts @@ -128,7 +128,6 @@ const adminDashboardWorkspaceSourceImpactSchema = z.object({ }) ) .max(1000), - brandingChanges: z.boolean(), /** * Rows omitted to keep the response inside the array bounds above. Non-null * means the lists are incomplete and the notice says so. diff --git a/apps/sim/lib/api/contracts/v1/admin/organizations.ts b/apps/sim/lib/api/contracts/v1/admin/organizations.ts index 418bf7ccf14..79168ee3e1c 100644 --- a/apps/sim/lib/api/contracts/v1/admin/organizations.ts +++ b/apps/sim/lib/api/contracts/v1/admin/organizations.ts @@ -2,7 +2,6 @@ import { z } from 'zod' import { updateOrganizationDataRetentionBodySchema, updateOrganizationSessionPolicyBodySchema, - updateOrganizationWhitelabelBodySchema, } from '@/lib/api/contracts/organization' import { type ContractJsonResponse, defineRouteContract } from '@/lib/api/contracts/types' import { @@ -401,17 +400,6 @@ export const adminV1DeleteOrganizationContract = defineRouteContract({ }, }) -export const adminV1UpdateOrganizationWhitelabelContract = defineRouteContract({ - method: 'PATCH', - path: '/api/v1/admin/organizations/[id]/whitelabel', - params: adminV1IdParamsSchema, - body: updateOrganizationWhitelabelBodySchema, - response: { - mode: 'json', - schema: adminV1SingleResponseSchema(adminV1OrganizationSettingsResultSchema), - }, -}) - export const adminV1UpdateOrganizationDataRetentionContract = defineRouteContract({ method: 'PATCH', path: '/api/v1/admin/organizations/[id]/data-retention', @@ -440,9 +428,6 @@ export type AdminV1TransferOwnershipResponse = ContractJsonResponse< export type AdminV1DeleteOrganizationResponse = ContractJsonResponse< typeof adminV1DeleteOrganizationContract > -export type AdminV1UpdateOrganizationWhitelabelResponse = ContractJsonResponse< - typeof adminV1UpdateOrganizationWhitelabelContract -> export type AdminV1UpdateOrganizationDataRetentionResponse = ContractJsonResponse< typeof adminV1UpdateOrganizationDataRetentionContract > diff --git a/apps/sim/lib/api/contracts/workspaces.ts b/apps/sim/lib/api/contracts/workspaces.ts index d26609ff336..9c165fd396b 100644 --- a/apps/sim/lib/api/contracts/workspaces.ts +++ b/apps/sim/lib/api/contracts/workspaces.ts @@ -241,7 +241,6 @@ export const deploymentFeaturesSchema = z.object({ sessionPolicies: z.boolean(), sso: z.boolean(), usageMonitoring: z.boolean(), - whitelabeling: z.boolean(), }) export type DeploymentFeatures = z.output diff --git a/apps/sim/lib/billing/aws-marketplace/notifications.ts b/apps/sim/lib/billing/aws-marketplace/notifications.ts index ee9baac9d4e..0f5d9a43904 100644 --- a/apps/sim/lib/billing/aws-marketplace/notifications.ts +++ b/apps/sim/lib/billing/aws-marketplace/notifications.ts @@ -14,12 +14,12 @@ import { getLinkParties, listOrganizationsLinkedToAccount, } from '@/lib/billing/aws-marketplace/repository' +import { SUPPORT_EMAIL } from '@/lib/branding/contact' import { env } from '@/lib/core/config/env' import type { OutboxHandler, OutboxHandlerRegistry } from '@/lib/core/outbox/service' import { getEmailDomain } from '@/lib/core/utils/urls' import { sendEmail } from '@/lib/messaging/email/mailer' import { getFromEmailAddress } from '@/lib/messaging/email/utils' -import { getBrandConfig } from '@/ee/whitelabeling' const logger = createLogger('AwsMarketplaceNotifications') @@ -212,16 +212,15 @@ ${copy.next} async function renderBuyerNotice(notice: AwsMarketplaceBuyerNotice): Promise { const [license] = await getLicensesByIds([notice.licenseId]) if (!license?.contactEmail) return null - const brand = getBrandConfig() return { to: license.contactEmail, - subject: `Your ${brand.name} account is being set up`, - replyTo: brand.supportEmail, - text: `Thanks for subscribing to ${brand.name} through AWS Marketplace. + subject: `Your Sim account is being set up`, + replyTo: SUPPORT_EMAIL, + text: `Thanks for subscribing to Sim through AWS Marketplace. Your account is being set up. Please wait for us to contact you. We expect to finish ${AWS_MARKETPLACE_SETUP_TURNAROUND}. -Questions? Contact ${brand.supportEmail}. +Questions? Contact ${SUPPORT_EMAIL}. `, } } diff --git a/apps/sim/lib/billing/core/subscription.ts b/apps/sim/lib/billing/core/subscription.ts index b39ebcc0415..fc427297456 100644 --- a/apps/sim/lib/billing/core/subscription.ts +++ b/apps/sim/lib/billing/core/subscription.ts @@ -613,7 +613,7 @@ export const isOrganizationGovernanceActive = cache(resolveOrganizationGovernanc * When billing runs, the organization's plan decides and every feature moves * together. When it does not, there is no plan to read, so deployment * configuration decides per feature — which is what lets an operator run, say, - * audit logs without whitelabeling. + * audit logs without data drains. * * Pass the matching flag from `@/lib/core/config/env-flags` as * `selfHostEntitlement`; those already resolve the master switch and the diff --git a/apps/sim/lib/billing/workspace-permissions.test.ts b/apps/sim/lib/billing/workspace-permissions.test.ts index a9b5e206b4f..22b46a998bb 100644 --- a/apps/sim/lib/billing/workspace-permissions.test.ts +++ b/apps/sim/lib/billing/workspace-permissions.test.ts @@ -52,7 +52,6 @@ const DEPLOYMENT: DeploymentShape = { sessionPolicies: false, sso: false, usageMonitoring: false, - whitelabeling: false, }, } diff --git a/apps/sim/lib/branding/contact.ts b/apps/sim/lib/branding/contact.ts new file mode 100644 index 00000000000..d6497128879 --- /dev/null +++ b/apps/sim/lib/branding/contact.ts @@ -0,0 +1,2 @@ +/** Inbox that every support link and transactional email points customers to. */ +export const SUPPORT_EMAIL = 'help@sim.ai' diff --git a/apps/sim/lib/branding/defaults.ts b/apps/sim/lib/branding/defaults.ts deleted file mode 100644 index ae3d9af5589..00000000000 --- a/apps/sim/lib/branding/defaults.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { BrandConfig } from './types' - -/** - * Default brand configuration values - */ -export const defaultBrandConfig: BrandConfig = { - name: 'Sim', - logoUrl: undefined, - wordmarkUrl: undefined, - faviconUrl: undefined, - customCssUrl: undefined, - supportEmail: 'help@sim.ai', - documentationUrl: undefined, - termsUrl: undefined, - privacyUrl: undefined, - theme: { - primaryColor: '#33c482', - primaryHoverColor: '#2dac72', - accentColor: '#33b4ff', - accentHoverColor: '#29a0e8', - backgroundColor: '#0c0c0c', - }, - isWhitelabeled: false, -} diff --git a/apps/sim/lib/branding/index.ts b/apps/sim/lib/branding/index.ts deleted file mode 100644 index d86de41775a..00000000000 --- a/apps/sim/lib/branding/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { defaultBrandConfig } from '@/lib/branding/defaults' -export type { BrandConfig, ThemeColors } from '@/lib/branding/types' -export { HEX_COLOR_REGEX } from '@/lib/branding/types' -export { EMAIL_WORDMARK_SIZE } from '@/lib/branding/wordmark' diff --git a/apps/sim/lib/branding/types.ts b/apps/sim/lib/branding/types.ts deleted file mode 100644 index 91437c1d485..00000000000 --- a/apps/sim/lib/branding/types.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** Matches 3- or 6-digit hex colors, e.g. `#abc` or `#33c482`. */ -export const HEX_COLOR_REGEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i - -export interface ThemeColors { - primaryColor?: string - primaryHoverColor?: string - accentColor?: string - accentHoverColor?: string - backgroundColor?: string -} - -export interface BrandConfig { - name: string - logoUrl?: string - wordmarkUrl?: string - faviconUrl?: string - customCssUrl?: string - supportEmail?: string - documentationUrl?: string - termsUrl?: string - privacyUrl?: string - theme?: ThemeColors - /** Whether this instance has custom branding applied (any brand env var is set) */ - isWhitelabeled: boolean -} - -/** - * Per-organization whitelabel settings stored in the database. - * Only available for enterprise organizations on the hosted platform. - */ -export interface OrganizationWhitelabelSettings { - brandName?: string - logoUrl?: string - wordmarkUrl?: string - primaryColor?: string - primaryHoverColor?: string - accentColor?: string - accentHoverColor?: string - supportEmail?: string - documentationUrl?: string - termsUrl?: string - privacyUrl?: string - hidePoweredBySim?: boolean -} diff --git a/apps/sim/lib/colors/brightness.ts b/apps/sim/lib/colors/brightness.ts deleted file mode 100644 index 141c67ec45f..00000000000 --- a/apps/sim/lib/colors/brightness.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { perceivedBrightness } from '@sim/utils/color' - -/** - * True when `color` is light enough that a white foreground would wash out. - * Non-color values (gradients, `currentColor`, unknown) are treated as not - * light. `threshold` is the perceived-brightness cutoff (default 0.6, tuned so - * only clearly light tiles flip to a dark foreground). - */ -export function isLightColor(color: string, threshold = 0.6): boolean { - const brightness = perceivedBrightness(color) - return brightness !== null && brightness > threshold -} - -/** - * True when `color` is dark enough to warrant a light foreground. Non-color - * values (gradients, `currentColor`, unknown) are treated as not dark. - * `threshold` is the perceived-brightness cutoff (default 0.5, the conventional - * midpoint for binary text contrast). - */ -export function isDarkColor(color: string, threshold = 0.5): boolean { - const brightness = perceivedBrightness(color) - return brightness !== null && brightness < threshold -} - -/** - * Black or white — whichever reads on top of `color`. Dark colors get white - * text; light colors (and unparseable values) get black. Uses the 0.5 midpoint - * ({@link isDarkColor}'s default), the conventional binary text-contrast cutoff. - * - * Note this is intentionally a different cutoff than the brand-tile *icon* - * decision ({@link isLightColor}'s 0.6 default, raised to 0.75 for tiles), which - * biases toward white more aggressively: a colored tile reads better with a - * white icon until it is clearly light, whereas plain text wants the - * mathematically closer of black/white. The two helpers therefore answer - * "what foreground reads here" differently by design, per surface. - */ -export function getContrastTextColor(color: string): '#000000' | '#ffffff' { - return isDarkColor(color) ? '#ffffff' : '#000000' -} diff --git a/apps/sim/lib/colors/index.ts b/apps/sim/lib/colors/index.ts index 940a0316d7d..7ac0ce8b3d8 100644 --- a/apps/sim/lib/colors/index.ts +++ b/apps/sim/lib/colors/index.ts @@ -1,2 +1 @@ -export { getContrastTextColor, isDarkColor, isLightColor } from './brightness' export { hexToRgb, hslToRgb, rgbToHex, rgbToHsl, toCssColor } from './convert' diff --git a/apps/sim/lib/compare/data/competitors/claude-cowork.ts b/apps/sim/lib/compare/data/competitors/claude-cowork.ts index fd4b62230b1..659e0c882d5 100644 --- a/apps/sim/lib/compare/data/competitors/claude-cowork.ts +++ b/apps/sim/lib/compare/data/competitors/claude-cowork.ts @@ -874,19 +874,6 @@ export const claudeCoworkProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - "No/Unknown: There is no evidence Anthropic lets an Enterprise customer replace Claude's own product branding (logo, product name, theme colors) inside the Claude Desktop, Cowork, or claude.ai interface itself. Claude Design (launched April 2026) lets Claude produce branded deliverables (documents, decks, landing pages) carrying the customer's brand, but that brands the output, not the vendor's own workspace UI.", - shortValue: 'No: brands outputs, not the Claude UI itself', - confidence: 'estimated', - sources: [ - { - url: 'https://www.anthropic.com/news/claude-design-anthropic-labs', - label: 'Introducing Claude Design by Anthropic Labs', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: "Yes for org-wide Claude data, but this does not cover Cowork: Enterprise plan Owners/Primary Owners can set a custom data retention period (minimum 30 days) for conversation and project data in Organization settings > Data and Privacy, and data is kept indefinitely without customization. Cowork conversation history is stored locally on users' computers, is not subject to this standard retention policy, and cannot be centrally managed or exported by admins; Cowork activity is also not currently captured in the Compliance API.", diff --git a/apps/sim/lib/compare/data/competitors/crewai.ts b/apps/sim/lib/compare/data/competitors/crewai.ts index 45b83a4421e..25bd685e91e 100644 --- a/apps/sim/lib/compare/data/competitors/crewai.ts +++ b/apps/sim/lib/compare/data/competitors/crewai.ts @@ -889,14 +889,6 @@ export const crewaiProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: 'Not publicly documented', - detail: - 'No CrewAI source describes a white-labeling or custom-branding option for the AMP platform UI or Crew Studio.', - shortValue: 'Not publicly documented', - confidence: 'unknown', - sources: [], - }, dataRetention: { value: 'Not publicly documented', detail: diff --git a/apps/sim/lib/compare/data/competitors/dify.ts b/apps/sim/lib/compare/data/competitors/dify.ts index dc84b05ab31..5259ec3fae9 100644 --- a/apps/sim/lib/compare/data/competitors/dify.ts +++ b/apps/sim/lib/compare/data/competitors/dify.ts @@ -1002,29 +1002,6 @@ export const difyProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'Partial: web app branding with a custom logo and UI is on the Team plan and Enterprise, and Enterprise branding settings replace the application title, login page logo, and workspace logo. On self-hosted Community deployments, the license forbids removing or modifying the Dify logo in the console or applications without a commercial license.', - shortValue: 'Team web app branding; full rebrand on Enterprise', - confidence: 'verified', - sources: [ - { - url: 'https://enterprise-docs.dify.ai/en/3.13.x/administer/branding', - label: 'Dify Enterprise Docs: Branding Settings', - asOf: '2026-11-19', - }, - { - url: 'https://dify.ai/pricing/dify-cloud', - label: 'Dify Cloud plan comparison (WebApp Branding Customization)', - asOf: '2026-11-19', - }, - { - url: 'https://github.com/langgenius/dify/blob/main/LICENSE', - label: 'langgenius/dify LICENSE (GitHub)', - asOf: '2026-11-19', - }, - ], - }, dataRetention: { value: 'Partial: Dify Cloud keeps logs for 30 days on Sandbox; on Professional and Team, conversation logs last for the subscription and workflow run logs older than about three months move to downloadable monthly CSV archives. Self-hosted deployments can turn on automatic workflow log cleanup with a configurable retention period (30 days by default).', diff --git a/apps/sim/lib/compare/data/competitors/dust.ts b/apps/sim/lib/compare/data/competitors/dust.ts index af235a5c8f2..292d8346daf 100644 --- a/apps/sim/lib/compare/data/competitors/dust.ts +++ b/apps/sim/lib/compare/data/competitors/dust.ts @@ -951,14 +951,6 @@ export const dustProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: 'Not publicly documented', - detail: - 'No Dust source describes a white-label/custom-branding offering for the workspace or chat UI.', - shortValue: 'Not publicly documented', - confidence: 'unknown', - sources: [], - }, dataRetention: { value: 'Yes: Enterprise plan documents custom data retention as a named feature', detail: diff --git a/apps/sim/lib/compare/data/competitors/flowise.ts b/apps/sim/lib/compare/data/competitors/flowise.ts index 280de8ba753..ff6ed92683c 100644 --- a/apps/sim/lib/compare/data/competitors/flowise.ts +++ b/apps/sim/lib/compare/data/competitors/flowise.ts @@ -800,19 +800,6 @@ export const flowiseProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'Partial: the free plan includes Flowise\'s own embed branding, and paid plans support customizing the embedded chat widget\'s theme (colors, welcome message, tooltips). Community reports indicate fully removing the "Powered by Flowise" watermark requires workarounds, not a clean built-in option.', - shortValue: 'Partial: widget theming yes, full logo/brand removal unclear', - confidence: 'estimated', - sources: [ - { - url: 'https://github.com/FlowiseAI/Flowise/discussions/626', - label: 'GitHub Discussion #626: remove the Powered by flowise watermark', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'Unknown: no documented org-configurable retention windows for execution logs or soft-deleted resources.', diff --git a/apps/sim/lib/compare/data/competitors/gumloop.ts b/apps/sim/lib/compare/data/competitors/gumloop.ts index 9fc792f45ed..8154a0519fd 100644 --- a/apps/sim/lib/compare/data/competitors/gumloop.ts +++ b/apps/sim/lib/compare/data/competitors/gumloop.ts @@ -966,25 +966,6 @@ export const gumloopProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - "No: Gumloop offers only partial branding controls. A custom Slack app lets an agent appear under the customer's own bot name/avatar, and a dedicated org-specific login page is available at gumloop.com/{your-org}, but the platform's logo, product name, and theme colors are not fully replaceable across the workspace/builder and deployed-app UI.", - detail: 'The core canvas/builder UI itself has no comprehensive white-labeling.', - shortValue: 'No: partial branding only (Slack bot, login page)', - confidence: 'estimated', - sources: [ - { - url: 'https://docs.gumloop.com/core-concepts/custom_slack_app', - label: 'Custom Slack App Integration - Gumloop docs', - asOf: '2026-07-02', - }, - { - url: 'https://docs.gumloop.com/enterprise-features/sso_saml_scim', - label: 'SSO, SAML & SCIM - Gumloop docs (mentions dedicated login page)', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'Yes: Gumloop\'s Enterprise plan includes custom data retention rules and an "Incognito Mode" for ephemeral runs with no history retention for legal/compliance-sensitive flows, alongside audit logs retained per custom policy.', diff --git a/apps/sim/lib/compare/data/competitors/langchain.ts b/apps/sim/lib/compare/data/competitors/langchain.ts index 41ba610512e..cc468590498 100644 --- a/apps/sim/lib/compare/data/competitors/langchain.ts +++ b/apps/sim/lib/compare/data/competitors/langchain.ts @@ -888,15 +888,6 @@ export const langchainProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - "Not publicly documented: no LangSmith or LangGraph Platform page describes an option to replace LangChain/LangSmith branding with a customer's own across the product UI", - detail: - 'No official documentation on customer-facing white-labeling or OEM/embed branding controls was found.', - shortValue: 'Not publicly documented', - confidence: 'unknown', - sources: [], - }, dataRetention: { value: "Yes: LangSmith's usage-based trace pricing offers two retention tiers a customer chooses per trace, base traces (14-day retention) and extended traces (400-day retention), giving org-level control over how long execution data is kept", diff --git a/apps/sim/lib/compare/data/competitors/langflow.ts b/apps/sim/lib/compare/data/competitors/langflow.ts index 0f555aaa8f8..e44eef250ae 100644 --- a/apps/sim/lib/compare/data/competitors/langflow.ts +++ b/apps/sim/lib/compare/data/competitors/langflow.ts @@ -800,21 +800,6 @@ export const langflowProfile: CompetitorProfile = { confidence: 'unknown', sources: [], }, - whiteLabeling: { - value: - "Unknown: no public documentation describes replacing Langflow's branding, such as logo, product name, or theme, in the self-hosted UI or embedded chat widget, beyond basic widget style customization exposed as embed props.", - detail: - 'The embed widget supports styling props but full logo and name replacement across the whole app was not confirmed.', - shortValue: 'Unknown; only chat-widget style props documented, not full rebrand', - confidence: 'estimated', - sources: [ - { - url: 'https://github.com/langflow-ai/langflow-embedded-chat', - label: 'GitHub: langflow-ai/langflow-embedded-chat', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'Unknown: no public documentation describes an org-configurable retention window for execution logs or soft-deleted resources. Self-hosters control their own database and log retention at the infrastructure level, since Langflow stores data in a configured database plus local or S3 file storage.', diff --git a/apps/sim/lib/compare/data/competitors/make.ts b/apps/sim/lib/compare/data/competitors/make.ts index 80bd3c8f4c8..56160828c84 100644 --- a/apps/sim/lib/compare/data/competitors/make.ts +++ b/apps/sim/lib/compare/data/competitors/make.ts @@ -983,26 +983,6 @@ export const makeProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'Yes: Make offers a White Label / OEM product that lets a customer rebrand a Make instance with their own product name (shown in browser tab and emails), custom login-page and UI colors, custom favicon, and custom logos for light and dark backgrounds.', - detail: - 'This is a separate enterprise/OEM offering from standard Make plans, documented in the Make White Label Developer Hub.', - shortValue: 'Yes: White Label OEM rebrand (name, colors, logo)', - confidence: 'verified', - sources: [ - { - url: 'https://developers.make.com/white-label-documentation/customize-your-instance/rebrand-your-instance', - label: 'Rebrand your instance - Make White Label Developer Hub', - asOf: '2026-07-02', - }, - { - url: 'https://developers.make.com/white-label-documentation', - label: 'Make White Label - Make Developer Hub', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'Yes (partially): Execution/run history retention in Make is plan-dependent, with longer retention on higher-tier plans, rather than freely configurable by default. White Label instance admins can set organization log retention (default 60 days if unset), and audit logs can retain data for up to 365 days.', diff --git a/apps/sim/lib/compare/data/competitors/microsoft-copilot.ts b/apps/sim/lib/compare/data/competitors/microsoft-copilot.ts index 2593ea14843..0950ab65b44 100644 --- a/apps/sim/lib/compare/data/competitors/microsoft-copilot.ts +++ b/apps/sim/lib/compare/data/competitors/microsoft-copilot.ts @@ -1238,22 +1238,6 @@ export const microsoftCopilotProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'No: agent-level branding is limited to a custom name, icon, and accent color in Settings, or fully hosting a custom canvas web app for the chat window (via CSS/JavaScript or the Bot Framework SDK). There is no option to remove Microsoft/Copilot Studio branding from the authoring canvas or the default published chat UI itself.', - detail: - 'A custom canvas gives full programmatic control over the embedded chat experience, but that is a developer-built replacement UI, not a native white-labeling setting inside the product.', - shortValue: 'No, only name/icon/color or a fully custom-built chat canvas', - confidence: 'estimated', - sources: [ - { - url: 'https://learn.microsoft.com/en-us/microsoft-copilot-studio/customize-default-canvas', - label: - 'Customize the look and feel of an agent - Microsoft Copilot Studio | Microsoft Learn', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'Partial: conversation transcripts downloaded directly from Copilot Studio only cover the past 29 days, while the underlying Dataverse conversation-transcript and custom-analytics tables default to a 30-day retention period; extending retention beyond that default requires either an admin changing the Dataverse retention setting or exporting the data via Azure Synapse Link for Dataverse into Azure Data Lake Storage Gen2', diff --git a/apps/sim/lib/compare/data/competitors/n8n.ts b/apps/sim/lib/compare/data/competitors/n8n.ts index 288a51861eb..81122b6dc2a 100644 --- a/apps/sim/lib/compare/data/competitors/n8n.ts +++ b/apps/sim/lib/compare/data/competitors/n8n.ts @@ -1020,26 +1020,6 @@ export const n8nProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - "No: n8n's OEM/embed documentation states n8n branding stays visible in the editor when embedded, and full white-labeling is not supported through their OEM offering; only self-hosted customers doing manual source-code modification (editing design-system CSS/Vue components and i18n text) can rebrand it themselves.", - detail: - 'n8n\'s docs say: "If full white-labeling is a hard requirement for your product, OEM isn\'t the right fit." A full rebrand is only possible via unsupported self-hosted source modification.', - shortValue: 'No, n8n branding stays visible even via OEM/embed', - confidence: 'verified', - sources: [ - { - url: 'https://n8n.io/oem/', - label: 'OEM | Embedded IPaaS | n8n', - asOf: '2026-07-02', - }, - { - url: 'https://community.n8n.io/t/white-label-incorporate-n8n-in-your-product/18146', - label: 'White label / Incorporate n8n in your product (n8n Community)', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'Yes: n8n lets self-hosted instances configure execution-data retention via environment variables (EXECUTIONS_DATA_MAX_AGE, EXECUTIONS_DATA_PRUNE_MAX_COUNT), and n8n Cloud Enterprise plans support up to 50,000 executions with unlimited retention versus fixed limits on lower tiers.', diff --git a/apps/sim/lib/compare/data/competitors/openai-agentkit.ts b/apps/sim/lib/compare/data/competitors/openai-agentkit.ts index c953cd807e0..5fbd07c15a9 100644 --- a/apps/sim/lib/compare/data/competitors/openai-agentkit.ts +++ b/apps/sim/lib/compare/data/competitors/openai-agentkit.ts @@ -1134,26 +1134,6 @@ export const openaiAgentkitProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'No: ChatKit (the deployment surface for Agent Builder workflows) only supports surface-level theming, colors, typography, density, and rounded corners, not full white-labeling. Deeper brand replacement, such as changing the chat bubble shape, header layout, or removing OpenAI product identity, requires forking the ChatKit library.', - detail: - "A third-party technical review explicitly notes deep white-label branding is 'impossible without forking the entire ChatKit library.'", - shortValue: 'No, only color/theme customization, not full white-label', - confidence: 'estimated', - sources: [ - { - url: 'https://developers.openai.com/api/docs/guides/chatkit-themes', - label: 'Theming and customization in ChatKit | OpenAI API', - asOf: '2026-07-02', - }, - { - url: 'https://quickchat.ai/post/openai-chatkit-review', - label: 'OpenAI ChatKit Review: Technical Deep Dive', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: "No: OpenAI's Compliance Logs Platform retains data for a fixed 30 days (not org-configurable), and API Platform audit logs have no fixed retention/TTL at all rather than an admin-adjustable window; there is no documented org-configurable retention setting for Agent Builder workflow execution logs specifically.", diff --git a/apps/sim/lib/compare/data/competitors/openclaw.ts b/apps/sim/lib/compare/data/competitors/openclaw.ts index 3687ff9da16..5a1b9099505 100644 --- a/apps/sim/lib/compare/data/competitors/openclaw.ts +++ b/apps/sim/lib/compare/data/competitors/openclaw.ts @@ -961,15 +961,6 @@ export const openClawProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'No: OpenClaw has no white-labeling feature. As a personal, self-hosted agent, not a product a business deploys to its own end customers under its own brand, rebranding the product UI/name is not a use case the docs address.', - detail: - 'No documentation describes replacing OpenClaw branding for a deployed customer-facing product; the concept does not map cleanly onto a personal-assistant tool the way it does for a workflow platform with deployed apps.', - shortValue: 'No white-labeling feature documented', - confidence: 'estimated', - sources: [], - }, dataRetention: { value: 'Yes, operator-configurable: isolated sub-agent/cron sessions are pruned after a retention window (24 hours by default), and because all data lives in local files (session JSONL transcripts, memory Markdown files), the self-hosting operator has full control over retention (including deleting files immediately).', diff --git a/apps/sim/lib/compare/data/competitors/pipedream.ts b/apps/sim/lib/compare/data/competitors/pipedream.ts index 97491509bf8..31d64f0a407 100644 --- a/apps/sim/lib/compare/data/competitors/pipedream.ts +++ b/apps/sim/lib/compare/data/competitors/pipedream.ts @@ -899,26 +899,6 @@ export const pipedreamProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'No: Pipedream supports custom domains for HTTP endpoint URLs, but its documentation and community support state the authentication/consent experience is not white-label. Users always see Pipedream branding and are asked to consent to Pipedream processing their data during connect flows, so vendor branding cannot be fully replaced across the workspace or deployed-app UI.', - detail: - 'Custom domains only rebrand webhook endpoint URLs (e.g. api.example.com instead of *.m.pipedream.net); the OAuth/consent UI and general product UI keep Pipedream branding.', - shortValue: 'No, endpoint domains only, auth stays branded', - confidence: 'verified', - sources: [ - { - url: 'https://pipedream.com/docs/workflows/domains', - label: 'Custom Domains docs', - asOf: '2026-07-02', - }, - { - url: 'https://pipedream.com/community/t/what-3rd-party-tool-can-i-use-to-white-label-my-endpoints-from-http-pipedream-com-pipedream-com-to-my-domain/7842', - label: 'Community: white-labeling endpoints limitation', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'Yes: Pipedream documents account-level retention rules for event/execution data, and states Enterprise customers can turn off all data retention, while internal application logs are deleted within about 30 days by default.', diff --git a/apps/sim/lib/compare/data/competitors/power-automate.ts b/apps/sim/lib/compare/data/competitors/power-automate.ts index 6f9073aee00..4f40187e526 100644 --- a/apps/sim/lib/compare/data/competitors/power-automate.ts +++ b/apps/sim/lib/compare/data/competitors/power-automate.ts @@ -1013,27 +1013,6 @@ export const powerAutomateProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'No: Power Platform offers only partial branding options, such as custom domains for Power Pages/portals, and lacks native white-labeling for the core app/flow UI. There is no native way to rebrand or remove Microsoft branding from canvas apps or the Power Apps/Power Automate product UI itself.', - detail: - 'Custom domains exist only for Power Pages (portals), not for canvas apps, model-driven apps, or the Power Automate flow designer itself.', - shortValue: 'No native full white-labeling of core product UI', - confidence: 'estimated', - sources: [ - { - url: 'https://d365update.com/power-apps-portal-custom-domains/', - label: 'Power Apps Portal Custom Domains - d365update.com', - asOf: '2026-07-02', - }, - { - url: 'https://community.powerplatform.com/forums/thread/details/?threadid=76b575a4-f741-46fc-84e0-8de11a6f7b78', - label: - 'Can we Rebrand Power APP mobile app for our own company - Power Platform Community', - asOf: '2026-07-08', - }, - ], - }, dataRetention: { value: "Yes: Power Platform admins can configure the run-history retention (time-to-live) for cloud flow runs stored in Dataverse via the Power Platform admin center, choosing 28 days (default), 14 days, 7 days, or Disabled, and can set a fully custom retention value directly via the Dataverse Organization table's FlowRunTimeToLiveInSeconds field.", diff --git a/apps/sim/lib/compare/data/competitors/relevance-ai.ts b/apps/sim/lib/compare/data/competitors/relevance-ai.ts index 83ee20440e3..9111b5b54a4 100644 --- a/apps/sim/lib/compare/data/competitors/relevance-ai.ts +++ b/apps/sim/lib/compare/data/competitors/relevance-ai.ts @@ -1065,20 +1065,6 @@ export const relevanceAiProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'Partial: the embeddable chat widget can hide Relevance AI branding and set a primary color; full white-labeling of the app is not documented', - detail: 'Widget options include hide_logo, primary_color, and bubble icon settings.', - shortValue: 'Chat widget branding can be hidden', - confidence: 'verified', - sources: [ - { - url: 'https://relevanceai.com/docs/build/agents/share-your-agent', - label: 'Share Your Agent | Relevance AI Docs', - asOf: '2026-11-19', - }, - ], - }, dataRetention: { value: 'Yes on Enterprise: admins set retention windows for tool runs, agent conversations, Workforce tasks, and old versions; Pro and Team list 90-day task history', diff --git a/apps/sim/lib/compare/data/competitors/retool.ts b/apps/sim/lib/compare/data/competitors/retool.ts index 4582bfd080c..fbd5d320860 100644 --- a/apps/sim/lib/compare/data/competitors/retool.ts +++ b/apps/sim/lib/compare/data/competitors/retool.ts @@ -939,31 +939,6 @@ export const retoolProfile: CompetitorProfile = { { url: 'https://retool.com/pricing', label: 'Retool Pricing', asOf: '2026-07-02' }, ], }, - whiteLabeling: { - value: - "Yes: Retool's Enterprise plan includes full white-labeling, letting orgs replace the Retool logo/favicon and remove references to the Retool name across login pages, headers, invite/password-reset emails, and app presentation mode. The Business plan gets custom branding with fewer white-label controls. Separately, white-labeled Retool Mobile apps can be requested for the iOS/Android app stores.", - detail: - 'Custom domain (Business/Enterprise) is required alongside white-labeling for a fully de-branded experience.', - shortValue: 'Yes, full white-labeling on Enterprise plan', - confidence: 'verified', - sources: [ - { - url: 'https://retool.com/pricing', - label: 'Retool Pricing', - asOf: '2026-11-02', - }, - { - url: 'https://docs.retool.com/apps/mobile/guides/whitelabel', - label: 'White-labeled Retool Mobile apps', - asOf: '2026-07-02', - }, - { - url: 'https://community.retool.com/t/change-retool-logo-for-custom-logo-at-retool-login-page-with-retool-branding-options/22734', - label: 'Change Retool Logo for Custom Logo (forum)', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'No: Retool Cloud has a fixed one-year audit log retention with only the most recent three months browsable in the UI; there is no documented org-configurable retention window on Cloud. Self-hosted orgs manage retention themselves via their own infrastructure, but that is operator-managed, not a Retool-provided configurable setting.', diff --git a/apps/sim/lib/compare/data/competitors/stackai.ts b/apps/sim/lib/compare/data/competitors/stackai.ts index 43dc1e80efc..fd2fde44b9e 100644 --- a/apps/sim/lib/compare/data/competitors/stackai.ts +++ b/apps/sim/lib/compare/data/competitors/stackai.ts @@ -788,15 +788,6 @@ export const stackaiProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'Unknown: StackAI does not document letting customers replace its logo, product name, or theme colors across the workspace or deployed-app UI. Deployed chat interfaces can be styled/branded, but full workspace-level white-labeling is unconfirmed.', - detail: - "Marketing pages reference brand guidelines for StackAI's own brand, and chat widgets can be styled to match a customer's site, but no source confirms full white-label replacement of vendor branding.", - shortValue: 'Unknown, not publicly documented', - confidence: 'unknown', - sources: [], - }, dataRetention: { value: "Yes: StackAI's Trust Center and security documentation state the org can configure data retention durations, backed by a documented Data Retention and Disposal Policy, rather than a single fixed platform-wide default.", diff --git a/apps/sim/lib/compare/data/competitors/tines.ts b/apps/sim/lib/compare/data/competitors/tines.ts index 58a5d1293b5..654052e2da2 100644 --- a/apps/sim/lib/compare/data/competitors/tines.ts +++ b/apps/sim/lib/compare/data/competitors/tines.ts @@ -886,21 +886,6 @@ export const tinesProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'No: branding customization is scoped to Pages (custom logo, background/action colors, light/dark mode, saved Page themes), not the whole workspace or product UI. No evidence of full white-labeling (removing the Tines name/logo tenant-wide) was found.', - detail: - 'Page themes let you brand individual deployed pages differently per audience, which is narrower than workspace-wide white-labeling.', - shortValue: 'No: only per-Page branding, not full white-label', - confidence: 'estimated', - sources: [ - { - url: 'https://www.tines.com/docs/pages/branding-and-style/', - label: 'Branding and style | Docs | Tines', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'No: audit logs have a fixed two-year retention period, with no org-configurable retention window for logs or soft-deleted resources. Self-hosted deployments expose configurable event/rate limits via environment variables, but not data retention windows.', diff --git a/apps/sim/lib/compare/data/competitors/vellum.ts b/apps/sim/lib/compare/data/competitors/vellum.ts index 34de1628705..7409d690bdd 100644 --- a/apps/sim/lib/compare/data/competitors/vellum.ts +++ b/apps/sim/lib/compare/data/competitors/vellum.ts @@ -893,15 +893,6 @@ export const vellumProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - "Unknown: no documentation describes replacing Vellum's own branding (logo, product name, theme) with a customer's branding across the workspace or deployed apps. Only generic 'white glove' Enterprise service language appears, and that refers to onboarding support, not white-label branding.", - detail: - "Vellum's own branding-guide page addresses Vellum's use of its own brand assets by others, not a customer-facing white-label capability.", - shortValue: 'Unknown, no white-label branding docs found', - confidence: 'unknown', - sources: [], - }, dataRetention: { value: 'Yes: Enterprise customers can configure data retention policies to automatically delete monitoring/interaction data after a specified period (30, 60, 90, or 365 days) instead of the default indefinite retention.', diff --git a/apps/sim/lib/compare/data/competitors/workato.ts b/apps/sim/lib/compare/data/competitors/workato.ts index 9af497d2faa..a4c3cb48f6b 100644 --- a/apps/sim/lib/compare/data/competitors/workato.ts +++ b/apps/sim/lib/compare/data/competitors/workato.ts @@ -1044,27 +1044,6 @@ export const workatoProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'Yes, partially self-service: Workato Embedded offers a Theme editor (Admin Console/Manage Customers > Settings > Branding) for customizing colors, fonts, and spacing, for partners embedding Workato in their own product. Adding a custom company logo is not part of the self-service Theme editor and instead requires contacting a Workato Success Representative.', - detail: - 'Scoped to the Embedded/OEM offering, not the standard workspace UI. No current documentation supports white-labeling of error messages, notifications, or logs.', - shortValue: 'Yes: Embedded theme editor (colors/fonts/spacing); logo needs Support', - confidence: 'verified', - sources: [ - { - url: 'https://docs.workato.com/oem/branding.html', - label: 'Workato Docs: Branding - Theme editor', - asOf: '2026-07-08', - }, - { - url: 'https://www.workato.com/product-hub/customization-possibilities-with-the-embedded-theme-editor/', - label: - 'Workato Product Hub: Customization possibilities with the Embedded Theme editor', - asOf: '2026-07-08', - }, - ], - }, dataRetention: { value: 'Yes: Workato supports org-configurable data retention for recipe job logs, with a default of 30 to 90 days depending on the workspace plan. Enterprise Workspaces, or workspaces with the Data Monitoring/Advanced Security & Compliance capability, can set a workspace-wide custom retention period between 1 hour and 90 days; individual recipes can then be set to follow that workspace policy or to store no data at all.', diff --git a/apps/sim/lib/compare/data/competitors/zapier.ts b/apps/sim/lib/compare/data/competitors/zapier.ts index 54a4d2706e3..063699729fe 100644 --- a/apps/sim/lib/compare/data/competitors/zapier.ts +++ b/apps/sim/lib/compare/data/competitors/zapier.ts @@ -948,26 +948,6 @@ export const zapierProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - "Yes, but partial and tiered: Zapier offers a White Label product for embedding automation UI into a customer's own product (currently limited access, contact sales). Separately, Team/Enterprise Forms customers can remove the 'Built on Zapier' label, while Professional/Team/Enterprise customers can apply custom brand colors and a logo to Forms (Free cannot). There is no platform-wide white-labeling of the core Zap editor or workspace itself.", - detail: - 'White Label is a distinct embedded product for SaaS builders; branding removal on Forms is a separate, narrower feature gated behind paid plans, with label removal itself requiring Team/Enterprise.', - shortValue: 'Partial: White Label embed product, tiered branding removal', - confidence: 'verified', - sources: [ - { - url: 'https://docs.zapier.com/white-label/getting-started', - label: 'White Label getting started', - asOf: '2026-07-08', - }, - { - url: 'https://help.zapier.com/hc/en-us/articles/15932034572685-Customize-branding-and-colors-in-Zapier-Forms', - label: 'Customize branding and colors in Zapier Forms', - asOf: '2026-07-08', - }, - ], - }, dataRetention: { value: 'Yes, but Enterprise-only: Enterprise admins can customize Zap history retention to 7-30 days. Free, Professional, and Team plans keep the default retention window and cannot customize it.', diff --git a/apps/sim/lib/compare/data/sim.ts b/apps/sim/lib/compare/data/sim.ts index 6e7fecfaca6..f17235155a0 100644 --- a/apps/sim/lib/compare/data/sim.ts +++ b/apps/sim/lib/compare/data/sim.ts @@ -978,19 +978,6 @@ export const simProfile: CompetitorProfile = { }, ], }, - whiteLabeling: { - value: - 'Yes: Enterprise orgs can replace the logo, wordmark, brand name, and primary/accent theme colors across the workspace UI with their own', - shortValue: 'Custom logo, name, and theme colors (Enterprise)', - confidence: 'verified', - sources: [ - { - url: 'https://docs.sim.ai/platform/enterprise/whitelabeling', - label: 'Sim Docs: Whitelabeling', - asOf: '2026-07-02', - }, - ], - }, dataRetention: { value: 'Yes: Enterprise orgs can independently configure log retention, soft-deletion cleanup, and Chat/Copilot task cleanup (chats, runs, checkpoints, Inbox tasks) at 1 day to 5 years or Forever, applied org-wide with no per-workspace override', diff --git a/apps/sim/lib/compare/data/types.ts b/apps/sim/lib/compare/data/types.ts index ababdb63161..6d990450d49 100644 --- a/apps/sim/lib/compare/data/types.ts +++ b/apps/sim/lib/compare/data/types.ts @@ -126,8 +126,6 @@ export interface ComparisonFacts { modelAndToolGovernance: Fact /** Restricting which specific stored credentials/connections a role or permission group may use, distinct from feature-level RBAC or integration-level allow/deny. */ credentialGovernance: Fact - /** Replacing vendor branding (logo, product name, theme colors) with the customer's own across the workspace/deployed-app UI. */ - whiteLabeling: Fact /** Org-configurable retention windows for execution logs, soft-deleted resources, and similar data, versus a fixed platform-wide default. */ dataRetention: Fact /** Detecting and redacting/blocking PII (emails, SSNs, etc.) in workflow content or retained logs, distinct from generic output-validation guardrails. */ diff --git a/apps/sim/lib/core/config/deployment-shape.ts b/apps/sim/lib/core/config/deployment-shape.ts index 5d415b26020..9ef96efb4d0 100644 --- a/apps/sim/lib/core/config/deployment-shape.ts +++ b/apps/sim/lib/core/config/deployment-shape.ts @@ -18,7 +18,6 @@ import { isSessionPoliciesEnabled, isSsoEnabled, isUsageMonitoringEnabled, - isWhitelabelingEnabled, } from '@/lib/core/config/env-flags' /** @@ -99,7 +98,6 @@ export function resolveDeploymentShape(): DeploymentShape { sessionPolicies: isSessionPoliciesEnabled, sso: isSsoEnabled, usageMonitoring: isUsageMonitoringEnabled, - whitelabeling: isWhitelabelingEnabled, }, } } diff --git a/apps/sim/lib/core/config/enterprise-entitlements.test.ts b/apps/sim/lib/core/config/enterprise-entitlements.test.ts index fcef8266054..2e6bb5c9806 100644 --- a/apps/sim/lib/core/config/enterprise-entitlements.test.ts +++ b/apps/sim/lib/core/config/enterprise-entitlements.test.ts @@ -88,7 +88,6 @@ describe('resolveEnterpriseEntitlement', () => { describe('legacy defaults', () => { it('keeps the features that were already reachable with billing off', () => { - expect(ENTERPRISE_FEATURE_LEGACY_DEFAULTS.whitelabeling).toBe(true) expect(ENTERPRISE_FEATURE_LEGACY_DEFAULTS.sessionPolicies).toBe(true) expect(ENTERPRISE_FEATURE_LEGACY_DEFAULTS.inbox).toBe(true) }) diff --git a/apps/sim/lib/core/config/enterprise-entitlements.ts b/apps/sim/lib/core/config/enterprise-entitlements.ts index 2080b594ff9..b302737f1db 100644 --- a/apps/sim/lib/core/config/enterprise-entitlements.ts +++ b/apps/sim/lib/core/config/enterprise-entitlements.ts @@ -40,7 +40,6 @@ export type EnterpriseFeature = | 'sessionPolicies' | 'sso' | 'usageMonitoring' - | 'whitelabeling' /** * What each feature resolved to before `ENTERPRISE_ENABLED` existed, for a @@ -89,7 +88,6 @@ export const ENTERPRISE_FEATURE_LEGACY_DEFAULTS: Readonly { AWS_REGION: 'us-east-1', S3_KB_BUCKET_NAME: 'test-kb-bucket', S3_CHAT_BUCKET_NAME: 'test-chat-bucket', - NEXT_PUBLIC_BRAND_LOGO_URL: 'https://brand.example.com/logo.png', - NEXT_PUBLIC_BRAND_FAVICON_URL: 'https://brand.example.com/favicon.ico', - NEXT_PUBLIC_PRIVACY_URL: 'https://legal.example.com/privacy', - NEXT_PUBLIC_TERMS_URL: 'https://legal.example.com/terms', S3_ENDPOINT: 'https://s3.de.io.cloud.ovh.net', S3_FORCE_PATH_STYLE: undefined, }) @@ -59,13 +55,12 @@ describe('getMainCSPPolicy', () => { }) describe('generateRuntimeCSP', () => { - it('adds the runtime app, socket (with WebSocket variant) and brand origins', () => { + it('adds the runtime app and socket (with WebSocket variant) origins', () => { const csp = generateRuntimeCSP() expect(csp).toContain('https://example.com') expect(csp).toContain('https://socket.example.com') expect(csp).toContain('wss://socket.example.com') - expect(csp).toContain('https://brand.example.com') }) it('should allow blob URLs for iframe-based PDF previews', () => { diff --git a/apps/sim/lib/core/security/csp.ts b/apps/sim/lib/core/security/csp.ts index 12a7f840935..1ef0cfb87d9 100644 --- a/apps/sim/lib/core/security/csp.ts +++ b/apps/sim/lib/core/security/csp.ts @@ -40,15 +40,6 @@ function isLocalhostUrl(url: string): boolean { } } -function getHostnameFromUrl(url: string | undefined): string[] { - if (!url) return [] - try { - return [`https://${new URL(url).hostname}`] - } catch { - return [] - } -} - const IPV4_HOSTNAME = /^\d{1,3}(\.\d{1,3}){3}$/ /** @@ -230,9 +221,6 @@ const buildTimeCSPDirectives: CSPDirectives = { : isDev ? [DEFAULT_SOCKET_URL, toWebSocketUrl(DEFAULT_SOCKET_URL)] : []), - ...getHostnameFromUrl(env.NEXT_PUBLIC_BRAND_LOGO_URL), - ...getHostnameFromUrl(env.NEXT_PUBLIC_PRIVACY_URL), - ...getHostnameFromUrl(env.NEXT_PUBLIC_TERMS_URL), ...getS3EndpointSources(env.S3_ENDPOINT, env.S3_FORCE_PATH_STYLE), ], @@ -279,9 +267,6 @@ export function generateRuntimeCSP(frameAncestors?: string[]): string { const socketWsUrl = socketUrl ? toWebSocketUrl(socketUrl) : '' const ollamaUrl = getEnv('OLLAMA_URL') || (isDev ? DEFAULT_OLLAMA_URL : '') - const brandLogoDomains = getHostnameFromUrl(getEnv('NEXT_PUBLIC_BRAND_LOGO_URL')) - const privacyDomains = getHostnameFromUrl(getEnv('NEXT_PUBLIC_PRIVACY_URL')) - const termsDomains = getHostnameFromUrl(getEnv('NEXT_PUBLIC_TERMS_URL')) const s3EndpointSources = getS3EndpointSources( getEnv('S3_ENDPOINT'), getEnv('S3_FORCE_PATH_STYLE') @@ -302,9 +287,6 @@ export function generateRuntimeCSP(frameAncestors?: string[]): string { ollamaUrl, socketUrl, socketWsUrl, - ...brandLogoDomains, - ...privacyDomains, - ...termsDomains, ...s3EndpointSources, ], } diff --git a/apps/sim/lib/invitations/send.ts b/apps/sim/lib/invitations/send.ts index 04e2244934c..14f4468e94c 100644 --- a/apps/sim/lib/invitations/send.ts +++ b/apps/sim/lib/invitations/send.ts @@ -28,7 +28,6 @@ import { acquireInvitationMutationLocks } from '@/lib/invitations/locks' import { lockInvitationResendPolicy } from '@/lib/invitations/resend-policy' import { sendEmail } from '@/lib/messaging/email/mailer' import { getFromEmailAddress } from '@/lib/messaging/email/utils' -import { getBrandConfig } from '@/ee/whitelabeling' interface WorkspaceGrantInput { workspaceId: string @@ -576,12 +575,10 @@ export async function sendInvitationEmail( workspaceNames, inviteUrl ) - - const brandName = getBrandConfig().name const subject = workspaceNames.length === 1 - ? `You've been invited to join "${workspaceNames[0]}" on ${brandName}` - : `You've been invited to join ${workspaceNames.length} workspaces on ${brandName}` + ? `You've been invited to join "${workspaceNames[0]}" on Sim` + : `You've been invited to join ${workspaceNames.length} workspaces on Sim` const result = await sendEmail({ to: input.email, diff --git a/apps/sim/lib/mothership/generated/docs-manifest.ts b/apps/sim/lib/mothership/generated/docs-manifest.ts index 2f5bf5ebde6..3160dc37aec 100644 --- a/apps/sim/lib/mothership/generated/docs-manifest.ts +++ b/apps/sim/lib/mothership/generated/docs-manifest.ts @@ -421,7 +421,6 @@ export const DOCS_MANIFEST: readonly string[] = [ 'platform/enterprise/sso.mdx', 'platform/enterprise/usage-tracking.mdx', 'platform/enterprise/verified-domains.mdx', - 'platform/enterprise/whitelabeling.mdx', 'platform/organization.mdx', 'platform/permissions.mdx', 'platform/self-hosting.mdx', diff --git a/apps/sim/lib/mothership/inbox/response.ts b/apps/sim/lib/mothership/inbox/response.ts index e4c0561c8ea..e2e0e6e5edb 100644 --- a/apps/sim/lib/mothership/inbox/response.ts +++ b/apps/sim/lib/mothership/inbox/response.ts @@ -5,7 +5,6 @@ import { getBaseUrl } from '@/lib/core/utils/urls' import * as agentmail from '@/lib/mothership/inbox/agentmail-client' import { replaceUntilStable } from '@/lib/mothership/inbox/format' import type { InboxTask } from '@/lib/mothership/inbox/types' -import { getBrandConfig } from '@/ee/whitelabeling' const logger = createLogger('InboxResponse') @@ -34,11 +33,9 @@ export async function sendInboxResponse( ? `${getBaseUrl()}/workspace/${ctx.workspaceId}/chat/${inboxTask.chatId}` : `${getBaseUrl()}/workspace/${ctx.workspaceId}/home` - const brandName = getBrandConfig().name - const text = result.success - ? `${result.content}\n\n[View full conversation](${chatUrl})\n\nBest,\n${brandName}` - : `I wasn't able to complete this task.\n\nError: ${result.error || 'Unknown error'}\n\n[View details](${chatUrl})\n\nBest,\n${brandName}` + ? `${result.content}\n\n[View full conversation](${chatUrl})\n\nBest,\nSim` + : `I wasn't able to complete this task.\n\nError: ${result.error || 'Unknown error'}\n\n[View details](${chatUrl})\n\nBest,\nSim` const html = result.success ? await renderInboxResponseEmail({ diff --git a/apps/sim/lib/mothership/tools/server/settings.ts b/apps/sim/lib/mothership/tools/server/settings.ts index e5b4e55c78a..0de93d3f5c4 100644 --- a/apps/sim/lib/mothership/tools/server/settings.ts +++ b/apps/sim/lib/mothership/tools/server/settings.ts @@ -8,7 +8,6 @@ import { import { updateOrganizationDataRetentionBodySchema, updateOrganizationSessionPolicyBodySchema, - updateOrganizationWhitelabelBodySchema, } from '@/lib/api/contracts/organization' import { updateUserProfileBodySchema } from '@/lib/api/contracts/user' import { @@ -52,10 +51,8 @@ import { organizationRoutes } from '@/lib/navigation/paths' import { getOrganizationDataRetention, getOrganizationSessionPolicy, - getOrganizationWhitelabel, updateOrganizationDataRetention, updateOrganizationSessionPolicy, - updateOrganizationWhitelabel, } from '@/lib/organizations/application/configuration' import { organizationSettingsPatchSchema, @@ -261,26 +258,6 @@ const adapters: Record = { available: (context) => isSimLinksEnabled(organizationInput(context).organizationId), get: (context) => readSettingsSimLinks(context), }, - 'organization/whitelabeling': { - schema: updateOrganizationWhitelabelBodySchema.strict(), - get: async (context) => - ( - await getOrganizationWhitelabel.execute({ - principal: context.principal, - input: organizationInput(context), - }) - ).settings, - update: async (context, changes) => - ( - await updateOrganizationWhitelabel.execute({ - principal: context.principal, - input: { - ...organizationInput(context), - settings: updateOrganizationWhitelabelBodySchema.strict().parse(changes), - }, - }) - ).data, - }, 'organization/security': { schema: updateOrganizationSessionPolicyBodySchema.strict(), get: (context) => diff --git a/apps/sim/lib/organizations/application/configuration-operations.ts b/apps/sim/lib/organizations/application/configuration-operations.ts index f3357bfe20b..9d93fdf053a 100644 --- a/apps/sim/lib/organizations/application/configuration-operations.ts +++ b/apps/sim/lib/organizations/application/configuration-operations.ts @@ -7,22 +7,6 @@ const configurationPolicy = { } as const export const organizationConfigurationOperations = { - // permission-group-exempt: organization branding is readable by current organization members. - readWhitelabel: defineOrganizationOperation({ - ...configurationPolicy, - id: 'organizations.whitelabel.read', - contentDelivery: 'none', - minimumRole: 'member', - capability: 'none', - }), - // permission-group-exempt: organization branding uses administrator authority and enterprise entitlement. - updateWhitelabel: defineOrganizationOperation({ - ...configurationPolicy, - id: 'organizations.whitelabel.update', - contentDelivery: 'none', - minimumRole: 'admin', - capability: 'none', - }), // permission-group-exempt: session policy is readable by current organization members. readSessionPolicy: defineOrganizationOperation({ ...configurationPolicy, diff --git a/apps/sim/lib/organizations/application/configuration.test.ts b/apps/sim/lib/organizations/application/configuration.test.ts index 410d6ff6b6a..d9176a4f869 100644 --- a/apps/sim/lib/organizations/application/configuration.test.ts +++ b/apps/sim/lib/organizations/application/configuration.test.ts @@ -45,10 +45,8 @@ vi.mock('@sim/audit', () => auditMock) import { getOrganizationDataRetention, getOrganizationSessionPolicy, - getOrganizationWhitelabel, updateOrganizationDataRetention, updateOrganizationSessionPolicy, - updateOrganizationWhitelabel, } from '@/lib/organizations/application/configuration' import { GET as getRetentionRoute, @@ -117,7 +115,7 @@ describe('organization configuration HTTP adapters', () => { }) describe('organization configuration authorization', () => { - it.each([getOrganizationWhitelabel, getOrganizationSessionPolicy, getOrganizationDataRetention])( + it.each([getOrganizationSessionPolicy, getOrganizationDataRetention])( 'preserves member reads and 403 membership refusal for $operation.id', async (useCase) => { queueTableRows(member, []) @@ -136,7 +134,7 @@ describe('organization configuration authorization', () => { queueTableRows(member, [{ role: 'member' }]) queueTableRows(organization, []) await expect( - getOrganizationWhitelabel.execute({ principal: session, input: { organizationId: 'org' } }) + getOrganizationSessionPolicy.execute({ principal: session, input: { organizationId: 'org' } }) ).rejects.toMatchObject({ code: 'not_found' }) }) @@ -147,7 +145,7 @@ describe('organization configuration authorization', () => { { ...delegated(), expiresAt: new Date(0) }, ])('rejects invalid authority before protected reads', async (principal) => { await expect( - getOrganizationWhitelabel.execute({ principal, input: { organizationId: 'org' } }) + getOrganizationSessionPolicy.execute({ principal, input: { organizationId: 'org' } }) ).rejects.toBeInstanceOf(Error) expect(dbChainMockFns.from).not.toHaveBeenCalled() }) @@ -155,26 +153,29 @@ describe('organization configuration authorization', () => { it('reauthorizes delegated current membership on every call', async () => { const principal = delegated() queueTableRows(member, [{ role: 'member' }]) - queueTableRows(organization, [{ settings: { brandName: 'Acme' } }]) + queueTableRows(organization, [{ sessionPolicySettings: { maxSessionHours: 72 } }]) await expect( - getOrganizationWhitelabel.execute({ principal, input: { organizationId: 'org' } }) - ).resolves.toEqual({ isEnterprise: true, settings: { brandName: 'Acme' } }) + getOrganizationSessionPolicy.execute({ principal, input: { organizationId: 'org' } }) + ).resolves.toEqual({ + isEnterprise: true, + configured: { maxSessionHours: 72, idleTimeoutHours: null }, + }) queueTableRows(member, []) await expect( - getOrganizationWhitelabel.execute({ principal, input: { organizationId: 'org' } }) + getOrganizationSessionPolicy.execute({ principal, input: { organizationId: 'org' } }) ).rejects.toMatchObject({ code: 'forbidden' }) }) it('refuses member writes before entitlement or mutation', async () => { queueTableRows(member, [{ role: 'member' }]) await expect( - updateOrganizationWhitelabel.execute({ + updateOrganizationSessionPolicy.execute({ principal: session, - input: { organizationId: 'org', settings: { brandName: 'New' } }, + input: { organizationId: 'org', settings: { maxSessionHours: 72, idleTimeoutHours: null } }, }) ).rejects.toMatchObject({ code: 'forbidden', - message: 'Forbidden - Only organization owners and admins can update whitelabel settings', + message: 'Forbidden - Only organization owners and admins can update the session policy', }) expect(mocks.entitled).not.toHaveBeenCalled() expect(dbChainMockFns.update).not.toHaveBeenCalled() diff --git a/apps/sim/lib/organizations/application/configuration.ts b/apps/sim/lib/organizations/application/configuration.ts index d0baeed1904..7690f779f1a 100644 --- a/apps/sim/lib/organizations/application/configuration.ts +++ b/apps/sim/lib/organizations/application/configuration.ts @@ -7,12 +7,10 @@ import { } from '@sim/db/schema' import { createLogger } from '@sim/logger' import { eq, sql } from 'drizzle-orm' -import type { z } from 'zod' import type { OrganizationRetentionValues, UpdateOrganizationDataRetentionBody, UpdateOrganizationSessionPolicyBody, - updateOrganizationWhitelabelBodySchema, } from '@/lib/api/contracts/organization' import { invalidateSecurityPolicyVersionCache } from '@/lib/auth/security-policy' import { eagerClampOrgSessions, invalidateSessionPolicyCache } from '@/lib/auth/session-policy' @@ -22,12 +20,7 @@ import { isOrganizationOnEnterprisePlan, } from '@/lib/billing/core/subscription' import { getForeignWorkspaceTargetsReason } from '@/lib/billing/retention' -import type { OrganizationWhitelabelSettings } from '@/lib/branding/types' -import { - isBillingEnabled, - isSessionPoliciesEnabled, - isWhitelabelingEnabled, -} from '@/lib/core/config/env-flags' +import { isBillingEnabled, isSessionPoliciesEnabled } from '@/lib/core/config/env-flags' import { OrchestrationError } from '@/lib/core/orchestration/types' import { coercePiiLanguage } from '@/lib/guardrails/pii-entities' import { defineOrganizationConfigurationUseCase } from '@/lib/organizations/application/authorized-configuration-use-case' @@ -39,9 +32,6 @@ interface OrganizationInput { organizationId: string } -type WhitelabelInput = OrganizationInput & { - settings: z.input -} type SessionPolicyInput = OrganizationInput & { settings: UpdateOrganizationSessionPolicyBody } type DataRetentionInput = OrganizationInput & { settings: UpdateOrganizationDataRetentionBody } @@ -104,69 +94,6 @@ function configuredRetention( } } -export const getOrganizationWhitelabel = defineOrganizationConfigurationUseCase({ - operation: organizationConfigurationOperations.readWhitelabel, - async execute({ input }: { input: OrganizationInput }) { - const [[row], isEnterprise] = await Promise.all([ - db - .select({ settings: organization.whitelabelSettings }) - .from(organization) - .where(eq(organization.id, input.organizationId)) - .limit(1), - isOrganizationFeatureEntitled(input.organizationId, isWhitelabelingEnabled), - ]) - return { isEnterprise, settings: requireOrganization(row).settings ?? {} } - }, -}) - -export const updateOrganizationWhitelabel = defineOrganizationConfigurationUseCase({ - operation: organizationConfigurationOperations.updateWhitelabel, - administratorError: - 'Forbidden - Only organization owners and admins can update whitelabel settings', - async execute({ input }: { input: WhitelabelInput }) { - if (!(await isOrganizationFeatureEntitled(input.organizationId, isWhitelabelingEnabled))) { - throw new OrchestrationError( - 'forbidden', - isBillingEnabled - ? 'Whitelabeling is available on Enterprise plans only' - : 'Whitelabeling is disabled. Set ENTERPRISE_ENABLED or WHITELABELING_ENABLED to enable it.' - ) - } - const [row] = await db - .select({ name: organization.name, settings: organization.whitelabelSettings }) - .from(organization) - .where(eq(organization.id, input.organizationId)) - .limit(1) - const current = requireOrganization(row) - const merged: OrganizationWhitelabelSettings = { ...current.settings } - for (const key of Object.keys(input.settings) as Array) { - if (key === 'hidePoweredBySim') { - if (input.settings.hidePoweredBySim !== undefined) { - merged.hidePoweredBySim = input.settings.hidePoweredBySim - } - continue - } - const value = input.settings[key] - if (value === null) delete merged[key] - else if (value !== undefined) merged[key] = value - } - const [updated] = await db - .update(organization) - .set({ whitelabelSettings: merged, updatedAt: new Date() }) - .where(eq(organization.id, input.organizationId)) - .returning({ settings: organization.whitelabelSettings }) - return { data: requireOrganization(updated).settings ?? {}, organizationName: current.name } - }, - projectAudit: ({ input, result }) => ({ - action: AuditAction.ORGANIZATION_UPDATED, - resourceType: AuditResourceType.ORGANIZATION, - resourceId: input.organizationId, - resourceName: result.organizationName, - description: 'Updated organization whitelabel settings', - metadata: { changes: Object.keys(input.settings) }, - }), -}) - export const getOrganizationSessionPolicy = defineOrganizationConfigurationUseCase({ operation: organizationConfigurationOperations.readSessionPolicy, async execute({ input }: { input: OrganizationInput }) { diff --git a/apps/sim/lib/organizations/instance-org.ts b/apps/sim/lib/organizations/instance-org.ts index 92099f42745..e7ae6b0db84 100644 --- a/apps/sim/lib/organizations/instance-org.ts +++ b/apps/sim/lib/organizations/instance-org.ts @@ -2,8 +2,8 @@ * Instance-tier organization: one organization that every user on a deployment * belongs to. * - * Org-scoped enterprise features — whitelabeling, PII redaction, permission - * groups, data drains, audit scoping — resolve their settings from a + * Org-scoped enterprise features — PII redaction, permission groups, data + * drains, audit scoping — resolve their settings from a * workspace's `organizationId`. A deployment where everyone works in personal * workspaces has no organization for those features to read, so enabling them * appears to do nothing. Setting `INSTANCE_ORG_NAME` turns on this mode: the diff --git a/apps/sim/lib/settings/application/workspace-section-access.test.ts b/apps/sim/lib/settings/application/workspace-section-access.test.ts index e5936719ea7..3c2db06fcb9 100644 --- a/apps/sim/lib/settings/application/workspace-section-access.test.ts +++ b/apps/sim/lib/settings/application/workspace-section-access.test.ts @@ -90,7 +90,7 @@ const mocks = { deploymentShape: createMockDeploymentShape({ hosted: true, billingEnabled: true, - features: { inbox: false, sessionPolicies: false, whitelabeling: false }, + features: { inbox: false, sessionPolicies: false }, }), checkWorkspaceAccess: permissionsMockFns.mockCheckWorkspaceAccess, isOrganizationOnEnterprisePlan: billingSubscriptionMockFns.mockIsOrganizationOnEnterprisePlan, diff --git a/apps/sim/lib/settings/sections.ts b/apps/sim/lib/settings/sections.ts index f287e6c199c..b9fcd0e73ce 100644 --- a/apps/sim/lib/settings/sections.ts +++ b/apps/sim/lib/settings/sections.ts @@ -45,7 +45,6 @@ export const settingsSections: Record @@ -155,25 +155,18 @@ const URL_ROW_PAGES: readonly UrlRowPage[] = [ .select({ id: organization.id, logo: organization.logo, - whitelabel: organization.whitelabelSettings, metadata: organization.metadata, }) .from(organization) .where( and( - or( - mentions(organization.logo), - mentions(organization.whitelabelSettings), - mentions(organization.metadata) - ), + or(mentions(organization.logo), mentions(organization.metadata)), gt(organization.id, afterId) ) ) .orderBy(organization.id) .limit(URL_ROW_PAGE_SIZE) - .then((rows) => - rows.map((row) => ({ id: row.id, values: [row.logo, row.whitelabel, row.metadata] })) - ), + .then((rows) => rows.map((row) => ({ id: row.id, values: [row.logo, row.metadata] }))), ] /** diff --git a/apps/sim/lib/users/storage-sweep.test.ts b/apps/sim/lib/users/storage-sweep.test.ts index b8bca298f88..186b8b61f7e 100644 --- a/apps/sim/lib/users/storage-sweep.test.ts +++ b/apps/sim/lib/users/storage-sweep.test.ts @@ -228,13 +228,10 @@ describe('deleted workspace storage sweep', () => { it.each([ { - name: 'an organization whitelabel logo serve URL', + name: 'an organization logo serve URL', table: 'organization', row: { - logo: null, - whitelabel: { - logoUrl: 'https://sim.test/api/files/serve/s3/workspace-logos%2Fwsdoomed1%2Flogo.png', - }, + logo: 'https://sim.test/api/files/serve/s3/workspace-logos%2Fwsdoomed1%2Flogo.png', metadata: null, }, }, diff --git a/apps/sim/lib/users/storage-sweep.ts b/apps/sim/lib/users/storage-sweep.ts index 650a4bbc52a..97b44b228f6 100644 --- a/apps/sim/lib/users/storage-sweep.ts +++ b/apps/sim/lib/users/storage-sweep.ts @@ -89,8 +89,8 @@ const OBJECT_CONTEXTS: ReadonlySet = new Set([ /** * Keys no row collected here may name: Project prefix cleanup, the Assistant upload-session * sweep, organization logos, and profile pictures — which account deletion takes only from the - * account's own `user.image` (see {@link extractProfilePictureKey}), because whitelabel logos were - * once uploaded as `profile-pictures` rows under an admin's account. + * account's own `user.image` (see {@link extractProfilePictureKey}), because organization branding + * logos were once uploaded as `profile-pictures` rows under an admin's account. */ const FOREIGN_LIFECYCLE_ROOTS = [ 'project/', diff --git a/apps/sim/lib/workspaces/admin-move-source-impact.test.ts b/apps/sim/lib/workspaces/admin-move-source-impact.test.ts index 1b6e98f5518..84168295bce 100644 --- a/apps/sim/lib/workspaces/admin-move-source-impact.test.ts +++ b/apps/sim/lib/workspaces/admin-move-source-impact.test.ts @@ -79,7 +79,6 @@ describe('resolveMoveEntitlements', () => { 'organization usage monitoring', 'audit logs', 'data drains', - 'whitelabel branding', 'workspace forking', 'custom blocks', ]) diff --git a/apps/sim/lib/workspaces/admin-move-source-impact.ts b/apps/sim/lib/workspaces/admin-move-source-impact.ts index 6b71eb2ab86..97e6a9ae15a 100644 --- a/apps/sim/lib/workspaces/admin-move-source-impact.ts +++ b/apps/sim/lib/workspaces/admin-move-source-impact.ts @@ -74,7 +74,6 @@ const ENTERPRISE_GATED_SECTION_LABELS: Record row.permissionGroupId) } } - -/** True when the two organizations present different whitelabel branding. */ -export async function willBrandingChange( - sourceOrganizationId: string, - destinationOrganizationId: string, - executor: DbOrTx = db -): Promise { - const rows = await executor - .select({ id: organization.id, whitelabelSettings: organization.whitelabelSettings }) - .from(organization) - .where(inArray(organization.id, [sourceOrganizationId, destinationOrganizationId])) - - /** An absent settings object and an empty one both mean default branding. */ - const normalize = (settings: unknown): string => { - if (!settings || typeof settings !== 'object') return '' - const entries = Object.entries(settings as Record) - .filter(([, value]) => value !== null && value !== undefined && value !== '') - .sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)) - return entries.length === 0 ? '' : JSON.stringify(entries) - } - const source = rows.find((row) => row.id === sourceOrganizationId)?.whitelabelSettings - const destination = rows.find((row) => row.id === destinationOrganizationId)?.whitelabelSettings - return normalize(source) !== normalize(destination) -} diff --git a/apps/sim/lib/workspaces/admin-move.test.ts b/apps/sim/lib/workspaces/admin-move.test.ts index 315d11e7287..2303e79592c 100644 --- a/apps/sim/lib/workspaces/admin-move.test.ts +++ b/apps/sim/lib/workspaces/admin-move.test.ts @@ -143,7 +143,6 @@ vi.mock('@/lib/workspaces/admin-move-source-impact', () => ({ findSourceOrgCustomBlocksForWorkspace, getSourceOrganization, resolveMoveEntitlements, - willBrandingChange: vi.fn(() => Promise.resolve(false)), })) const movedWorkspace = { diff --git a/apps/sim/lib/workspaces/admin-move.ts b/apps/sim/lib/workspaces/admin-move.ts index 97d4f0a6847..29d603f9770 100644 --- a/apps/sim/lib/workspaces/admin-move.ts +++ b/apps/sim/lib/workspaces/admin-move.ts @@ -60,7 +60,6 @@ import { getSourceOrganization, type InboundSourceOrgCustomBlock, resolveMoveEntitlements, - willBrandingChange, } from '@/lib/workspaces/admin-move-source-impact' import { mergeInvitationMembershipIntent, @@ -196,8 +195,6 @@ export interface WorkspaceMoveSourceImpact { email: string sourceOrgLimitDollars: number | null }> - /** The workspace visibly re-skins when the two orgs' whitelabel settings differ. */ - brandingChanges: boolean /** Rows omitted to stay inside the contract's array bounds, or `null`. */ truncated: { customBlocks: number @@ -509,7 +506,6 @@ function buildAppliedSourceImpact(params: { blockingForkEdges: [], strippedRetentionRules: { piiRedactionRules: 0, retentionOverrides: 0 }, retainedCollaboratorCaps: [], - brandingChanges: false, truncated: Object.values(truncated).some((dropped) => dropped > 0) ? truncated : null, } } @@ -719,7 +715,7 @@ export async function getWorkspaceMovePreflight( resolveMoveEntitlements(sourceOrganizationId, destinationOrganizationId), collectWorkspaceCredentialSummary(workspaceId, sourceOrganizationId), findCrossOrgForkEdges(workspaceId, destinationOrganizationId), - collectSourceOrganizationImpact(workspaceId, sourceOrganizationId, destinationOrganizationId), + collectSourceOrganizationImpact(workspaceId, sourceOrganizationId), ]) const boundedForkEdges = boundList(forkEdges, PREFLIGHT_LIST_LIMITS.forkEdges) @@ -879,11 +875,6 @@ function buildMoveNotices(params: { `${cappedCollaborators} retained collaborator${cappedCollaborators === 1 ? '' : 's'} had a per-member usage cap in ${params.sourceOrganization.name} that will no longer apply. Re-apply it in ${params.destinationOrganization.name} if it should continue.` ) } - if (params.sourceImpact.brandingChanges) { - notices.push( - `The workspace will re-skin to ${params.destinationOrganization.name}'s branding immediately.` - ) - } return notices } @@ -922,8 +913,7 @@ function formatList(items: string[]): string { */ async function collectSourceOrganizationImpact( workspaceId: string, - sourceOrganizationId: string | null, - destinationOrganizationId: string + sourceOrganizationId: string | null ): Promise> { if (!sourceOrganizationId) { return { @@ -932,30 +922,22 @@ async function collectSourceOrganizationImpact( detachedPermissionGroups: [], strippedRetentionRules: { piiRedactionRules: 0, retentionOverrides: 0 }, retainedCollaboratorCaps: [], - brandingChanges: false, truncated: null, } } - const [ - customBlocks, - inboundCustomBlocks, - permissionGroups, - retentionSettings, - collaboratorCaps, - brandingChanges, - ] = await Promise.all([ - findUnpublishableCustomBlocks(workspaceId, sourceOrganizationId), - findInboundSourceOrgCustomBlockUsage(workspaceId, sourceOrganizationId), - findAttachedPermissionGroups(workspaceId), - db - .select({ dataRetentionSettings: organization.dataRetentionSettings }) - .from(organization) - .where(eq(organization.id, sourceOrganizationId)) - .limit(1), - findRetainedCollaboratorCaps(workspaceId, sourceOrganizationId), - willBrandingChange(sourceOrganizationId, destinationOrganizationId), - ]) + const [customBlocks, inboundCustomBlocks, permissionGroups, retentionSettings, collaboratorCaps] = + await Promise.all([ + findUnpublishableCustomBlocks(workspaceId, sourceOrganizationId), + findInboundSourceOrgCustomBlockUsage(workspaceId, sourceOrganizationId), + findAttachedPermissionGroups(workspaceId), + db + .select({ dataRetentionSettings: organization.dataRetentionSettings }) + .from(organization) + .where(eq(organization.id, sourceOrganizationId)) + .limit(1), + findRetainedCollaboratorCaps(workspaceId, sourceOrganizationId), + ]) const boundedBlocks = boundList(customBlocks.items, PREFLIGHT_LIST_LIMITS.customBlocks) /** Enrichment already capped the slice, so the gap comes from the true total. */ @@ -973,7 +955,6 @@ async function collectSourceOrganizationImpact( workspaceId ), retainedCollaboratorCaps: boundedCaps.items, - brandingChanges, truncated: droppedBlocks + boundedInbound.dropped + boundedGroups.dropped + boundedCaps.dropped > 0 ? { diff --git a/apps/sim/next.config.ts b/apps/sim/next.config.ts index f3a331098ad..310096ac276 100644 --- a/apps/sim/next.config.ts +++ b/apps/sim/next.config.ts @@ -69,36 +69,6 @@ const nextConfig: NextConfig = { protocol: 'https', hostname: 'lh3.googleusercontent.com', }, - // Brand logo domain if configured - ...(process.env.NEXT_PUBLIC_BRAND_LOGO_URL - ? (() => { - try { - return [ - { - protocol: 'https' as const, - hostname: new URL(process.env.NEXT_PUBLIC_BRAND_LOGO_URL!).hostname, - }, - ] - } catch { - return [] - } - })() - : []), - // Brand favicon domain if configured - ...(process.env.NEXT_PUBLIC_BRAND_FAVICON_URL - ? (() => { - try { - return [ - { - protocol: 'https' as const, - hostname: new URL(process.env.NEXT_PUBLIC_BRAND_FAVICON_URL!).hostname, - }, - ] - } catch { - return [] - } - })() - : []), ], }, typescript: { diff --git a/apps/sim/proxy.ts b/apps/sim/proxy.ts index 685fc0d22c5..6381e13aaf8 100644 --- a/apps/sim/proxy.ts +++ b/apps/sim/proxy.ts @@ -491,8 +491,6 @@ function applyIndexingPolicy(request: NextRequest, response: NextResponse): Next export const config = { matcher: [ '/', // Root path for self-hosted redirect logic - '/terms', // Whitelabel terms redirect - '/privacy', // Whitelabel privacy redirect '/w', // Legacy /w redirect '/w/:path*', // Legacy /w/* redirects '/workspace/:path*', // New workspace routes diff --git a/apps/sim/scripts/consolidate-users-into-organization.ts b/apps/sim/scripts/consolidate-users-into-organization.ts index f9cb4474547..62ef5ea2b08 100644 --- a/apps/sim/scripts/consolidate-users-into-organization.ts +++ b/apps/sim/scripts/consolidate-users-into-organization.ts @@ -5,9 +5,9 @@ * org-scoped enterprise features apply deployment-wide. * * Membership alone is not enough. Session policies and SSO provisioning resolve - * the governing org from the user's `member` row, but whitelabeling, PII - * redaction, permission groups, data drains, and audit scoping all resolve it - * from `workspace.organization_id`. This script therefore does both: it adds + * the governing org from the user's `member` row, but PII redaction, permission + * groups, data drains, and audit scoping all resolve it from + * `workspace.organization_id`. This script therefore does both: it adds * every user to the target org AND attaches their personal/grandfathered * workspaces to it. * diff --git a/helm/sim/.claude/skills/sim-helm/references/install-paths.md b/helm/sim/.claude/skills/sim-helm/references/install-paths.md index 0fe51bf4a20..82f678061bc 100644 --- a/helm/sim/.claude/skills/sim-helm/references/install-paths.md +++ b/helm/sim/.claude/skills/sim-helm/references/install-paths.md @@ -162,7 +162,7 @@ BETTER_AUTH_SECRET: ## Cross-cutting: things that are NOT secrets -Operational tunables (rate limits, timeouts, IVM pool size, branding) live in `app.envDefaults` and `realtime.envDefaults`. They're rendered as **inline `env:`** on the Deployment, not written to the Secret. See `values-model.md` for the full mental model. +Operational tunables (rate limits, timeouts, IVM pool size) live in `app.envDefaults` and `realtime.envDefaults`. They're rendered as **inline `env:`** on the Deployment, not written to the Secret. See `values-model.md` for the full mental model. Don't try to push these into ESO — they're not sensitive, they'd just bloat the secret store. diff --git a/helm/sim/.claude/skills/sim-helm/references/values-model.md b/helm/sim/.claude/skills/sim-helm/references/values-model.md index 1dcf2984c79..5304fcd7aef 100644 --- a/helm/sim/.claude/skills/sim-helm/references/values-model.md +++ b/helm/sim/.claude/skills/sim-helm/references/values-model.md @@ -20,7 +20,7 @@ The Sim chart splits configuration across **four** layers. Understanding which l │ → Rendered as inline env: on the Deployment │ │ → SKIPPED for any key already set in app.env (or realtime.env) │ │ → Use for: operational tunables and safe fallback defaults │ -│ → Examples: NODE_ENV=production, RATE_LIMIT_*, IVM_*, brand defaults │ +│ → Examples: NODE_ENV=production, RATE_LIMIT_*, IVM_* │ └───────────────────────────────────────────────────────────────────────────┘ │ │ chart-computed values are always inline @@ -58,8 +58,7 @@ The exhaustive list of keys per layer lives in `helm/sim/values.yaml`. Read the | Provider API keys | 1 (app.env) | `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GOOGLE_CLIENT_SECRET`, etc. | | Per-environment URLs | 1 (app.env) | `NEXT_PUBLIC_APP_URL`, `BETTER_AUTH_URL`, `NEXT_PUBLIC_SOCKET_URL` | | Feature flags | 1 (app.env) | `ACCESS_CONTROL_ENABLED`, `ORGANIZATIONS_ENABLED`, `SSO_ENABLED`, all `NEXT_PUBLIC_*_ENABLED` | -| Brand / whitelabel | 1 (app.env) | `NEXT_PUBLIC_BRAND_NAME`, `NEXT_PUBLIC_BRAND_LOGO_URL`, etc. | -| Operational defaults | 2 (envDefaults) | `NODE_ENV=production`, `EMAIL_VERIFICATION_ENABLED=false`, `VERTEX_LOCATION=us-central1`, `NEXT_PUBLIC_SUPPORT_EMAIL=help@sim.ai` | +| Operational defaults | 2 (envDefaults) | `NODE_ENV=production`, `EMAIL_VERIFICATION_ENABLED=false`, `VERTEX_LOCATION=us-central1` | | Rate limits | 2 (envDefaults) | `RATE_LIMIT_WINDOW_MS`, `RATE_LIMIT_FREE_SYNC`, etc. | | Execution timeouts | 2 (envDefaults) | `EXECUTION_TIMEOUT_FREE`, `EXECUTION_TIMEOUT_PRO`, etc. | | IVM pool / quotas | 2 (envDefaults) | `IVM_POOL_SIZE`, `IVM_MAX_CONCURRENT`, `IVM_MAX_PER_WORKER`, etc. | @@ -113,7 +112,7 @@ app: FREE_TABLES_LIMIT: null ``` -**Do not use `""` — it is a silent no-op — and do not add a chart-level "unset list" to work around that.** Every key under `app.env` in `values.yaml` ships as a `""` placeholder, so the templates must read `""` as "not specified"; ten of those collide with a real `envDefaults` value (`NEXT_PUBLIC_APP_URL`, `BETTER_AUTH_URL`, `NEXT_PUBLIC_BRAND_NAME`, `VERTEX_LOCATION`, `EMAIL_VERIFICATION_ENABLED`, …) and would blank themselves out on every default install if `""` meant "delete". A list-shaped unset key is also the wrong interface — Helm merges dicts but not lists, so it cannot be modified or unset downstream. +**Do not use `""` — it is a silent no-op — and do not add a chart-level "unset list" to work around that.** Every key under `app.env` in `values.yaml` ships as a `""` placeholder, so the templates must read `""` as "not specified"; eight of those collide with a real `envDefaults` value (`NEXT_PUBLIC_APP_URL`, `BETTER_AUTH_URL`, `ORGANIZATIONS_ENABLED`, `VERTEX_LOCATION`, `EMAIL_VERIFICATION_ENABLED`, …) and would blank themselves out on every default install if `""` meant "delete". A list-shaped unset key is also the wrong interface — Helm merges dicts but not lists, so it cannot be modified or unset downstream. The `(ne (toString $value) "")` guards throughout the templates are what make `null` deletion work — preserve them in any new render path. Regression net: `tests/env-null-deletion_test.yaml`. diff --git a/helm/sim/Chart.yaml b/helm/sim/Chart.yaml index ceb7d114988..68c47a6aecc 100644 --- a/helm/sim/Chart.yaml +++ b/helm/sim/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: sim description: A Helm chart for Sim - the open-source AI workspace where teams build, deploy, and manage AI agents type: application -version: 1.11.22 +version: 1.12.0 appVersion: "v0.8.26" kubeVersion: ">=1.25.0-0" home: https://sim.ai diff --git a/helm/sim/README.md b/helm/sim/README.md index 6e958725cb0..cf263134c45 100644 --- a/helm/sim/README.md +++ b/helm/sim/README.md @@ -268,7 +268,6 @@ Pre-built values files for common scenarios live in [`helm/sim/examples/`](https | `values-external-secrets.yaml` | Sync secrets from Vault / AWS SM / Azure KV / GCP SM via External Secrets Operator. | | `values-existing-secret.yaml` | GitOps / Sealed Secrets / SOPS — reference pre-created Kubernetes Secrets. | | `values-copilot.yaml` | Enables the Copilot service + its Postgres StatefulSet. | -| `values-whitelabeled.yaml` | Custom branding (logo, name, support links). | Use one with: @@ -464,7 +463,7 @@ User-supplied `securityContext` values are merged with the defaults — your val Other security features: * `automountServiceAccountToken: false` on the ServiceAccount **and** every pod. -* Every value in `app.env` and `realtime.env` is written to a chart-managed Secret and mounted via `envFrom: secretRef` — no values are inlined on the container spec. This eliminates a sensitivity classifier (no static list of "secret" keys to maintain) and ensures new provider keys can never accidentally leak into pod manifests. Two categories are inlined on the container instead: chart-computed values (`DATABASE_URL`, `SOCKET_SERVER_URL`, `OLLAMA_URL`, `PII_URL`) and operational defaults under `app.envDefaults` / `realtime.envDefaults` (rate limits, timeouts, IVM tunables, feature-flag defaults, branding defaults, `http://localhost:3000` URL fallbacks). Operational defaults are non-sensitive by design — moving them out of `app.env` keeps the Secret small and means External Secrets Operator users only have to map the keys they actually set, not every chart default. A **non-empty** value placed in `app.env` wins over the same key in `app.envDefaults` (the template skips the inline default when an override exists). An **empty** value does not — to remove a key rather than change it, see [Removing an inherited env key](#removing-an-inherited-env-key). +* Every value in `app.env` and `realtime.env` is written to a chart-managed Secret and mounted via `envFrom: secretRef` — no values are inlined on the container spec. This eliminates a sensitivity classifier (no static list of "secret" keys to maintain) and ensures new provider keys can never accidentally leak into pod manifests. Two categories are inlined on the container instead: chart-computed values (`DATABASE_URL`, `SOCKET_SERVER_URL`, `OLLAMA_URL`, `PII_URL`) and operational defaults under `app.envDefaults` / `realtime.envDefaults` (rate limits, timeouts, IVM tunables, feature-flag defaults, `http://localhost:3000` URL fallbacks). Operational defaults are non-sensitive by design — moving them out of `app.env` keeps the Secret small and means External Secrets Operator users only have to map the keys they actually set, not every chart default. A **non-empty** value placed in `app.env` wins over the same key in `app.envDefaults` (the template skips the inline default when an override exists). An **empty** value does not — to remove a key rather than change it, see [Removing an inherited env key](#removing-an-inherited-env-key). * Optional `networkPolicy.enabled=true` enforces east-west isolation and blocks cloud metadata endpoints in egress. --- @@ -484,7 +483,7 @@ Or on the CLI: `--set app.envDefaults.FREE_TABLES_LIMIT=null`. **Null the key in every layer that sets it.** `null` deletes the key from the map you null, not from the pod — so if a key is set in both `app.env` and `app.envDefaults`, nulling only the `app.env` entry makes the inline `envDefaults` value apply again and the variable stays on the pod. The same holds for `realtime.env` / `realtime.envDefaults`. Under ESO there is a third source: a key mapped in `externalSecrets.remoteRefs.app` keeps being synced into the Secret regardless of `app.env`, so remove that mapping too. Rendering the manifest (below) is the reliable way to confirm the key is actually gone. -**Setting the key to `""` instead does not remove it.** Every key under `app.env` in `values.yaml` ships as a `""` placeholder, so the templates have to treat an empty string as "the operator said nothing" — if they did not, the ten placeholders that collide with a real `app.envDefaults` value (`NEXT_PUBLIC_APP_URL`, `BETTER_AUTH_URL`, `NEXT_PUBLIC_BRAND_NAME`, `VERTEX_LOCATION`, `EMAIL_VERIFICATION_ENABLED`, …) would blank themselves out on every default install. An empty entry is a silent no-op; `null` is the deletion. +**Setting the key to `""` instead does not remove it.** Every key under `app.env` in `values.yaml` ships as a `""` placeholder, so the templates have to treat an empty string as "the operator said nothing" — if they did not, the eight placeholders that collide with a real `app.envDefaults` value (`NEXT_PUBLIC_APP_URL`, `BETTER_AUTH_URL`, `ORGANIZATIONS_ENABLED`, `VERTEX_LOCATION`, `EMAIL_VERIFICATION_ENABLED`, …) would blank themselves out on every default install. An empty entry is a silent no-op; `null` is the deletion. With the chart-managed Secret (the default), nulling a key the application cannot start without (`BETTER_AUTH_SECRET`, `ENCRYPTION_KEY`, `INTERNAL_API_SECRET`, or `CRON_SECRET` with `cronjobs.enabled=true`) fails at template time with the existing required-secret error rather than at runtime. In `existingSecret` mode the chart skips that validation entirely — those values come from your pre-created Secret, which the chart cannot read — so a null there renders successfully and the key is simply absent from `app.env`. Under ESO the key must still be mapped in `externalSecrets.remoteRefs.app`, which is validated at template time. diff --git a/helm/sim/examples/values-whitelabeled.yaml b/helm/sim/examples/values-whitelabeled.yaml deleted file mode 100644 index e39abc960fc..00000000000 --- a/helm/sim/examples/values-whitelabeled.yaml +++ /dev/null @@ -1,110 +0,0 @@ -# values-whitelabeled.yaml -# -# When to use: whitelabeled / branded deployment. Replaces the default Sim -# branding (logo, product name, support URLs) with your own. The example -# below uses "Acme Corp" placeholders — replace with your brand. -# -# Prerequisites: a hosted logo URL and brand assets. -# -# Install: -# helm install acme ./helm/sim \ -# --namespace acme --create-namespace \ -# --values ./helm/sim/examples/values-whitelabeled.yaml \ -# --set app.env.BETTER_AUTH_SECRET="$BETTER_AUTH_SECRET" \ -# --set app.env.ENCRYPTION_KEY="$ENCRYPTION_KEY" \ -# --set app.env.INTERNAL_API_SECRET="$INTERNAL_API_SECRET" \ -# --set app.env.CRON_SECRET="$CRON_SECRET" \ -# --set postgresql.auth.password="$POSTGRES_PASSWORD" - -# Global configuration -global: - imageRegistry: "ghcr.io" - storageClass: "" # your cluster's StorageClass (empty = cluster default) - -# Main application with custom branding -app: - enabled: true - replicaCount: 1 - - # Custom branding configuration - env: - # Application URLs (update with your domain) - NEXT_PUBLIC_APP_URL: "https://sim.acme.ai" - BETTER_AUTH_URL: "https://sim.acme.ai" - NEXT_PUBLIC_SOCKET_URL: "https://sim-ws.acme.ai" - - # Security settings (REQUIRED - pass with --set or an external secret manager; - # the install fails while any is empty). Generate using: openssl rand -hex 32 - BETTER_AUTH_SECRET: "" - ENCRYPTION_KEY: "" - INTERNAL_API_SECRET: "" - CRON_SECRET: "" - - # Optional: API Key Encryption (RECOMMENDED for production) - # Generate 64-character hex string using: openssl rand -hex 32 - API_ENCRYPTION_KEY: "" # Optional but recommended - - # UI Branding & Whitelabeling Configuration - NEXT_PUBLIC_BRAND_NAME: "Acme AI Studio" - NEXT_PUBLIC_BRAND_LOGO_URL: "https://acme.com/assets/logo.png" - NEXT_PUBLIC_BRAND_FAVICON_URL: "https://acme.com/assets/favicon.ico" - NEXT_PUBLIC_CUSTOM_CSS_URL: "https://acme.com/assets/theme.css" - NEXT_PUBLIC_SUPPORT_EMAIL: "ai-support@acme.com" - NEXT_PUBLIC_DOCUMENTATION_URL: "https://docs.acme.com/ai-studio" - NEXT_PUBLIC_TERMS_URL: "https://acme.com/terms" - NEXT_PUBLIC_PRIVACY_URL: "https://acme.com/privacy" - -# Realtime service -realtime: - enabled: true - replicaCount: 1 - env: - NEXT_PUBLIC_APP_URL: "https://sim.acme.ai" - BETTER_AUTH_URL: "https://sim.acme.ai" - BETTER_AUTH_SECRET: "" # Inherits app.env.BETTER_AUTH_SECRET when empty - ALLOWED_ORIGINS: "https://sim.acme.ai" - -# PostgreSQL database -postgresql: - enabled: true - auth: - password: "" # Set via --set flag or external secret manager - persistence: - enabled: true - size: 20Gi - -# Ingress configuration -ingress: - enabled: true - className: "nginx" - annotations: - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - cert-manager.io/cluster-issuer: "letsencrypt-prod" - - app: - host: "sim.acme.ai" - paths: - - path: / - pathType: Prefix - - realtime: - host: "sim-ws.acme.ai" - paths: - - path: / - pathType: Prefix - - tls: - enabled: true - secretName: "sim-acme-tls" - -# Auto-scaling -autoscaling: - enabled: true - # Realtime scales with the app because Redis is available by default. Set this - # to false only if you run without Redis (redis.enabled=false and no - # app.env.REDIS_URL) — multi-replica realtime would drop cross-pod events. - realtime: - enabled: false - minReplicas: 2 - maxReplicas: 10 - targetCPUUtilizationPercentage: 70 diff --git a/helm/sim/templates/configmap-branding.yaml b/helm/sim/templates/configmap-branding.yaml deleted file mode 100644 index ae05c4dd822..00000000000 --- a/helm/sim/templates/configmap-branding.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if and .Values.branding.enabled (or .Values.branding.files .Values.branding.binaryFiles) }} ---- -# Branding ConfigMap -# Mounts custom branding assets (logos, CSS, etc.) into the application -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "sim.fullname" . }}-branding - namespace: {{ .Release.Namespace }} - labels: - {{- include "sim.labels" . | nindent 4 }} - app.kubernetes.io/component: branding -{{- if .Values.branding.files }} -data: - {{- range $key, $value := .Values.branding.files }} - {{ $key }}: {{ $value | quote }} - {{- end }} -{{- end }} -{{- if .Values.branding.binaryFiles }} -binaryData: - {{- range $key, $value := .Values.branding.binaryFiles }} - {{ $key }}: {{ $value }} - {{- end }} -{{- end }} -{{- end }} diff --git a/helm/sim/templates/deployment-app.yaml b/helm/sim/templates/deployment-app.yaml index a6437716b0e..3fa619b517f 100644 --- a/helm/sim/templates/deployment-app.yaml +++ b/helm/sim/templates/deployment-app.yaml @@ -23,9 +23,6 @@ spec: Rotated values inside the external store still can't be detected at render time — ESO's own reconciliation handles those. */}} checksum/secret: {{ printf "%s%s" (include (print $.Template.BasePath "/secrets-app.yaml") .) (include (print $.Template.BasePath "/external-secret-app.yaml") .) | sha256sum }} - {{- if .Values.branding.enabled }} - checksum/config: {{ include (print $.Template.BasePath "/configmap-branding.yaml") . | sha256sum }} - {{- end }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} @@ -163,14 +160,8 @@ spec: {{- end }} {{- include "sim.resources" .Values.app | nindent 10 }} {{- include "sim.containerSecurityContext" .Values.app | nindent 10 }} - {{- $hasBranding := and .Values.branding.enabled (or .Values.branding.files .Values.branding.binaryFiles) }} - {{- if or $hasBranding .Values.extraVolumeMounts .Values.app.extraVolumeMounts }} + {{- if or .Values.extraVolumeMounts .Values.app.extraVolumeMounts }} volumeMounts: - {{- if $hasBranding }} - - name: branding - mountPath: {{ .Values.branding.mountPath | default "/app/public/branding" }} - readOnly: true - {{- end }} {{- with .Values.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -178,14 +169,8 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- end }} - {{- $hasBranding := and .Values.branding.enabled (or .Values.branding.files .Values.branding.binaryFiles) }} - {{- if or $hasBranding .Values.extraVolumes .Values.app.extraVolumes }} + {{- if or .Values.extraVolumes .Values.app.extraVolumes }} volumes: - {{- if $hasBranding }} - - name: branding - configMap: - name: {{ include "sim.fullname" . }}-branding - {{- end }} {{- with .Values.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/helm/sim/values.schema.json b/helm/sim/values.schema.json index 7bd6c496512..3ca3c103166 100644 --- a/helm/sim/values.schema.json +++ b/helm/sim/values.schema.json @@ -384,39 +384,6 @@ "type": "string", "description": "Manual execution bypass value" }, - "NEXT_PUBLIC_BRAND_NAME": { - "type": "string", - "description": "Custom brand name" - }, - "NEXT_PUBLIC_BRAND_LOGO_URL": { - "type": "string", - "description": "Custom logo URL (leave empty for default)" - }, - "NEXT_PUBLIC_BRAND_FAVICON_URL": { - "type": "string", - "description": "Custom favicon URL (leave empty for default)" - }, - "NEXT_PUBLIC_CUSTOM_CSS_URL": { - "type": "string", - "description": "Custom stylesheet URL (leave empty for none)" - }, - "NEXT_PUBLIC_SUPPORT_EMAIL": { - "type": "string", - "anyOf": [{ "format": "email" }, { "const": "" }], - "description": "Support email address (default help@sim.ai via envDefaults; set explicitly here to override in Secret)" - }, - "NEXT_PUBLIC_DOCUMENTATION_URL": { - "type": "string", - "description": "Documentation URL" - }, - "NEXT_PUBLIC_TERMS_URL": { - "type": "string", - "description": "Terms of service URL" - }, - "NEXT_PUBLIC_PRIVACY_URL": { - "type": "string", - "description": "Privacy policy URL" - }, "ALLOWED_LOGIN_EMAILS": { "type": "string", "description": "Comma-separated list of allowed email addresses for login" @@ -1263,7 +1230,7 @@ }, "branding": { "type": "object", - "description": "Whitelabel branding configuration (logos, names, colors)" + "description": "Removed in chart 1.12.0 and ignored; still accepted so values files copied from older charts keep validating" }, "certManager": { "type": "object", diff --git a/helm/sim/values.yaml b/helm/sim/values.yaml index 13a02e00eff..72ef1268632 100644 --- a/helm/sim/values.yaml +++ b/helm/sim/values.yaml @@ -191,20 +191,6 @@ app: PII_URL: "" # Presidio PII service URL; auto-computed when pii.enabled, override here otherwise ELEVENLABS_API_KEY: "" # ElevenLabs API key for text-to-speech in deployed chat - # UI Branding & Whitelabeling Configuration - NEXT_PUBLIC_BRAND_NAME: "" # Custom brand name (default "Sim" via envDefaults) - NEXT_PUBLIC_BRAND_LOGO_URL: "" # Custom logo URL — square icon, shown in collapsed sidebar - NEXT_PUBLIC_BRAND_WORDMARK_URL: "" # Custom wordmark URL — wide image, shown in expanded sidebar - NEXT_PUBLIC_BRAND_FAVICON_URL: "" # Custom favicon URL (leave empty for default) - NEXT_PUBLIC_BRAND_PRIMARY_COLOR: "" # Primary brand color (hex, e.g., "#701a75") - NEXT_PUBLIC_BRAND_ACCENT_COLOR: "" # Accent color (hex, e.g., "#9333ea") - NEXT_PUBLIC_BRAND_BACKGROUND_COLOR: "" # Background color (hex, e.g., "#ffffff") - NEXT_PUBLIC_CUSTOM_CSS_URL: "" # Custom stylesheet URL (leave empty for none) - NEXT_PUBLIC_SUPPORT_EMAIL: "" # Support email address (default "help@sim.ai" via envDefaults) - NEXT_PUBLIC_DOCUMENTATION_URL: "" # Documentation URL (leave empty for none) - NEXT_PUBLIC_TERMS_URL: "" # Terms of service URL (leave empty for none) - NEXT_PUBLIC_PRIVACY_URL: "" # Privacy policy URL (leave empty for none) - # Registration Control DISABLE_REGISTRATION: "" # Set to "true" to disable new user signups EMAIL_PASSWORD_SIGNUP_ENABLED: "" # Set to "false" to disable email/password login (SSO-only mode, server-side enforcement) @@ -269,8 +255,6 @@ app: # Enterprise Feature Overrides (self-hosted) INBOX_ENABLED: "" # Enable Sim Mailer on self-hosted ("true" to enable) NEXT_PUBLIC_INBOX_ENABLED: "" # Show Sim Mailer settings page ("true" to enable) - WHITELABELING_ENABLED: "" # Enable whitelabeling on self-hosted ("true" to enable) - NEXT_PUBLIC_WHITELABELING_ENABLED: "" # Show whitelabeling settings page ("true" to enable) AUDIT_LOGS_ENABLED: "" # Enable audit logs on self-hosted ("true" to enable) NEXT_PUBLIC_AUDIT_LOGS_ENABLED: "" # Show audit logs settings page ("true" to enable) CUSTOM_BLOCKS_ENABLED: "" # Enable custom blocks on self-hosted ("true" to enable) @@ -364,10 +348,6 @@ app: # Vertex AI defaults VERTEX_LOCATION: "us-central1" - # Branding defaults - NEXT_PUBLIC_BRAND_NAME: "Sim" - NEXT_PUBLIC_SUPPORT_EMAIL: "help@sim.ai" - # Feature flags — left EMPTY, not "false", on purpose. # A per-feature flag set to "false" is an explicit override that wins over # ENTERPRISE_ENABLED, so hardcoding "false" here would silently prevent the @@ -477,7 +457,7 @@ app: timeoutSeconds: 3 failureThreshold: 3 - # Additional volumes for app deployment (e.g., branding assets, custom configs) + # Additional volumes for app deployment (e.g., custom configs) extraVolumes: [] extraVolumeMounts: [] @@ -1287,34 +1267,6 @@ sharedStorage: extraVolumes: [] extraVolumeMounts: [] -# Branding configuration -# Use this to inject custom branding assets (logos, CSS, etc.) into the application -branding: - # Enable/disable branding ConfigMap - enabled: false - - # Mount path in the container where branding files will be available - # Must sit inside the image's public directory, which the standalone build - # places at /app/apps/sim/public — a path outside it serves nothing. - mountPath: "/app/apps/sim/public/branding" - - # Text files (CSS, JSON, HTML, etc.) - values are plain text - # Example: - # files: - # custom.css: | - # .logo { background-color: #ff0000; } - # config.json: | - # {"theme": "dark"} - files: {} - - # Binary files (PNG, JPG, ICO, etc.) - values must be base64 encoded - # Generate base64 with: base64 -i logo.png | tr -d '\n' - # Example: - # binaryFiles: - # logo.png: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk..." - # favicon.ico: "AAABAAEAEBAAAAEAIABoBAAAFgAAAA..." - binaryFiles: {} - # Additional environment variables for custom integrations extraEnvVars: [] diff --git a/packages/sim-setup/src/twins.ts b/packages/sim-setup/src/twins.ts index 1e69be103a8..ed26a5cc77b 100644 --- a/packages/sim-setup/src/twins.ts +++ b/packages/sim-setup/src/twins.ts @@ -10,7 +10,6 @@ export const FLAG_TWINS: ReadonlyArray<{ server: string; client: string }> = [ { server: 'ENTERPRISE_ENABLED', client: 'NEXT_PUBLIC_ENTERPRISE_ENABLED' }, { server: 'ACCESS_CONTROL_ENABLED', client: 'NEXT_PUBLIC_ACCESS_CONTROL_ENABLED' }, { server: 'ORGANIZATIONS_ENABLED', client: 'NEXT_PUBLIC_ORGANIZATIONS_ENABLED' }, - { server: 'WHITELABELING_ENABLED', client: 'NEXT_PUBLIC_WHITELABELING_ENABLED' }, { server: 'AUDIT_LOGS_ENABLED', client: 'NEXT_PUBLIC_AUDIT_LOGS_ENABLED' }, { server: 'CUSTOM_BLOCKS_ENABLED', client: 'NEXT_PUBLIC_CUSTOM_BLOCKS_ENABLED' }, { server: 'DATA_RETENTION_ENABLED', client: 'NEXT_PUBLIC_DATA_RETENTION_ENABLED' }, @@ -52,7 +51,6 @@ export const SELF_HOST_UNLOCKS: ReadonlyArray<{ server: string; label: string; h label: 'Usage monitoring', hint: 'org-wide credit usage', }, - { server: 'WHITELABELING_ENABLED', label: 'Whitelabeling', hint: 'custom branding' }, ] export function getConfiguredMailProvider(vars: Map): string { diff --git a/packages/testing/src/mocks/deployment-shape.mock.ts b/packages/testing/src/mocks/deployment-shape.mock.ts index 0b61e4aaf26..4e20ff43434 100644 --- a/packages/testing/src/mocks/deployment-shape.mock.ts +++ b/packages/testing/src/mocks/deployment-shape.mock.ts @@ -19,13 +19,12 @@ export interface MockDeploymentShape { sessionPolicies: boolean sso: boolean usageMonitoring: boolean - whitelabeling: boolean } } /** * Builds a deployment shape from the `env-flags` mock defaults (self-hosted, billing off, Chat on, - * Live Search, inbox/whitelabeling/session policies on, everything else off), with shallow + * Live Search, inbox/session policies on, everything else off), with shallow * `features` overrides. */ export function createMockDeploymentShape( @@ -53,7 +52,6 @@ export function createMockDeploymentShape( sessionPolicies: true, sso: false, usageMonitoring: false, - whitelabeling: true, ...features, }, } diff --git a/packages/testing/src/mocks/email-templates.mock.ts b/packages/testing/src/mocks/email-templates.mock.ts index 4731c360022..b1e2c587560 100644 --- a/packages/testing/src/mocks/email-templates.mock.ts +++ b/packages/testing/src/mocks/email-templates.mock.ts @@ -275,7 +275,7 @@ const EMAIL_SUBJECTS: Record = { * * - Every `render*Email` is a bare `vi.fn()` (returns `undefined`); set the rendered HTML per test. * - Every email/layout component is `vi.fn(() => null)`. - * - The subject helpers port the real logic with the default brand name `Sim` (no whitelabeling): + * - The subject helpers port the real logic with the brand name `Sim`: * `mockGetEmailSubject`, `mockGetLimitEmailSubject`, `mockGetPlanWelcomeSubject`, * `mockGetRequestConfirmationSubject`, `mockGetOtpSubject`, * `mockGetCredentialGroupInvitationSubject`. @@ -370,8 +370,7 @@ export const emailTemplatesMockFns = { /** * Static mock module for `@/components/emails`. The style tokens (`baseStyles`, `colors`, - * `fontWeight`, `plainEmailStyles`, `spacing`, `typography`) carry the real non-whitelabeled - * values. + * `fontWeight`, `plainEmailStyles`, `spacing`, `typography`) carry the real values. * * @example * ```ts diff --git a/packages/testing/src/mocks/env-flags.mock.ts b/packages/testing/src/mocks/env-flags.mock.ts index a56abb59a7a..1358c26f772 100644 --- a/packages/testing/src/mocks/env-flags.mock.ts +++ b/packages/testing/src/mocks/env-flags.mock.ts @@ -36,7 +36,6 @@ interface EnvFlagsMockState { isSandboxDeploymentEntitled: boolean isSandboxesEnabled: boolean isScimEnabled: boolean - isWhitelabelingEnabled: boolean isAuditLogsEnabled: boolean isCustomBlocksEnabled: boolean isCredentialGroupsEnabled: boolean @@ -94,7 +93,6 @@ const defaultEnvFlagsState: EnvFlagsMockState = { isSandboxDeploymentEntitled: false, isSandboxesEnabled: false, isScimEnabled: false, - isWhitelabelingEnabled: true, isSessionPoliciesEnabled: true, isAuditLogsEnabled: false, isCustomBlocksEnabled: false, diff --git a/scripts/check-explicit-any.baseline.json b/scripts/check-explicit-any.baseline.json index b2981d2bcf1..36d0dabf631 100644 --- a/scripts/check-explicit-any.baseline.json +++ b/scripts/check-explicit-any.baseline.json @@ -1680,7 +1680,6 @@ "apps/sim/lib/workspaces/__integration__/pagination.integration.ts": 2, "apps/sim/lib/workspaces/application/list-organization-workspaces.ts": 1, "apps/sim/lib/workspaces/naming.ts": 1, - "apps/sim/next.config.ts": 2, "apps/sim/providers/__fixtures__/anthropic/fixtures.test.ts": 4, "apps/sim/providers/azure-openai/index.ts": 1, "apps/sim/providers/conversation-continuation.test.ts": 3, diff --git a/scripts/check-source-conventions.baseline.json b/scripts/check-source-conventions.baseline.json index df10085192e..496b8324fd3 100644 --- a/scripts/check-source-conventions.baseline.json +++ b/scripts/check-source-conventions.baseline.json @@ -150,7 +150,6 @@ "apps/sim/lib/billing/application/organization-settings-actor.test.ts": 1, "apps/sim/lib/billing/client/utils.ts": 1, "apps/sim/lib/billing/webhooks/enterprise.ts": 1, - "apps/sim/lib/branding/defaults.ts": 1, "apps/sim/lib/chunkers/regex-chunker.test.ts": 1, "apps/sim/lib/chunkers/sentence-chunker.test.ts": 1, "apps/sim/lib/chunkers/structured-data-chunker.test.ts": 1, @@ -618,7 +617,6 @@ "apps/sim/app/api/v1/admin/organizations/[id]/route.ts": 2, "apps/sim/app/api/v1/admin/organizations/[id]/session-policy/route.ts": 2, "apps/sim/app/api/v1/admin/organizations/[id]/transfer-ownership/route.ts": 2, - "apps/sim/app/api/v1/admin/organizations/[id]/whitelabel/route.ts": 2, "apps/sim/app/api/v1/admin/organizations/route.ts": 2, "apps/sim/app/api/v1/admin/outbox/[id]/requeue/route.ts": 2, "apps/sim/app/api/v1/admin/outbox/route.ts": 2, diff --git a/scripts/check-unused-exports.baseline.json b/scripts/check-unused-exports.baseline.json index bf0f811b55e..e01ff28c594 100644 --- a/scripts/check-unused-exports.baseline.json +++ b/scripts/check-unused-exports.baseline.json @@ -867,11 +867,6 @@ "apps/sim/ee/sso/hooks/sso-policy.ts#SSO_POLICY_STALE_TIME", "apps/sim/ee/sso/hooks/sso.ts#SSO_PROVIDERS_STALE_TIME", "apps/sim/ee/sso/search-params.ts#SSO_SETTINGS_TABS", - "apps/sim/ee/whitelabeling/branding.ts#ThemeColors", - "apps/sim/ee/whitelabeling/hooks/whitelabel.ts#WHITELABEL_STALE_TIME", - "apps/sim/ee/whitelabeling/hooks/whitelabel.ts#whitelabelKeys", - "apps/sim/ee/whitelabeling/index.ts#ThemeColors", - "apps/sim/ee/whitelabeling/index.ts#generateOrgThemeCSS", "apps/sim/ee/workspace-forking/components/fork-resource-picker/fork-resource-picker.tsx#ForkResourcePickerItem", "apps/sim/ee/workspace-forking/components/fork-sync/use-fork-sync.ts#MappableMappingKind", "apps/sim/ee/workspace-forking/hooks/background-work.ts#BACKGROUND_WORK_STALE_TIME", @@ -1741,7 +1736,6 @@ "apps/sim/lib/api/contracts/organization.ts#organizationSeatInfoSchema", "apps/sim/lib/api/contracts/organization.ts#organizationSessionPolicyResponseSchema", "apps/sim/lib/api/contracts/organization.ts#organizationSsoPolicyResponseSchema", - "apps/sim/lib/api/contracts/organization.ts#organizationWhitelabelSettingsResponseSchema", "apps/sim/lib/api/contracts/organization.ts#removalImpactCredentialSchema", "apps/sim/lib/api/contracts/organization.ts#revokeOrganizationSessionsResponseSchema", "apps/sim/lib/api/contracts/organization.ts#rosterMemberSchema", @@ -2851,7 +2845,6 @@ "apps/sim/lib/api/contracts/v1/admin/organizations.ts#AdminV1UpdateOrganizationMemberResponse", "apps/sim/lib/api/contracts/v1/admin/organizations.ts#AdminV1UpdateOrganizationResponse", "apps/sim/lib/api/contracts/v1/admin/organizations.ts#AdminV1UpdateOrganizationSessionPolicyResponse", - "apps/sim/lib/api/contracts/v1/admin/organizations.ts#AdminV1UpdateOrganizationWhitelabelResponse", "apps/sim/lib/api/contracts/v1/admin/organizations.ts#adminV1AddOrganizationMemberBodySchema", "apps/sim/lib/api/contracts/v1/admin/organizations.ts#adminV1CreateOrganizationBodySchema", "apps/sim/lib/api/contracts/v1/admin/organizations.ts#adminV1DeleteOrganizationQuerySchema", @@ -4064,7 +4057,6 @@ "apps/sim/lib/billing/validation/seat-management.ts#computeSeatUsage", "apps/sim/lib/blog/seo.ts#buildArticleJsonLd", "apps/sim/lib/blog/seo.ts#buildFaqJsonLd", - "apps/sim/lib/branding/index.ts#EMAIL_WORDMARK_SIZE", "apps/sim/lib/branding/wordmark.ts#EMAIL_WORDMARK_CANVAS", "apps/sim/lib/catalog/projection/block-detail.ts#CatalogBlockOperation", "apps/sim/lib/catalog/projection/block-detail.ts#CatalogBlockTrigger", @@ -4120,8 +4112,6 @@ "apps/sim/lib/chunkers/utils.ts#iterateWordBoundaryChunkSpans", "apps/sim/lib/cleanup/chat-cleanup.ts#deleteStorageFiles", "apps/sim/lib/collab-doc/state.ts#CollabDocStateToken", - "apps/sim/lib/colors/brightness.ts#isLightColor", - "apps/sim/lib/colors/index.ts#isLightColor", "apps/sim/lib/compare/data/index.ts#ProseSegment", "apps/sim/lib/compare/data/types.ts#ProseSegment", "apps/sim/lib/consent/scripts.ts#X_PIXEL_ID",