From 35e144e25cea62617a9ec9383fa678b29c192751 Mon Sep 17 00:00:00 2001 From: Aman Ganapathy <84686202+nams1570@users.noreply.github.com> Date: Wed, 10 Jun 2026 13:22:01 -0700 Subject: [PATCH] feat(emails): disable unavailable email server options for local (#1576) ### Context When working with local install, we can't send emails with resend keys/ managed domain/ custom smtp as of yet. So, we disable those buttons and indicate to the user what's going on. --- ## Summary by cubic Disables unsupported email server options when running the dashboard locally. Only the `shared` provider is selectable; others are disabled with a clear tooltip. - **New Features** - In local development, disables Resend, Managed Domain, and Custom SMTP; only `shared` remains enabled. - Shows tooltip: "These email server options are not supported when running dashboard locally." and applies disabled, non-interactive styles without changing the card layout. Written for commit 49828fd6877e1f2f25c4e2455b6f5a103089117e. Summary will update on new commits. Review in cubic ## Summary by CodeRabbit * **Bug Fixes** * Email provider selection UI now disables non-shared providers when the dashboard is running in a local development/emulator environment, and shows explanatory tooltips on the disabled provider cards. A shared-environment tooltip string was added to clarify which option is supported locally, improving clarity when configuring email settings. --- .../email-settings/domain-settings.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-settings/domain-settings.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-settings/domain-settings.tsx index 2d23edf8b..3e508f1c5 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-settings/domain-settings.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/email-settings/domain-settings.tsx @@ -34,7 +34,7 @@ import { } from "@phosphor-icons/react"; import { throwErr } from "@hexclave/shared/dist/utils/errors"; import { runAsynchronously, runAsynchronouslyWithAlert } from "@hexclave/shared/dist/utils/promises"; -import { ActionDialog, Dialog, DialogContent, DialogTitle, Label, Popover, PopoverContent, PopoverTrigger, Typography, useToast } from "@/components/ui"; +import { ActionDialog, Dialog, DialogContent, DialogTitle, Label, Popover, PopoverContent, PopoverTrigger, SimpleTooltip, Typography, useToast } from "@/components/ui"; import { useCallback, useEffect, useMemo, useState } from "react"; import * as yup from "yup"; import Image from "next/image"; @@ -178,6 +178,8 @@ const PROVIDERS: ProviderMeta[] = [ }, ]; +const REMOTE_DEVELOPMENT_ENVIRONMENT_EMAIL_PROVIDER_TOOLTIP = "These email server options are not supported when running dashboard locally."; + function TestSendingDialog(props: { trigger: React.ReactNode }) { const hexclaveAdminApp = useAdminApp(); const project = hexclaveAdminApp.useProject(); @@ -960,18 +962,21 @@ export function DomainSettings() { const isSelected = serverType === p.value; const isSaved = savedServerType === p.value; const isDraft = isSelected && !isSaved; + const isDisabledInDevelopmentEnvironment = project.isDevelopmentEnvironment && p.value !== "shared"; const Icon = p.icon; - return ( + const button = ( ); + return isDisabledInDevelopmentEnvironment ? ( + + {button} + + ) : button; })}