feat(webui): improve setup flows across chat channels (NAN-112) (#5356)

* feat(webui): improve channel setup flows

* fix(webui): refine channel setup interactions (NAN-112)

* fix(webui): keep email setup sections channel-owned

* fix(webui): remove concrete channel details from shared components

* refactor(webui): remove unused channel setup resources

* fix(webui): finish channel-owned setup boundaries

* fix(webui): update channel switches optimistically

* test(channels): remove obsolete absence assertions

* fix(webui): flatten channel instance settings disclosure

* fix(webui): complete channel setup and connection flows

* fix(whatsapp): wait for session database release

* fix(webui): preserve scrolling channel controls

* fix(webui): stage channel connection checks

* fix(channels): align verification actions

* fix(email): expose connection checks

* fix(webui): align channel field actions

* fix(email): verify account credentials

* fix(wecom): bypass system proxy for websocket

* fix(channels): stabilize async connection cleanup

* fix(webui): autosave channel credentials

* fix(email): make provider presets non-destructive

* test(weixin): isolate persisted QR credentials
This commit is contained in:
chengyongru authored and GitHub committed 2026-09-11 15:22:14 +08:00
1 parent 3cc3012b3a
commit e8a29a0087
291 files changed
+12194 -3979

No files matched your search

@@ -0,0 +1,48 @@
import { CircleHelp, ExternalLink } from "lucide-react";
import { useTranslation } from "react-i18next";
import { channelSetup } from "@/components/settings/channels/ChannelIdentity";
import { docsUrlWithBase } from "@/components/settings/channels/catalog";
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { Tooltip, TooltipProvider, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
import type { NanobotFeatureInfo } from "@/lib/types";
export function ChannelHelpMenu({ feature, chatAppsDocsUrl }: {
feature: NanobotFeatureInfo;
chatAppsDocsUrl?: string;
}) {
const { t, i18n } = useTranslation();
const setup = channelSetup(feature, i18n.resolvedLanguage ?? i18n.language);
const links = [
{ url: setup.officialUrl, label: setup.officialLabel },
{ url: docsUrlWithBase(setup.docsUrl, chatAppsDocsUrl), label: setup.docsLabel },
].filter((link) => link.url);
if (!links.length) return null;
const label = t("settings.channels.help", { defaultValue: "Help" });
return (
<TooltipProvider>
<DropdownMenu>
<Tooltip>
<TooltipTrigger asChild>
<DropdownMenuTrigger asChild>
<button type="button" aria-label={label}
className="grid h-8 w-8 place-items-center rounded-full text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring">
<CircleHelp className="h-4 w-4" aria-hidden />
</button>
</DropdownMenuTrigger>
</TooltipTrigger>
<TooltipContent>{label}</TooltipContent>
</Tooltip>
<DropdownMenuContent align="end">
{links.map((link) => (
<DropdownMenuItem key={link.url} asChild>
<a href={link.url} target="_blank" rel="noreferrer">
{link.label ?? label}
<ExternalLink className="ml-2 h-3.5 w-3.5 text-muted-foreground" aria-hidden />
</a>
</DropdownMenuItem>
))}
</DropdownMenuContent>
</DropdownMenu>
</TooltipProvider>
);
}