Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
feat(integrations): split Integrations into sections with a sidebar (#2444)
Chad Pihab597292683c9
diff --git a/src/assets/icons/github.svg b/src/assets/icons/github.svgnew file mode 100644index 000000000..4f46bf357--- /dev/null+++ b/src/assets/icons/github.svg@@ -0,0 +1,10 @@+<svg width="98" height="96" viewBox="0 0 98 96" fill="none" xmlns="http://www.w3.org/2000/svg">+<g clip-path="url(#clip0_730_27126)">+<path d="M41.4395 69.3848C28.8066 67.8535 19.9062 58.7617 19.9062 46.9902C19.9062 42.2051 21.6289 37.0371 24.5 33.5918C23.2559 30.4336 23.4473 23.7344 24.8828 20.959C28.7109 20.4805 33.8789 22.4902 36.9414 25.2656C40.5781 24.1172 44.4062 23.543 49.0957 23.543C53.7852 23.543 57.6133 24.1172 61.0586 25.1699C64.0254 22.4902 69.2891 20.4805 73.1172 20.959C74.457 23.543 74.6484 30.2422 73.4043 33.4961C76.4668 37.1328 78.0937 42.0137 78.0937 46.9902C78.0937 58.7617 69.1934 67.6621 56.3691 69.2891C59.623 71.3945 61.8242 75.9883 61.8242 81.252L61.8242 91.2051C61.8242 94.0762 64.2168 95.7031 67.0879 94.5547C84.4102 87.9512 98 70.6289 98 49.1914C98 22.1074 75.9883 6.69539e-07 48.9043 4.309e-07C21.8203 1.92261e-07 -1.9479e-07 22.1074 -4.3343e-07 49.1914C-6.20631e-07 70.4375 13.4941 88.0469 31.6777 94.6504C34.2617 95.6074 36.75 93.8848 36.75 91.3008L36.75 83.6445C35.4102 84.2188 33.6875 84.6016 32.1562 84.6016C25.8398 84.6016 22.1074 81.1563 19.4277 74.7441C18.375 72.1602 17.2266 70.6289 15.0254 70.3418C13.877 70.2461 13.4941 69.7676 13.4941 69.1934C13.4941 68.0449 15.4082 67.1836 17.3223 67.1836C20.0977 67.1836 22.4902 68.9063 24.9785 72.4473C26.8926 75.2227 28.9023 76.4668 31.2949 76.4668C33.6875 76.4668 35.2187 75.6055 37.4199 73.4043C39.0469 71.7773 40.291 70.3418 41.4395 69.3848Z" fill="black"/>+</g>+<defs>+<clipPath id="clip0_730_27126">+<rect width="98" height="96" fill="white"/>+</clipPath>+</defs>+</svg>diff --git a/src/assets/icons/linear.svg b/src/assets/icons/linear.svgnew file mode 100644index 000000000..e2484d708--- /dev/null+++ b/src/assets/icons/linear.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" fill="#222326" width="200" height="200" viewBox="0 0 100 100">+ <path+ d="M1.22541 61.5228c-.2225-.9485.90748-1.5459 1.59638-.857L39.3342 97.1782c.6889.6889.0915 1.8189-.857 1.5964C20.0515 94.4522 5.54779 79.9485 1.22541 61.5228ZM.00189135 46.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503 99.7085c.2007.2007.4773.3075.7606.2896 2.3692-.1476 4.6938-.46 6.9624-.9259.7645-.157 1.0301-1.0963.4782-1.6481L2.57595 39.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915 2.2686-.77832 4.5932-.92588465 6.9624ZM4.21093 29.7054c-.16649.3738-.08169.8106.20765 1.1l64.77602 64.776c.2894.2894.7262.3742 1.1.2077 1.7861-.7956 3.5171-1.6927 5.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566 24.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132 1.6684-1.88843 3.3994-2.68399 5.1855ZM12.6587 18.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795 6.45931 35.1114 0 49.9519 0 77.5927 0 100 22.4073 100 50.0481c0 14.8405-6.4593 28.1724-16.7199 37.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587 18.074Z"+ />+</svg>diff --git a/src/assets/icons/slack.svg b/src/assets/icons/slack.svgnew file mode 100644index 000000000..245f446ae--- /dev/null+++ b/src/assets/icons/slack.svg@@ -0,0 +1,17 @@+<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">+<g clip-path="url(#clip0_4127_70105)">+<path d="M11.379 33.9993C11.379 37.1358 8.84512 39.6507 5.7276 39.6507C2.61008 39.6507 0.0572205 37.1168 0.0572205 33.9993C0.0572205 30.8817 2.5911 28.3479 5.70862 28.3479H11.36V33.9993H11.379Z" fill="#E3066A"/>+<path d="M14.1962 33.9997C14.1962 30.8632 16.7301 28.3483 19.8476 28.3483C22.9651 28.3483 25.499 30.8822 25.499 33.9997V48.1353C25.499 51.2718 22.9651 53.7867 19.8476 53.7867C16.7301 53.7867 14.1962 51.2718 14.1962 48.1353V33.9997Z" fill="#E3066A"/>+<path d="M19.8662 11.2673C16.7296 11.2673 14.2148 8.73347 14.2148 5.61594C14.2148 2.49842 16.7486 -0.0354538 19.8662 -0.0354538C22.9837 -0.0354538 25.5175 2.49842 25.5175 5.61594V11.2673H19.8662Z" fill="#00B3FF"/>+<path d="M19.8682 14.1334C23.0047 14.1334 25.5196 16.6673 25.5196 19.7848C25.5196 22.9023 22.9857 25.4362 19.8682 25.4362H5.67566C2.53916 25.4362 0.0242615 22.9023 0.0242615 19.7848C0.0242615 16.6673 2.55814 14.1334 5.67566 14.1334H19.8682Z" fill="#00B3FF"/>+<path d="M42.5323 19.7853C42.5323 16.6488 45.0662 14.1339 48.1837 14.1339C51.3012 14.1339 53.8351 16.6678 53.8351 19.7853C53.8351 22.9028 51.3012 25.4367 48.1837 25.4367H42.5323V19.7853Z" fill="#41B658"/>+<path d="M39.7126 19.7934C39.7126 22.9299 37.1787 25.4448 34.0612 25.4448C30.9436 25.4448 28.4098 22.911 28.4098 19.7934V5.61986C28.4098 2.48336 30.9436 -0.0315399 34.0612 -0.0315399C37.1787 -0.0315399 39.7126 2.48336 39.7126 5.61986V19.7934Z" fill="#41B658"/>+<path d="M34.0376 42.482C37.1741 42.482 39.689 45.0158 39.689 48.1334C39.689 51.2509 37.1552 53.7848 34.0376 53.7848C30.9201 53.7848 28.3862 51.2509 28.3862 48.1334V42.482H34.0376Z" fill="#FCC003"/>+<path d="M34.0381 39.6507C30.9016 39.6507 28.3867 37.1168 28.3867 33.9993C28.3867 30.8818 30.9206 28.3479 34.0381 28.3479H48.2306C51.3671 28.3479 53.882 30.8818 53.882 33.9993C53.882 37.1168 51.3482 39.6507 48.2306 39.6507H34.0381Z" fill="#FCC003"/>+</g>+<defs>+<clipPath id="clip0_4127_70105">+<rect width="54" height="54" fill="white"/>+</clipPath>+</defs>+</svg>diff --git a/src/components/ApiKeysSection.tsx b/src/components/ApiKeysSection.tsxindex bf0a44fe8..b0168249c 100644--- a/src/components/ApiKeysSection.tsx+++ b/src/components/ApiKeysSection.tsx@@ -1,4 +1,4 @@-import { useState, useEffect, useCallback } from "react";+import { useState, useEffect, useCallback, useRef } from "react";import { useTranslation } from "react-i18next";import { Key, Copy, Check, Trash2, Plus, Shield, AlertTriangle } from "./icons";import { Button } from "./ui/button";@@ -44,7 +44,12 @@ function formatRelativeTime(dateString: string): string {return `${months}mo ago`;}-export default function ApiKeysSection() {+interface ApiKeysSectionProps {+ /** Bumped by a "Create API key" elsewhere; opens the create dialog once keys load. */+ createRequest?: number;+}++export default function ApiKeysSection({ createRequest = 0 }: ApiKeysSectionProps) {const { t } = useTranslation();const { toast } = useToast();@@ -52,6 +57,7 @@ export default function ApiKeysSection() {const [isLoading, setIsLoading] = useState(true);const [createOpen, setCreateOpen] = useState(false);const [revokeTarget, setRevokeTarget] = useState<ApiKey | null>(null);+ const handledCreateRequest = useRef(0);const fetchKeys = useCallback(async () => {try {@@ -68,6 +74,13 @@ export default function ApiKeysSection() {fetchKeys();}, [fetchKeys]);+ // At the key limit there's nothing to create; the list says so instead.+ useEffect(() => {+ if (isLoading || createRequest === handledCreateRequest.current) return;+ handledCreateRequest.current = createRequest;+ if (keys.length < MAX_API_KEYS) setCreateOpen(true);+ }, [createRequest, isLoading, keys.length]);+const handleRevoke = async () => {if (!revokeTarget) return;try {diff --git a/src/components/CliIntegrationCard.tsx b/src/components/CliIntegrationCard.tsxdeleted file mode 100644index d7f7c18e7..000000000--- a/src/components/CliIntegrationCard.tsx+++ /dev/null@@ -1,122 +0,0 @@-import { useState } from "react";-import { useTranslation } from "react-i18next";-import { Check, Copy, ExternalLink, Terminal } from "./icons";-import { Badge } from "./ui/badge";-import { Button } from "./ui/button";-import { CopyableCommand } from "./ui/CopyableCommand";-import { LogoTile } from "./ui/LogoTile";-import { useToast } from "./ui/useToast";-import logo from "../assets/logo.svg";--const CLI_DOCS_URL = "https://docs.openwhispr.com/cli/install";-const INSTALL_CMD = "npm install -g @openwhispr/cli";-const LOCAL_EXAMPLE = "openwhispr --local notes list";-const CLOUD_LOGIN_CMD = "openwhispr auth login";--interface CliIntegrationCardProps {- isPaid: boolean;- onUpgrade: () => void;-}--export default function CliIntegrationCard({ isPaid, onUpgrade }: CliIntegrationCardProps) {- const { t } = useTranslation();- const { toast } = useToast();- const [docsLinkCopied, setDocsLinkCopied] = useState(false);-- const handleCopyDocsLink = async () => {- try {- await navigator.clipboard.writeText(CLI_DOCS_URL);- setDocsLinkCopied(true);- toast({- title: t("integrations.cli.docsLinkCopied"),- variant: "success",- duration: 2000,- });- setTimeout(() => setDocsLinkCopied(false), 2000);- } catch {- /* noop */- }- };-- return (- <div className="rounded-lg border border-border/70 dark:border-border-subtle/70 bg-card/50 dark:bg-surface-2/50 backdrop-blur-sm p-4">- <div className="flex items-center gap-2 mb-4">- <LogoTile src={logo} alt="OpenWhispr" />- <div className="w-9 h-9 rounded-lg bg-white dark:bg-surface-raised shadow-[0_0_0_1px_rgba(0,0,0,0.04)] dark:shadow-none dark:border dark:border-white/10 flex items-center justify-center shrink-0">- <Terminal className="w-4 h-4 text-foreground/70" strokeWidth={2} />- </div>- </div>-- <h3 className="text-sm font-semibold text-foreground mb-1">{t("integrations.cli.title")}</h3>- <p className="text-xs text-muted-foreground/70 mb-4 leading-relaxed">- {t("integrations.cli.description")}- </p>-- <div className="mb-3">- <div className="text-[10px] font-medium uppercase tracking-wider text-muted-foreground/70 mb-1.5">- {t("integrations.cli.installLabel")}- </div>- <CopyableCommand command={INSTALL_CMD} />- </div>-- <div className="flex items-center gap-2 mb-5">- <Button- size="sm"- onClick={() => window.electronAPI?.openExternal?.(CLI_DOCS_URL)}- className="gap-1.5"- >- {t("integrations.cli.learnMore")}- <ExternalLink className="h-3 w-3" />- </Button>- <Button variant="outline" size="sm" onClick={handleCopyDocsLink} className="gap-1.5">- {docsLinkCopied ? (- <Check className="h-3 w-3 text-success" />- ) : (- <Copy className="h-3 w-3" />- )}- {t("integrations.cli.copyDocsLink")}- </Button>- </div>-- <div className="mb-4">- <div className="flex items-center gap-1.5 mb-1">- <h4 className="text-xs font-semibold text-foreground">- {t("integrations.cli.local.label")}- </h4>- <Badge variant="outline" className="text-[10px] px-1.5 py-0 font-normal">- {t("integrations.cli.local.freeBadge")}- </Badge>- </div>- <p className="text-xs text-muted-foreground/70 mb-2 leading-relaxed">- {t("integrations.cli.local.description")}- </p>- <CopyableCommand command={LOCAL_EXAMPLE} />- </div>-- <div>- <div className="flex items-center gap-1.5 mb-1">- <h4 className="text-xs font-semibold text-foreground">- {t("integrations.cli.cloud.label")}- </h4>- {!isPaid && (- <Badge variant="outline" className="text-[10px] px-1.5 py-0 font-normal">- {t("integrations.plan.pro")}- </Badge>- )}- </div>- <p className="text-xs text-muted-foreground/70 mb-2 leading-relaxed">- {isPaid- ? t("integrations.cli.cloud.description")- : t("integrations.cli.cloud.proRequired")}- </p>- {isPaid ? (- <CopyableCommand command={CLOUD_LOGIN_CMD} />- ) : (- <Button size="sm" onClick={onUpgrade}>- {t("integrations.cli.viewPlans")}- </Button>- )}- </div>- </div>- );-}diff --git a/src/components/ConnectorsSection.tsx b/src/components/ConnectorsSection.tsxindex 8f3aa3e22..87a4451e7 100644--- a/src/components/ConnectorsSection.tsx+++ b/src/components/ConnectorsSection.tsx@@ -1,19 +1,16 @@-import { useSyncExternalStore, type ReactElement } from "react";+import type { ReactElement } from "react";import { useTranslation } from "react-i18next";-import { Mail } from "./icons";-import { Button } from "./ui/button";+import { Lock, Mail } from "./icons";import { SettingsPanel, SettingsPanelRow } from "./ui/SettingsSection";import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select";import { RecentActions } from "./connectors/RecentActions";import { ConnectorLoginRow } from "./connectors/ConnectorLoginRow";+import { BetaBadge } from "./connectors/BetaBadge";import { CONNECTOR_ROWS } from "./connectors/connectorRows";+import { UpsellBar } from "./integrations/IntegrationsPane";import { useSettingsStore } from "../stores/settingsStore";import { useConnectorStatusStore } from "../stores/connectorStatusStore";-import { usePolicyStore } from "../stores/policyStore";-import { isConnectorsAllowed, isConnectorsBlockedByOrg } from "../stores/policyRules";-import { getUsageState, subscribeUsage } from "../lib/usageStore";-import { readIsSubscribed, subscribeIsSubscribed } from "../lib/subscriptionFlag";-import { hasConnectorPlan } from "../utils/connectorEligibility";+import { useConnectorAccess } from "../hooks/useConnectorAccess";import {EMAIL_DRAFT_TARGET_SETTINGS,gmailSendStatus,@@ -27,21 +24,13 @@ interface ConnectorsSectionProps {export function ConnectorsSection({ onUpgrade }: ConnectorsSectionProps): ReactElement {const { t } = useTranslation();- const blockedByOrg = usePolicyStore(isConnectorsBlockedByOrg);- // False while the policy loads, after a failed fetch, or when the org requires- // a newer app: chat has no connector tools then, so the card mustn't offer them.- const connectorsAllowed = usePolicyStore(isConnectorsAllowed);- const isSignedIn = useSettingsStore((state) => state.isSignedIn);+ const { isPaid, blockedByOrg, connectorsAllowed } = useConnectorAccess();const emailDraftTarget = useSettingsStore((state) => state.emailDraftTarget);const setEmailDraftTarget = useSettingsStore((state) => state.setEmailDraftTarget);const gcalConnected = useSettingsStore((state) => state.gcalConnected);const mcalAccounts = useSettingsStore((state) => state.mcalAccounts);const gmail = useConnectorStatusStore((state) => state.statuses.gmail);const gmailStatus = gmailSendStatus(gmail);- // The same plan check that decides whether the chat gets the connector tools.- const usage = useSyncExternalStore(subscribeUsage, getUsageState);- const isSubscribedFlag = useSyncExternalStore(subscribeIsSubscribed, readIsSubscribed);- const isPaid = isSignedIn && hasConnectorPlan(usage, isSubscribedFlag);const showActions = isPaid && connectorsAllowed;const automaticTarget = resolveEmailDraftTarget({@@ -80,69 +69,76 @@ export function ConnectorsSection({ onUpgrade }: ConnectorsSectionProps): ReactEreturn t(`connectors.email.targets.${option}`);};+ // A free plan sees what drafting does, dimmed; the one upsell sits above the list.+ const locked = !isPaid && !blockedByOrg;const description = blockedByOrg? t("connectors.policyOff")- : !isPaid- ? t("connectors.email.proRequired")- : !connectorsAllowed- ? t("connectors.email.unavailable")- : currentTarget === "gmailSend"- ? t("connectors.email.descriptionSend")- : t("connectors.email.description");+ : isPaid && !connectorsAllowed+ ? t("connectors.email.unavailable")+ : isPaid && currentTarget === "gmailSend"+ ? t("connectors.email.descriptionSend")+ : t("connectors.email.description");return (- <SettingsPanel>- <SettingsPanelRow>- <div className="flex items-center gap-3">- <div className="w-9 h-9 rounded-lg bg-primary/5 dark:bg-primary/10 flex items-center justify-center shrink-0">- <Mail className="h-4 w-4 text-primary/80" strokeWidth={2} aria-hidden="true" />- </div>- <div className="flex-1 min-w-0">- <p className="text-xs font-semibold text-foreground">{t("connectors.email.title")}</p>- <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">{description}</p>- </div>- {showActions && (- <Select- value={shownTarget}- onValueChange={(value) => setEmailDraftTarget(value as EmailDraftTargetSetting)}- >- <SelectTrigger- className="h-7 w-48 shrink-0 text-xs rounded-lg px-2.5 [&>svg]:h-3 [&>svg]:w-3"- aria-label={t("connectors.email.targetLabel")}+ <div className="space-y-3">+ {locked && <UpsellBar message={t("connectors.upsell")} onUpgrade={onUpgrade} />}+ <SettingsPanel>+ <SettingsPanelRow>+ <div className={`flex items-center gap-3 ${locked ? "opacity-60" : ""}`}>+ <div className="w-9 h-9 rounded-lg bg-primary/5 dark:bg-primary/10 flex items-center justify-center shrink-0">+ <Mail className="h-4 w-4 text-primary/80" strokeWidth={2} aria-hidden="true" />+ </div>+ <div className="flex-1 min-w-0">+ <div className="flex items-center gap-1.5">+ <p className="text-xs font-semibold text-foreground">+ {t("connectors.email.title")}+ </p>+ <BetaBadge />+ </div>+ <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">+ {description}+ </p>+ </div>+ {showActions && (+ <Select+ value={shownTarget}+ onValueChange={(value) => setEmailDraftTarget(value as EmailDraftTargetSetting)}>- <SelectValue />- </SelectTrigger>- <SelectContent>- {targetOptions.map((option) => (- <SelectItem- key={option}- value={option}- disabled={option === "gmailSend" && gmailSendUnavailable}- >- {optionLabel(option)}- </SelectItem>- ))}- </SelectContent>- </Select>- )}- {!isPaid && !blockedByOrg && (- <Button size="sm" className="shrink-0" onClick={onUpgrade}>- {t("integrations.api.viewPlans")}- </Button>- )}- </div>+ <SelectTrigger+ className="h-7 w-48 shrink-0 text-xs rounded-lg px-2.5 [&>svg]:h-3 [&>svg]:w-3"+ aria-label={t("connectors.email.targetLabel")}+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {targetOptions.map((option) => (+ <SelectItem+ key={option}+ value={option}+ disabled={option === "gmailSend" && gmailSendUnavailable}+ >+ {optionLabel(option)}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ )}+ {locked && (+ <Lock+ size={14}+ role="img"+ aria-label={t("connectors.locked")}+ className="shrink-0 text-muted-foreground"+ />+ )}+ </div>- {showActions && <RecentActions connectorId="email" />}- </SettingsPanelRow>- {CONNECTOR_ROWS.map((row) => (- <ConnectorLoginRow- key={row.id}- row={row}- isPaid={isPaid}- blockedByOrg={blockedByOrg}- onUpgrade={onUpgrade}- />- ))}- </SettingsPanel>+ {showActions && <RecentActions connectorId="email" />}+ </SettingsPanelRow>+ {CONNECTOR_ROWS.map((row) => (+ <ConnectorLoginRow key={row.id} row={row} isPaid={isPaid} blockedByOrg={blockedByOrg} />+ ))}+ </SettingsPanel>+ </div>);}diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsxindex 332368815..dc2fe01d6 100644--- a/src/components/ControlPanel.tsx+++ b/src/components/ControlPanel.tsx@@ -53,6 +53,10 @@ import {import ControlPanelSidebar from "./ControlPanelSidebar";import ControlPanelTopBar from "./ControlPanelTopBar";import { useControlPanelNavItems, type ControlPanelView } from "./controlPanelNav";+import {+ DEFAULT_INTEGRATIONS_SECTION,+ type IntegrationsSection,+} from "./integrations/integrationsSections";import MeetingRecordingMount from "./MeetingRecordingMount";import MeetingRecordingPill from "./notes/MeetingRecordingPill";import NewNoteMenu from "./notes/NewNoteMenu";@@ -135,6 +139,9 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelProconst [showSearch, setShowSearch] = useState(false);const showDiscarded = useShowDiscarded();const [activeView, setActiveView] = useState<ControlPanelView>("home");+ const [integrationsSection, setIntegrationsSection] = useState<IntegrationsSection>(+ DEFAULT_INTEGRATIONS_SECTION+ );const navItems = useControlPanelNavItems();const {collapsed: sidebarCollapsed,@@ -1173,7 +1180,10 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelProsetSettingsSection(section);setShowSettings(true);}}- onOpenIntegrations={() => setActiveView("integrations")}+ onOpenIntegrations={() => {+ setIntegrationsSection("calendars");+ setActiveView("integrations");+ }}/>)}{activeView === "insights" && (@@ -1233,6 +1243,8 @@ export default function ControlPanel({ initialSettingsSection }: ControlPanelProsetSettingsSection("plansBilling");setShowSettings(true);}}+ section={integrationsSection}+ onSectionChange={setIntegrationsSection}/></Suspense>)}diff --git a/src/components/IntegrationsView.tsx b/src/components/IntegrationsView.tsxindex 1cbe7c1d0..4a77056aa 100644--- a/src/components/IntegrationsView.tsx+++ b/src/components/IntegrationsView.tsx@@ -1,604 +1,220 @@-import { useState, useEffect, useCallback } from "react";+import { useEffect, useRef, useState, type ReactElement, type ReactNode } from "react";import { useTranslation } from "react-i18next";-import { CalendarDays, Code2, Info, Loader2, Mail, Plus, Unlink } from "./icons";+import { ExternalLink } from "./icons";import { Button } from "./ui/button";-import { PAGE_CONTENT_WIDTH_CLASS } from "./ui/pageWidth";-import { cn } from "./lib/utils";-import { BIDI_VALUE_TOKEN, BidiInterpolatedText } from "./ui/BidiInterpolatedText";-import { Badge } from "./ui/badge";-import { SectionLabel, SettingsPanel, SettingsPanelRow, SettingsRow } from "./ui/SettingsSection";-import { Toggle } from "./ui/toggle";-import {- AlertDialog,- ConfirmDialog,- Dialog,- DialogContent,- DialogDescription,- DialogHeader,- DialogTitle,-} from "./ui/dialog";+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select";import { useSettingsStore } from "../stores/settingsStore";-import { useSystemAudioPermission } from "../hooks/useSystemAudioPermission";-import { canManageSystemAudioInApp } from "../utils/systemAudioAccess";-import type { CalendarAccount, MicrosoftCalendarAccount } from "../types/calendar";+import { ensureConnectorStatus, useConnectorStatusStore } from "../stores/connectorStatusStore";+import { useConnectorAccess } from "../hooks/useConnectorAccess";import ApiKeysSection from "./ApiKeysSection";-import CliIntegrationCard from "./CliIntegrationCard";-import McpIntegrationCard from "./McpIntegrationCard";import { ConnectorsSection } from "./ConnectorsSection";-import googleCalendarIcon from "../assets/icons/google-calendar.svg";-import microsoftCalendarIcon from "../assets/icons/microsoft-calendar.svg";-import appleCalendarIcon from "../assets/icons/apple-calendar.svg";+import { CONNECTOR_ROWS } from "./connectors/connectorRows";+import { IntegrationsNav } from "./integrations/IntegrationsNav";+import { IntegrationsPane, UpsellBar } from "./integrations/IntegrationsPane";+import { CalendarsPane } from "./integrations/CalendarsPane";+import { McpPane } from "./integrations/McpPane";+import { CliPane } from "./integrations/CliPane";+import {+ INTEGRATIONS_SECTION_ICONS,+ INTEGRATIONS_SECTIONS,+ sectionMeta,+ type IntegrationsSection,+ type SectionMeta,+} from "./integrations/integrationsSections";const API_DOCS_URL = "https://docs.openwhispr.com/api/overview";+const { mcp: McpIcon, cli: CliIcon } = INTEGRATIONS_SECTION_ICONS;interface IntegrationsViewProps {isPaid: boolean;onUpgrade: () => void;+ section: IntegrationsSection;+ onSectionChange: (section: IntegrationsSection) => void;}-interface ProviderRowProps {- icon: string;- i18nKey: string;- connected: boolean;- isConnecting: boolean;- onConnect: () => void;-}--function ProviderRow({ icon, i18nKey, connected, isConnecting, onConnect }: ProviderRowProps) {+export default function IntegrationsView({+ isPaid,+ onUpgrade,+ section,+ onSectionChange,+}: IntegrationsViewProps): ReactElement {const { t } = useTranslation();- return (- <SettingsPanelRow>- <div className="flex items-center gap-3">- <div className="w-9 h-9 rounded-lg bg-white dark:bg-surface-raised shadow-[0_0_0_1px_rgba(0,0,0,0.04)] dark:shadow-none dark:border dark:border-white/10 flex items-center justify-center shrink-0">- <img src={icon} alt="" className="w-5 h-5" />- </div>- <div className="flex-1 min-w-0">- <div className="flex items-center gap-1.5">- <p className="text-xs font-semibold text-foreground">{t(`${i18nKey}.title`)}</p>- <Badge variant="outline" className="text-[10px] px-1.5 py-0 font-normal">- {t(`${i18nKey}.optional`)}- </Badge>- </div>- <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">- {t(`${i18nKey}.description`)}- </p>- </div>- {connected ? (- <Badge variant="success" className="shrink-0">- {t(`${i18nKey}.connected`)}- </Badge>- ) : (- <Button size="sm" onClick={onConnect} disabled={isConnecting} className="shrink-0">- {isConnecting ? (- <Loader2 className="h-3.5 w-3.5 animate-spin" />- ) : (- t(`${i18nKey}.connect`)- )}- </Button>- )}- </div>- </SettingsPanelRow>- );-}--interface CalendarAccountRowsProps {- i18nKey: string;- accounts: CalendarAccount[];- disconnectingEmail: string | null;- onUnlink: (email: string) => void;- primaryOnly: boolean;- onPrimaryOnlyChange: (value: boolean) => void;- isConnecting: boolean;- onAddAnother: () => void;-}--function CalendarAccountRows({- i18nKey,- accounts,- disconnectingEmail,- onUnlink,- primaryOnly,- onPrimaryOnlyChange,- isConnecting,- onAddAnother,-}: CalendarAccountRowsProps) {- const { t } = useTranslation();- if (accounts.length === 0) return null;- return (- <>- {accounts.map((account) => (- <SettingsPanelRow key={account.email}>- <div className="group flex items-center gap-3 ps-12">- <Mail className="h-3.5 w-3.5 text-muted-foreground/70 shrink-0" />- <span className="text-xs text-muted-foreground truncate flex-1">- <bdi dir="ltr">{account.email}</bdi>- </span>- <button- onClick={() => onUnlink(account.email)}- disabled={disconnectingEmail === account.email}- className="opacity-0 group-hover:opacity-100 p-1 rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-all disabled:opacity-50"- aria-label={t(`${i18nKey}.disconnect`)}- >- {disconnectingEmail === account.email ? (- <Loader2 className="h-3.5 w-3.5 animate-spin" />- ) : (- <Unlink className="h-3.5 w-3.5" />- )}- </button>- </div>- </SettingsPanelRow>- ))}-- <SettingsPanelRow>- <SettingsRow- label={t(`${i18nKey}.primaryOnly`)}- description={t(`${i18nKey}.primaryOnlyDescription`)}- >- <Toggle checked={primaryOnly} onChange={onPrimaryOnlyChange} />- </SettingsRow>- </SettingsPanelRow>-- <SettingsPanelRow>- <button- onClick={onAddAnother}- disabled={isConnecting}- className="flex items-center gap-2 ps-12 text-xs text-primary hover:text-primary/80 transition-colors disabled:opacity-50"- >- {isConnecting ? (- <Loader2 className="h-3.5 w-3.5 animate-spin" />- ) : (- <Plus className="h-3.5 w-3.5" />- )}- {t(`${i18nKey}.addAnother`)}- </button>- </SettingsPanelRow>- </>- );-}--export default function IntegrationsView({ isPaid, onUpgrade }: IntegrationsViewProps) {- const { t } = useTranslation();- const {- gcalAccounts,- setGcalAccounts,- gcalPrimaryOnly,- setGcalPrimaryOnly,- mcalAccounts,- setMcalAccounts,- mcalPrimaryOnly,- setMcalPrimaryOnly,- appleCalendarConnected,- setAppleCalendarConnected,- } = useSettingsStore();- const [isConnecting, setIsConnecting] = useState(false);- const [disconnectingEmail, setDisconnectingEmail] = useState<string | null>(null);- const [confirmDisconnectEmail, setConfirmDisconnectEmail] = useState<string | null>(null);- const [isMsConnecting, setIsMsConnecting] = useState(false);- const [msDisconnectingEmail, setMsDisconnectingEmail] = useState<string | null>(null);- const [confirmMsDisconnectEmail, setConfirmMsDisconnectEmail] = useState<string | null>(null);- const [showPermissionDialog, setShowPermissionDialog] = useState(false);- const [isAppleConnecting, setIsAppleConnecting] = useState(false);- const [appleSourceNames, setAppleSourceNames] = useState<string[]>([]);- const [confirmAppleDisconnect, setConfirmAppleDisconnect] = useState(false);- const [appleConnectError, setAppleConnectError] = useState<"denied" | "failed" | null>(null);- // i18n prefix of the provider whose OAuth flow failed, e.g. "integrations.googleCalendar"- const [oauthErrorKey, setOauthErrorKey] = useState<string | null>(null);- const [apiKeysDialogOpen, setApiKeysDialogOpen] = useState(false);- const systemAudio = useSystemAudioPermission();- const { request: requestSystemAudioAccess } = systemAudio;- const hasAccounts = gcalAccounts.length > 0;- const needsSystemAudioGrant = !systemAudio.granted && canManageSystemAudioInApp(systemAudio);const isMac = window.electronAPI?.getPlatform?.() === "darwin";-- const startOAuth = useCallback(async () => {- setIsConnecting(true);- try {- const result = await window.electronAPI?.gcalStartOAuth?.();- if (result?.success && result.email) {- const current = useSettingsStore.getState().gcalAccounts;- setGcalAccounts([- ...current.filter((a) => a.email !== result.email),- { email: result.email },- ]);- } else if (!result?.error?.includes("access_denied")) {- // access_denied means the user cancelled on the consent screen- setOauthErrorKey("integrations.googleCalendar");- }- } finally {- setIsConnecting(false);- }- }, [setGcalAccounts]);-- const startMicrosoftOAuth = useCallback(async () => {- setIsMsConnecting(true);- try {- const result = await window.electronAPI?.mcalStartOAuth?.();- if (result?.success && result.email) {- const current = useSettingsStore.getState().mcalAccounts;- setMcalAccounts([- ...current.filter((a) => a.email !== result.email),- { email: result.email, tenantId: result.tenantId },- ]);- } else if (!result?.error?.includes("access_denied")) {- setOauthErrorKey("integrations.microsoftCalendar");- }- } finally {- setIsMsConnecting(false);- }- }, [setMcalAccounts]);-- const connectAppleCalendar = useCallback(async () => {- setIsAppleConnecting(true);- try {- const result = await window.electronAPI?.acalConnect?.();- if (result?.success) {- setAppleCalendarConnected(true);- } else {- // Only send the user to Privacy settings when access was actually- // denied; helper-missing/snapshot-failed are not permission problems.- setAppleConnectError(result?.reason === "denied" ? "denied" : "failed");- }- } finally {- setIsAppleConnecting(false);- }- }, [setAppleCalendarConnected]);-- const withSystemAudioGate = useCallback(- async (connect: () => Promise<void>) => {- if (needsSystemAudioGrant) {- const granted = await requestSystemAudioAccess();- if (!granted) {- setShowPermissionDialog(true);- return;- }- }- await connect();- },- [needsSystemAudioGrant, requestSystemAudioAccess]- );-- const handleConnect = useCallback(- () => withSystemAudioGate(startOAuth),- [withSystemAudioGate, startOAuth]- );-- const handleMicrosoftConnect = useCallback(- () => withSystemAudioGate(startMicrosoftOAuth),- [withSystemAudioGate, startMicrosoftOAuth]- );-- const handleAppleConnect = useCallback(- () => withSystemAudioGate(connectAppleCalendar),- [withSystemAudioGate, connectAppleCalendar]+ const connectorAccess = useConnectorAccess();+ const readyConnectors = useConnectorStatusStore(+ (state) =>+ CONNECTOR_ROWS.filter((row) => {+ const status = state.statuses[row.id];+ return status?.connected && !status.needsReconnect;+ }).length);-- const handleAppleDisconnect = useCallback(async () => {- await window.electronAPI?.acalDisconnect?.();- setAppleCalendarConnected(false);- setAppleSourceNames([]);- }, [setAppleCalendarConnected]);-- const handleDisconnect = useCallback(- async (email: string) => {- setDisconnectingEmail(email);- try {- await window.electronAPI?.gcalDisconnect?.(email);- const current = useSettingsStore.getState().gcalAccounts;- setGcalAccounts(current.filter((a) => a.email !== email));- } finally {- setDisconnectingEmail(null);- }- },- [setGcalAccounts]+ const connectedCalendars = useSettingsStore(+ (state) =>+ [+ state.gcalAccounts.length > 0,+ state.mcalAccounts.length > 0,+ isMac && state.appleCalendarConnected,+ ].filter(Boolean).length);-- const handleMicrosoftDisconnect = useCallback(- async (email: string) => {- setMsDisconnectingEmail(email);- try {- await window.electronAPI?.mcalDisconnect?.(email);- const current = useSettingsStore.getState().mcalAccounts;- setMcalAccounts(current.filter((a) => a.email !== email));- } finally {- setMsDisconnectingEmail(null);- }- },- [setMcalAccounts]+ // A section stays mounted once opened, so a connect or dialog in it survives+ // a visit to another section. Calendars always mounts: its connection+ // listeners keep the nav's count fresh, as when Integrations was one page.+ const [mounted, setMounted] = useState<ReadonlySet<IntegrationsSection>>(+ () => new Set<IntegrationsSection>(["calendars", section]));+ if (!mounted.has(section)) setMounted(new Set(mounted).add(section));+ const [createKeyRequest, setCreateKeyRequest] = useState(0);+ const scroller = useRef<HTMLDivElement>(null);+ const paneElements = useRef<Partial<Record<IntegrationsSection, HTMLDivElement | null>>>({});+ const focusOpenedSection = useRef(false);+ // The nav counts connected logins on every section, not only once Connectors has mounted.useEffect(() => {- const unsub = window.electronAPI?.onGcalConnectionChanged?.(- (data: {- accounts?: Array<{ email: string }>;- connected?: boolean;- email?: string | null;- }) => {- if (data.accounts) {- setGcalAccounts(data.accounts);- } else if (data.connected && data.email) {- const current = useSettingsStore.getState().gcalAccounts;- setGcalAccounts([- ...current.filter((a) => a.email !== data.email),- { email: data.email },- ]);- }- }- );- return () => unsub?.();- }, [setGcalAccounts]);-- useEffect(() => {- const unsub = window.electronAPI?.onMcalConnectionChanged?.(- (data: { accounts?: MicrosoftCalendarAccount[] }) => {- if (data.accounts) setMcalAccounts(data.accounts);- }- );- return () => unsub?.();- }, [setMcalAccounts]);+ void ensureConnectorStatus();+ }, []);useEffect(() => {- if (!isMac) return;- window.electronAPI?.acalGetConnectionStatus?.().then((status) => {- if (status) {- setAppleCalendarConnected(status.connected);- setAppleSourceNames(status.sourceNames);- }- });- const unsub = window.electronAPI?.onAcalConnectionChanged?.((data) => {- setAppleCalendarConnected(data.connected);- setAppleSourceNames(data.sourceNames ?? []);- });- return () => unsub?.();- }, [isMac, setAppleCalendarConnected]);-- return (- <div className={cn(PAGE_CONTENT_WIDTH_CLASS, "px-6 py-6 space-y-5")}>- <p className="text-xs text-muted-foreground/70">{t("integrations.description")}</p>-- <div>- <SectionLabel>{t("integrations.sections.connectors")}</SectionLabel>+ if (scroller.current) scroller.current.scrollTop = 0;+ if (!focusOpenedSection.current) return;+ focusOpenedSection.current = false;+ paneElements.current[section]?.querySelector("h2")?.focus();+ }, [section]);++ // A link inside a section is hidden along with it, so focus moves to the+ // opened section's heading instead of dropping to the page.+ const openSection = (next: IntegrationsSection): void => {+ focusOpenedSection.current = true;+ onSectionChange(next);+ };++ const meta = Object.fromEntries(+ INTEGRATIONS_SECTIONS.map((id) => [+ id,+ sectionMeta(id, {+ isPaid,+ connectors: { ...connectorAccess, ready: readyConnectors },+ connectedCalendars,+ }),+ ])+ ) as Record<IntegrationsSection, SectionMeta | null>;+ const titleOf = (id: IntegrationsSection): string => t(`integrations.nav.sections.${id}`);++ const panes: Record<IntegrationsSection, ReactNode> = {+ connectors: (+ <IntegrationsPane+ title={titleOf("connectors")}+ description={t("integrations.connectors.description")}+ ><ConnectorsSection onUpgrade={onUpgrade} />- </div>-- <div>- <SectionLabel>{t("integrations.sections.calendar")}</SectionLabel>- <SettingsPanel>- <ProviderRow- icon={googleCalendarIcon}- i18nKey="integrations.googleCalendar"- connected={hasAccounts}- isConnecting={isConnecting}- onConnect={handleConnect}- />- <CalendarAccountRows- i18nKey="integrations.googleCalendar"- accounts={gcalAccounts}- disconnectingEmail={disconnectingEmail}- onUnlink={setConfirmDisconnectEmail}- primaryOnly={gcalPrimaryOnly}- onPrimaryOnlyChange={setGcalPrimaryOnly}- isConnecting={isConnecting}- onAddAnother={handleConnect}- />-- <ProviderRow- icon={microsoftCalendarIcon}- i18nKey="integrations.microsoftCalendar"- connected={mcalAccounts.length > 0}- isConnecting={isMsConnecting}- onConnect={handleMicrosoftConnect}- />- <CalendarAccountRows- i18nKey="integrations.microsoftCalendar"- accounts={mcalAccounts}- disconnectingEmail={msDisconnectingEmail}- onUnlink={setConfirmMsDisconnectEmail}- primaryOnly={mcalPrimaryOnly}- onPrimaryOnlyChange={setMcalPrimaryOnly}- isConnecting={isMsConnecting}- onAddAnother={handleMicrosoftConnect}- />-- {isMac && (- <ProviderRow- icon={appleCalendarIcon}- i18nKey="integrations.appleCalendar"- connected={appleCalendarConnected}- isConnecting={isAppleConnecting}- onConnect={handleAppleConnect}- />- )}-- {isMac && appleCalendarConnected && (- <SettingsPanelRow>- <div className="group flex items-center gap-3 ps-12">- <CalendarDays className="h-3.5 w-3.5 text-muted-foreground/70 shrink-0" />- <span className="text-xs text-muted-foreground truncate flex-1">- {appleSourceNames.join(" · ")}- </span>- <button- onClick={() => setConfirmAppleDisconnect(true)}- className="opacity-0 group-hover:opacity-100 p-1 rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-all"- aria-label={t("integrations.appleCalendar.disconnect")}- >- <Unlink className="h-3.5 w-3.5" />- </button>- </div>- </SettingsPanelRow>- )}- </SettingsPanel>- </div>-- <div>- <SectionLabel>{t("integrations.sections.api")}</SectionLabel>- <SettingsPanel>- <SettingsPanelRow>- <div className="flex items-center gap-3">- <div className="w-9 h-9 rounded-lg bg-primary/5 dark:bg-primary/10 flex items-center justify-center shrink-0">- <Code2 className="h-4 w-4 text-primary/80" strokeWidth={2} />- </div>- <div className="flex-1 min-w-0">- <p className="text-xs font-semibold text-foreground">- {t("integrations.api.title")}- </p>- <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">- {isPaid ? t("integrations.api.description") : t("integrations.api.proRequired")}- </p>- </div>- {isPaid ? (- <Button- variant="outline"- size="sm"- onClick={() => setApiKeysDialogOpen(true)}- className="shrink-0"- >- {t("integrations.api.manage")}- </Button>- ) : (- <Button size="sm" onClick={onUpgrade} className="shrink-0">- {t("integrations.api.viewPlans")}- </Button>- )}- </div>- </SettingsPanelRow>- </SettingsPanel>- </div>-- <div>- <SectionLabel>{t("integrations.sections.mcp")}</SectionLabel>- <McpIntegrationCard isPaid={isPaid} onUpgrade={onUpgrade} />- </div>-- <div>- <SectionLabel>{t("integrations.sections.cli")}</SectionLabel>- <CliIntegrationCard isPaid={isPaid} onUpgrade={onUpgrade} />- </div>-- {!hasAccounts && (- <div className="rounded-lg border border-border/70 dark:border-border-subtle/60 bg-muted/20 dark:bg-surface-2/30 p-4 flex items-start gap-3">- <Info size={15} className="text-primary/60 shrink-0 mt-0.5" />- <div className="flex-1 min-w-0">- <p className="text-xs font-medium text-foreground/80">- {t("integrations.notABot.title")}- </p>- <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">- {t("integrations.notABot.description")}- </p>- </div>- </div>- )}-- <Dialog open={apiKeysDialogOpen} onOpenChange={setApiKeysDialogOpen}>- <DialogContent className="sm:max-w-2xl">- <DialogHeader>- <DialogTitle>{t("integrations.api.dialogTitle")}</DialogTitle>- <DialogDescription asChild>- <span className="text-xs text-muted-foreground/80 leading-relaxed">- {t("apiKeysSection.description")}- <span className="mx-1.5 text-muted-foreground/70">·</span>+ </IntegrationsPane>+ ),+ calendars: <CalendarsPane title={titleOf("calendars")} />,+ api: (+ <IntegrationsPane+ title={titleOf("api")}+ description={t("integrations.api.description")}+ actions={+ <Button+ variant="ghost"+ size="sm"+ onClick={() => window.electronAPI?.openExternal?.(API_DOCS_URL)}+ className="gap-1.5 text-muted-foreground"+ >+ {t("apiKeysSection.docsLink")}+ <ExternalLink className="h-3 w-3" />+ </Button>+ }+ >+ {isPaid ? (+ <>+ <ApiKeysSection createRequest={createKeyRequest} />+ <div className="flex flex-wrap items-center gap-x-3 gap-y-1 ps-1 text-xs text-muted-foreground">+ <span>{t("integrations.api.useWith")}</span>+ {(+ [+ ["mcp", McpIcon],+ ["cli", CliIcon],+ ] as const+ ).map(([id, Icon]) => (<button+ key={id}type="button"- className="inline-flex items-center gap-1 text-primary/80 hover:text-primary transition-colors"- onClick={() => window.electronAPI?.openExternal?.(API_DOCS_URL)}+ onClick={() => openSection(id)}+ className="inline-flex items-center gap-1 rounded-sm text-primary/80 hover:text-primary outline-none focus-visible:ring-1 focus-visible:ring-primary/30 transition-colors">- {t("apiKeysSection.docsLink")}+ <Icon size={13} />+ {titleOf(id)}</button>- </span>- </DialogDescription>- </DialogHeader>- <ApiKeysSection />- </DialogContent>- </Dialog>-- <ConfirmDialog- open={!!confirmDisconnectEmail}- onOpenChange={(open) => {- if (!open) setConfirmDisconnectEmail(null);- }}- title={- <BidiInterpolatedText- text={t("integrations.googleCalendar.disconnectConfirm", {- email: BIDI_VALUE_TOKEN,- })}- value={confirmDisconnectEmail}- />- }- description={t("integrations.googleCalendar.disconnectDescription")}- confirmText={t("integrations.googleCalendar.disconnect")}- variant="destructive"- onConfirm={() => {- if (confirmDisconnectEmail) handleDisconnect(confirmDisconnectEmail);- }}- />-- <ConfirmDialog- open={!!confirmMsDisconnectEmail}- onOpenChange={(open) => {- if (!open) setConfirmMsDisconnectEmail(null);- }}- title={- <BidiInterpolatedText- text={t("integrations.microsoftCalendar.disconnectConfirm", {- email: BIDI_VALUE_TOKEN,- })}- value={confirmMsDisconnectEmail}- />- }- description={t("integrations.microsoftCalendar.disconnectDescription")}- confirmText={t("integrations.microsoftCalendar.disconnect")}- variant="destructive"- onConfirm={() => {- if (confirmMsDisconnectEmail) handleMicrosoftDisconnect(confirmMsDisconnectEmail);+ ))}+ </div>+ </>+ ) : (+ <UpsellBar message={t("integrations.api.proRequired")} onUpgrade={onUpgrade} />+ )}+ </IntegrationsPane>+ ),+ mcp: (+ <McpPane+ title={titleOf("mcp")}+ isPaid={isPaid}+ onUpgrade={onUpgrade}+ onCreateKey={() => {+ setCreateKeyRequest((request) => request + 1);+ openSection("api");}}/>+ ),+ cli: <CliPane title={titleOf("cli")} isPaid={isPaid} onUpgrade={onUpgrade} />,+ };- <ConfirmDialog- open={showPermissionDialog}- onOpenChange={setShowPermissionDialog}- title={t("integrations.googleCalendar.systemAudioRequired")}- description={t("integrations.googleCalendar.systemAudioDescription")}- confirmText={- systemAudio.mode === "native"- ? t("integrations.googleCalendar.openSettings")- : t("onboarding.permissions.grantAccess")- }- onConfirm={systemAudio.mode === "native" ? systemAudio.openSettings : systemAudio.request}- />-- <ConfirmDialog- open={confirmAppleDisconnect}- onOpenChange={setConfirmAppleDisconnect}- title={t("integrations.appleCalendar.disconnectConfirm")}- description={t("integrations.appleCalendar.disconnectDescription")}- confirmText={t("integrations.appleCalendar.disconnect")}- variant="destructive"- onConfirm={handleAppleDisconnect}- />-- <ConfirmDialog- open={appleConnectError === "denied"}- onOpenChange={(open) => !open && setAppleConnectError(null)}- title={t("integrations.appleCalendar.permissionDenied")}- description={t("integrations.appleCalendar.permissionDeniedDescription")}- confirmText={t("integrations.appleCalendar.openSettings")}- onConfirm={() => window.electronAPI?.openCalendarPrivacySettings?.()}+ return (+ <div className="@container flex h-full min-h-0">+ <IntegrationsNav+ active={section}+ meta={meta}+ onSelect={onSectionChange}+ className="@max-2xl:hidden"/>- <AlertDialog- open={appleConnectError === "failed"}- onOpenChange={(open) => !open && setAppleConnectError(null)}- title={t("integrations.appleCalendar.connectFailed")}- description={t("integrations.appleCalendar.connectFailedDescription")}- onOk={() => {}}- />+ <div className="flex-1 min-w-0 flex flex-col">+ {/* Outside the scroller, so it stays in view and keeps focus after a pick. */}+ <div className="px-5 pt-2 pb-2 @2xl:hidden">+ <Select+ value={section}+ onValueChange={(value) => onSectionChange(value as IntegrationsSection)}+ >+ <SelectTrigger+ className="h-8 w-full text-xs rounded-lg"+ aria-label={t("integrations.nav.label")}+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {INTEGRATIONS_SECTIONS.map((id) => (+ <SelectItem key={id} value={id}>+ {titleOf(id)}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>- <AlertDialog- open={!!oauthErrorKey}- onOpenChange={(open) => !open && setOauthErrorKey(null)}- title={oauthErrorKey ? t(`${oauthErrorKey}.connectFailed`) : ""}- description={oauthErrorKey ? t(`${oauthErrorKey}.connectFailedDescription`) : ""}- onOk={() => {}}- />+ <div ref={scroller} className="flex-1 min-h-0 overflow-y-auto px-8 pt-2 pb-6 @max-2xl:px-5">+ <div className="max-w-[760px]">+ {INTEGRATIONS_SECTIONS.filter((id) => mounted.has(id)).map((id) => (+ <div+ key={id}+ ref={(element) => {+ paneElements.current[id] = element;+ }}+ hidden={id !== section}+ >+ {panes[id]}+ </div>+ ))}+ </div>+ </div>+ </div></div>);}diff --git a/src/components/McpIntegrationCard.tsx b/src/components/McpIntegrationCard.tsxdeleted file mode 100644index 1a2733a5b..000000000--- a/src/components/McpIntegrationCard.tsx+++ /dev/null@@ -1,105 +0,0 @@-import { useState } from "react";-import { useTranslation } from "react-i18next";-import { Check, Copy, ExternalLink, Plus } from "./icons";-import { Badge } from "./ui/badge";-import { Button } from "./ui/button";-import { LogoTile } from "./ui/LogoTile";-import { useToast } from "./ui/useToast";-import logo from "../assets/logo.svg";-import claudeIcon from "../assets/icons/providers/claude.svg";-import openaiIcon from "../assets/icons/providers/openai.svg";-import cursorIcon from "../assets/icons/providers/cursor.svg";--const MCP_URL = "https://mcp.openwhispr.com/mcp";-const MCP_DOCS_URL = "https://docs.openwhispr.com/integrations/mcp";--interface McpIntegrationCardProps {- isPaid: boolean;- onUpgrade: () => void;-}--export default function McpIntegrationCard({ isPaid, onUpgrade }: McpIntegrationCardProps) {- const { t } = useTranslation();- const { toast } = useToast();- const [copied, setCopied] = useState(false);-- const handleCopy = async () => {- try {- await navigator.clipboard.writeText(MCP_URL);- setCopied(true);- toast({ title: t("integrations.mcp.copied"), variant: "success", duration: 2000 });- setTimeout(() => setCopied(false), 2000);- } catch {- /* noop */- }- };-- return (- <div className="rounded-lg border border-border/70 dark:border-border-subtle/70 bg-card/50 dark:bg-surface-2/50 backdrop-blur-sm p-4">- <div className="flex items-center gap-2 mb-4">- <LogoTile src={logo} alt="OpenWhispr" />- <Plus className="h-3 w-3 text-muted-foreground/70 shrink-0" />- <div className="flex items-center gap-1">- <LogoTile src={claudeIcon} alt="Claude" monochrome />- <LogoTile src={openaiIcon} alt="ChatGPT" monochrome />- <LogoTile src={cursorIcon} alt="Cursor" monochrome />- </div>- </div>-- <div className="flex items-center gap-1.5 mb-1">- <h3 className="text-sm font-semibold text-foreground">{t("integrations.mcp.title")}</h3>- {!isPaid && (- <Badge variant="outline" className="text-[10px] px-1.5 py-0 font-normal">- {t("integrations.plan.pro")}- </Badge>- )}- </div>- <p className="text-xs text-muted-foreground/70 mb-4 leading-relaxed">- {isPaid ? t("integrations.mcp.description") : t("integrations.mcp.proRequired")}- </p>-- {isPaid && (- <ol className="space-y-1.5 text-xs text-muted-foreground mb-4 list-decimal ps-4 marker:text-muted-foreground/70">- <li className="leading-relaxed">- {t("integrations.mcp.step1")}{" "}- <span- dir="ltr"- className="inline-flex items-center gap-1 rounded-md border border-primary/15 bg-primary/5 px-1.5 py-0.5 font-mono text-[10.5px] text-foreground align-middle"- >- {MCP_URL}- <button- type="button"- onClick={handleCopy}- aria-label={t("integrations.mcp.copyUrl")}- className="p-0.5 rounded transition-colors hover:bg-primary/10 text-muted-foreground hover:text-foreground"- >- {copied ? (- <Check className="h-2.5 w-2.5 text-success" />- ) : (- <Copy className="h-2.5 w-2.5" />- )}- </button>- </span>- </li>- <li className="leading-relaxed">{t("integrations.mcp.step2")}</li>- <li className="leading-relaxed">{t("integrations.mcp.step3")}</li>- </ol>- )}-- {isPaid ? (- <Button- size="sm"- onClick={() => window.electronAPI?.openExternal?.(MCP_DOCS_URL)}- className="gap-1.5"- >- {t("integrations.mcp.learnMore")}- <ExternalLink className="h-3 w-3" />- </Button>- ) : (- <Button size="sm" onClick={onUpgrade}>- {t("integrations.mcp.viewPlans")}- </Button>- )}- </div>- );-}diff --git a/src/components/connectors/BetaBadge.tsx b/src/components/connectors/BetaBadge.tsxnew file mode 100644index 000000000..6239cc375--- /dev/null+++ b/src/components/connectors/BetaBadge.tsx@@ -0,0 +1,11 @@+import type { ReactElement } from "react";+import { useTranslation } from "react-i18next";+import { Badge } from "../ui/badge";++/** The pill beside every connector's name while connectors are in beta. */+export function BetaBadge(): ReactElement {+ const { t } = useTranslation();+ return (+ <Badge className="px-1.5 py-0 text-[10px] font-medium leading-4">{t("connectors.beta")}</Badge>+ );+}diff --git a/src/components/connectors/ConnectorLoginRow.tsx b/src/components/connectors/ConnectorLoginRow.tsxindex 5cce5ede6..c0a1ed211 100644--- a/src/components/connectors/ConnectorLoginRow.tsx+++ b/src/components/connectors/ConnectorLoginRow.tsx@@ -1,8 +1,10 @@import { useEffect, useRef, useState, type ReactElement } from "react";import { useTranslation } from "react-i18next";+import { Lock } from "../icons";import { Button } from "../ui/button";import { SettingsPanelRow } from "../ui/SettingsSection";import { RecentActions } from "./RecentActions";+import { BetaBadge } from "./BetaBadge";import { ensureConnectorStatus, useConnectorStatusStore } from "../../stores/connectorStatusStore";import type { ConnectorRowSpec } from "./connectorRows";@@ -40,19 +42,17 @@ export interface ConnectorLoginRowProps {row: ConnectorRowSpec;isPaid: boolean;blockedByOrg: boolean;- onUpgrade: () => void;}/*** One connector's login in Settings → Connectors: Connect, Reconnect,- * Disconnect, the plan upsell and its recent actions. Copy lives under- * `connectors.<connectorId>.*`.+ * Disconnect, the locked state on a free plan and its recent actions. Copy+ * lives under `connectors.<connectorId>.*`.*/export function ConnectorLoginRow({row,isPaid,blockedByOrg,- onUpgrade,}: ConnectorLoginRowProps): ReactElement | null {const {id: connectorId,@@ -205,13 +205,16 @@ export function ConnectorLoginRow({if (phase === "connecting" && (!connected || needsReconnect)) summary = copy("connecting");else if (needsReconnect) summary = copy("needsReconnect");else if (connected && status) summary = copy("connectedAs", accountSummary(status));- else if (!isPaid) summary = copy("proRequired");+ // A free plan sees the connector dimmed, without Connect; the section's one upsell sits above.+ // Only what describes the connector dims: notes about a login just removed stay readable.+ const locked = !isPaid && !connected;+ const dimmed = locked ? "opacity-60" : "";return (<SettingsPanelRow><div className="flex items-center gap-3"><div- className={`w-9 h-9 rounded-lg flex items-center justify-center shrink-0 ${+ className={`w-9 h-9 rounded-lg flex items-center justify-center shrink-0 ${dimmed} ${brandIcon? "bg-white dark:bg-surface-raised shadow-[0_0_0_1px_rgba(0,0,0,0.04)] dark:shadow-none dark:border dark:border-white/10": "bg-primary/5 dark:bg-primary/10"@@ -220,10 +223,15 @@ export function ConnectorLoginRow({{icon}</div><div className="flex-1 min-w-0">- <p className="text-xs font-semibold text-foreground">{copy("title")}</p>- <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed" dir="auto">- {summary}- </p>+ <div className={dimmed}>+ <div className="flex items-center gap-1.5">+ <p className="text-xs font-semibold text-foreground">{copy("title")}</p>+ <BetaBadge />+ </div>+ <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed" dir="auto">+ {summary}+ </p>+ </div>{phase === "connecting" && ConnectingDetail && (<div ref={connectingDetail}><ConnectingDetail connectorId={connectorId} />@@ -267,10 +275,13 @@ export function ConnectorLoginRow({{copy("connect")}</Button>)}- {!connected && !isPaid && (- <Button size="sm" className="shrink-0" onClick={onUpgrade}>- {t("integrations.api.viewPlans")}- </Button>+ {locked && (+ <Lock+ size={14}+ role="img"+ aria-label={t("connectors.locked")}+ className="text-muted-foreground opacity-60"+ />)}</div></div>diff --git a/src/components/connectors/connectorRows.tsx b/src/components/connectors/connectorRows.tsxindex bb6faba97..0c5fe97cc 100644--- a/src/components/connectors/connectorRows.tsx+++ b/src/components/connectors/connectorRows.tsx@@ -1,6 +1,8 @@import type { ComponentType, ReactNode } from "react";import gmailMark from "../../assets/icons/gmail.svg";-import { CheckCircle, Code2, MessageSquare } from "../icons";+import slackMark from "../../assets/icons/slack.svg";+import linearMark from "../../assets/icons/linear.svg";+import githubMark from "../../assets/icons/github.svg";import type { ConnectorStatus } from "../../types/connectors";import { GithubDeviceCode } from "./GithubDeviceCode";import { GithubRepositoriesButton } from "./GithubRepositoriesButton";@@ -41,11 +43,27 @@ export function accountWorkspaceSummary(return { account: status.accountLabel ?? "", workspace: status.workspaceLabel ?? "" };}-const ICON_CLASS = "w-4 h-4 text-primary";+/** A brand mark for a white tile; `className` sets its size (and `icon-monochrome` for one-colour marks). */+function brandMark(src: string, width: number, height: number, className: string): ReactNode {+ return (+ <img+ src={src}+ alt=""+ aria-hidden="true"+ width={width}+ height={height}+ decoding="async"+ draggable={false}+ className={`shrink-0 select-none ${className}`}+ />+ );+}const githubRow: ConnectorRowSpec = {id: "github",- icon: <Code2 className={ICON_CLASS} aria-hidden="true" />,+ brandIcon: true,+ // GitHub's mark is black only; icon-monochrome inverts it in dark mode.+ icon: brandMark(githubMark, 18, 18, "h-[18px] w-[18px] icon-monochrome"),// getStatus reports the installed repository count as workspaceLabel, or// null when the installations couldn't be read. The i18next context picks// connectedAs_empty ("no repositories yet") or connectedAs_unknown (no@@ -70,28 +88,20 @@ export const CONNECTOR_ROWS: readonly ConnectorRowSpec[] = [// Gmail's mark, like the calendar rows' brand marks: the generic// envelope is the "Email drafts" row just above.brandIcon: true,- icon: (- <img- src={gmailMark}- alt=""- aria-hidden="true"- width={20}- height={15}- decoding="async"- draggable={false}- className="h-[15px] w-5 shrink-0 select-none"- />- ),+ icon: brandMark(gmailMark, 20, 15, "h-[15px] w-5"),accountSummary: accountLabelSummary,},{id: "slack",- icon: <MessageSquare className={ICON_CLASS} aria-hidden="true" />,+ brandIcon: true,+ icon: brandMark(slackMark, 18, 18, "h-[18px] w-[18px]"),accountSummary: accountWorkspaceSummary,},{id: "linear",- icon: <CheckCircle className={ICON_CLASS} aria-hidden="true" />,+ brandIcon: true,+ // Linear's mark is one colour; icon-monochrome inverts it in dark mode.+ icon: brandMark(linearMark, 16, 16, "h-4 w-4 icon-monochrome"),accountSummary: accountWorkspaceSummary,},githubRow,diff --git a/src/components/integrations/CalendarsPane.tsx b/src/components/integrations/CalendarsPane.tsxnew file mode 100644index 000000000..580b4d49e--- /dev/null+++ b/src/components/integrations/CalendarsPane.tsx@@ -0,0 +1,490 @@+import { useState, useEffect, useCallback, type ReactElement } from "react";+import { useTranslation } from "react-i18next";+import { CalendarDays, Loader2, Mail, Plus, Unlink } from "../icons";+import { Button } from "../ui/button";+import { BIDI_VALUE_TOKEN, BidiInterpolatedText } from "../ui/BidiInterpolatedText";+import { Badge } from "../ui/badge";+import { SettingsPanel, SettingsPanelRow, SettingsRow } from "../ui/SettingsSection";+import { Toggle } from "../ui/toggle";+import { AlertDialog, ConfirmDialog } from "../ui/dialog";+import { useSettingsStore } from "../../stores/settingsStore";+import { useSystemAudioPermission } from "../../hooks/useSystemAudioPermission";+import { canManageSystemAudioInApp } from "../../utils/systemAudioAccess";+import type { CalendarAccount, MicrosoftCalendarAccount } from "../../types/calendar";+import { IntegrationsPane } from "./IntegrationsPane";+import googleCalendarIcon from "../../assets/icons/google-calendar.svg";+import microsoftCalendarIcon from "../../assets/icons/microsoft-calendar.svg";+import appleCalendarIcon from "../../assets/icons/apple-calendar.svg";++interface ProviderRowProps {+ icon: string;+ i18nKey: string;+ connected: boolean;+ isConnecting: boolean;+ onConnect: () => void;+}++function ProviderRow({ icon, i18nKey, connected, isConnecting, onConnect }: ProviderRowProps) {+ const { t } = useTranslation();+ return (+ <SettingsPanelRow>+ <div className="flex items-center gap-3">+ <div className="w-9 h-9 rounded-lg bg-white dark:bg-surface-raised shadow-[0_0_0_1px_rgba(0,0,0,0.04)] dark:shadow-none dark:border dark:border-white/10 flex items-center justify-center shrink-0">+ <img src={icon} alt="" className="w-5 h-5" />+ </div>+ <div className="flex-1 min-w-0">+ <p className="text-xs font-semibold text-foreground">{t(`${i18nKey}.title`)}</p>+ <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">+ {t(`${i18nKey}.description`)}+ </p>+ </div>+ {connected ? (+ <Badge variant="success" className="shrink-0">+ {t(`${i18nKey}.connected`)}+ </Badge>+ ) : (+ <Button size="sm" onClick={onConnect} disabled={isConnecting} className="shrink-0">+ {isConnecting ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ t(`${i18nKey}.connect`)+ )}+ </Button>+ )}+ </div>+ </SettingsPanelRow>+ );+}++interface CalendarAccountRowsProps {+ i18nKey: string;+ accounts: CalendarAccount[];+ disconnectingEmail: string | null;+ onUnlink: (email: string) => void;+ primaryOnly: boolean;+ onPrimaryOnlyChange: (value: boolean) => void;+ isConnecting: boolean;+ onAddAnother: () => void;+}++function CalendarAccountRows({+ i18nKey,+ accounts,+ disconnectingEmail,+ onUnlink,+ primaryOnly,+ onPrimaryOnlyChange,+ isConnecting,+ onAddAnother,+}: CalendarAccountRowsProps) {+ const { t } = useTranslation();+ if (accounts.length === 0) return null;+ return (+ <>+ {accounts.map((account) => (+ <SettingsPanelRow key={account.email}>+ <div className="group flex items-center gap-3 ps-12">+ <Mail className="h-3.5 w-3.5 text-muted-foreground/70 shrink-0" />+ <span className="text-xs text-muted-foreground truncate flex-1">+ <bdi dir="ltr">{account.email}</bdi>+ </span>+ <button+ onClick={() => onUnlink(account.email)}+ disabled={disconnectingEmail === account.email}+ className="opacity-0 group-hover:opacity-100 focus-visible:opacity-100 p-1 rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-all disabled:opacity-50"+ aria-label={t(`${i18nKey}.disconnect`)}+ >+ {disconnectingEmail === account.email ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ <Unlink className="h-3.5 w-3.5" />+ )}+ </button>+ </div>+ </SettingsPanelRow>+ ))}++ <SettingsPanelRow>+ <SettingsRow+ label={t(`${i18nKey}.primaryOnly`)}+ description={t(`${i18nKey}.primaryOnlyDescription`)}+ >+ <Toggle checked={primaryOnly} onChange={onPrimaryOnlyChange} />+ </SettingsRow>+ </SettingsPanelRow>++ <SettingsPanelRow>+ <button+ onClick={onAddAnother}+ disabled={isConnecting}+ className="flex items-center gap-2 ps-12 text-xs text-primary hover:text-primary/80 transition-colors disabled:opacity-50"+ >+ {isConnecting ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ <Plus className="h-3.5 w-3.5" />+ )}+ {t(`${i18nKey}.addAnother`)}+ </button>+ </SettingsPanelRow>+ </>+ );+}++interface CalendarsPaneProps {+ title: string;+}++export function CalendarsPane({ title }: CalendarsPaneProps): ReactElement {+ const { t } = useTranslation();+ const {+ gcalAccounts,+ setGcalAccounts,+ gcalPrimaryOnly,+ setGcalPrimaryOnly,+ mcalAccounts,+ setMcalAccounts,+ mcalPrimaryOnly,+ setMcalPrimaryOnly,+ appleCalendarConnected,+ setAppleCalendarConnected,+ } = useSettingsStore();+ const [isConnecting, setIsConnecting] = useState(false);+ const [disconnectingEmail, setDisconnectingEmail] = useState<string | null>(null);+ const [confirmDisconnectEmail, setConfirmDisconnectEmail] = useState<string | null>(null);+ const [isMsConnecting, setIsMsConnecting] = useState(false);+ const [msDisconnectingEmail, setMsDisconnectingEmail] = useState<string | null>(null);+ const [confirmMsDisconnectEmail, setConfirmMsDisconnectEmail] = useState<string | null>(null);+ const [showPermissionDialog, setShowPermissionDialog] = useState(false);+ const [isAppleConnecting, setIsAppleConnecting] = useState(false);+ const [appleSourceNames, setAppleSourceNames] = useState<string[]>([]);+ const [confirmAppleDisconnect, setConfirmAppleDisconnect] = useState(false);+ const [appleConnectError, setAppleConnectError] = useState<"denied" | "failed" | null>(null);+ // i18n prefix of the provider whose OAuth flow failed, e.g. "integrations.googleCalendar"+ const [oauthErrorKey, setOauthErrorKey] = useState<string | null>(null);+ const systemAudio = useSystemAudioPermission();+ const { request: requestSystemAudioAccess } = systemAudio;+ const needsSystemAudioGrant = !systemAudio.granted && canManageSystemAudioInApp(systemAudio);+ const isMac = window.electronAPI?.getPlatform?.() === "darwin";++ const startOAuth = useCallback(async () => {+ setIsConnecting(true);+ try {+ const result = await window.electronAPI?.gcalStartOAuth?.();+ if (result?.success && result.email) {+ const current = useSettingsStore.getState().gcalAccounts;+ setGcalAccounts([+ ...current.filter((a) => a.email !== result.email),+ { email: result.email },+ ]);+ } else if (!result?.error?.includes("access_denied")) {+ // access_denied means the user cancelled on the consent screen+ setOauthErrorKey("integrations.googleCalendar");+ }+ } finally {+ setIsConnecting(false);+ }+ }, [setGcalAccounts]);++ const startMicrosoftOAuth = useCallback(async () => {+ setIsMsConnecting(true);+ try {+ const result = await window.electronAPI?.mcalStartOAuth?.();+ if (result?.success && result.email) {+ const current = useSettingsStore.getState().mcalAccounts;+ setMcalAccounts([+ ...current.filter((a) => a.email !== result.email),+ { email: result.email, tenantId: result.tenantId },+ ]);+ } else if (!result?.error?.includes("access_denied")) {+ setOauthErrorKey("integrations.microsoftCalendar");+ }+ } finally {+ setIsMsConnecting(false);+ }+ }, [setMcalAccounts]);++ const connectAppleCalendar = useCallback(async () => {+ setIsAppleConnecting(true);+ try {+ const result = await window.electronAPI?.acalConnect?.();+ if (result?.success) {+ setAppleCalendarConnected(true);+ } else {+ // Only send the user to Privacy settings when access was actually+ // denied; helper-missing/snapshot-failed are not permission problems.+ setAppleConnectError(result?.reason === "denied" ? "denied" : "failed");+ }+ } finally {+ setIsAppleConnecting(false);+ }+ }, [setAppleCalendarConnected]);++ const withSystemAudioGate = useCallback(+ async (connect: () => Promise<void>) => {+ if (needsSystemAudioGrant) {+ const granted = await requestSystemAudioAccess();+ if (!granted) {+ setShowPermissionDialog(true);+ return;+ }+ }+ await connect();+ },+ [needsSystemAudioGrant, requestSystemAudioAccess]+ );++ const handleConnect = useCallback(+ () => withSystemAudioGate(startOAuth),+ [withSystemAudioGate, startOAuth]+ );++ const handleMicrosoftConnect = useCallback(+ () => withSystemAudioGate(startMicrosoftOAuth),+ [withSystemAudioGate, startMicrosoftOAuth]+ );++ const handleAppleConnect = useCallback(+ () => withSystemAudioGate(connectAppleCalendar),+ [withSystemAudioGate, connectAppleCalendar]+ );++ const handleAppleDisconnect = useCallback(async () => {+ await window.electronAPI?.acalDisconnect?.();+ setAppleCalendarConnected(false);+ setAppleSourceNames([]);+ }, [setAppleCalendarConnected]);++ const handleDisconnect = useCallback(+ async (email: string) => {+ setDisconnectingEmail(email);+ try {+ await window.electronAPI?.gcalDisconnect?.(email);+ const current = useSettingsStore.getState().gcalAccounts;+ setGcalAccounts(current.filter((a) => a.email !== email));+ } finally {+ setDisconnectingEmail(null);+ }+ },+ [setGcalAccounts]+ );++ const handleMicrosoftDisconnect = useCallback(+ async (email: string) => {+ setMsDisconnectingEmail(email);+ try {+ await window.electronAPI?.mcalDisconnect?.(email);+ const current = useSettingsStore.getState().mcalAccounts;+ setMcalAccounts(current.filter((a) => a.email !== email));+ } finally {+ setMsDisconnectingEmail(null);+ }+ },+ [setMcalAccounts]+ );++ useEffect(() => {+ const unsub = window.electronAPI?.onGcalConnectionChanged?.(+ (data: {+ accounts?: Array<{ email: string }>;+ connected?: boolean;+ email?: string | null;+ }) => {+ if (data.accounts) {+ setGcalAccounts(data.accounts);+ } else if (data.connected && data.email) {+ const current = useSettingsStore.getState().gcalAccounts;+ setGcalAccounts([+ ...current.filter((a) => a.email !== data.email),+ { email: data.email },+ ]);+ }+ }+ );+ return () => unsub?.();+ }, [setGcalAccounts]);++ useEffect(() => {+ const unsub = window.electronAPI?.onMcalConnectionChanged?.(+ (data: { accounts?: MicrosoftCalendarAccount[] }) => {+ if (data.accounts) setMcalAccounts(data.accounts);+ }+ );+ return () => unsub?.();+ }, [setMcalAccounts]);++ useEffect(() => {+ if (!isMac) return;+ window.electronAPI?.acalGetConnectionStatus?.().then((status) => {+ if (status) {+ setAppleCalendarConnected(status.connected);+ setAppleSourceNames(status.sourceNames);+ }+ });+ const unsub = window.electronAPI?.onAcalConnectionChanged?.((data) => {+ setAppleCalendarConnected(data.connected);+ setAppleSourceNames(data.sourceNames ?? []);+ });+ return () => unsub?.();+ }, [isMac, setAppleCalendarConnected]);++ return (+ <IntegrationsPane title={title} description={t("integrations.notABot.description")}>+ <SettingsPanel>+ <ProviderRow+ icon={googleCalendarIcon}+ i18nKey="integrations.googleCalendar"+ connected={gcalAccounts.length > 0}+ isConnecting={isConnecting}+ onConnect={handleConnect}+ />+ <CalendarAccountRows+ i18nKey="integrations.googleCalendar"+ accounts={gcalAccounts}+ disconnectingEmail={disconnectingEmail}+ onUnlink={setConfirmDisconnectEmail}+ primaryOnly={gcalPrimaryOnly}+ onPrimaryOnlyChange={setGcalPrimaryOnly}+ isConnecting={isConnecting}+ onAddAnother={handleConnect}+ />++ <ProviderRow+ icon={microsoftCalendarIcon}+ i18nKey="integrations.microsoftCalendar"+ connected={mcalAccounts.length > 0}+ isConnecting={isMsConnecting}+ onConnect={handleMicrosoftConnect}+ />+ <CalendarAccountRows+ i18nKey="integrations.microsoftCalendar"+ accounts={mcalAccounts}+ disconnectingEmail={msDisconnectingEmail}+ onUnlink={setConfirmMsDisconnectEmail}+ primaryOnly={mcalPrimaryOnly}+ onPrimaryOnlyChange={setMcalPrimaryOnly}+ isConnecting={isMsConnecting}+ onAddAnother={handleMicrosoftConnect}+ />++ {isMac && (+ <ProviderRow+ icon={appleCalendarIcon}+ i18nKey="integrations.appleCalendar"+ connected={appleCalendarConnected}+ isConnecting={isAppleConnecting}+ onConnect={handleAppleConnect}+ />+ )}++ {isMac && appleCalendarConnected && (+ <SettingsPanelRow>+ <div className="group flex items-center gap-3 ps-12">+ <CalendarDays className="h-3.5 w-3.5 text-muted-foreground/70 shrink-0" />+ <span className="text-xs text-muted-foreground truncate flex-1">+ {appleSourceNames.join(" · ")}+ </span>+ <button+ onClick={() => setConfirmAppleDisconnect(true)}+ className="opacity-0 group-hover:opacity-100 focus-visible:opacity-100 p-1 rounded-md text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-all"+ aria-label={t("integrations.appleCalendar.disconnect")}+ >+ <Unlink className="h-3.5 w-3.5" />+ </button>+ </div>+ </SettingsPanelRow>+ )}+ </SettingsPanel>++ <ConfirmDialog+ open={!!confirmDisconnectEmail}+ onOpenChange={(open) => {+ if (!open) setConfirmDisconnectEmail(null);+ }}+ title={+ <BidiInterpolatedText+ text={t("integrations.googleCalendar.disconnectConfirm", {+ email: BIDI_VALUE_TOKEN,+ })}+ value={confirmDisconnectEmail}+ />+ }+ description={t("integrations.googleCalendar.disconnectDescription")}+ confirmText={t("integrations.googleCalendar.disconnect")}+ variant="destructive"+ onConfirm={() => {+ if (confirmDisconnectEmail) handleDisconnect(confirmDisconnectEmail);+ }}+ />++ <ConfirmDialog+ open={!!confirmMsDisconnectEmail}+ onOpenChange={(open) => {+ if (!open) setConfirmMsDisconnectEmail(null);+ }}+ title={+ <BidiInterpolatedText+ text={t("integrations.microsoftCalendar.disconnectConfirm", {+ email: BIDI_VALUE_TOKEN,+ })}+ value={confirmMsDisconnectEmail}+ />+ }+ description={t("integrations.microsoftCalendar.disconnectDescription")}+ confirmText={t("integrations.microsoftCalendar.disconnect")}+ variant="destructive"+ onConfirm={() => {+ if (confirmMsDisconnectEmail) handleMicrosoftDisconnect(confirmMsDisconnectEmail);+ }}+ />++ <ConfirmDialog+ open={showPermissionDialog}+ onOpenChange={setShowPermissionDialog}+ title={t("integrations.googleCalendar.systemAudioRequired")}+ description={t("integrations.googleCalendar.systemAudioDescription")}+ confirmText={+ systemAudio.mode === "native"+ ? t("integrations.googleCalendar.openSettings")+ : t("onboarding.permissions.grantAccess")+ }+ onConfirm={systemAudio.mode === "native" ? systemAudio.openSettings : systemAudio.request}+ />++ <ConfirmDialog+ open={confirmAppleDisconnect}+ onOpenChange={setConfirmAppleDisconnect}+ title={t("integrations.appleCalendar.disconnectConfirm")}+ description={t("integrations.appleCalendar.disconnectDescription")}+ confirmText={t("integrations.appleCalendar.disconnect")}+ variant="destructive"+ onConfirm={handleAppleDisconnect}+ />++ <ConfirmDialog+ open={appleConnectError === "denied"}+ onOpenChange={(open) => !open && setAppleConnectError(null)}+ title={t("integrations.appleCalendar.permissionDenied")}+ description={t("integrations.appleCalendar.permissionDeniedDescription")}+ confirmText={t("integrations.appleCalendar.openSettings")}+ onConfirm={() => window.electronAPI?.openCalendarPrivacySettings?.()}+ />++ <AlertDialog+ open={appleConnectError === "failed"}+ onOpenChange={(open) => !open && setAppleConnectError(null)}+ title={t("integrations.appleCalendar.connectFailed")}+ description={t("integrations.appleCalendar.connectFailedDescription")}+ onOk={() => {}}+ />++ <AlertDialog+ open={!!oauthErrorKey}+ onOpenChange={(open) => !open && setOauthErrorKey(null)}+ title={oauthErrorKey ? t(`${oauthErrorKey}.connectFailed`) : ""}+ description={oauthErrorKey ? t(`${oauthErrorKey}.connectFailedDescription`) : ""}+ onOk={() => {}}+ />+ </IntegrationsPane>+ );+}diff --git a/src/components/integrations/CliPane.tsx b/src/components/integrations/CliPane.tsxnew file mode 100644index 000000000..a8eb5951d--- /dev/null+++ b/src/components/integrations/CliPane.tsx@@ -0,0 +1,129 @@+import { useState, type ReactElement } from "react";+import { useTranslation } from "react-i18next";+import { Check, Copy, ExternalLink } from "../icons";+import { Badge } from "../ui/badge";+import { Button } from "../ui/button";+import { CopyableCommand } from "../ui/CopyableCommand";+import { SectionLabel, SettingsPanel, SettingsPanelRow } from "../ui/SettingsSection";+import { useToast } from "../ui/useToast";+import { IntegrationsPane } from "./IntegrationsPane";++const CLI_DOCS_URL = "https://docs.openwhispr.com/cli/install";+const INSTALL_CMD = "npm install -g @openwhispr/cli";+const LOCAL_EXAMPLE = "openwhispr --local notes list";+const CLOUD_LOGIN_CMD = "openwhispr auth login";++interface CliPaneProps {+ title: string;+ isPaid: boolean;+ onUpgrade: () => void;+}++export function CliPane({ title, isPaid, onUpgrade }: CliPaneProps): ReactElement {+ const { t } = useTranslation();+ const { toast } = useToast();+ const [docsLinkCopied, setDocsLinkCopied] = useState(false);++ const handleCopyDocsLink = async () => {+ try {+ await navigator.clipboard.writeText(CLI_DOCS_URL);+ setDocsLinkCopied(true);+ toast({+ title: t("integrations.cli.docsLinkCopied"),+ variant: "success",+ duration: 2000,+ });+ setTimeout(() => setDocsLinkCopied(false), 2000);+ } catch {+ /* noop */+ }+ };++ return (+ <IntegrationsPane+ title={title}+ description={t("integrations.cli.description")}+ actions={+ <>+ <Button+ variant="ghost"+ size="sm"+ onClick={handleCopyDocsLink}+ className="gap-1.5 text-muted-foreground"+ >+ {docsLinkCopied ? (+ <Check className="h-3 w-3 text-success" />+ ) : (+ <Copy className="h-3 w-3" />+ )}+ {t("integrations.cli.copyDocsLink")}+ </Button>+ <Button+ variant="outline"+ size="sm"+ onClick={() => window.electronAPI?.openExternal?.(CLI_DOCS_URL)}+ className="gap-1.5"+ >+ {t("integrations.cli.learnMore")}+ <ExternalLink className="h-3 w-3" />+ </Button>+ </>+ }+ >+ <div>+ <SectionLabel>{t("integrations.cli.installLabel")}</SectionLabel>+ <CopyableCommand command={INSTALL_CMD} />+ </div>++ <div className="grid gap-3 @min-[56rem]:grid-cols-2">+ <SettingsPanel>+ <SettingsPanelRow className="space-y-2.5">+ <div>+ <div className="flex h-[18px] items-center gap-1.5">+ <h3 className="text-xs font-semibold text-foreground">+ {t("integrations.cli.local.label")}+ </h3>+ <Badge variant="outline" className="text-[10px] px-1.5 py-0 font-normal">+ {t("integrations.cli.local.freeBadge")}+ </Badge>+ </div>+ <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">+ {t("integrations.cli.local.description")}+ </p>+ </div>+ <CopyableCommand command={LOCAL_EXAMPLE} />+ </SettingsPanelRow>+ </SettingsPanel>++ <SettingsPanel>+ <SettingsPanelRow className="space-y-2.5">+ <div>+ <div className="flex h-[18px] items-center gap-1.5">+ <h3 className="text-xs font-semibold text-foreground">+ {t("integrations.cli.cloud.label")}+ </h3>+ {!isPaid && (+ <Badge variant="outline" className="text-[10px] px-1.5 py-0 font-normal">+ {t("integrations.plan.pro")}+ </Badge>+ )}+ </div>+ <p className="text-xs text-muted-foreground/70 mt-0.5 leading-relaxed">+ {isPaid+ ? t("integrations.cli.cloud.description")+ : t("integrations.cli.cloud.proRequired")}+ </p>+ </div>+ {isPaid ? (+ <CopyableCommand command={CLOUD_LOGIN_CMD} />+ ) : (+ <Button size="sm" onClick={onUpgrade}>+ {t("integrations.cli.viewPlans")}+ </Button>+ )}+ </SettingsPanelRow>+ </SettingsPanel>+ </div>+ </IntegrationsPane>+ );+}diff --git a/src/components/integrations/IntegrationsNav.tsx b/src/components/integrations/IntegrationsNav.tsxnew file mode 100644index 000000000..cc2e83882--- /dev/null+++ b/src/components/integrations/IntegrationsNav.tsx@@ -0,0 +1,117 @@+import type { ReactElement } from "react";+import { useTranslation } from "react-i18next";+import { BookOpen } from "../icons";+import { Badge } from "../ui/badge";+import { cn } from "../lib/utils";+import {+ INTEGRATIONS_SECTION_GROUPS,+ INTEGRATIONS_SECTION_ICONS,+ type IntegrationsSection,+ type SectionMeta,+} from "./integrationsSections";++export const INTEGRATIONS_DOCS_URL = "https://docs.openwhispr.com";++interface IntegrationsNavProps {+ active: IntegrationsSection;+ meta: Record<IntegrationsSection, SectionMeta | null>;+ onSelect: (section: IntegrationsSection) => void;+ className?: string;+}++function SectionMetaTag({ meta }: { meta: SectionMeta | null }): ReactElement | null {+ const { t } = useTranslation();+ if (!meta) return null;+ if (meta.kind === "count") {+ return (+ <span className="ms-auto flex items-center gap-1.5 text-[11px] tabular-nums text-muted-foreground">+ <span className="h-1.5 w-1.5 rounded-full bg-success" aria-hidden="true" />+ {meta.value}+ </span>+ );+ }+ return (+ <Badge variant="outline" className="ms-auto text-[10px] px-1.5 py-0 font-normal">+ {meta.badge === "pro" ? t("integrations.plan.pro") : t("integrations.cli.local.freeBadge")}+ </Badge>+ );+}++export function IntegrationsNav({+ active,+ meta,+ onSelect,+ className,+}: IntegrationsNavProps): ReactElement {+ const { t } = useTranslation();++ return (+ <nav+ aria-label={t("integrations.nav.label")}+ className={cn(+ "w-54 shrink-0 flex flex-col gap-4 overflow-y-auto border-e border-border/70 dark:border-white/8 px-2 pt-3 pb-3",+ className+ )}+ >+ {INTEGRATIONS_SECTION_GROUPS.map((group) => (+ <div key={group.id}>+ <div className="px-2.5 pb-1.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground/70">+ {t(`integrations.nav.groups.${group.id}`)}+ </div>+ <div className="flex flex-col gap-0.5">+ {group.sections.map((section) => {+ const Icon = INTEGRATIONS_SECTION_ICONS[section];+ const isActive = section === active;+ return (+ <button+ key={section}+ type="button"+ aria-current={isActive ? "page" : undefined}+ onClick={() => onSelect(section)}+ className={cn(+ "group flex items-center gap-2.5 w-full h-8 px-2.5 rounded-md outline-none transition-colors duration-150 text-start",+ "focus-visible:ring-1 focus-visible:ring-primary/30",+ isActive+ ? "bg-primary/8 dark:bg-primary/10"+ : "hover:bg-foreground/4 dark:hover:bg-white/4 active:bg-foreground/6"+ )}+ >+ <Icon+ size={15}+ className={cn(+ "shrink-0 transition-colors duration-150",+ isActive+ ? "text-primary"+ : "text-foreground/60 group-hover:text-foreground/85 dark:text-foreground/60"+ )}+ />+ <span+ className={cn(+ "truncate text-[12.5px] transition-colors duration-150",+ isActive+ ? "text-foreground font-medium"+ : "text-foreground/85 group-hover:text-foreground"+ )}+ >+ {t(`integrations.nav.sections.${section}`)}+ </span>+ <SectionMetaTag meta={meta[section]} />+ </button>+ );+ })}+ </div>+ </div>+ ))}++ <div className="flex-1" />+ <button+ type="button"+ onClick={() => window.electronAPI?.openExternal?.(INTEGRATIONS_DOCS_URL)}+ className="flex items-center gap-2 h-7 px-2.5 rounded-md text-xs text-muted-foreground outline-none transition-colors hover:text-foreground hover:bg-foreground/4 dark:hover:bg-white/4 focus-visible:ring-1 focus-visible:ring-primary/30"+ >+ <BookOpen size={14} className="shrink-0" />+ {t("integrations.nav.docs")}+ </button>+ </nav>+ );+}diff --git a/src/components/integrations/IntegrationsPane.tsx b/src/components/integrations/IntegrationsPane.tsxnew file mode 100644index 000000000..649593cb1--- /dev/null+++ b/src/components/integrations/IntegrationsPane.tsx@@ -0,0 +1,55 @@+import type { ReactElement, ReactNode } from "react";+import { useTranslation } from "react-i18next";+import { Sparkles } from "../icons";+import { Button } from "../ui/button";++interface IntegrationsPaneProps {+ title: string;+ description: ReactNode;+ actions?: ReactNode;+ children: ReactNode;+}++/** One Integrations section: a header with its actions, then the section's content. */+export function IntegrationsPane({+ title,+ description,+ actions,+ children,+}: IntegrationsPaneProps): ReactElement {+ return (+ <div className="space-y-4">+ {/* The actions wrap under the title when both don't fit, as with long translations. */}+ <div className="flex flex-wrap items-start gap-x-4 gap-y-2">+ <div className="flex-1 basis-60 min-w-0">+ {/* Focusable so a link that opens another section can move focus here. */}+ <h2 tabIndex={-1} className="text-base text-foreground outline-none">+ {title}+ </h2>+ <p className="text-xs text-muted-foreground/80 mt-1 leading-relaxed">{description}</p>+ </div>+ {actions && <div className="flex flex-wrap items-center gap-1.5">{actions}</div>}+ </div>+ {children}+ </div>+ );+}++interface UpsellBarProps {+ message: string;+ onUpgrade: () => void;+}++/** Shown under a section's header when the user's plan doesn't include it. */+export function UpsellBar({ message, onUpgrade }: UpsellBarProps): ReactElement {+ const { t } = useTranslation();+ return (+ <div className="flex items-center gap-3 rounded-lg border border-primary/20 dark:border-primary/30 bg-primary/5 dark:bg-primary/10 ps-3.5 pe-2 py-2">+ <Sparkles size={15} className="shrink-0 text-primary" />+ <p className="flex-1 min-w-0 text-xs text-foreground/85 leading-relaxed">{message}</p>+ <Button size="sm" onClick={onUpgrade} className="shrink-0">+ {t("integrations.api.viewPlans")}+ </Button>+ </div>+ );+}diff --git a/src/components/integrations/McpPane.tsx b/src/components/integrations/McpPane.tsxnew file mode 100644index 000000000..5c9a5bff3--- /dev/null+++ b/src/components/integrations/McpPane.tsx@@ -0,0 +1,129 @@+import type { ReactElement, ReactNode } from "react";+import { useTranslation } from "react-i18next";+import { ExternalLink } from "../icons";+import { Button } from "../ui/button";+import { CopyableCommand } from "../ui/CopyableCommand";+import { SettingsPanel, SettingsPanelRow } from "../ui/SettingsSection";+import { useToast } from "../ui/useToast";+import { IntegrationsPane, UpsellBar } from "./IntegrationsPane";+import claudeIcon from "../../assets/icons/providers/claude.svg";+import openaiIcon from "../../assets/icons/providers/openai.svg";+import cursorIcon from "../../assets/icons/providers/cursor.svg";++const MCP_URL = "https://mcp.openwhispr.com/mcp";+const MCP_DOCS_URL = "https://docs.openwhispr.com/integrations/mcp";++const MCP_CLIENTS = [+ { name: "Claude", icon: claudeIcon },+ { name: "ChatGPT", icon: openaiIcon },+ { name: "Cursor", icon: cursorIcon },+];++interface McpPaneProps {+ title: string;+ isPaid: boolean;+ onUpgrade: () => void;+ onCreateKey: () => void;+}++interface StepProps {+ number: number;+ /** Centre the number on a single-line step that sits beside a button. */+ centered?: boolean;+ children: ReactNode;+}++function Step({ number, centered = false, children }: StepProps): ReactElement {+ return (+ <SettingsPanelRow as="li">+ <div className={`flex gap-3 ${centered ? "items-center" : "items-start"}`}>+ {/* The list already gives each step its position. */}+ <span+ aria-hidden="true"+ className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary/10 text-[11px] font-semibold text-primary"+ >+ {number}+ </span>+ <div className="flex-1 min-w-0">{children}</div>+ </div>+ </SettingsPanelRow>+ );+}++export function McpPane({ title, isPaid, onUpgrade, onCreateKey }: McpPaneProps): ReactElement {+ const { t } = useTranslation();+ const { toast } = useToast();++ return (+ <IntegrationsPane+ title={title}+ description={t("integrations.mcp.description")}+ actions={+ <Button+ variant="ghost"+ size="sm"+ onClick={() => window.electronAPI?.openExternal?.(MCP_DOCS_URL)}+ className="gap-1.5 text-muted-foreground"+ >+ {t("integrations.mcp.learnMore")}+ <ExternalLink className="h-3 w-3" />+ </Button>+ }+ >+ <div className="flex flex-wrap items-center gap-x-4 gap-y-1.5 ps-1 text-xs">+ <span className="text-muted-foreground/80">{t("integrations.mcp.worksWith")}</span>+ {MCP_CLIENTS.map((client) => (+ <span key={client.name} className="flex items-center gap-1.5 text-foreground/85">+ <img+ src={client.icon}+ alt=""+ aria-hidden="true"+ width={14}+ height={14}+ decoding="async"+ draggable={false}+ className="h-3.5 w-3.5 icon-monochrome"+ />+ {client.name}+ </span>+ ))}+ </div>++ {!isPaid && <UpsellBar message={t("integrations.mcp.proRequired")} onUpgrade={onUpgrade} />}++ <SettingsPanel as="ol">+ <Step number={1}>+ <p className="text-xs leading-5 font-medium text-foreground mb-2">+ {t("integrations.mcp.step1")}+ </p>+ <CopyableCommand+ command={MCP_URL}+ copyLabel={t("integrations.mcp.copyUrl")}+ onCopied={() =>+ toast({ title: t("integrations.mcp.copied"), variant: "success", duration: 2000 })+ }+ />+ </Step>+ <Step number={2} centered>+ <div className="flex items-center gap-3">+ <p className="flex-1 min-w-0 text-xs font-medium text-foreground">+ {t("integrations.mcp.step2")}+ </p>+ <Button+ variant="outline"+ size="sm"+ onClick={onCreateKey}+ disabled={!isPaid}+ className="shrink-0"+ >+ {t("apiKeysSection.createButton")}+ </Button>+ </div>+ </Step>+ <Step number={3} centered>+ <p className="text-xs font-medium text-foreground">{t("integrations.mcp.step3")}</p>+ </Step>+ </SettingsPanel>+ </IntegrationsPane>+ );+}diff --git a/src/components/integrations/integrationsSections.ts b/src/components/integrations/integrationsSections.tsnew file mode 100644index 000000000..87646fc25--- /dev/null+++ b/src/components/integrations/integrationsSections.ts@@ -0,0 +1,61 @@+import type { ComponentType } from "react";+import { Calendar, Key, Link2, Network, Terminal } from "../icons";++export type IntegrationsSection = "connectors" | "calendars" | "api" | "mcp" | "cli";++export const DEFAULT_INTEGRATIONS_SECTION: IntegrationsSection = "calendars";++export const INTEGRATIONS_SECTION_GROUPS: ReadonlyArray<{+ id: "assistant" | "meetings" | "developer";+ sections: readonly IntegrationsSection[];+}> = [+ { id: "meetings", sections: ["calendars"] },+ { id: "assistant", sections: ["connectors"] },+ { id: "developer", sections: ["api", "mcp", "cli"] },+];++export const INTEGRATIONS_SECTION_ICONS: Record<+ IntegrationsSection,+ ComponentType<{ size?: number; className?: string }>+> = {+ connectors: Link2,+ calendars: Calendar,+ api: Key,+ mcp: Network,+ cli: Terminal,+};++export type SectionMeta =+ { kind: "count"; value: number } | { kind: "badge"; badge: "pro" | "free" };++export interface SectionMetaInput {+ isPaid: boolean;+ /** Connectors decide their plan and org policy as the Connectors pane does. */+ connectors: { isPaid: boolean; blockedByOrg: boolean; ready: number };+ connectedCalendars: number;+}++/** The status shown beside a section in the nav: what's connected, or which plan it needs. */+export function sectionMeta(+ section: IntegrationsSection,+ { isPaid, connectors, connectedCalendars }: SectionMetaInput+): SectionMeta | null {+ switch (section) {+ case "connectors":+ // Turned off by the organization: no plan would change that, and no login can act.+ if (connectors.blockedByOrg) return null;+ if (!connectors.isPaid) return { kind: "badge", badge: "pro" };+ return connectors.ready > 0 ? { kind: "count", value: connectors.ready } : null;+ case "calendars":+ return connectedCalendars > 0 ? { kind: "count", value: connectedCalendars } : null;+ case "api":+ case "mcp":+ return isPaid ? null : { kind: "badge", badge: "pro" };+ case "cli":+ // Local mode is free; saying so is the point of surfacing it to free plans.+ return isPaid ? null : { kind: "badge", badge: "free" };+ }+}++export const INTEGRATIONS_SECTIONS: readonly IntegrationsSection[] =+ INTEGRATIONS_SECTION_GROUPS.flatMap((group) => group.sections);diff --git a/src/components/onboarding/CalendarConnectionsStep.tsx b/src/components/onboarding/CalendarConnectionsStep.tsxindex e294ca8fd..d9c8861f9 100644--- a/src/components/onboarding/CalendarConnectionsStep.tsx+++ b/src/components/onboarding/CalendarConnectionsStep.tsx@@ -65,7 +65,7 @@ export default function CalendarConnectionsStep() {if (result?.success) {store.setAppleCalendarConnected(true);} else if (result?.reason === "denied") {- // Same distinction IntegrationsView draws: only a real permission+ // Same distinction CalendarsPane draws: only a real permission// denial sends the user to Privacy settings; helper-missing /// snapshot-failed are not permission problems.setAppleDenied(true);diff --git a/src/components/ui/CopyableCommand.tsx b/src/components/ui/CopyableCommand.tsxindex 3e11db1f4..bf648419d 100644--- a/src/components/ui/CopyableCommand.tsx+++ b/src/components/ui/CopyableCommand.tsx@@ -1,13 +1,24 @@import { useState, useCallback } from "react";+import { useTranslation } from "react-i18next";import { Copy, Check } from "../icons";interface CopyableCommandProps {command: string;label?: string;+ /** Names what the button copies, e.g. "Copy MCP URL"; defaults to "Copy". */+ copyLabel?: string;+ onCopied?: () => void;className?: string;}-export function CopyableCommand({ command, label, className = "" }: CopyableCommandProps) {+export function CopyableCommand({+ command,+ label,+ copyLabel,+ onCopied,+ className = "",+}: CopyableCommandProps) {+ const { t } = useTranslation();const [copied, setCopied] = useState(false);const handleCopy = useCallback(() => {@@ -15,10 +26,11 @@ export function CopyableCommand({ command, label, className = "" }: CopyableComm.writeText(command).then(() => {setCopied(true);+ onCopied?.();setTimeout(() => setCopied(false), 2000);}).catch(() => {});- }, [command]);+ }, [command, onCopied]);return (<div className={className}>@@ -31,7 +43,7 @@ export function CopyableCommand({ command, label, className = "" }: CopyableComm<buttontype="button"onClick={handleCopy}- aria-label={copied ? "Copied" : "Copy command"}+ aria-label={copied ? t("common.copied") : (copyLabel ?? t("common.copy"))}className="absolute top-2 right-2 h-6 w-6 flex items-center justify-center rounded text-muted-foreground/70 hover:text-muted-foreground hover:bg-muted/50 active:scale-95 transition-all">{copied ? (diff --git a/src/components/ui/SettingsSection.tsx b/src/components/ui/SettingsSection.tsxindex f784a8811..e8c3e69ba 100644--- a/src/components/ui/SettingsSection.tsx+++ b/src/components/ui/SettingsSection.tsx@@ -91,30 +91,37 @@ export const SettingsRow: React.FC<SettingsRowProps> = ({export function SettingsPanel({children,className = "",+ as: Element = "div",}: {children: React.ReactNode;className?: string;+ /** "ol" for a panel of numbered steps, whose rows are then "li". */+ as?: "div" | "ol";}) {return (- <div+ <ElementclassName={`rounded-lg border border-border/70 dark:border-border-subtle/70 bg-card/50 dark:bg-surface-2/50 backdrop-blur-sm divide-y divide-border/60 dark:divide-border-subtle/50 ${className}`}>{children}- </div>+ </Element>);}export function SettingsPanelRow({children,className = "",+ as: Element = "div",}: {children: React.ReactNode;className?: string;+ as?: "div" | "li";}) {const { isCompact } = useSettingsLayout();return (- <div className={`${isCompact ? "px-3 py-2.5" : "px-4 py-3"} ${className}`}>{children}</div>+ <Element className={`${isCompact ? "px-3 py-2.5" : "px-4 py-3"} ${className}`}>+ {children}+ </Element>);}diff --git a/src/hooks/useConnectorAccess.ts b/src/hooks/useConnectorAccess.tsnew file mode 100644index 000000000..783e44334--- /dev/null+++ b/src/hooks/useConnectorAccess.ts@@ -0,0 +1,31 @@+import { useSyncExternalStore } from "react";+import { useSettingsStore } from "../stores/settingsStore";+import { usePolicyStore } from "../stores/policyStore";+import { isConnectorsAllowed, isConnectorsBlockedByOrg } from "../stores/policyRules";+import { getUsageState, subscribeUsage } from "../lib/usageStore";+import { readIsSubscribed, subscribeIsSubscribed } from "../lib/subscriptionFlag";+import { hasConnectorPlan } from "../utils/connectorEligibility";++export interface ConnectorAccess {+ /** The same plan check that decides whether the chat gets the connector tools. */+ isPaid: boolean;+ blockedByOrg: boolean;+ /**+ * False while the policy loads, after a failed fetch, or when the org requires+ * a newer app: chat has no connector tools then, so nothing may offer them.+ */+ connectorsAllowed: boolean;+}++export function useConnectorAccess(): ConnectorAccess {+ const blockedByOrg = usePolicyStore(isConnectorsBlockedByOrg);+ const connectorsAllowed = usePolicyStore(isConnectorsAllowed);+ const isSignedIn = useSettingsStore((state) => state.isSignedIn);+ const usage = useSyncExternalStore(subscribeUsage, getUsageState);+ const isSubscribedFlag = useSyncExternalStore(subscribeIsSubscribed, readIsSubscribed);+ return {+ isPaid: isSignedIn && hasConnectorPlan(usage, isSubscribedFlag),+ blockedByOrg,+ connectorsAllowed,+ };+}diff --git a/src/locales/ar/translation.json b/src/locales/ar/translation.jsonindex 82da25580..f285925f6 100644--- a/src/locales/ar/translation.json+++ b/src/locales/ar/translation.json@@ -608,10 +608,8 @@},"integrations": {"title": "التكاملات (Integrations)",- "description": "قم بتوصيل الخدمات لتعزيز سير عملك","googleCalendar": {"title": "تقويم Google",- "optional": "اختياري","description": "الملء التلقائي لعناوين الاجتماعات والحاضرين من التقويم الخاص بك.","connect": "ربط تقويم Google","connecting": "جاري الربط...",@@ -630,7 +628,6 @@},"microsoftCalendar": {"title": "تقويم Microsoft",- "optional": "اختياري","description": "قراءة الاجتماعات من تقويم Outlook أو Microsoft 365 الخاص بك.","connect": "ربط تقويم Microsoft","connected": "متصل",@@ -645,7 +642,6 @@},"appleCalendar": {"title": "تقويم Apple",- "optional": "اختياري","description": "قراءة الاجتماعات من تطبيق التقويم (Calendar.app) — iCloud وGoogle وExchange وOutlook في مكان واحد.","connect": "ربط تقويم Apple","connected": "متصل",@@ -658,35 +654,24 @@"connectFailed": "فشل الاتصال","connectFailedDescription": "حدث خطأ ما أثناء الاتصال بتطبيق Calendar.app. يرجى إعادة تشغيل OpenWhispr والمحاولة مرة أخرى."},- "sections": {- "connectors": "الموصلات",- "calendar": "التقويم (Calendar)",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "مفاتيح API","description": "إدارة مفاتيح API للوصول البرمجي","proRequired": "قم بالترقية إلى خطة مدفوعة للوصول إلى API",- "manage": "إدارة المفاتيح","viewPlans": "عرض الخطط",- "dialogTitle": "مفاتيح API"+ "useWith": "استخدم مفتاحًا مع"},"mcp": {- "title": "اجلب ملاحظاتك إلى أدوات الذكاء الاصطناعي الخاصة بك","description": "الدردشة والبحث والعمل مع ملاحظاتك داخل Claude وChatGPT وCursor.","step1": "في أداة الذكاء الاصطناعي الخاصة بك، أضف OpenWhispr MCP باستخدام عنوان URL العام",- "step2": "قم بإنشاء مفتاح API أعلاه بالنطاقات (scopes) التي تحتاجها.",+ "step2": "أنشئ مفتاح API بالنطاقات (scopes) التي تحتاجها.","step3": "الصق المفتاح في ترويسة Authorization للاتصال.","learnMore": "اعرف المزيد",- "viewPlans": "عرض الخطط",- "copyUrl": "نسخ عنوان URL لـ MCP","proRequired": "قم بالترقية إلى خطة مدفوعة لتوصيل OpenWhispr بـ Claude وChatGPT وCursor.",+ "worksWith": "يعمل مع",+ "copyUrl": "نسخ عنوان URL لـ MCP","copied": "تم النسخ"},"cli": {- "title": "الوصول عبر سطر الأوامر (Command-line)","description": "امنح مساعدك حق الوصول إلى ملاحظاتك من الجهاز الطرفي (terminal).","installLabel": "تثبيت","learnMore": "اقرأ الوثائق",@@ -716,8 +701,26 @@"upgrade": "ترقية"},"notABot": {- "title": "OpenWhispr هو مسجل اجتماعات، وليس روبوتًا","description": "يلتقط OpenWhispr الصوت مباشرة من نظامك — فهو لا ينضم أبدًا إلى اجتماعاتك كمشارك. ما عليك سوى ربط التقويم الخاص بك وتدوين الملاحظات كالمعتاد."+ },+ "nav": {+ "label": "أقسام التكاملات",+ "groups": {+ "assistant": "المساعد",+ "meetings": "الاجتماعات",+ "developer": "المطوّرون"+ },+ "sections": {+ "connectors": "الموصلات",+ "calendars": "التقويمات",+ "api": "مفاتيح API",+ "mcp": "خادم MCP",+ "cli": "سطر الأوامر"+ },+ "docs": "وثائق التكاملات"+ },+ "connectors": {+ "description": "دع المساعد يستخدم أدواتك. توافق على كل بريد ورسالة ومهمة قبل إرسالها."}},"connectors": {@@ -883,7 +886,6 @@"title": "مسودات البريد الإلكتروني","description": "يفتح المساعد مسودة معبأة مسبقًا في تطبيق البريد الإلكتروني الخاص بك. راجعها واضغط إرسال بنفسك.","descriptionSend": "يعرض المساعد بطاقة بريد إلكتروني في الدردشة، ولا يُرسل البريد من Gmail الخاص بك إلا عندما تضغط إرسال.",- "proRequired": "قم بالترقية إلى خطة مدفوعة ليكتب المساعد مسودات رسائلك الإلكترونية.","unavailable": "مسودات البريد الإلكتروني غير متاحة حاليًا.","targetLabel": "صياغة رسائل البريد الإلكتروني في","autoResolved": "تلقائي · {{target}}",@@ -898,14 +900,13 @@},"slack": {"title": "Slack",- "description": "يمكن للمساعد نشر الرسائل في القنوات وللأشخاص نيابةً عنك. توافق على كل رسالة قبل إرسالها.",+ "description": "ينشر الرسائل في القنوات وللأشخاص.","connect": "ربط","reconnect": "إعادة الربط","disconnect": "قطع الربط","connecting": "أكمل الربط في متصفحك…","connectedAs": "متصل بصفتك {{account}} في {{workspace}}","needsReconnect": "يلزم إعادة ربط Slack.",- "proRequired": "قم بالترقية إلى خطة مدفوعة ليتمكن المساعد من إرسال رسائل Slack نيابةً عنك.","errors": {"connect_failed": "تعذّر ربط Slack. حاول مرة أخرى.","disconnect_failed": "تعذّر قطع ربط Slack. حاول مرة أخرى.",@@ -929,7 +930,7 @@},"github": {"title": "GitHub",- "description": "يمكن للمساعد البحث في المشكلات وطلبات السحب وإنشاء المشكلات والتعليق نيابةً عنك، في المستودعات التي تختارها فقط. لا يمكنه قراءة الكود الخاص بك، وتوافق على كل مشكلة وكل تعليق قبل نشره.",+ "description": "المهام والتعليقات في المستودعات التي تختارها. لا يمكنه قراءة الكود الخاص بك.","connect": "ربط","reconnect": "إعادة الربط","disconnect": "قطع الربط",@@ -938,7 +939,6 @@"connectedAs_empty": "متصل بصفتك {{account}} · لا توجد مستودعات بعد","connectedAs_unknown": "متصل بصفتك {{account}}","needsReconnect": "يلزم إعادة ربط GitHub.",- "proRequired": "قم بالترقية إلى خطة مدفوعة ليتمكن المساعد من العمل على مشكلات GitHub نيابةً عنك.","reviewOnGithub": "المراجعة على GitHub","disconnectedHint": "تم قطع الربط على هذا الكمبيوتر. يحتفظ GitHub بتفويض OpenWhispr إلى أن تزيله من هناك.","errors": {@@ -970,7 +970,7 @@},"gmail": {"title": "Gmail",- "description": "يمكن للمساعد إرسال الرسائل الإلكترونية من حسابك على Gmail. لا يمكنه قراءة بريدك، وتضغط إرسال بنفسك لكل رسالة.",+ "description": "يرسل البريد من حسابك. لا يمكنه قراءة بريدك.","connect": "ربط","reconnect": "إعادة الربط","disconnect": "قطع الربط",@@ -978,7 +978,6 @@"connectedAs": "متصل بصفتك {{account}}","needsReconnect": "يلزم إعادة ربط Gmail.","grantKept": "تم قطع الاتصال. يستخدم تقويم Google إذن Google نفسه، لذا سيظل OpenWhispr مدرجًا في حسابك على Google حتى تقطع اتصال تقويم Google أيضًا.",- "proRequired": "قم بالترقية إلى خطة مدفوعة ليتمكن المساعد من إرسال الرسائل الإلكترونية من Gmail نيابةً عنك.","errors": {"connect_failed": "تعذّر ربط Gmail. حاول مرة أخرى.","disconnect_failed": "تعذّر قطع ربط Gmail. حاول مرة أخرى.",@@ -1005,14 +1004,13 @@},"linear": {"title": "Linear",- "description": "يمكن للمساعد البحث في مشكلات Linear وإنشاء مشكلات وتعليقات نيابةً عنك. توافق على كل مشكلة وتعليق قبل إرسالهما.",+ "description": "يبحث في المهام وينشئ المهام والتعليقات.","connect": "ربط","reconnect": "إعادة الربط","disconnect": "قطع الربط","connecting": "أكمل الربط في متصفحك…","connectedAs": "متصل بصفتك {{account}} في {{workspace}}","needsReconnect": "يلزم إعادة ربط Linear.",- "proRequired": "قم بالترقية إلى خطة مدفوعة ليتمكن المساعد من العمل في Linear نيابةً عنك.","errors": {"connect_failed": "تعذّر ربط Linear. حاول مرة أخرى.","disconnect_failed": "تعذّر قطع ربط Linear. حاول مرة أخرى.",@@ -1169,7 +1167,10 @@"gmailDraftLimit": "يمكن تجهيز {{max}} رسائل بريد إلكتروني فقط لكل طلب.","queryResults": "النتائج التي عُثر عليها: {{total}}","cardLimit": "يمكن تجهيز {{max}} بطاقات فقط لكل طلب."- }+ },+ "beta": "تجريبي",+ "upsell": "الموصلات متاحة في الخطط المدفوعة. قم بالترقية ليعمل المساعد في أدواتك.",+ "locked": "متاح ضمن الخطط المدفوعة"},"auth": {"cloudNotConfigured": "السحابة غير مهيأة",diff --git a/src/locales/de/translation.json b/src/locales/de/translation.jsonindex 406a0a76f..77860ff04 100644--- a/src/locales/de/translation.json+++ b/src/locales/de/translation.json@@ -4002,10 +4002,8 @@},"integrations": {"title": "Integrationen",- "description": "Verbinde Dienste, um deinen Workflow zu verbessern","googleCalendar": {"title": "Google Calendar",- "optional": "Optional","description": "Meeting-Titel und Teilnehmer automatisch aus deinem Kalender übernehmen.","connect": "Google Calendar verbinden","connecting": "Verbinde...",@@ -4024,7 +4022,6 @@},"microsoftCalendar": {"title": "Microsoft Calendar",- "optional": "Optional","description": "Besprechungen aus deinem Outlook- oder Microsoft 365-Kalender lesen.","connect": "Microsoft Calendar verbinden","connected": "Verbunden",@@ -4039,7 +4036,6 @@},"appleCalendar": {"title": "Apple Kalender",- "optional": "Optional","description": "Termine aus Calendar.app lesen — iCloud, Google, Exchange und Outlook an einem Ort.","connect": "Apple Kalender verbinden","connected": "Verbunden",@@ -4052,35 +4048,24 @@"connectFailed": "Verbindung fehlgeschlagen","connectFailedDescription": "Beim Verbinden mit Calendar.app ist ein Fehler aufgetreten. Starte OpenWhispr neu und versuche es erneut."},- "sections": {- "connectors": "Konnektoren",- "calendar": "Kalender",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "API-Schlüssel","description": "Verwalte API-Schlüssel für programmatischen Zugriff","proRequired": "Upgrade auf einen kostenpflichtigen Plan, um die API zu nutzen",- "manage": "Schlüssel verwalten","viewPlans": "Pläne ansehen",- "dialogTitle": "API-Schlüssel"+ "useWith": "Nutze einen Schlüssel mit"},"mcp": {- "title": "Bring deine Notizen in deine KI-Tools","description": "Chatte, suche und arbeite mit deinen Notizen in Claude, ChatGPT und Cursor.","step1": "Füge OpenWhispr MCP in deinem KI-Tool mit der öffentlichen URL hinzu",- "step2": "Erstelle oben einen API-Schlüssel mit den benötigten Berechtigungen.",+ "step2": "Erstelle einen API-Schlüssel mit den benötigten Berechtigungen.","step3": "Füge den Schlüssel als Authorization-Header ein, um zu verbinden.","learnMore": "Mehr erfahren",- "viewPlans": "Pläne ansehen",- "copyUrl": "MCP-URL kopieren","proRequired": "Upgrade auf einen kostenpflichtigen Plan, um OpenWhispr mit Claude, ChatGPT und Cursor zu verbinden.",+ "worksWith": "Funktioniert mit",+ "copyUrl": "MCP-URL kopieren","copied": "Kopiert"},"cli": {- "title": "Kommandozeilen-Zugriff","description": "Gib deinem Assistenten über das Terminal Zugriff auf deine Notizen.","installLabel": "Installieren","learnMore": "Dokumentation lesen",@@ -4110,8 +4095,26 @@"upgrade": "Upgrade"},"notABot": {- "title": "OpenWhispr ist ein Meeting-Rekorder, kein Bot","description": "OpenWhispr erfasst Audio direkt von deinem System — es nimmt niemals als Teilnehmer an deinen Meetings teil. Verbinde einfach deinen Kalender und mach Notizen wie gewohnt."+ },+ "nav": {+ "label": "Integrationsbereiche",+ "groups": {+ "assistant": "Assistent",+ "meetings": "Meetings",+ "developer": "Entwickler"+ },+ "sections": {+ "connectors": "Konnektoren",+ "calendars": "Kalender",+ "api": "API-Schlüssel",+ "mcp": "MCP-Server",+ "cli": "Kommandozeile"+ },+ "docs": "Integrations-Doku"+ },+ "connectors": {+ "description": "Lass den Assistenten deine Tools nutzen. Du bestätigst jede E-Mail, jede Nachricht und jedes Issue, bevor es rausgeht."}},"connectors": {@@ -4277,7 +4280,6 @@"title": "E-Mail-Entwürfe","description": "Der Assistent öffnet einen vorausgefüllten Entwurf in deiner E-Mail-App. Du prüfst ihn und klickst selbst auf Senden.","descriptionSend": "Der Assistent zeigt im Chat eine E-Mail-Karte. Sie wird erst über dein Gmail gesendet, wenn du auf Senden klickst.",- "proRequired": "Upgrade auf einen kostenpflichtigen Plan, damit der Assistent E-Mails für dich entwirft.","unavailable": "E-Mail-Entwürfe sind gerade nicht verfügbar.","targetLabel": "E-Mails entwerfen in","autoResolved": "Automatisch · {{target}}",@@ -4292,14 +4294,13 @@},"slack": {"title": "Slack",- "description": "Der Assistent kann Nachrichten in Kanälen und an Personen in deinem Namen posten. Du bestätigst jede Nachricht, bevor sie gesendet wird.",+ "description": "Nachrichten in Kanälen und an Personen posten.","connect": "Verbinden","reconnect": "Erneut verbinden","disconnect": "Trennen","connecting": "Schließe die Verbindung in deinem Browser ab…","connectedAs": "Verbunden als {{account}} in {{workspace}}","needsReconnect": "Slack muss erneut verbunden werden.",- "proRequired": "Upgrade auf einen kostenpflichtigen Plan, damit der Assistent Slack-Nachrichten für dich sendet.","errors": {"connect_failed": "Slack konnte nicht verbunden werden. Versuche es erneut.","disconnect_failed": "Slack konnte nicht getrennt werden. Versuche es erneut.",@@ -4323,7 +4324,7 @@},"github": {"title": "GitHub",- "description": "Der Assistent kann Issues und Pull Requests durchsuchen, Issues erstellen und in deinem Namen kommentieren, nur in den Repositorys, die du auswählst. Er kann deinen Code nicht lesen, und du bestätigst jedes Issue und jeden Kommentar, bevor er gepostet wird.",+ "description": "Issues und Kommentare in den Repositorys deiner Wahl. Deinen Code kann er nicht lesen.","connect": "Verbinden","reconnect": "Erneut verbinden","disconnect": "Trennen",@@ -4332,7 +4333,6 @@"connectedAs_empty": "Verbunden als {{account}} · noch keine Repositorys","connectedAs_unknown": "Verbunden als {{account}}","needsReconnect": "GitHub muss erneut verbunden werden.",- "proRequired": "Upgrade auf einen kostenpflichtigen Plan, damit der Assistent für dich mit GitHub-Issues arbeitet.","reviewOnGithub": "Auf GitHub prüfen","disconnectedHint": "Von diesem Computer getrennt. GitHub behält die Autorisierung von OpenWhispr, bis du sie dort entfernst.","errors": {@@ -4364,7 +4364,7 @@},"gmail": {"title": "Gmail",- "description": "Der Assistent kann E-Mails über dein Gmail-Konto senden. Er kann deine E-Mails nicht lesen, und du klickst bei jeder E-Mail selbst auf Senden.",+ "description": "E-Mails von deinem Konto senden. Deine E-Mails kann er nicht lesen.","connect": "Verbinden","reconnect": "Erneut verbinden","disconnect": "Trennen",@@ -4372,7 +4372,6 @@"connectedAs": "Verbunden als {{account}}","needsReconnect": "Gmail muss erneut verbunden werden.","grantKept": "Getrennt. Google Kalender nutzt dieselbe Google-Berechtigung, daher bleibt OpenWhispr in deinem Google-Konto aufgeführt, bis du auch Google Kalender trennst.",- "proRequired": "Upgrade auf einen kostenpflichtigen Plan, damit der Assistent E-Mails über Gmail für dich sendet.","errors": {"connect_failed": "Gmail konnte nicht verbunden werden. Versuche es erneut.","disconnect_failed": "Gmail konnte nicht getrennt werden. Versuche es erneut.",@@ -4399,14 +4398,13 @@},"linear": {"title": "Linear",- "description": "Der Assistent kann deine Linear-Issues durchsuchen und in deinem Namen Issues und Kommentare erstellen. Du bestätigst jedes Issue und jeden Kommentar, bevor sie gesendet werden.",+ "description": "Issues durchsuchen sowie Issues und Kommentare erstellen.","connect": "Verbinden","reconnect": "Erneut verbinden","disconnect": "Trennen","connecting": "Schließe die Verbindung in deinem Browser ab…","connectedAs": "Verbunden als {{account}} in {{workspace}}","needsReconnect": "Linear muss erneut verbunden werden.",- "proRequired": "Upgrade auf einen kostenpflichtigen Plan, damit der Assistent für dich in Linear arbeitet.","errors": {"connect_failed": "Linear konnte nicht verbunden werden. Versuche es erneut.","disconnect_failed": "Linear konnte nicht getrennt werden. Versuche es erneut.",@@ -4563,7 +4561,10 @@"gmailDraftLimit": "Pro Anfrage können nur {{max}} E-Mails vorbereitet werden.","queryResults": "Gefundene Ergebnisse: {{total}}","cardLimit": "Pro Anfrage können nur {{max}} Karten vorbereitet werden."- }+ },+ "beta": "Beta",+ "upsell": "Konnektoren sind in kostenpflichtigen Tarifen enthalten. Upgrade, damit der Assistent in deinen Tools arbeiten kann.",+ "locked": "In kostenpflichtigen Tarifen enthalten"},"notesView": {"searchPlaceholder": "Notizen durchsuchen…",diff --git a/src/locales/en/translation.json b/src/locales/en/translation.jsonindex 7990787a0..b560c3c7f 100644--- a/src/locales/en/translation.json+++ b/src/locales/en/translation.json@@ -4002,10 +4002,8 @@},"integrations": {"title": "Integrations",- "description": "Connect services to supercharge your workflow","googleCalendar": {"title": "Google Calendar",- "optional": "Optional","description": "Auto-fill meeting titles and attendees from your calendar.","connect": "Connect Google Calendar","connecting": "Connecting...",@@ -4024,7 +4022,6 @@},"microsoftCalendar": {"title": "Microsoft Calendar",- "optional": "Optional","description": "Read meetings from your Outlook or Microsoft 365 calendar.","connect": "Connect Microsoft Calendar","connected": "Connected",@@ -4039,7 +4036,6 @@},"appleCalendar": {"title": "Apple Calendar",- "optional": "Optional","description": "Read meetings from Calendar.app — iCloud, Google, Exchange, and Outlook in one place.","connect": "Connect Apple Calendar","connected": "Connected",@@ -4052,35 +4048,24 @@"connectFailed": "Connection Failed","connectFailedDescription": "Something went wrong while connecting to Calendar.app. Please restart OpenWhispr and try again."},- "sections": {- "connectors": "Connectors",- "calendar": "Calendar",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "API keys","description": "Manage API keys for programmatic access","proRequired": "Upgrade to a paid plan to access the API",- "manage": "Manage keys","viewPlans": "View Plans",- "dialogTitle": "API keys"+ "useWith": "Use a key with"},"mcp": {- "title": "Bring your notes to your AI tools","description": "Chat, search, and work with your notes inside Claude, ChatGPT, and Cursor.","step1": "In your AI tool, add OpenWhispr MCP using the public URL",- "step2": "Create an API key above with the scopes you need.",+ "step2": "Create an API key with the scopes you need.","step3": "Paste the key as the Authorization header to connect.","learnMore": "Learn more",- "viewPlans": "View Plans",- "copyUrl": "Copy MCP URL","proRequired": "Upgrade to a paid plan to connect OpenWhispr to Claude, ChatGPT, and Cursor.",+ "worksWith": "Works with",+ "copyUrl": "Copy MCP URL","copied": "Copied"},"cli": {- "title": "Command-line access","description": "Give your assistant access to your notes from the terminal.","installLabel": "Install","learnMore": "Read the docs",@@ -4110,8 +4095,26 @@"upgrade": "Upgrade"},"notABot": {- "title": "OpenWhispr is a meeting recorder, not a bot","description": "OpenWhispr captures audio directly from your system — it never joins your meetings as a participant. Just connect your calendar and take notes as normal."+ },+ "nav": {+ "label": "Integration sections",+ "groups": {+ "assistant": "Assistant",+ "meetings": "Meetings",+ "developer": "Developer"+ },+ "sections": {+ "connectors": "Connectors",+ "calendars": "Calendars",+ "api": "API keys",+ "mcp": "MCP server",+ "cli": "Command line"+ },+ "docs": "Integration docs"+ },+ "connectors": {+ "description": "Let the assistant use your tools. You approve every email, message and issue before it goes out."}},"connectors": {@@ -4277,7 +4280,6 @@"title": "Email drafts","description": "The assistant opens a pre-filled draft in your email app. You review it and press Send yourself.","descriptionSend": "The assistant shows an email card in the chat. It's sent from your Gmail only when you press Send.",- "proRequired": "Upgrade to a paid plan to let the assistant draft emails for you.","unavailable": "Email drafts aren't available right now.","targetLabel": "Draft emails in","autoResolved": "Automatic · {{target}}",@@ -4292,14 +4294,13 @@},"slack": {"title": "Slack",- "description": "The assistant can post messages to channels and people as you. You approve every message before it's sent.",+ "description": "Post messages to channels and people.","connect": "Connect","reconnect": "Reconnect","disconnect": "Disconnect","connecting": "Finish connecting in your browser…","connectedAs": "Connected as {{account}} in {{workspace}}","needsReconnect": "Slack needs to be reconnected.",- "proRequired": "Upgrade to a paid plan to let the assistant send Slack messages for you.","errors": {"connect_failed": "Couldn't connect Slack. Try again.","disconnect_failed": "Couldn't disconnect Slack. Try again.",@@ -4323,7 +4324,7 @@},"github": {"title": "GitHub",- "description": "The assistant can search issues and pull requests, create issues and comment as you, only in the repositories you choose. It can't read your code, and you approve every issue and comment before it's posted.",+ "description": "Issues and comments in the repositories you choose. It can't read your code.","connect": "Connect","reconnect": "Reconnect","disconnect": "Disconnect",@@ -4332,7 +4333,6 @@"connectedAs_empty": "Connected as {{account}} · no repositories yet","connectedAs_unknown": "Connected as {{account}}","needsReconnect": "GitHub needs to be reconnected.",- "proRequired": "Upgrade to a paid plan to let the assistant work with GitHub issues for you.","reviewOnGithub": "Review on GitHub","disconnectedHint": "Disconnected from this computer. GitHub keeps OpenWhispr's authorization until you remove it there.","errors": {@@ -4364,7 +4364,7 @@},"gmail": {"title": "Gmail",- "description": "The assistant can send emails from your Gmail account. It can't read your mail, and you press Send on every email yourself.",+ "description": "Send email from your account. It can't read your mail.","connect": "Connect","reconnect": "Reconnect","disconnect": "Disconnect",@@ -4372,7 +4372,6 @@"connectedAs": "Connected as {{account}}","needsReconnect": "Gmail needs to be reconnected.","grantKept": "Disconnected. Google Calendar uses the same Google permission, so OpenWhispr stays listed in your Google Account until you disconnect Google Calendar too.",- "proRequired": "Upgrade to a paid plan to let the assistant send emails from Gmail for you.","errors": {"connect_failed": "Couldn't connect Gmail. Try again.","disconnect_failed": "Couldn't disconnect Gmail. Try again.",@@ -4399,14 +4398,13 @@},"linear": {"title": "Linear",- "description": "The assistant can search your Linear issues and create issues and comments as you. You approve every issue and comment before it's sent.",+ "description": "Search issues and create issues and comments.","connect": "Connect","reconnect": "Reconnect","disconnect": "Disconnect","connecting": "Finish connecting in your browser…","connectedAs": "Connected as {{account}} in {{workspace}}","needsReconnect": "Linear needs to be reconnected.",- "proRequired": "Upgrade to a paid plan to let the assistant work in Linear for you.","errors": {"connect_failed": "Couldn't connect Linear. Try again.","disconnect_failed": "Couldn't disconnect Linear. Try again.",@@ -4563,7 +4561,10 @@"gmailDraftLimit": "Only {{max}} emails can be prepared per request.","queryResults": "Results found: {{total}}","cardLimit": "Only {{max}} cards can be prepared per request."- }+ },+ "beta": "Beta",+ "upsell": "Connectors are included with paid plans. Upgrade to let the assistant work in your tools.",+ "locked": "Included with paid plans"},"notesView": {"searchPlaceholder": "Search notes…",diff --git a/src/locales/es/translation.json b/src/locales/es/translation.jsonindex 90e24f75d..153cf9f38 100644--- a/src/locales/es/translation.json+++ b/src/locales/es/translation.json@@ -3884,10 +3884,8 @@},"integrations": {"title": "Integraciones",- "description": "Conecta servicios para potenciar tu flujo de trabajo","googleCalendar": {"title": "Google Calendar",- "optional": "Opcional","description": "Rellena automáticamente los títulos y asistentes de las reuniones desde tu calendario.","connect": "Conectar Google Calendar","connecting": "Conectando...",@@ -3906,7 +3904,6 @@},"microsoftCalendar": {"title": "Microsoft Calendar",- "optional": "Opcional","description": "Lee reuniones de tu calendario de Outlook o Microsoft 365.","connect": "Conectar Microsoft Calendar","connected": "Conectado",@@ -3921,7 +3918,6 @@},"appleCalendar": {"title": "Calendario de Apple",- "optional": "Opcional","description": "Lee reuniones de Calendar.app — iCloud, Google, Exchange y Outlook en un solo lugar.","connect": "Conectar Calendario de Apple","connected": "Conectado",@@ -3934,35 +3930,24 @@"connectFailed": "Error de conexión","connectFailedDescription": "Se produjo un error al conectar con Calendar.app. Reinicia OpenWhispr e inténtalo de nuevo."},- "sections": {- "connectors": "Conectores",- "calendar": "Calendario",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "Claves API","description": "Administra las claves API para acceso programático","proRequired": "Actualiza a un plan de pago para acceder a la API",- "manage": "Administrar claves","viewPlans": "Ver planes",- "dialogTitle": "Claves API"+ "useWith": "Usa una clave con"},"mcp": {- "title": "Lleva tus notas a tus herramientas de IA","description": "Chatea, busca y trabaja con tus notas en Claude, ChatGPT y Cursor.","step1": "En tu herramienta de IA, añade OpenWhispr MCP usando la URL pública",- "step2": "Crea una clave API arriba con los permisos que necesites.",+ "step2": "Crea una clave API con los permisos que necesites.","step3": "Pega la clave como cabecera Authorization para conectar.","learnMore": "Más información",- "viewPlans": "Ver planes",- "copyUrl": "Copiar URL de MCP","proRequired": "Actualiza a un plan de pago para conectar OpenWhispr con Claude, ChatGPT y Cursor.",+ "worksWith": "Funciona con",+ "copyUrl": "Copiar URL de MCP","copied": "Copiado"},"cli": {- "title": "Acceso por línea de comandos","description": "Dale a tu asistente acceso a tus notas desde la terminal.","installLabel": "Instalar","learnMore": "Leer la documentación",@@ -3992,8 +3977,26 @@"upgrade": "Mejorar"},"notABot": {- "title": "OpenWhispr es un grabador de reuniones, no un bot","description": "OpenWhispr captura el audio directamente de tu sistema — nunca se une a tus reuniones como participante. Solo conecta tu calendario y toma notas con normalidad."+ },+ "nav": {+ "label": "Secciones de integraciones",+ "groups": {+ "assistant": "Asistente",+ "meetings": "Reuniones",+ "developer": "Desarrolladores"+ },+ "sections": {+ "connectors": "Conectores",+ "calendars": "Calendarios",+ "api": "Claves API",+ "mcp": "Servidor MCP",+ "cli": "Línea de comandos"+ },+ "docs": "Documentación de integraciones"+ },+ "connectors": {+ "description": "Deja que el asistente use tus herramientas. Apruebas cada correo, mensaje e incidencia antes de que se envíe."}},"connectors": {@@ -4159,7 +4162,6 @@"title": "Borradores de correo","description": "El asistente abre un borrador prellenado en tu aplicación de correo. Tú lo revisas y pulsas Enviar.","descriptionSend": "El asistente muestra una tarjeta de correo en el chat. Solo se envía desde tu Gmail cuando pulsas Enviar.",- "proRequired": "Actualiza a un plan de pago para que el asistente redacte correos por ti.","unavailable": "Los borradores de correo no están disponibles en este momento.","targetLabel": "Redactar correos en","autoResolved": "Automático · {{target}}",@@ -4174,14 +4176,13 @@},"slack": {"title": "Slack",- "description": "El asistente puede publicar mensajes en canales y a personas en tu nombre. Apruebas cada mensaje antes de que se envíe.",+ "description": "Publica mensajes en canales y a personas.","connect": "Conectar","reconnect": "Reconectar","disconnect": "Desconectar","connecting": "Termina de conectar en tu navegador…","connectedAs": "Conectado como {{account}} en {{workspace}}","needsReconnect": "Slack debe reconectarse.",- "proRequired": "Actualiza a un plan de pago para que el asistente envíe mensajes de Slack por ti.","errors": {"connect_failed": "No se pudo conectar Slack. Inténtalo de nuevo.","disconnect_failed": "No se pudo desconectar Slack. Inténtalo de nuevo.",@@ -4205,7 +4206,7 @@},"github": {"title": "GitHub",- "description": "El asistente puede buscar issues y pull requests, crear issues y comentar en tu nombre, solo en los repositorios que elijas. No puede leer tu código y apruebas cada issue y comentario antes de que se publique.",+ "description": "Incidencias y comentarios en los repositorios que elijas. No puede leer tu código.","connect": "Conectar","reconnect": "Reconectar","disconnect": "Desconectar",@@ -4214,7 +4215,6 @@"connectedAs_empty": "Conectado como {{account}} · aún no hay repositorios","connectedAs_unknown": "Conectado como {{account}}","needsReconnect": "GitHub debe reconectarse.",- "proRequired": "Actualiza a un plan de pago para que el asistente trabaje con issues de GitHub por ti.","reviewOnGithub": "Revisar en GitHub","disconnectedHint": "Desconectado de este equipo. GitHub conserva la autorización de OpenWhispr hasta que la quites allí.","errors": {@@ -4246,7 +4246,7 @@},"gmail": {"title": "Gmail",- "description": "El asistente puede enviar correos desde tu cuenta de Gmail. No puede leer tu correo y tú pulsas Enviar en cada correo.",+ "description": "Envía correos desde tu cuenta. No puede leer tu correo.","connect": "Conectar","reconnect": "Reconectar","disconnect": "Desconectar",@@ -4254,7 +4254,6 @@"connectedAs": "Conectado como {{account}}","needsReconnect": "Gmail debe reconectarse.","grantKept": "Desconectado. Google Calendar usa el mismo permiso de Google, así que OpenWhispr seguirá apareciendo en tu cuenta de Google hasta que también desconectes Google Calendar.",- "proRequired": "Actualiza a un plan de pago para que el asistente envíe correos desde Gmail por ti.","errors": {"connect_failed": "No se pudo conectar Gmail. Inténtalo de nuevo.","disconnect_failed": "No se pudo desconectar Gmail. Inténtalo de nuevo.",@@ -4281,14 +4280,13 @@},"linear": {"title": "Linear",- "description": "El asistente puede buscar tus incidencias de Linear y crear incidencias y comentarios en tu nombre. Apruebas cada incidencia y comentario antes de que se envíe.",+ "description": "Busca incidencias y crea incidencias y comentarios.","connect": "Conectar","reconnect": "Reconectar","disconnect": "Desconectar","connecting": "Termina de conectar en tu navegador…","connectedAs": "Conectado como {{account}} en {{workspace}}","needsReconnect": "Linear debe reconectarse.",- "proRequired": "Actualiza a un plan de pago para que el asistente trabaje en Linear por ti.","errors": {"connect_failed": "No se pudo conectar Linear. Inténtalo de nuevo.","disconnect_failed": "No se pudo desconectar Linear. Inténtalo de nuevo.",@@ -4445,7 +4443,10 @@"gmailDraftLimit": "Solo se pueden preparar {{max}} correos por solicitud.","queryResults": "Resultados encontrados: {{total}}","cardLimit": "Solo se pueden preparar {{max}} tarjetas por solicitud."- }+ },+ "beta": "Beta",+ "upsell": "Los conectores se incluyen en los planes de pago. Mejora tu plan para que el asistente trabaje en tus herramientas.",+ "locked": "Incluido en los planes de pago"},"calendar": {"title": "Google Calendar",diff --git a/src/locales/fr/translation.json b/src/locales/fr/translation.jsonindex 8aaeaf708..204bee777 100644--- a/src/locales/fr/translation.json+++ b/src/locales/fr/translation.json@@ -4002,10 +4002,8 @@},"integrations": {"title": "Intégrations",- "description": "Connectez des services pour booster votre productivité","googleCalendar": {"title": "Google Calendar",- "optional": "Facultatif","description": "Remplissez automatiquement les titres et participants des réunions depuis votre calendrier.","connect": "Connecter Google Calendar","connecting": "Connexion...",@@ -4024,7 +4022,6 @@},"microsoftCalendar": {"title": "Microsoft Calendar",- "optional": "Facultatif","description": "Lisez les réunions depuis votre calendrier Outlook ou Microsoft 365.","connect": "Connecter Microsoft Calendar","connected": "Connecté",@@ -4039,7 +4036,6 @@},"appleCalendar": {"title": "Calendrier Apple",- "optional": "Facultatif","description": "Lisez les réunions depuis Calendar.app — iCloud, Google, Exchange et Outlook au même endroit.","connect": "Connecter le Calendrier Apple","connected": "Connecté",@@ -4052,35 +4048,24 @@"connectFailed": "Échec de la connexion","connectFailedDescription": "Une erreur s'est produite lors de la connexion à Calendar.app. Redémarrez OpenWhispr et réessayez."},- "sections": {- "connectors": "Connecteurs",- "calendar": "Calendrier",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "Clés API","description": "Gérez les clés API pour un accès programmatique","proRequired": "Passez à un plan payant pour accéder à l'API",- "manage": "Gérer les clés","viewPlans": "Voir les forfaits",- "dialogTitle": "Clés API"+ "useWith": "Utilisez une clé avec"},"mcp": {- "title": "Apportez vos notes à vos outils d'IA","description": "Discutez, recherchez et travaillez avec vos notes dans Claude, ChatGPT et Cursor.","step1": "Dans votre outil d'IA, ajoutez OpenWhispr MCP avec l'URL publique",- "step2": "Créez une clé API ci-dessus avec les permissions dont vous avez besoin.",+ "step2": "Créez une clé API avec les permissions dont vous avez besoin.","step3": "Collez la clé comme en-tête Authorization pour vous connecter.","learnMore": "En savoir plus",- "viewPlans": "Voir les forfaits",- "copyUrl": "Copier l'URL MCP","proRequired": "Passez à un plan payant pour connecter OpenWhispr à Claude, ChatGPT et Cursor.",+ "worksWith": "Fonctionne avec",+ "copyUrl": "Copier l'URL MCP","copied": "Copié"},"cli": {- "title": "Accès en ligne de commande","description": "Donnez à votre assistant l'accès à vos notes depuis le terminal.","installLabel": "Installer","learnMore": "Lire la documentation",@@ -4110,8 +4095,26 @@"upgrade": "Passer au supérieur"},"notABot": {- "title": "OpenWhispr est un enregistreur de réunions, pas un bot","description": "OpenWhispr capture l'audio directement depuis votre système — il ne rejoint jamais vos réunions en tant que participant. Connectez simplement votre calendrier et prenez vos notes normalement."+ },+ "nav": {+ "label": "Sections des intégrations",+ "groups": {+ "assistant": "Assistant",+ "meetings": "Réunions",+ "developer": "Développeurs"+ },+ "sections": {+ "connectors": "Connecteurs",+ "calendars": "Calendriers",+ "api": "Clés API",+ "mcp": "Serveur MCP",+ "cli": "Ligne de commande"+ },+ "docs": "Documentation des intégrations"+ },+ "connectors": {+ "description": "Laissez l'assistant utiliser vos outils. Vous approuvez chaque e-mail, message et ticket avant son envoi."}},"connectors": {@@ -4277,7 +4280,6 @@"title": "Brouillons d'e-mails","description": "L'assistant ouvre un brouillon pré-rempli dans votre application de messagerie. Vous le vérifiez et appuyez vous-même sur Envoyer.","descriptionSend": "L'assistant affiche une carte d'e-mail dans le chat. L'e-mail n'est envoyé depuis votre Gmail que lorsque vous appuyez sur Envoyer.",- "proRequired": "Passez à un plan payant pour que l'assistant rédige des e-mails pour vous.","unavailable": "Les brouillons d'e-mails ne sont pas disponibles pour le moment.","targetLabel": "Rédiger les e-mails dans","autoResolved": "Automatique · {{target}}",@@ -4292,14 +4294,13 @@},"slack": {"title": "Slack",- "description": "L'assistant peut publier des messages dans des canaux et à des personnes en votre nom. Vous approuvez chaque message avant son envoi.",+ "description": "Publie des messages dans des canaux et à des personnes.","connect": "Connecter","reconnect": "Reconnecter","disconnect": "Déconnecter","connecting": "Terminez la connexion dans votre navigateur…","connectedAs": "Connecté en tant que {{account}} dans {{workspace}}","needsReconnect": "Slack doit être reconnecté.",- "proRequired": "Passez à un plan payant pour que l'assistant envoie des messages Slack pour vous.","errors": {"connect_failed": "Impossible de connecter Slack. Réessayez.","disconnect_failed": "Impossible de déconnecter Slack. Réessayez.",@@ -4323,7 +4324,7 @@},"github": {"title": "GitHub",- "description": "L'assistant peut rechercher des issues et des pull requests, créer des issues et commenter en votre nom, uniquement dans les dépôts que vous choisissez. Il ne peut pas lire votre code, et vous approuvez chaque issue et chaque commentaire avant sa publication.",+ "description": "Tickets et commentaires dans les dépôts de votre choix. Il ne peut pas lire votre code.","connect": "Connecter","reconnect": "Reconnecter","disconnect": "Déconnecter",@@ -4332,7 +4333,6 @@"connectedAs_empty": "Connecté en tant que {{account}} · aucun dépôt pour l'instant","connectedAs_unknown": "Connecté en tant que {{account}}","needsReconnect": "GitHub doit être reconnecté.",- "proRequired": "Passez à un plan payant pour que l'assistant gère les issues GitHub pour vous.","reviewOnGithub": "Vérifier sur GitHub","disconnectedHint": "Déconnecté de cet ordinateur. GitHub conserve l'autorisation d'OpenWhispr jusqu'à ce que vous la retiriez sur GitHub.","errors": {@@ -4364,7 +4364,7 @@},"gmail": {"title": "Gmail",- "description": "L'assistant peut envoyer des e-mails depuis votre compte Gmail. Il ne peut pas lire vos e-mails, et vous appuyez vous-même sur Envoyer pour chaque e-mail.",+ "description": "Envoie des e-mails depuis votre compte. Il ne peut pas lire vos e-mails.","connect": "Connecter","reconnect": "Reconnecter","disconnect": "Déconnecter",@@ -4372,7 +4372,6 @@"connectedAs": "Connecté en tant que {{account}}","needsReconnect": "Gmail doit être reconnecté.","grantKept": "Déconnecté. Google Agenda utilise la même autorisation Google : OpenWhispr reste donc listé dans votre compte Google jusqu'à ce que vous déconnectiez aussi Google Agenda.",- "proRequired": "Passez à un plan payant pour que l'assistant envoie des e-mails depuis Gmail pour vous.","errors": {"connect_failed": "Impossible de connecter Gmail. Réessayez.","disconnect_failed": "Impossible de déconnecter Gmail. Réessayez.",@@ -4399,14 +4398,13 @@},"linear": {"title": "Linear",- "description": "L'assistant peut rechercher vos tickets Linear et créer des tickets et des commentaires en votre nom. Vous approuvez chaque ticket et chaque commentaire avant son envoi.",+ "description": "Recherche des tickets, crée des tickets et des commentaires.","connect": "Connecter","reconnect": "Reconnecter","disconnect": "Déconnecter","connecting": "Terminez la connexion dans votre navigateur…","connectedAs": "Connecté en tant que {{account}} dans {{workspace}}","needsReconnect": "Linear doit être reconnecté.",- "proRequired": "Passez à un plan payant pour que l'assistant travaille dans Linear pour vous.","errors": {"connect_failed": "Impossible de connecter Linear. Réessayez.","disconnect_failed": "Impossible de déconnecter Linear. Réessayez.",@@ -4563,7 +4561,10 @@"gmailDraftLimit": "Seuls {{max}} e-mails peuvent être préparés par demande.","queryResults": "Résultats trouvés : {{total}}","cardLimit": "Seules {{max}} cartes peuvent être préparées par demande."- }+ },+ "beta": "Bêta",+ "upsell": "Les connecteurs sont inclus dans les forfaits payants. Passez à un forfait payant pour que l'assistant agisse dans vos outils.",+ "locked": "Inclus dans les forfaits payants"},"notesView": {"searchPlaceholder": "Rechercher des notes…",diff --git a/src/locales/it/translation.json b/src/locales/it/translation.jsonindex 458c8245d..16618f0b8 100644--- a/src/locales/it/translation.json+++ b/src/locales/it/translation.json@@ -3831,10 +3831,8 @@},"integrations": {"title": "Integrazioni",- "description": "Collega servizi per potenziare il tuo flusso di lavoro","googleCalendar": {"title": "Google Calendar",- "optional": "Opzionale","description": "Compila automaticamente titoli e partecipanti delle riunioni dal tuo calendario.","connect": "Collega Google Calendar","connecting": "Connessione...",@@ -3853,7 +3851,6 @@},"microsoftCalendar": {"title": "Microsoft Calendar",- "optional": "Opzionale","description": "Leggi le riunioni dal tuo calendario Outlook o Microsoft 365.","connect": "Collega Microsoft Calendar","connected": "Connesso",@@ -3868,7 +3865,6 @@},"appleCalendar": {"title": "Calendario Apple",- "optional": "Opzionale","description": "Leggi le riunioni da Calendar.app — iCloud, Google, Exchange e Outlook in un unico posto.","connect": "Collega Calendario Apple","connected": "Connesso",@@ -3881,35 +3877,24 @@"connectFailed": "Connessione non riuscita","connectFailedDescription": "Si è verificato un errore durante la connessione a Calendar.app. Riavvia OpenWhispr e riprova."},- "sections": {- "connectors": "Connettori",- "calendar": "Calendario",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "Chiavi API","description": "Gestisci le chiavi API per l'accesso programmatico","proRequired": "Passa a un piano a pagamento per accedere all'API",- "manage": "Gestisci chiavi","viewPlans": "Visualizza i piani",- "dialogTitle": "Chiavi API"+ "useWith": "Usa una chiave con"},"mcp": {- "title": "Porta le tue note nei tuoi strumenti di IA","description": "Chatta, cerca e lavora con le tue note in Claude, ChatGPT e Cursor.","step1": "Nel tuo strumento di IA, aggiungi OpenWhispr MCP usando l'URL pubblico",- "step2": "Crea una chiave API sopra con gli scope necessari.",+ "step2": "Crea una chiave API con gli scope necessari.","step3": "Incolla la chiave come intestazione Authorization per connetterti.","learnMore": "Scopri di più",- "viewPlans": "Visualizza i piani",- "copyUrl": "Copia URL MCP","proRequired": "Passa a un piano a pagamento per collegare OpenWhispr a Claude, ChatGPT e Cursor.",+ "worksWith": "Funziona con",+ "copyUrl": "Copia URL MCP","copied": "Copiato"},"cli": {- "title": "Accesso da riga di comando","description": "Dai al tuo assistente l'accesso alle note dal terminale.","installLabel": "Installa","learnMore": "Leggi la documentazione",@@ -3939,8 +3924,26 @@"upgrade": "Aggiorna"},"notABot": {- "title": "OpenWhispr è un registratore di riunioni, non un bot","description": "OpenWhispr cattura l'audio direttamente dal tuo sistema — non entra mai nelle tue riunioni come partecipante. Basta collegare il calendario e prendere appunti normalmente."+ },+ "nav": {+ "label": "Sezioni integrazioni",+ "groups": {+ "assistant": "Assistente",+ "meetings": "Riunioni",+ "developer": "Sviluppatori"+ },+ "sections": {+ "connectors": "Connettori",+ "calendars": "Calendari",+ "api": "Chiavi API",+ "mcp": "Server MCP",+ "cli": "Riga di comando"+ },+ "docs": "Documentazione integrazioni"+ },+ "connectors": {+ "description": "Lascia che l'assistente usi i tuoi strumenti. Approvi ogni email, messaggio e issue prima dell'invio."}},"connectors": {@@ -4106,7 +4109,6 @@"title": "Bozze email","description": "L'assistente apre una bozza precompilata nella tua app di posta. La rivedi e premi Invia tu stesso.","descriptionSend": "L'assistente mostra una scheda email nella chat. Viene inviata dal tuo Gmail solo quando premi Invia.",- "proRequired": "Passa a un piano a pagamento per far scrivere all'assistente le bozze delle email.","unavailable": "Le bozze email non sono disponibili al momento.","targetLabel": "Crea bozze email in","autoResolved": "Automatico · {{target}}",@@ -4121,14 +4123,13 @@},"slack": {"title": "Slack",- "description": "L'assistente può pubblicare messaggi nei canali e alle persone per tuo conto. Approvi ogni messaggio prima che venga inviato.",+ "description": "Pubblica messaggi nei canali e alle persone.","connect": "Connetti","reconnect": "Riconnetti","disconnect": "Disconnetti","connecting": "Completa la connessione nel tuo browser…","connectedAs": "Connesso come {{account}} in {{workspace}}","needsReconnect": "Slack deve essere ricollegato.",- "proRequired": "Passa a un piano a pagamento per far inviare all'assistente i messaggi Slack per te.","errors": {"connect_failed": "Impossibile connettere Slack. Riprova.","disconnect_failed": "Impossibile disconnettere Slack. Riprova.",@@ -4152,7 +4153,7 @@},"github": {"title": "GitHub",- "description": "L'assistente può cercare issue e pull request, creare issue e commentare per tuo conto, solo nei repository che scegli. Non può leggere il tuo codice e approvi ogni issue e commento prima che venga pubblicato.",+ "description": "Issue e commenti nei repository che scegli. Non può leggere il tuo codice.","connect": "Connetti","reconnect": "Riconnetti","disconnect": "Disconnetti",@@ -4161,7 +4162,6 @@"connectedAs_empty": "Connesso come {{account}} · ancora nessun repository","connectedAs_unknown": "Connesso come {{account}}","needsReconnect": "GitHub deve essere ricollegato.",- "proRequired": "Passa a un piano a pagamento per far gestire all'assistente le issue di GitHub per te.","reviewOnGithub": "Controlla su GitHub","disconnectedHint": "Disconnesso da questo computer. GitHub mantiene l'autorizzazione di OpenWhispr finché non la rimuovi da lì.","errors": {@@ -4193,7 +4193,7 @@},"gmail": {"title": "Gmail",- "description": "L'assistente può inviare email dal tuo account Gmail. Non può leggere la tua posta e premi tu Invia per ogni email.",+ "description": "Invia email dal tuo account. Non può leggere la tua posta.","connect": "Connetti","reconnect": "Riconnetti","disconnect": "Disconnetti",@@ -4201,7 +4201,6 @@"connectedAs": "Connesso come {{account}}","needsReconnect": "Gmail deve essere ricollegato.","grantKept": "Disconnesso. Google Calendar usa la stessa autorizzazione Google, quindi OpenWhispr resta elencato nel tuo account Google finché non disconnetti anche Google Calendar.",- "proRequired": "Passa a un piano a pagamento per far inviare all'assistente le email da Gmail per te.","errors": {"connect_failed": "Impossibile connettere Gmail. Riprova.","disconnect_failed": "Impossibile disconnettere Gmail. Riprova.",@@ -4228,14 +4227,13 @@},"linear": {"title": "Linear",- "description": "L'assistente può cercare le tue issue di Linear e creare issue e commenti per tuo conto. Approvi ogni issue e ogni commento prima che venga inviato.",+ "description": "Cerca issue e crea issue e commenti.","connect": "Connetti","reconnect": "Riconnetti","disconnect": "Disconnetti","connecting": "Completa la connessione nel tuo browser…","connectedAs": "Connesso come {{account}} in {{workspace}}","needsReconnect": "Linear deve essere ricollegato.",- "proRequired": "Passa a un piano a pagamento per far lavorare l'assistente in Linear per te.","errors": {"connect_failed": "Impossibile connettere Linear. Riprova.","disconnect_failed": "Impossibile disconnettere Linear. Riprova.",@@ -4392,7 +4390,10 @@"gmailDraftLimit": "Si possono preparare solo {{max}} email per richiesta.","queryResults": "Risultati trovati: {{total}}","cardLimit": "Si possono preparare solo {{max}} schede per richiesta."- }+ },+ "beta": "Beta",+ "upsell": "I connettori sono inclusi nei piani a pagamento. Effettua l'upgrade per far lavorare l'assistente nei tuoi strumenti.",+ "locked": "Incluso nei piani a pagamento"},"calendar": {"title": "Google Calendar",diff --git a/src/locales/ja/translation.json b/src/locales/ja/translation.jsonindex fe012dc53..5d661aeb3 100644--- a/src/locales/ja/translation.json+++ b/src/locales/ja/translation.json@@ -3831,10 +3831,8 @@},"integrations": {"title": "連携",- "description": "サービスを接続してワークフローを強化","googleCalendar": {"title": "Google カレンダー",- "optional": "任意","description": "カレンダーから会議名と参加者を自動で入力します。","connect": "Google カレンダーを接続","connecting": "接続中...",@@ -3853,7 +3851,6 @@},"microsoftCalendar": {"title": "Microsoft カレンダー",- "optional": "任意","description": "Outlook または Microsoft 365 のカレンダーから会議を読み取ります。","connect": "Microsoft カレンダーを接続","connected": "接続済み",@@ -3868,7 +3865,6 @@},"appleCalendar": {"title": "Apple カレンダー",- "optional": "任意","description": "Calendar.app から会議を読み取ります — iCloud、Google、Exchange、Outlook をまとめて。","connect": "Apple カレンダーを接続","connected": "接続済み",@@ -3881,35 +3877,24 @@"connectFailed": "接続に失敗しました","connectFailedDescription": "Calendar.app への接続中にエラーが発生しました。OpenWhispr を再起動してもう一度お試しください。"},- "sections": {- "connectors": "コネクタ",- "calendar": "カレンダー",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "APIキー","description": "プログラムからのアクセス用にAPIキーを管理","proRequired": "APIを利用するには有料プランへのアップグレードが必要です",- "manage": "キーを管理","viewPlans": "プランを表示",- "dialogTitle": "APIキー"+ "useWith": "キーの利用先"},"mcp": {- "title": "メモをAIツールに持ち込みましょう","description": "Claude、ChatGPT、Cursor内でメモを使ってチャット、検索、作業ができます。","step1": "AIツールで、公開URLを使用してOpenWhispr MCPを追加します",- "step2": "上のセクションで必要なスコープを持つAPIキーを作成します。",+ "step2": "必要なスコープを持つAPIキーを作成します。","step3": "キーを Authorization ヘッダーとして貼り付けて接続します。","learnMore": "詳細",- "viewPlans": "プランを表示",- "copyUrl": "MCP URLをコピー","proRequired": "OpenWhispr を Claude、ChatGPT、Cursor に接続するには、有料プランへのアップグレードが必要です。",+ "worksWith": "対応アプリ",+ "copyUrl": "MCP URLをコピー","copied": "コピーしました"},"cli": {- "title": "コマンドラインアクセス","description": "ターミナルからアシスタントにメモへのアクセスを許可します。","installLabel": "インストール","learnMore": "ドキュメントを読む",@@ -3939,8 +3924,26 @@"upgrade": "アップグレード"},"notABot": {- "title": "OpenWhispr はミーティング録音ツールであり、ボットではありません","description": "OpenWhispr はシステムから直接オーディオをキャプチャします — 参加者としてミーティングに参加することはありません。カレンダーを接続して、通常通りノートを取るだけです。"+ },+ "nav": {+ "label": "連携セクション",+ "groups": {+ "assistant": "アシスタント",+ "meetings": "ミーティング",+ "developer": "開発者"+ },+ "sections": {+ "connectors": "コネクタ",+ "calendars": "カレンダー",+ "api": "APIキー",+ "mcp": "MCPサーバー",+ "cli": "コマンドライン"+ },+ "docs": "連携ドキュメント"+ },+ "connectors": {+ "description": "アシスタントがあなたのツールを使えるようにします。メール、メッセージ、課題はすべて送信前にあなたが承認します。"}},"connectors": {@@ -4106,7 +4109,6 @@"title": "メール下書き","description": "アシスタントがメールアプリに下書きを自動入力して開きます。内容を確認し、自分で送信を押してください。","descriptionSend": "アシスタントがチャットにメールのカードを表示します。送信を押したときだけ、Gmail から送信されます。",- "proRequired": "アシスタントにメールの下書きを作成させるには、有料プランへのアップグレードが必要です。","unavailable": "現在メール下書きを利用できません。","targetLabel": "メールを作成するアプリ","autoResolved": "自動 · {{target}}",@@ -4121,14 +4123,13 @@},"slack": {"title": "Slack",- "description": "アシスタントはチャンネルや個人にあなたとしてメッセージを投稿できます。送信前に必ず内容を承認します。",+ "description": "チャンネルや個人にメッセージを投稿します。","connect": "接続","reconnect": "再接続","disconnect": "接続を解除","connecting": "ブラウザで接続を完了してください…","connectedAs": "{{workspace}} の {{account}} として接続済み","needsReconnect": "Slackを再接続する必要があります。",- "proRequired": "アシスタントにSlackメッセージを送信させるには、有料プランへのアップグレードが必要です。","errors": {"connect_failed": "Slackを接続できませんでした。もう一度お試しください。","disconnect_failed": "Slackの接続を解除できませんでした。もう一度お試しください。",@@ -4152,7 +4153,7 @@},"github": {"title": "GitHub",- "description": "アシスタントは、あなたが選んだリポジトリでのみ、あなたとしてIssueとプルリクエストの検索、Issueの作成、コメントができます。コードを読むことはできず、Issueやコメントは投稿前に必ずあなたが承認します。",+ "description": "選択したリポジトリの課題とコメント。コードを読むことはできません。","connect": "接続","reconnect": "再接続","disconnect": "接続を解除",@@ -4161,7 +4162,6 @@"connectedAs_empty": "{{account}} として接続済み · リポジトリはまだありません","connectedAs_unknown": "{{account}} として接続済み","needsReconnect": "GitHubを再接続する必要があります。",- "proRequired": "アシスタントにGitHubのIssueを扱わせるには、有料プランへのアップグレードが必要です。","reviewOnGithub": "GitHubで確認","disconnectedHint": "このコンピューターから接続を解除しました。GitHub側でOpenWhisprの認可を削除するまで、認可はGitHubに残ります。","errors": {@@ -4193,7 +4193,7 @@},"gmail": {"title": "Gmail",- "description": "アシスタントはあなたのGmailアカウントからメールを送信できます。メールを読むことはできず、各メールはあなた自身が送信を押して送ります。",+ "description": "あなたのアカウントからメールを送信します。メールを読むことはできません。","connect": "接続","reconnect": "再接続","disconnect": "接続を解除",@@ -4201,7 +4201,6 @@"connectedAs": "{{account}} として接続済み","needsReconnect": "Gmailを再接続する必要があります。","grantKept": "接続を解除しました。Google カレンダーが同じ Google の権限を使用しているため、Google カレンダーの接続も解除するまで、OpenWhispr は Google アカウントに表示されたままになります。",- "proRequired": "アシスタントにGmailからメールを送信させるには、有料プランへのアップグレードが必要です。","errors": {"connect_failed": "Gmailを接続できませんでした。もう一度お試しください。","disconnect_failed": "Gmailの接続を解除できませんでした。もう一度お試しください。",@@ -4228,14 +4227,13 @@},"linear": {"title": "Linear",- "description": "アシスタントはLinearのIssueを検索し、あなたとしてIssueやコメントを作成できます。送信前に必ず各Issueとコメントを承認します。",+ "description": "課題を検索し、課題とコメントを作成します。","connect": "接続","reconnect": "再接続","disconnect": "接続を解除","connecting": "ブラウザで接続を完了してください…","connectedAs": "{{workspace}} の {{account}} として接続済み","needsReconnect": "Linearを再接続する必要があります。",- "proRequired": "アシスタントにLinearで作業させるには、有料プランへのアップグレードが必要です。","errors": {"connect_failed": "Linearを接続できませんでした。もう一度お試しください。","disconnect_failed": "Linearの接続を解除できませんでした。もう一度お試しください。",@@ -4392,7 +4390,10 @@"gmailDraftLimit": "1回のリクエストで準備できるメールは{{max}}件までです。","queryResults": "見つかった結果: {{total}}","cardLimit": "1回のリクエストで準備できるカードは{{max}}件までです。"- }+ },+ "beta": "ベータ",+ "upsell": "コネクタは有料プランに含まれています。アップグレードすると、アシスタントがあなたのツールで操作できるようになります。",+ "locked": "有料プランに含まれます"},"calendar": {"title": "Google カレンダー",diff --git a/src/locales/pt/translation.json b/src/locales/pt/translation.jsonindex a67737809..693ec6f51 100644--- a/src/locales/pt/translation.json+++ b/src/locales/pt/translation.json@@ -3831,10 +3831,8 @@},"integrations": {"title": "Integrações",- "description": "Conecte serviços para turbinar seu fluxo de trabalho","googleCalendar": {"title": "Google Calendar",- "optional": "Opcional","description": "Preencha automaticamente títulos e participantes das reuniões a partir do seu calendário.","connect": "Conectar Google Calendar","connecting": "Conectando...",@@ -3853,7 +3851,6 @@},"microsoftCalendar": {"title": "Microsoft Calendar",- "optional": "Opcional","description": "Leia reuniões do seu calendário do Outlook ou Microsoft 365.","connect": "Conectar Microsoft Calendar","connected": "Conectado",@@ -3868,7 +3865,6 @@},"appleCalendar": {"title": "Calendário da Apple",- "optional": "Opcional","description": "Leia reuniões do Calendar.app — iCloud, Google, Exchange e Outlook em um só lugar.","connect": "Conectar Calendário da Apple","connected": "Conectado",@@ -3881,35 +3877,24 @@"connectFailed": "Falha na conexão","connectFailedDescription": "Ocorreu um erro ao conectar ao Calendar.app. Reinicie o OpenWhispr e tente novamente."},- "sections": {- "connectors": "Conectores",- "calendar": "Calendário",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "Chaves de API","description": "Gerencie chaves de API para acesso programático","proRequired": "Atualize para um plano pago para acessar a API",- "manage": "Gerenciar chaves","viewPlans": "Ver planos",- "dialogTitle": "Chaves de API"+ "useWith": "Use uma chave com"},"mcp": {- "title": "Leve suas notas para suas ferramentas de IA","description": "Converse, pesquise e trabalhe com suas notas no Claude, ChatGPT e Cursor.","step1": "Na sua ferramenta de IA, adicione OpenWhispr MCP usando a URL pública",- "step2": "Crie uma chave de API acima com os escopos necessários.",+ "step2": "Crie uma chave de API com os escopos necessários.","step3": "Cole a chave como cabeçalho Authorization para conectar.","learnMore": "Saiba mais",- "viewPlans": "Ver planos",- "copyUrl": "Copiar URL do MCP","proRequired": "Atualize para um plano pago para conectar o OpenWhispr ao Claude, ChatGPT e Cursor.",+ "worksWith": "Funciona com",+ "copyUrl": "Copiar URL do MCP","copied": "Copiado"},"cli": {- "title": "Acesso pela linha de comando","description": "Dê ao seu assistente acesso às suas notas pelo terminal.","installLabel": "Instalar","learnMore": "Ler a documentação",@@ -3939,8 +3924,26 @@"upgrade": "Atualizar"},"notABot": {- "title": "O OpenWhispr é um gravador de reuniões, não um bot","description": "O OpenWhispr captura áudio diretamente do seu sistema — ele nunca entra nas suas reuniões como participante. Basta conectar seu calendário e fazer anotações normalmente."+ },+ "nav": {+ "label": "Seções de integrações",+ "groups": {+ "assistant": "Assistente",+ "meetings": "Reuniões",+ "developer": "Desenvolvedor"+ },+ "sections": {+ "connectors": "Conectores",+ "calendars": "Calendários",+ "api": "Chaves de API",+ "mcp": "Servidor MCP",+ "cli": "Linha de comando"+ },+ "docs": "Documentação de integrações"+ },+ "connectors": {+ "description": "Deixe o assistente usar suas ferramentas. Você aprova cada e-mail, mensagem e issue antes do envio."}},"connectors": {@@ -4106,7 +4109,6 @@"title": "Rascunhos de e-mail","description": "O assistente abre um rascunho pré-preenchido no seu aplicativo de e-mail. Você revisa e aperta Enviar.","descriptionSend": "O assistente mostra um cartão de e-mail no chat. O e-mail só é enviado pelo seu Gmail quando você aperta Enviar.",- "proRequired": "Atualize para um plano pago para que o assistente escreva rascunhos de e-mail para você.","unavailable": "Os rascunhos de e-mail não estão disponíveis no momento.","targetLabel": "Criar rascunhos de e-mail em","autoResolved": "Automático · {{target}}",@@ -4121,14 +4123,13 @@},"slack": {"title": "Slack",- "description": "O assistente pode publicar mensagens em canais e para pessoas em seu nome. Você aprova cada mensagem antes de ela ser enviada.",+ "description": "Publica mensagens em canais e para pessoas.","connect": "Conectar","reconnect": "Reconectar","disconnect": "Desconectar","connecting": "Termine de conectar no seu navegador…","connectedAs": "Conectado como {{account}} em {{workspace}}","needsReconnect": "O Slack precisa ser reconectado.",- "proRequired": "Atualize para um plano pago para que o assistente envie mensagens do Slack por você.","errors": {"connect_failed": "Não foi possível conectar o Slack. Tente novamente.","disconnect_failed": "Não foi possível desconectar o Slack. Tente novamente.",@@ -4152,7 +4153,7 @@},"github": {"title": "GitHub",- "description": "O assistente pode pesquisar issues e pull requests, criar issues e comentar em seu nome, apenas nos repositórios que você escolher. Ele não consegue ler seu código, e você aprova cada issue e comentário antes de ser publicado.",+ "description": "Issues e comentários nos repositórios que você escolher. Ele não consegue ler seu código.","connect": "Conectar","reconnect": "Reconectar","disconnect": "Desconectar",@@ -4161,7 +4162,6 @@"connectedAs_empty": "Conectado como {{account}} · nenhum repositório ainda","connectedAs_unknown": "Conectado como {{account}}","needsReconnect": "O GitHub precisa ser reconectado.",- "proRequired": "Atualize para um plano pago para que o assistente trabalhe com issues do GitHub por você.","reviewOnGithub": "Revisar no GitHub","disconnectedHint": "Desconectado deste computador. O GitHub mantém a autorização do OpenWhispr até você removê-la lá.","errors": {@@ -4193,7 +4193,7 @@},"gmail": {"title": "Gmail",- "description": "O assistente pode enviar e-mails pela sua conta do Gmail. Ele não consegue ler seus e-mails, e você aperta Enviar em cada e-mail.",+ "description": "Envia e-mails pela sua conta. Ele não consegue ler seus e-mails.","connect": "Conectar","reconnect": "Reconectar","disconnect": "Desconectar",@@ -4201,7 +4201,6 @@"connectedAs": "Conectado como {{account}}","needsReconnect": "O Gmail precisa ser reconectado.","grantKept": "Desconectado. O Google Agenda usa a mesma permissão do Google, então o OpenWhispr continua listado na sua Conta do Google até você desconectar o Google Agenda também.",- "proRequired": "Atualize para um plano pago para que o assistente envie e-mails pelo Gmail por você.","errors": {"connect_failed": "Não foi possível conectar o Gmail. Tente novamente.","disconnect_failed": "Não foi possível desconectar o Gmail. Tente novamente.",@@ -4228,14 +4227,13 @@},"linear": {"title": "Linear",- "description": "O assistente pode pesquisar suas issues do Linear e criar issues e comentários em seu nome. Você aprova cada issue e comentário antes de ser enviado.",+ "description": "Pesquisa issues e cria issues e comentários.","connect": "Conectar","reconnect": "Reconectar","disconnect": "Desconectar","connecting": "Termine de conectar no seu navegador…","connectedAs": "Conectado como {{account}} em {{workspace}}","needsReconnect": "O Linear precisa ser reconectado.",- "proRequired": "Atualize para um plano pago para que o assistente trabalhe no Linear por você.","errors": {"connect_failed": "Não foi possível conectar o Linear. Tente novamente.","disconnect_failed": "Não foi possível desconectar o Linear. Tente novamente.",@@ -4392,7 +4390,10 @@"gmailDraftLimit": "Só é possível preparar {{max}} e-mails por solicitação.","queryResults": "Resultados encontrados: {{total}}","cardLimit": "Só é possível preparar {{max}} cartões por solicitação."- }+ },+ "beta": "Beta",+ "upsell": "Os conectores estão incluídos nos planos pagos. Faça upgrade para o assistente trabalhar nas suas ferramentas.",+ "locked": "Incluído nos planos pagos"},"calendar": {"title": "Google Agenda",diff --git a/src/locales/ru/translation.json b/src/locales/ru/translation.jsonindex c7e06fb54..3a34ae4f8 100644--- a/src/locales/ru/translation.json+++ b/src/locales/ru/translation.json@@ -3875,10 +3875,8 @@},"integrations": {"title": "Интеграции",- "description": "Подключите сервисы для улучшения рабочего процесса","googleCalendar": {"title": "Google Calendar",- "optional": "Необязательно","description": "Автоматически подставляйте названия встреч и участников из вашего календаря.","connect": "Подключить Google Calendar","connecting": "Подключение...",@@ -3897,7 +3895,6 @@},"microsoftCalendar": {"title": "Microsoft Calendar",- "optional": "Необязательно","description": "Читайте встречи из календаря Outlook или Microsoft 365.","connect": "Подключить Microsoft Calendar","connected": "Подключено",@@ -3912,7 +3909,6 @@},"appleCalendar": {"title": "Календарь Apple",- "optional": "Необязательно","description": "Читайте встречи из Calendar.app — iCloud, Google, Exchange и Outlook в одном месте.","connect": "Подключить Календарь Apple","connected": "Подключено",@@ -3925,35 +3921,24 @@"connectFailed": "Ошибка подключения","connectFailedDescription": "При подключении к Calendar.app произошла ошибка. Перезапустите OpenWhispr и попробуйте снова."},- "sections": {- "connectors": "Коннекторы",- "calendar": "Календарь",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "API-ключи","description": "Управление API-ключами для программного доступа","proRequired": "Перейдите на платный план, чтобы получить доступ к API",- "manage": "Управлять ключами","viewPlans": "Посмотреть планы",- "dialogTitle": "API-ключи"+ "useWith": "Ключ работает с"},"mcp": {- "title": "Перенесите заметки в ваши инструменты ИИ","description": "Общайтесь, ищите и работайте с заметками в Claude, ChatGPT и Cursor.","step1": "В вашем инструменте ИИ добавьте OpenWhispr MCP, используя публичный URL",- "step2": "Создайте API-ключ выше с нужными разрешениями.",+ "step2": "Создайте API-ключ с нужными разрешениями.","step3": "Вставьте ключ в заголовок Authorization для подключения.","learnMore": "Узнать больше",- "viewPlans": "Посмотреть планы",- "copyUrl": "Копировать URL MCP","proRequired": "Перейдите на платный план, чтобы подключить OpenWhispr к Claude, ChatGPT и Cursor.",+ "worksWith": "Работает с",+ "copyUrl": "Копировать URL MCP","copied": "Скопировано"},"cli": {- "title": "Доступ через командную строку","description": "Дайте своему помощнику доступ к заметкам из терминала.","installLabel": "Установить","learnMore": "Открыть документацию",@@ -3983,8 +3968,26 @@"upgrade": "Улучшить"},"notABot": {- "title": "OpenWhispr — это запись встреч, а не бот","description": "OpenWhispr захватывает аудио напрямую из вашей системы — он никогда не присоединяется к встречам как участник. Просто подключите календарь и делайте заметки как обычно."+ },+ "nav": {+ "label": "Разделы интеграций",+ "groups": {+ "assistant": "Ассистент",+ "meetings": "Встречи",+ "developer": "Разработчикам"+ },+ "sections": {+ "connectors": "Коннекторы",+ "calendars": "Календари",+ "api": "API-ключи",+ "mcp": "MCP-сервер",+ "cli": "Командная строка"+ },+ "docs": "Документация по интеграциям"+ },+ "connectors": {+ "description": "Позвольте ассистенту пользоваться вашими инструментами. Вы одобряете каждое письмо, сообщение и задачу перед отправкой."}},"connectors": {@@ -4150,7 +4153,6 @@"title": "Черновики писем","description": "Ассистент открывает предзаполненный черновик в вашем почтовом приложении. Вы проверяете его и сами нажимаете «Отправить».","descriptionSend": "Ассистент показывает в чате карточку письма. Оно отправляется из вашего Gmail, только когда вы нажимаете «Отправить».",- "proRequired": "Перейдите на платный план, чтобы ассистент составлял для вас черновики писем.","unavailable": "Черновики писем сейчас недоступны.","targetLabel": "Создавать черновики писем в","autoResolved": "Автоматически · {{target}}",@@ -4165,14 +4167,13 @@},"slack": {"title": "Slack",- "description": "Ассистент может публиковать сообщения в каналах и людям от вашего имени. Вы одобряете каждое сообщение перед отправкой.",+ "description": "Публикует сообщения в каналах и людям.","connect": "Подключить","reconnect": "Переподключить","disconnect": "Отключить","connecting": "Завершите подключение в браузере…","connectedAs": "Подключено как {{account}} в {{workspace}}","needsReconnect": "Slack нужно переподключить.",- "proRequired": "Перейдите на платный план, чтобы ассистент отправлял сообщения в Slack за вас.","errors": {"connect_failed": "Не удалось подключить Slack. Попробуйте снова.","disconnect_failed": "Не удалось отключить Slack. Попробуйте снова.",@@ -4196,7 +4197,7 @@},"github": {"title": "GitHub",- "description": "Ассистент может искать issues и pull requests, создавать issues и оставлять комментарии от вашего имени, только в выбранных вами репозиториях. Он не может читать ваш код, и вы одобряете каждое issue и каждый комментарий перед публикацией.",+ "description": "Задачи и комментарии в выбранных вами репозиториях. Не может читать ваш код.","connect": "Подключить","reconnect": "Переподключить","disconnect": "Отключить",@@ -4205,7 +4206,6 @@"connectedAs_empty": "Подключено как {{account}} · репозиториев пока нет","connectedAs_unknown": "Подключено как {{account}}","needsReconnect": "GitHub нужно переподключить.",- "proRequired": "Перейдите на платный план, чтобы ассистент работал с issues в GitHub за вас.","reviewOnGithub": "Проверить на GitHub","disconnectedHint": "Отключено на этом компьютере. GitHub сохраняет авторизацию OpenWhispr, пока вы не удалите её там.","errors": {@@ -4237,7 +4237,7 @@},"gmail": {"title": "Gmail",- "description": "Ассистент может отправлять письма из вашего аккаунта Gmail. Он не может читать вашу почту, и каждое письмо вы отправляете сами кнопкой «Отправить».",+ "description": "Отправляет письма из вашего аккаунта. Не может читать вашу почту.","connect": "Подключить","reconnect": "Переподключить","disconnect": "Отключить",@@ -4245,7 +4245,6 @@"connectedAs": "Подключено как {{account}}","needsReconnect": "Gmail нужно переподключить.","grantKept": "Отключено. Google Календарь использует то же разрешение Google, поэтому OpenWhispr останется в списке вашего аккаунта Google, пока вы не отключите и Google Календарь.",- "proRequired": "Перейдите на платный план, чтобы ассистент отправлял письма из Gmail за вас.","errors": {"connect_failed": "Не удалось подключить Gmail. Попробуйте снова.","disconnect_failed": "Не удалось отключить Gmail. Попробуйте снова.",@@ -4272,14 +4271,13 @@},"linear": {"title": "Linear",- "description": "Ассистент может искать ваши задачи в Linear, а также создавать задачи и комментарии от вашего имени. Вы одобряете каждую задачу и каждый комментарий перед отправкой.",+ "description": "Ищет задачи, создаёт задачи и комментарии.","connect": "Подключить","reconnect": "Переподключить","disconnect": "Отключить","connecting": "Завершите подключение в браузере…","connectedAs": "Подключено как {{account}} в {{workspace}}","needsReconnect": "Linear нужно переподключить.",- "proRequired": "Перейдите на платный план, чтобы ассистент работал в Linear за вас.","errors": {"connect_failed": "Не удалось подключить Linear. Попробуйте снова.","disconnect_failed": "Не удалось отключить Linear. Попробуйте снова.",@@ -4436,7 +4434,10 @@"gmailDraftLimit": "Лимит писем на один запрос: {{max}}.","queryResults": "Найдено результатов: {{total}}","cardLimit": "Лимит карточек на один запрос: {{max}}."- }+ },+ "beta": "Бета",+ "upsell": "Коннекторы входят в платные тарифы. Перейдите на платный тариф, чтобы ассистент работал в ваших инструментах.",+ "locked": "Входит в платные тарифы"},"calendar": {"title": "Google Календарь",diff --git a/src/locales/zh-CN/translation.json b/src/locales/zh-CN/translation.jsonindex 562eaa93d..18c7aee25 100644--- a/src/locales/zh-CN/translation.json+++ b/src/locales/zh-CN/translation.json@@ -3831,10 +3831,8 @@},"integrations": {"title": "集成",- "description": "连接服务以增强您的工作流程","googleCalendar": {"title": "Google 日历",- "optional": "可选","description": "从日历自动填充会议名称和参与者。","connect": "连接 Google 日历","connecting": "连接中...",@@ -3853,7 +3851,6 @@},"microsoftCalendar": {"title": "Microsoft 日历",- "optional": "可选","description": "从 Outlook 或 Microsoft 365 日历读取会议。","connect": "连接 Microsoft 日历","connected": "已连接",@@ -3868,7 +3865,6 @@},"appleCalendar": {"title": "Apple 日历",- "optional": "可选","description": "从 Calendar.app 读取会议 — iCloud、Google、Exchange 和 Outlook 一站式接入。","connect": "连接 Apple 日历","connected": "已连接",@@ -3881,35 +3877,24 @@"connectFailed": "连接失败","connectFailedDescription": "连接 Calendar.app 时出错。请重启 OpenWhispr 后重试。"},- "sections": {- "connectors": "连接器",- "calendar": "日历",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "API 密钥","description": "管理用于程序访问的 API 密钥","proRequired": "升级到付费计划以访问 API",- "manage": "管理密钥","viewPlans": "查看套餐",- "dialogTitle": "API 密钥"+ "useWith": "密钥可用于"},"mcp": {- "title": "将笔记带到你的 AI 工具中","description": "在 Claude、ChatGPT 和 Cursor 中与你的笔记一起聊天、搜索和工作。","step1": "在你的 AI 工具中,使用公开 URL 添加 OpenWhispr MCP",- "step2": "在上方创建具有所需权限的 API 密钥。",+ "step2": "创建具有所需权限的 API 密钥。","step3": "将密钥粘贴为 Authorization 标头以连接。","learnMore": "了解更多",- "viewPlans": "查看套餐",- "copyUrl": "复制 MCP URL","proRequired": "升级到付费计划,以将 OpenWhispr 连接到 Claude、ChatGPT 和 Cursor。",+ "worksWith": "支持",+ "copyUrl": "复制 MCP URL","copied": "已复制"},"cli": {- "title": "命令行访问","description": "让你的助手通过终端访问你的笔记。","installLabel": "安装","learnMore": "查看文档",@@ -3939,8 +3924,26 @@"upgrade": "升级"},"notABot": {- "title": "OpenWhispr 是会议录制工具,不是机器人","description": "OpenWhispr 直接从您的系统捕获音频 — 它不会以参与者身份加入您的会议。只需连接日历,正常记录笔记即可。"+ },+ "nav": {+ "label": "集成分区",+ "groups": {+ "assistant": "助手",+ "meetings": "会议",+ "developer": "开发者"+ },+ "sections": {+ "connectors": "连接器",+ "calendars": "日历",+ "api": "API 密钥",+ "mcp": "MCP 服务器",+ "cli": "命令行"+ },+ "docs": "集成文档"+ },+ "connectors": {+ "description": "让助手使用您的工具。每封邮件、每条消息和每个议题发出前都需要您批准。"}},"connectors": {@@ -4106,7 +4109,6 @@"title": "邮件草稿","description": "助手会在您的邮件应用中打开预填好的草稿,由您检查并亲自点击发送。","descriptionSend": "助手会在聊天中显示一张邮件卡片,只有在您点击发送后才会通过您的 Gmail 发出。",- "proRequired": "升级到付费计划,让助手为您起草邮件。","unavailable": "邮件草稿暂时不可用。","targetLabel": "在此处起草邮件","autoResolved": "自动 · {{target}}",@@ -4121,14 +4123,13 @@},"slack": {"title": "Slack",- "description": "助手可以代表您在频道和给他人发布消息。每条消息发送前都需要您批准。",+ "description": "在频道中和向他人发布消息。","connect": "连接","reconnect": "重新连接","disconnect": "断开连接","connecting": "请在浏览器中完成连接…","connectedAs": "已以 {{account}} 身份连接到 {{workspace}}","needsReconnect": "需要重新连接 Slack。",- "proRequired": "升级到付费计划,让助手为您发送 Slack 消息。","errors": {"connect_failed": "无法连接 Slack,请重试。","disconnect_failed": "无法断开 Slack 连接,请重试。",@@ -4152,7 +4153,7 @@},"github": {"title": "GitHub",- "description": "助手可以仅在您选择的仓库中,以您的身份搜索 Issue 和拉取请求、创建 Issue 以及发表评论。它无法读取您的代码,每个 Issue 和评论在发布前都需要您批准。",+ "description": "您所选仓库中的议题和评论。无法读取您的代码。","connect": "连接","reconnect": "重新连接","disconnect": "断开连接",@@ -4161,7 +4162,6 @@"connectedAs_empty": "已以 {{account}} 身份连接 · 尚无仓库","connectedAs_unknown": "已以 {{account}} 身份连接","needsReconnect": "需要重新连接 GitHub。",- "proRequired": "升级到付费计划,让助手为您处理 GitHub Issue。","reviewOnGithub": "在 GitHub 上查看","disconnectedHint": "已在此电脑上断开连接。在您于 GitHub 上移除之前,GitHub 会保留 OpenWhispr 的授权。","errors": {@@ -4193,7 +4193,7 @@},"gmail": {"title": "Gmail",- "description": "助手可以通过您的 Gmail 账户发送邮件。它无法读取您的邮件,每封邮件都由您亲自点击发送。",+ "description": "从您的账户发送邮件。无法读取您的邮件。","connect": "连接","reconnect": "重新连接","disconnect": "断开连接",@@ -4201,7 +4201,6 @@"connectedAs": "已以 {{account}} 身份连接","needsReconnect": "需要重新连接 Gmail。","grantKept": "已断开连接。Google 日历使用相同的 Google 权限,因此在您也断开 Google 日历之前,OpenWhispr 仍会显示在您的 Google 帐号中。",- "proRequired": "升级到付费计划,让助手通过 Gmail 为您发送邮件。","errors": {"connect_failed": "无法连接 Gmail,请重试。","disconnect_failed": "无法断开 Gmail 连接,请重试。",@@ -4228,14 +4227,13 @@},"linear": {"title": "Linear",- "description": "助手可以搜索您的 Linear 议题,并以您的身份创建议题和评论。每个议题和评论发送前都需要您批准。",+ "description": "搜索议题,创建议题和评论。","connect": "连接","reconnect": "重新连接","disconnect": "断开连接","connecting": "请在浏览器中完成连接…","connectedAs": "已以 {{account}} 身份连接到 {{workspace}}","needsReconnect": "需要重新连接 Linear。",- "proRequired": "升级到付费计划,让助手为您在 Linear 中工作。","errors": {"connect_failed": "无法连接 Linear,请重试。","disconnect_failed": "无法断开 Linear 连接,请重试。",@@ -4392,7 +4390,10 @@"gmailDraftLimit": "每次请求最多只能准备 {{max}} 封邮件。","queryResults": "找到的结果:{{total}}","cardLimit": "每次请求最多只能准备 {{max}} 张卡片。"- }+ },+ "beta": "测试版",+ "upsell": "连接器包含在付费方案中。升级后,助手即可在您的工具中执行操作。",+ "locked": "付费方案包含此功能"},"calendar": {"title": "Google 日历",diff --git a/src/locales/zh-TW/translation.json b/src/locales/zh-TW/translation.jsonindex f563d953f..e9889f086 100644--- a/src/locales/zh-TW/translation.json+++ b/src/locales/zh-TW/translation.json@@ -3831,10 +3831,8 @@},"integrations": {"title": "整合",- "description": "連接服務以增強您的工作流程","googleCalendar": {"title": "Google 日曆",- "optional": "可選","description": "從日曆自動填入會議名稱和參與者。","connect": "連接 Google 日曆","connecting": "連接中...",@@ -3853,7 +3851,6 @@},"microsoftCalendar": {"title": "Microsoft 日曆",- "optional": "可選","description": "從 Outlook 或 Microsoft 365 日曆讀取會議。","connect": "連接 Microsoft 日曆","connected": "已連接",@@ -3868,7 +3865,6 @@},"appleCalendar": {"title": "Apple 日曆",- "optional": "可選","description": "從 Calendar.app 讀取會議 — iCloud、Google、Exchange 和 Outlook 一站式接入。","connect": "連接 Apple 日曆","connected": "已連接",@@ -3881,35 +3877,24 @@"connectFailed": "連線失敗","connectFailedDescription": "連線 Calendar.app 時發生錯誤。請重新啟動 OpenWhispr 後再試一次。"},- "sections": {- "connectors": "連接器",- "calendar": "行事曆",- "api": "API",- "mcp": "MCP",- "cli": "CLI"- },"api": {- "title": "API 金鑰","description": "管理用於程式存取的 API 金鑰","proRequired": "升級到付費方案以存取 API",- "manage": "管理金鑰","viewPlans": "查看方案",- "dialogTitle": "API 金鑰"+ "useWith": "金鑰可用於"},"mcp": {- "title": "將筆記帶到你的 AI 工具中","description": "在 Claude、ChatGPT 和 Cursor 中與你的筆記一起聊天、搜尋和工作。","step1": "在你的 AI 工具中,使用公開 URL 新增 OpenWhispr MCP",- "step2": "在上方建立具有所需權限的 API 金鑰。",+ "step2": "建立具有所需權限的 API 金鑰。","step3": "將金鑰貼上為 Authorization 標頭以連線。","learnMore": "瞭解更多",- "viewPlans": "查看方案",- "copyUrl": "複製 MCP URL","proRequired": "升級到付費方案,以將 OpenWhispr 連接到 Claude、ChatGPT 和 Cursor。",+ "worksWith": "支援",+ "copyUrl": "複製 MCP URL","copied": "已複製"},"cli": {- "title": "命令列存取","description": "讓你的助理透過終端機存取你的筆記。","installLabel": "安裝","learnMore": "查看文件",@@ -3939,8 +3924,26 @@"upgrade": "升級"},"notABot": {- "title": "OpenWhispr 是會議錄製工具,不是機器人","description": "OpenWhispr 直接從您的系統擷取音訊 — 它不會以參與者身分加入您的會議。只需連接日曆,正常記錄筆記即可。"+ },+ "nav": {+ "label": "整合分區",+ "groups": {+ "assistant": "助理",+ "meetings": "會議",+ "developer": "開發者"+ },+ "sections": {+ "connectors": "連接器",+ "calendars": "行事曆",+ "api": "API 金鑰",+ "mcp": "MCP 伺服器",+ "cli": "命令列"+ },+ "docs": "整合文件"+ },+ "connectors": {+ "description": "讓助理使用您的工具。每封郵件、每則訊息和每個議題送出前都需要您核准。"}},"connectors": {@@ -4106,7 +4109,6 @@"title": "郵件草稿","description": "助理會在您的郵件應用程式中開啟預先填寫的草稿,由您檢查並親自按下傳送。","descriptionSend": "助理會在聊天中顯示一張郵件卡片,只有在您按下傳送後才會透過您的 Gmail 寄出。",- "proRequired": "升級到付費方案,讓助理為您草擬郵件。","unavailable": "郵件草稿暫時無法使用。","targetLabel": "在此撰寫郵件","autoResolved": "自動 · {{target}}",@@ -4121,14 +4123,13 @@},"slack": {"title": "Slack",- "description": "助理可以代表您在頻道和向他人發佈訊息。每則訊息傳送前都需要您核准。",+ "description": "在頻道中和向他人發佈訊息。","connect": "連接","reconnect": "重新連接","disconnect": "中斷連接","connecting": "請在瀏覽器中完成連接…","connectedAs": "已以 {{account}} 身分連接到 {{workspace}}","needsReconnect": "需要重新連接 Slack。",- "proRequired": "升級到付費方案,讓助理為您傳送 Slack 訊息。","errors": {"connect_failed": "無法連接 Slack,請重試。","disconnect_failed": "無法中斷 Slack 連接,請重試。",@@ -4152,7 +4153,7 @@},"github": {"title": "GitHub",- "description": "助理可以僅在您選擇的存放庫中,以您的身分搜尋 Issue 和提取要求、建立 Issue 以及發表留言。它無法讀取您的程式碼,每個 Issue 和留言在發佈前都需要您核准。",+ "description": "您所選儲存庫中的議題和留言。無法讀取您的程式碼。","connect": "連接","reconnect": "重新連接","disconnect": "中斷連接",@@ -4161,7 +4162,6 @@"connectedAs_empty": "已以 {{account}} 身分連接 · 尚無存放庫","connectedAs_unknown": "已以 {{account}} 身分連接","needsReconnect": "需要重新連接 GitHub。",- "proRequired": "升級到付費方案,讓助理為您處理 GitHub Issue。","reviewOnGithub": "在 GitHub 上查看","disconnectedHint": "已在這台電腦上中斷連接。在您於 GitHub 上移除之前,GitHub 會保留 OpenWhispr 的授權。","errors": {@@ -4193,7 +4193,7 @@},"gmail": {"title": "Gmail",- "description": "助理可以透過您的 Gmail 帳戶傳送郵件。它無法讀取您的郵件,每封郵件都由您親自按下傳送。",+ "description": "從您的帳戶傳送郵件。無法讀取您的郵件。","connect": "連接","reconnect": "重新連接","disconnect": "中斷連接",@@ -4201,7 +4201,6 @@"connectedAs": "已以 {{account}} 身分連接","needsReconnect": "需要重新連接 Gmail。","grantKept": "已中斷連線。Google 日曆使用相同的 Google 權限,因此在您也中斷 Google 日曆的連線之前,OpenWhispr 仍會顯示在您的 Google 帳戶中。",- "proRequired": "升級到付費方案,讓助理透過 Gmail 為您傳送郵件。","errors": {"connect_failed": "無法連接 Gmail,請重試。","disconnect_failed": "無法中斷 Gmail 連接,請重試。",@@ -4228,14 +4227,13 @@},"linear": {"title": "Linear",- "description": "助理可以搜尋您的 Linear 議題,並以您的身分建立議題和留言。每個議題和留言傳送前都需要您核准。",+ "description": "搜尋議題,建立議題和留言。","connect": "連接","reconnect": "重新連接","disconnect": "中斷連接","connecting": "請在瀏覽器中完成連接…","connectedAs": "已以 {{account}} 身分連接到 {{workspace}}","needsReconnect": "需要重新連接 Linear。",- "proRequired": "升級到付費方案,讓助理為您在 Linear 中工作。","errors": {"connect_failed": "無法連接 Linear,請重試。","disconnect_failed": "無法中斷 Linear 連接,請重試。",@@ -4392,7 +4390,10 @@"gmailDraftLimit": "每次請求最多只能準備 {{max}} 封郵件。","queryResults": "找到的結果:{{total}}","cardLimit": "每次請求最多只能準備 {{max}} 張卡片。"- }+ },+ "beta": "測試版",+ "upsell": "連接器包含在付費方案中。升級後,助理即可在您的工具中執行操作。",+ "locked": "付費方案包含此功能"},"calendar": {"title": "Google 日曆",diff --git a/test/components/apiKeysSection.test.js b/test/components/apiKeysSection.test.jsnew file mode 100644index 000000000..b594c5426--- /dev/null+++ b/test/components/apiKeysSection.test.js@@ -0,0 +1,105 @@+const test = require("node:test");+const assert = require("node:assert/strict");+const React = require("react");+const { createRoot } = require("react-dom/client");++const { createElement } = React;+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");+const { installInteractiveDom } = require("../lib/interactiveDom");++// The create dialog renders as a marker while open; the list comes from __apiKeys.+const MOCKS = {+ "react-i18next": `+ const t = (key) => key;+ export const useTranslation = () => ({ t, i18n: { language: "en" } });+ `,+ "/services/ApiKeysService": `+ export const ApiKeysService = {+ list: () => globalThis.__apiKeysList(),+ revoke: async () => {},+ create: async () => ({}),+ };+ `,+ "/ui/dialog": `+ import React from "react";+ export const Dialog = ({ open, children }) =>+ open ? React.createElement("div", null, "CREATE DIALOG", children) : null;+ const Pass = ({ children }) => React.createElement("div", null, children);+ export const DialogContent = Pass;+ export const DialogHeader = Pass;+ export const DialogTitle = Pass;+ export const DialogDescription = Pass;+ export const DialogFooter = Pass;+ export const ConfirmDialog = () => null;+ `,+ "/ui/select": `+ import React from "react";+ const Pass = ({ children }) => React.createElement("div", null, children);+ export const Select = Pass;+ export const SelectContent = Pass;+ export const SelectTrigger = Pass;+ export const SelectValue = () => null;+ export const SelectItem = Pass;+ `,+ "/ui/useToast": `+ export const useToast = () => ({ toast() {} });+ `,+};++const keysOf = (count) =>+ Array.from({ length: count }, (_, index) => ({+ id: `key-${index}`,+ name: `Key ${index}`,+ key_prefix: `ow_${index}`,+ scopes: [],+ last_used_at: null,+ }));++async function renderSection(t, { keyCount = 0 } = {}) {+ let root = null;+ t.after(async () => {+ if (root) await React.act(async () => root.unmount());+ });+ installBrowserGlobals(t, { window: { electronAPI: {} } });+ let resolveList;+ globalThis.__apiKeysList = () =>+ new Promise((resolve) => {+ resolveList = () => resolve({ keys: keysOf(keyCount) });+ });+ t.after(() => delete globalThis.__apiKeysList);+ const container = installInteractiveDom(t);+ const vite = await createRendererServer(t, {+ cachePrefix: "openwhispr-api-keys-section-test-",+ noExternal: ["react-i18next"],+ mockModules: MOCKS,+ });+ const { default: ApiKeysSection } = await vite.ssrLoadModule("/components/ApiKeysSection.tsx");+ root = createRoot(container);+ const render = (createRequest) =>+ React.act(async () => root.render(createElement(ApiKeysSection, { createRequest })));+ return { container, render, loadKeys: () => React.act(async () => resolveList()) };+}++test("a create request opens the create dialog once the keys have loaded", async (t) => {+ const { container, render, loadKeys } = await renderSection(t, { keyCount: 1 });+ await render(1);+ assert.doesNotMatch(container.textContent, /CREATE DIALOG/);++ await loadKeys();+ assert.match(container.textContent, /CREATE DIALOG/);+});++test("without a create request, the dialog stays closed", async (t) => {+ const { container, render, loadKeys } = await renderSection(t, { keyCount: 1 });+ await render(0);+ await loadKeys();+ assert.doesNotMatch(container.textContent, /CREATE DIALOG/);+});++test("at the key limit a create request opens nothing, and the list says why", async (t) => {+ const { container, render, loadKeys } = await renderSection(t, { keyCount: 5 });+ await render(1);+ await loadKeys();+ assert.doesNotMatch(container.textContent, /CREATE DIALOG/);+ assert.match(container.textContent, /apiKeysSection\.maxKeysReached/);+});diff --git a/test/components/connectorRows.test.js b/test/components/connectorRows.test.jsindex 703de6401..6ee5f5a99 100644--- a/test/components/connectorRows.test.js+++ b/test/components/connectorRows.test.js@@ -96,7 +96,6 @@ test("a row's connecting detail shows only while Connect is in progress", asyncrow,isPaid: true,blockedByOrg: false,- onUpgrade() {},})));diff --git a/test/components/connectorsSection.test.js b/test/components/connectorsSection.test.jsindex 9bd2e2c22..39c2d17cf 100644--- a/test/components/connectorsSection.test.js+++ b/test/components/connectorsSection.test.js@@ -185,16 +185,15 @@ test("while usage is unknown, the card follows the saved flag like the chat doestest("while usage is unknown and the flag is unset, the card asks for a plan", async (t) => {const loading = { status: "loading", accountId: "acct" };const { textContent } = await renderSection(t, { usageState: loading, subscribedFlag: false });- assert.match(textContent, /connectors\.email\.proRequired/);+ assert.match(textContent, /connectors\.upsell/);});-test("free users see that a paid plan is required and a View Plans button", async (t) => {+test("free users see one upsell above the connectors, which still say what they do", async (t) => {const container = await renderSection(t, { usageState: usage(false) });- // Matches the API card pattern (IntegrationsView.tsx): the description says- // a paid plan is required, and the CTA is the primary/filled button.- assert.match(container.textContent, /connectors\.email\.proRequired/);- assert.doesNotMatch(container.textContent, /connectors\.email\.description/);+ assert.match(container.textContent, /connectors\.upsell/);+ assert.match(container.textContent, /connectors\.email\.description/);assert.doesNotMatch(container.textContent, /connectors\.email\.targets\.gmail/);+ // The section's first button is the upsell's primary View plans.const button = findElement(container, (node) => node.tagName === "BUTTON");assert.match(button.textContent, /integrations\.api\.viewPlans/);assert.equal(button.getAttribute("variant"), null);@@ -230,7 +229,7 @@ test("while the policy is unresolved, the card says drafts are unavailable", asytest("an unresolved policy doesn't hide the upsell from a free user", async (t) => {const { textContent } = await renderSection(t, { usageState: usage(false), allowed: false });- assert.match(textContent, /connectors\.email\.proRequired/);+ assert.match(textContent, /connectors\.upsell/);assert.match(textContent, /integrations\.api\.viewPlans/);});@@ -326,11 +325,12 @@ test("a stale login offers Reconnect and Disconnect", async (t) => {assert.match(staleMarkup, /connectors\.slack\.needsReconnect/);});-test("free users with no login see Upgrade on every row and no Connect", async (t) => {+test("free users with no login see a single View plans and no Connect", async (t) => {const none = await renderSection(t, { isPaid: false, blocked: false });- // Email, Gmail, Slack, Linear and GitHub.- assert.equal(count(none.textContent, /integrations\.api\.viewPlans/g), 5);+ assert.equal(count(none.textContent, /integrations\.api\.viewPlans/g), 1);assert.equal(buttonWithText(none, "connectors.slack.connect"), null);+ // Every connector is still listed, each marked beta: email, Gmail, Slack, Linear and GitHub.+ assert.equal(count(none.textContent, /connectors\.beta/g), 5);});test("free users can always disconnect a login they have", async (t) => {@@ -340,11 +340,7 @@ test("free users can always disconnect a login they have", async (t) => {statuses: { slack: SLACK },});assert.match(lapsed.textContent, /connectors\.slack\.disconnect/);- assert.equal(- count(lapsed.textContent, /integrations\.api\.viewPlans/g),- 4,- "only the email, Gmail, Linear and GitHub rows' Upgrade"- );+ assert.equal(count(lapsed.textContent, /integrations\.api\.viewPlans/g), 1);});test("an org that turned connectors off still lets the user remove a login", async (t) => {@@ -523,3 +519,10 @@ test("every CONNECTOR_ROWS entry renders after the email row, in list order", aspreviousIndex = index;}});++test("a free user whose org turned connectors off sees why, not an upsell", async (t) => {+ const { textContent } = await renderSection(t, { usageState: usage(false), blocked: true });+ assert.match(textContent, /connectors\.policyOff/);+ assert.doesNotMatch(textContent, /connectors\.upsell/);+ assert.doesNotMatch(textContent, /integrations\.api\.viewPlans/);+});diff --git a/test/components/directionalContentPolicy.test.js b/test/components/directionalContentPolicy.test.jsindex bffc8744d..8bdf6f138 100644--- a/test/components/directionalContentPolicy.test.js+++ b/test/components/directionalContentPolicy.test.js@@ -75,7 +75,8 @@ test("technical output values remain LTR inside an Arabic document", () => {],["src/components/ui/TechnicalErrorDetails.tsx", /<pre\s+dir="ltr"[\s\S]*?\{text\}/],["src/components/ui/NixOsPasteInfo.tsx", /<div\s+dir="ltr"[\s\S]*?<pre/],- ["src/components/McpIntegrationCard.tsx", /<span\s+dir="ltr"[\s\S]*?\{MCP_URL\}/],+ ["src/components/integrations/McpPane.tsx", /<CopyableCommand\s+command=\{MCP_URL\}/],+ ["src/components/ui/CopyableCommand.tsx", /<div\s+dir="ltr"[\s\S]*?\{command\}/],["src/components/settings/WorkspaceBillingCard.tsx",/<span\s+dir="ltr"[^>]*>\s*\{seatsUsed\} \/ \{seatsTotal\}/,@@ -145,11 +146,11 @@ test("localized sentences isolate technical interpolations without changing word/<BidiInterpolatedText[\s\S]*?members\.invited[\s\S]*?value=\{invitedEmail\}/,],[- "src/components/IntegrationsView.tsx",+ "src/components/integrations/CalendarsPane.tsx",/<BidiInterpolatedText[\s\S]*?googleCalendar\.disconnectConfirm[\s\S]*?value=\{confirmDisconnectEmail\}/,],[- "src/components/IntegrationsView.tsx",+ "src/components/integrations/CalendarsPane.tsx",/<BidiInterpolatedText[\s\S]*?microsoftCalendar\.disconnectConfirm[\s\S]*?value=\{confirmMsDisconnectEmail\}/,],];diff --git a/test/components/githubConnectorRow.test.js b/test/components/githubConnectorRow.test.jsindex 04b02589d..25b78899f 100644--- a/test/components/githubConnectorRow.test.js+++ b/test/components/githubConnectorRow.test.js@@ -181,7 +181,6 @@ async function renderGithubRow(row,isPaid,blockedByOrg,- onUpgrade() {},...props,}))diff --git a/test/components/gmailConnectorRow.test.js b/test/components/gmailConnectorRow.test.jsindex 2e094fe2a..73addb791 100644--- a/test/components/gmailConnectorRow.test.js+++ b/test/components/gmailConnectorRow.test.js@@ -91,9 +91,7 @@ async function renderGmailRow(const { createRoot } = require("react-dom/client");root = createRoot(container);await React.act(async () =>- root.render(- React.createElement(ConnectorLoginRow, { row, isPaid, blockedByOrg, onUpgrade() {} })- )+ root.render(React.createElement(ConnectorLoginRow, { row, isPaid, blockedByOrg })));// Let the status load from the mount effect commit.await React.act(async () => {});@@ -229,10 +227,11 @@ test("a free plan can still disconnect a Gmail login it has", async (t) => {assert.equal(hasButton(container, "integrations.api.viewPlans"), false);});-test("a free plan without a login sees the upsell and no Connect", async (t) => {+test("a free plan without a login still sees what Gmail does, with no button", async (t) => {const container = await renderGmailRow(t, { status: DISCONNECTED, isPaid: false });- assert.match(container.textContent, /connectors\.gmail\.proRequired/);- assert.equal(hasButton(container, "integrations.api.viewPlans"), true);+ assert.match(container.textContent, /connectors\.gmail\.description/);+ assert.match(container.textContent, /connectors\.beta/);+ assert.equal(hasButton(container, "integrations.api.viewPlans"), false);assert.equal(hasButton(container, "connectors.gmail.connect"), false);});@@ -250,3 +249,59 @@ test("with connectors turned off and no login, the row is hidden", async (t) =>const container = await renderGmailRow(t, { status: DISCONNECTED, blockedByOrg: true });assert.equal(container.textContent, "");});++// Whether `node` sits inside something drawn at reduced opacity.+function isDimmed(node) {+ for (let current = node; current; current = current.parentNode) {+ if (current.getAttribute?.("class")?.split(/\s+/).includes("opacity-60")) return true;+ }+ return false;+}++function textNode(root, text) {+ const found = findElement(+ root,+ (element) => element.tagName === "P" && element.textContent === text+ );+ assert.ok(found, `${text} is rendered`);+ return found;+}++const lockIcon = (root) =>+ findElement(root, (element) => element.getAttribute?.("aria-label") === "connectors.locked");++test("a free plan without a login sees Gmail dimmed, with a lock that says why", async (t) => {+ const container = await renderGmailRow(t, { status: DISCONNECTED, isPaid: false });+ assert.equal(isDimmed(textNode(container, "connectors.gmail.title")), true);+ assert.equal(isDimmed(textNode(container, "connectors.gmail.description")), true);+ assert.ok(lockIcon(container), "the lock is labelled for screen readers");+});++test("a free plan with a login sees Gmail at full contrast and unlocked", async (t) => {+ const container = await renderGmailRow(t, { status: GMAIL, isPaid: false });+ assert.equal(isDimmed(textNode(container, "connectors.gmail.title")), false);+ assert.equal(isDimmed(button(container, "connectors.gmail.disconnect")), false);+ assert.equal(lockIcon(container), null);+});++test("on a free plan, what a disconnect leaves behind isn't dimmed with the locked row", async (t) => {+ let broadcast = null;+ const container = await renderGmailRow(t, {+ status: GMAIL,+ isPaid: false,+ electronAPI: {+ onConnectorStatusChanged: (listener) => {+ broadcast = listener;+ return () => {};+ },+ connectorDisconnect: async () => ({ status: "disconnected", grantKept: true }),+ },+ });++ await React.act(async () => click(button(container, "connectors.gmail.disconnect")));+ await React.act(async () => broadcast([DISCONNECTED]));++ assert.ok(lockIcon(container), "the row is locked once the login is gone");+ assert.equal(isDimmed(textNode(container, "connectors.gmail.title")), true);+ assert.equal(isDimmed(textNode(container, "connectors.gmail.grantKept")), false);+});diff --git a/test/components/integrationsView.test.js b/test/components/integrationsView.test.jsnew file mode 100644index 000000000..6c3970ea0--- /dev/null+++ b/test/components/integrationsView.test.js@@ -0,0 +1,350 @@+const test = require("node:test");+const assert = require("node:assert/strict");+const React = require("react");+const { createRoot } = require("react-dom/client");++const { createElement } = React;+const { createRendererServer, installBrowserGlobals } = require("../lib/rendererTestHarness");+const { findElement, installInteractiveDom } = require("../lib/interactiveDom");++const MOCKS = {+ "react-i18next": `+ const t = (key) => key;+ export const useTranslation = () => ({ t, i18n: { language: "en" } });+ `,+ "/stores/settingsStore": `+ export function useSettingsStore(selector) {+ return selector({+ gcalAccounts: globalThis.__gcalAccounts ?? [],+ mcalAccounts: [],+ appleCalendarConnected: false,+ });+ }+ `,+ "/hooks/useConnectorAccess": `+ export function useConnectorAccess() {+ return globalThis.__connectorAccess;+ }+ `,+ "/stores/connectorStatusStore": `+ export function useConnectorStatusStore(selector) {+ return selector({ statuses: globalThis.__connectorStatuses ?? {} });+ }+ export async function ensureConnectorStatus() {}+ `,+ "/connectors/connectorRows": `+ export const CONNECTOR_ROWS = [{ id: "gmail" }, { id: "slack" }, { id: "linear" }, { id: "github" }];+ `,+ "/ConnectorsSection": `+ import React from "react";+ export function ConnectorsSection() {+ React.useEffect(() => {+ globalThis.__connectorsMounts += 1;+ }, []);+ return React.createElement("div", null, "CONNECTORS SECTION");+ }+ `,+ "/ApiKeysSection": `+ import React from "react";+ export default function ApiKeysSection({ createRequest }) {+ return React.createElement("div", null, "API KEYS SECTION create:" + createRequest);+ }+ `,+ "/integrations/CalendarsPane": `+ import React from "react";+ export function CalendarsPane() { return React.createElement("div", null, "CALENDARS PANE"); }+ `,+ "/ui/select": `+ import React from "react";+ const Pass = ({ children }) => React.createElement("div", null, children);+ export const Select = Pass;+ export const SelectContent = Pass;+ export const SelectTrigger = Pass;+ export const SelectValue = () => null;+ export const SelectItem = ({ children }) => React.createElement("span", null, children);+ `,+ "/ui/button": `+ import React from "react";+ export function Button(props) { return React.createElement("button", props); }+ `,+ "/ui/useToast": `+ export const useToast = () => ({ toast() {} });+ `,+};++function click(element) {+ element.dispatchEvent({+ type: "click",+ bubbles: true,+ button: 0,+ defaultPrevented: false,+ cancelBubble: false,+ preventDefault() {+ this.defaultPrevented = true;+ },+ stopPropagation() {+ this.cancelBubble = true;+ },+ });+}++const nav = (container) => findElement(container, (node) => node.tagName === "NAV");+const navButton = (container, section) =>+ findElement(+ nav(container),+ (node) =>+ node.tagName === "BUTTON" &&+ node.textContent.trim().startsWith(`integrations.nav.sections.${section}`)+ );+// Icons render whitespace text nodes, so labels are compared trimmed.+const label = (node) => node.textContent.trim();+// Sections stay mounted once opened; only the open one is shown.+const shownText = (node) => {+ if (node.nodeType === 3) return node.textContent;+ if (node.nodeType === 1 && node.getAttribute("hidden") !== null) return "";+ return node.childNodes.map(shownText).join("");+};+// Focus checks compare as booleans: a failed assert would try to print the DOM.+const heading = (container, text) =>+ findElement(container, (node) => node.tagName === "H2" && label(node) === text);+const buttonWithText = (container, text) =>+ findElement(container, (node) => node.tagName === "BUTTON" && label(node) === text);++async function renderView(+ t,+ {+ isPaid = true,+ section = "connectors",+ statuses = {},+ gcalAccounts = [],+ connectorAccess = { isPaid, blockedByOrg: false, connectorsAllowed: true },+ } = {}+) {+ let root = null;+ t.after(async () => {+ if (root) await React.act(async () => root.unmount());+ });+ installBrowserGlobals(t, {+ window: { electronAPI: { getPlatform: () => "darwin", openExternal() {} } },+ });+ globalThis.__connectorStatuses = statuses;+ globalThis.__gcalAccounts = gcalAccounts;+ globalThis.__connectorAccess = connectorAccess;+ globalThis.__connectorsMounts = 0;+ t.after(() => {+ delete globalThis.__connectorStatuses;+ delete globalThis.__gcalAccounts;+ delete globalThis.__connectorAccess;+ delete globalThis.__connectorsMounts;+ });+ const container = installInteractiveDom(t);+ const vite = await createRendererServer(t, {+ cachePrefix: "openwhispr-integrations-view-test-",+ noExternal: ["react-i18next"],+ mockModules: MOCKS,+ });+ const { default: IntegrationsView } = await vite.ssrLoadModule(+ "/components/IntegrationsView.tsx"+ );+ const upgrades = { count: 0 };+ function Harness() {+ const [current, setCurrent] = React.useState(section);+ return createElement(IntegrationsView, {+ isPaid,+ onUpgrade: () => upgrades.count++,+ section: current,+ onSectionChange: setCurrent,+ });+ }+ root = createRoot(container);+ await React.act(async () => root.render(createElement(Harness)));+ return { container, upgrades };+}++test("sectionMeta shows counts on a paid plan and plan badges on a free one", async (t) => {+ const vite = await createRendererServer(t, {+ cachePrefix: "openwhispr-integrations-sections-test-",+ });+ const { sectionMeta } = await vite.ssrLoadModule(+ "/components/integrations/integrationsSections.ts"+ );+ const connectors = (isPaid, ready, blockedByOrg = false) => ({ isPaid, blockedByOrg, ready });+ const paid = { isPaid: true, connectors: connectors(true, 2), connectedCalendars: 1 };+ const free = { isPaid: false, connectors: connectors(false, 0), connectedCalendars: 1 };+ const empty = { isPaid: true, connectors: connectors(true, 0), connectedCalendars: 0 };++ assert.deepEqual(sectionMeta("connectors", paid), { kind: "count", value: 2 });+ assert.deepEqual(sectionMeta("calendars", paid), { kind: "count", value: 1 });+ assert.equal(sectionMeta("api", paid), null);+ assert.equal(sectionMeta("mcp", paid), null);+ assert.equal(sectionMeta("cli", paid), null);++ assert.deepEqual(sectionMeta("connectors", free), { kind: "badge", badge: "pro" });+ assert.deepEqual(sectionMeta("calendars", free), { kind: "count", value: 1 });+ assert.deepEqual(sectionMeta("api", free), { kind: "badge", badge: "pro" });+ assert.deepEqual(sectionMeta("mcp", free), { kind: "badge", badge: "pro" });+ assert.deepEqual(sectionMeta("cli", free), { kind: "badge", badge: "free" });++ assert.equal(sectionMeta("connectors", empty), null);+ assert.equal(sectionMeta("calendars", empty), null);++ // The organization turned connectors off: no plan badge and no count, on any plan.+ for (const isPaid of [true, false]) {+ const blocked = { ...paid, isPaid, connectors: connectors(isPaid, 2, true) };+ assert.equal(sectionMeta("connectors", blocked), null);+ }+});++test("the nav lists every section and switches the pane it shows", async (t) => {+ const { container } = await renderView(t);++ const order = [];+ findElement(nav(container), (node) => {+ if (node.tagName === "BUTTON" && label(node).startsWith("integrations.nav.sections.")) {+ order.push(label(node).replace(/^integrations\.nav\.sections\.([a-z]+).*$/, "$1"));+ }+ return false;+ });+ assert.deepEqual(order, ["calendars", "connectors", "api", "mcp", "cli"]);+ assert.equal(navButton(container, "connectors").getAttribute("aria-current"), "page");+ assert.match(container.textContent, /CONNECTORS SECTION/);++ await React.act(async () => click(navButton(container, "cli")));++ assert.equal(navButton(container, "cli").getAttribute("aria-current"), "page");+ assert.equal(navButton(container, "connectors").getAttribute("aria-current"), null);+ assert.doesNotMatch(shownText(container), /CONNECTORS SECTION/);+ assert.match(shownText(container), /npm install -g @openwhispr\/cli/);+});++test("a section keeps its state while another one is open", async (t) => {+ const { container } = await renderView(t);++ await React.act(async () => click(navButton(container, "api")));+ await React.act(async () => click(navButton(container, "connectors")));++ // A connect running in a connector row (GitHub's device code) would stop on unmount.+ assert.equal(globalThis.__connectorsMounts, 1);+ assert.match(shownText(container), /CONNECTORS SECTION/);+});++test("Calendars stays mounted from any section, so its listeners keep the nav count fresh", async (t) => {+ const { container } = await renderView(t, { section: "api" });++ assert.match(container.textContent, /CALENDARS PANE/);+ assert.doesNotMatch(shownText(container), /CALENDARS PANE/);+});++test("the section it's given opens first", async (t) => {+ const { container } = await renderView(t, { section: "calendars" });++ assert.equal(navButton(container, "calendars").getAttribute("aria-current"), "page");+ assert.match(shownText(container), /CALENDARS PANE/);+});++test("MCP's Create API key step opens the API keys section and asks it to create one", async (t) => {+ const { container } = await renderView(t, { section: "mcp" });++ await React.act(async () => click(buttonWithText(container, "apiKeysSection.createButton")));++ assert.equal(navButton(container, "api").getAttribute("aria-current"), "page");+ assert.match(shownText(container), /API KEYS SECTION create:1/);+ assert.equal(+ container.ownerDocument.activeElement === heading(container, "integrations.nav.sections.api"),+ true+ );+});++test("the API keys section links on to MCP and the command line", async (t) => {+ const { container } = await renderView(t, { section: "api" });++ const cliLink = findElement(+ container,+ (node) =>+ node.tagName === "BUTTON" &&+ node.textContent.trim() === "integrations.nav.sections.cli" &&+ !nav(container).contains(node)+ );+ await React.act(async () => click(cliLink));++ assert.equal(navButton(container, "cli").getAttribute("aria-current"), "page");+ // The link is hidden with its section, so focus moves to the opened one.+ assert.equal(+ container.ownerDocument.activeElement === heading(container, "integrations.nav.sections.cli"),+ true+ );+});++test("picking a section from the nav leaves focus on the nav", async (t) => {+ const { container } = await renderView(t);+ const cliButton = navButton(container, "cli");+ cliButton.focus();++ await React.act(async () => click(cliButton));++ assert.equal(container.ownerDocument.activeElement === cliButton, true);+});++test("a paid plan sees how many connectors and calendars are connected", async (t) => {+ const { container } = await renderView(t, {+ statuses: {+ gmail: { id: "gmail", connected: true },+ slack: { id: "slack", connected: true },+ linear: { id: "linear", connected: false },+ github: { id: "github", connected: true, needsReconnect: true },+ },+ gcalAccounts: [{ email: "[email protected]" }],+ });++ assert.equal(label(navButton(container, "connectors")), "integrations.nav.sections.connectors2");+ assert.equal(label(navButton(container, "calendars")), "integrations.nav.sections.calendars1");+ assert.equal(label(navButton(container, "api")), "integrations.nav.sections.api");+});++test("the Connectors tag follows the plan check the Connectors pane uses", async (t) => {+ // Usage still loading: the page counts as paid, while connectors fall back to+ // the saved subscription flag, as the pane does.+ const { container } = await renderView(t, {+ isPaid: true,+ connectorAccess: { isPaid: false, blockedByOrg: false, connectorsAllowed: false },+ });++ assert.equal(+ label(navButton(container, "connectors")),+ "integrations.nav.sections.connectorsintegrations.plan.pro"+ );+ assert.equal(label(navButton(container, "api")), "integrations.nav.sections.api");+});++test("a free plan sees plan badges, the API upsell, and no key list", async (t) => {+ const { container, upgrades } = await renderView(t, { isPaid: false, section: "api" });++ assert.equal(+ label(navButton(container, "connectors")),+ "integrations.nav.sections.connectorsintegrations.plan.pro"+ );+ assert.equal(+ label(navButton(container, "mcp")),+ "integrations.nav.sections.mcpintegrations.plan.pro"+ );+ assert.equal(+ label(navButton(container, "cli")),+ "integrations.nav.sections.cliintegrations.cli.local.freeBadge"+ );+ assert.match(shownText(container), /integrations\.api\.proRequired/);+ assert.doesNotMatch(container.textContent, /API KEYS SECTION/);++ await React.act(async () => click(buttonWithText(container, "integrations.api.viewPlans")));+ assert.equal(upgrades.count, 1);+});++test("a free plan still sees MCP's setup steps, with Create API key disabled", async (t) => {+ const { container } = await renderView(t, { isPaid: false, section: "mcp" });++ assert.match(container.textContent, /integrations\.mcp\.proRequired/);+ assert.match(container.textContent, /https:\/\/mcp\.openwhispr\.com\/mcp/);+ assert.notEqual(+ buttonWithText(container, "apiKeysSection.createButton").getAttribute("disabled"),+ null+ );+});diff --git a/test/components/linearConnectorRow.test.js b/test/components/linearConnectorRow.test.jsindex 1e0a49b89..34083fbc3 100644--- a/test/components/linearConnectorRow.test.js+++ b/test/components/linearConnectorRow.test.js@@ -93,9 +93,7 @@ async function renderLinearRow(const { createRoot } = require("react-dom/client");root = createRoot(container);await React.act(async () =>- root.render(- React.createElement(ConnectorLoginRow, { row, isPaid, blockedByOrg, onUpgrade() {} })- )+ root.render(React.createElement(ConnectorLoginRow, { row, isPaid, blockedByOrg })));// Let the status load from the mount effect commit.await React.act(async () => {});@@ -172,10 +170,10 @@ test("a free plan can still disconnect a Linear login it has", async (t) => {assert.equal(hasButton(connected.container, "connectors.linear.connect"), false);});-test("a free plan without a Linear login sees the upsell and no Connect", async (t) => {+test("a free plan without a Linear login still sees what Linear does, with no button", async (t) => {const { container } = await renderLinearRow(t, { status: DISCONNECTED, isPaid: false });- assert.match(container.textContent, /connectors\.linear\.proRequired/);- assert.equal(hasButton(container, "integrations.api.viewPlans"), true);+ assert.match(container.textContent, /connectors\.linear\.description/);+ assert.equal(hasButton(container, "integrations.api.viewPlans"), false);assert.equal(hasButton(container, "connectors.linear.connect"), false);});diff --git a/test/components/slackConnectorRow.test.js b/test/components/slackConnectorRow.test.jsindex 21113e7a8..2b63e20c1 100644--- a/test/components/slackConnectorRow.test.js+++ b/test/components/slackConnectorRow.test.js@@ -77,7 +77,6 @@ test("Connect runs the browser flow once and says why it failed", async (t) => {row,isPaid: true,blockedByOrg: false,- onUpgrade() {},})));@@ -140,7 +139,6 @@ async function renderDisconnectedRow(t, { connectorConnect }) {row,isPaid: true,blockedByOrg: false,- onUpgrade() {},})));@@ -238,7 +236,6 @@ async function renderConnectedRow(t, { connectorDisconnect }) {row,isPaid: true,blockedByOrg: false,- onUpgrade() {},})));diff --git a/test/utils/linearErrorCopy.test.js b/test/utils/linearErrorCopy.test.jsindex b816f324b..d88f34680 100644--- a/test/utils/linearErrorCopy.test.js+++ b/test/utils/linearErrorCopy.test.js@@ -117,7 +117,6 @@ test("the Linear row, browser page, card note, link and receipts have copy in ev]),["connectedAs", linear.connectedAs],["needsReconnect", linear.needsReconnect],- ["proRequired", linear.proRequired],...ROW_ERRORS.map((code) => [`errors.${code}`, linear.errors[code]]),...["connectedTitle", "connectedBody", "failedTitle", "failedBody"].map((key) => [`browser.${key}`,