diff --git a/src/app/[locale]/tenants/[name]/page.tsx b/src/app/[locale]/tenants/[name]/page.tsx index 1cd336e..66e0357 100644 --- a/src/app/[locale]/tenants/[name]/page.tsx +++ b/src/app/[locale]/tenants/[name]/page.tsx @@ -13,8 +13,15 @@ import { ChannelUsers } from "@/components/channel-users/channel-users"; import { AssignedUsersPanel } from "@/components/tenants/assigned-users-panel"; import { SubscriptionToggle } from "@/components/tenants/subscription-toggle"; import { formatDateTime, formatRelative } from "@/lib/format"; +import { CHANNEL_PACKAGE_IDS } from "@/lib/packages"; -const CHANNEL_PACKAGES = ["telegram", "discord", "email"]; +// CHANNEL_PACKAGES used to be a hardcoded literal here +// (`["telegram", "discord", "email"]`). It now derives from the +// portal-side catalog so adding a new channel anywhere only requires +// editing src/lib/packages.ts. The `email` channel was dropped as +// part of the Phase A package-model rework — IMAP/SMTP is now the +// `mail` skill instead. +const CHANNEL_PACKAGES = CHANNEL_PACKAGE_IDS; export default async function TenantDetailPage({ params, diff --git a/src/components/channel-users/channel-users.tsx b/src/components/channel-users/channel-users.tsx index 346af90..1c90569 100644 --- a/src/components/channel-users/channel-users.tsx +++ b/src/components/channel-users/channel-users.tsx @@ -8,7 +8,10 @@ import { useRouter } from "next/navigation"; const CHANNEL_ID_HELP: Record = { telegram: "telegramIdHelp", discord: "discordIdHelp", - email: "emailIdHelp", + // email entry dropped in the Phase A rework — IMAP/SMTP is handled by + // the `mail` skill (category=skill, not channel), so it never appears + // in `enabledChannels`. If a future channel is added to the catalog, + // give it an entry here so the help blurb renders. }; interface ChannelUsersProps { diff --git a/src/components/onboarding/wizard.tsx b/src/components/onboarding/wizard.tsx index 2a7af8e..347759e 100644 --- a/src/components/onboarding/wizard.tsx +++ b/src/components/onboarding/wizard.tsx @@ -3,7 +3,7 @@ import { useState, useCallback, useEffect, useRef } from "react"; import { useTranslations } from "next-intl"; import { Card } from "@/components/ui/card"; -import { PACKAGE_CATALOG, type PackageDef } from "@/lib/packages"; +import { PACKAGE_CATALOG, DEFAULT_PACKAGE_IDS, type PackageDef } from "@/lib/packages"; import { isPersonalOrgName, displayOrgNameFor } from "@/lib/personal-org"; import { configureStepSchema, @@ -69,6 +69,7 @@ translation, and general question answering. `; const CATEGORIES = [ + { key: "core" as const, labelKey: "categories.core" }, { key: "channel" as const, labelKey: "categories.channels" }, { key: "skill" as const, labelKey: "categories.skills" }, ] as const; @@ -198,7 +199,11 @@ export function OnboardingWizard({ agentName: "Assistant", soulMd: FALLBACK_SOUL.replace("{company}", displayOrgName), agentsMd: FALLBACK_AGENTS, - packages: [] as string[], + // CORE defaults: heartbeat + cron pre-selected so the assistant + // can be proactive and run scheduled tasks out of the box. + // Customers can untoggle either before submitting. core-voice + // stays unselected — its toggle is disabled until Phase B. + packages: [...DEFAULT_PACKAGE_IDS] as string[], billingAddress: { // For personal accounts, leave the company field empty — it'll // appear on invoices. The user can still type something if they @@ -691,7 +696,7 @@ export function OnboardingWizard({