Update the Connect account dialog and provider chooser (#23361)

## Thinking Path

> - Paperclip helps people manage agents.
> - Each agent can use a managed provider account.
> - People can connect that account during onboarding or from agent
settings.
> - The two screens used different sign-in controls.
> - This change brings the wizard controls to the account dialog and
groups other providers in a grid.

## Linked Issues or Issue Description

**Subsystem affected**

Agent settings and managed AI connections.

**Current behavior**

The account dialog uses different controls from onboarding and displays
other providers in separate lists.

**Proposed behavior**

Show provider sign-in, code entry, expiry, and retry inside the
credential panel. Show other providers in a compact grid.

## What Changed

- Share the provider marks and sign-in controls with onboarding.
- Keep the account fields visible while sign-in prepares.
- Crossfade between the account form and provider grid. Keep the modal
width stable.

## Verification

- All 29 tests in AdapterLoginChrome and AgentProviderConnection passed.
- The UI TypeScript check passed.
- To check the layout, open Connect account from agent settings, choose
Other Models, then return to the provider form.

## Risks

- The dialog shares controls with onboarding. Changes to their defaults
could affect both entry points.
- Subscription sign-in depends on the selected execution environment.

## Model Used

OpenAI GPT-6 through Codex, with local editing and test execution.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [ ] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [ ] I will address all Greptile and reviewer comments before
requesting merge
This commit is contained in:
Tonio authored and GitHub committed 2026-12-01 09:14:24 +00:00
1 parent 285db75d87
commit 2033ab912f
9 files changed
+309 -134

No files matched your search

+2 -55
View File
@@ -1,3 +1,4 @@
import { ModelSourceMark } from "./onboarding/ModelSourceMark";
import { OnboardingSignInMark, OnboardingSignInRetry } from "./AdapterLoginChrome";
import type { AiConnectionLoginIntent } from "@paperclipai/shared";
import { cancelAdapterLoginSession, cancelPendingAdapterLogin, matchesAdapterLoginTarget } from "./useAdapterLoginCancellation";
@@ -27,7 +28,7 @@ import { OnboardingGatewaySetup } from "./onboarding/OnboardingGatewaySetup";
import { randomAgentAppearance, resolveAgentAppearance, agentAppearanceSchema } from "@paperclipai/shared";
import { OnboardingCharacter } from "./onboarding/OnboardingCharacter";
import { useCallback, useEffect, useState, useMemo, useRef } from "react";
import type { ComponentType, CSSProperties } from "react";
import type { CSSProperties } from "react";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { AnimatePresence, MotionConfig, motion } from "motion/react";
import type {
@@ -248,46 +249,6 @@ function adapterConfigHasAnthropicApiKey(config: Record<string, unknown>): boole
return binding.type === "secret_ref" || binding.type === "user_secret_ref";
}
/**
* Full-colour brand marks for the sources this step offers.
*
* The registry's own icons are monochrome, drawn to sit in dense config UI
* where a row of saturated logos would be noise. This step is the opposite
* case: two large tiles carrying the whole choice, where the brand is the
* fastest thing to recognise.
*
* Keyed by adapter type with a fallback, so the row stays registry-driven. An
* adapter with no brand file here still renders — with its registry icon —
* rather than a gap where a tile should be.
*/
const MODEL_SOURCE_BRAND_MARKS: Record<string, string> = {
claude_local: "/brands/claude-color.svg",
};
/**
* OpenAI's blossom, inline rather than served from `/brands`.
*
* The supplied asset is a white fill, which was fine while this row only ever
* sat on a dark tile. It follows the reader's system setting now, and white on
* the light tile is invisible. Inlining lets the path take
* `currentColor` and be legible in both, which an `<img>` cannot do.
*/
function OpenAiBlossom({ className }: { className?: string }) {
return (
<svg viewBox="114 114 488 488" className={className} fill="none" aria-hidden>
<path
fill="currentColor"
d="M508.749 317.399C516.777 287.314 508.991 253.884 485.389 230.282C461.788 206.681 428.36 198.895 398.273 206.923C376.231 184.928 343.39 174.956 311.148 183.596C278.906 192.234 255.45 217.292 247.36 247.361C217.291 255.451 192.233 278.91 183.595 311.149C174.957 343.391 184.927 376.232 206.924 398.274C198.896 428.359 206.683 461.789 230.284 485.391C253.885 508.992 287.313 516.779 317.401 508.75C339.442 530.745 372.286 540.717 404.525 532.079C436.767 523.441 460.223 498.384 468.313 468.315C498.383 460.224 523.44 436.766 532.078 404.526C540.716 372.285 530.747 339.443 508.749 317.402V317.399ZM470.899 244.776C486.892 260.77 493.488 282.601 490.687 303.412L415.577 260.046C412.411 258.218 408.509 258.218 405.345 260.046L317.401 310.82V277.526C317.401 275.191 318.652 273.005 320.676 271.837L387.644 233.174C414.178 218.353 448.346 222.223 470.901 244.776H470.899ZM357.837 311.144L398.275 334.491V381.185L357.837 404.532L317.398 381.185V334.491L357.837 311.144ZM264.776 269.693C265.207 239.305 285.644 211.649 316.453 203.393C338.3 197.54 360.505 202.744 377.127 215.573L302.014 258.937C298.848 260.764 296.898 264.144 296.898 267.798V369.346L268.065 352.699C266.043 351.531 264.776 349.353 264.776 347.017V269.691V269.693ZM203.391 316.454C209.244 294.608 224.854 277.978 244.276 269.999V356.73C244.276 360.384 246.226 363.763 249.392 365.591L337.337 416.365L308.503 433.013C306.481 434.181 303.961 434.188 301.939 433.02L234.971 394.357C208.868 378.789 195.138 347.261 203.391 316.454ZM244.775 470.9C228.781 454.906 222.186 433.075 224.986 412.264L300.096 455.63C303.263 457.457 307.164 457.457 310.328 455.63L398.273 404.856V438.149C398.273 440.485 397.022 442.671 394.997 443.839L328.029 482.502C301.495 497.322 267.327 493.452 244.772 470.9H244.775ZM450.897 445.982C450.466 476.371 430.029 504.027 399.22 512.283C377.373 518.136 355.168 512.932 338.547 500.102L413.659 456.738C416.826 454.911 418.775 451.532 418.775 447.877V346.329L447.609 362.977C449.631 364.145 450.897 366.323 450.897 368.659V445.985V445.982ZM512.282 399.221C506.429 421.068 490.819 437.697 471.397 445.676V358.946C471.397 355.292 469.448 351.912 466.281 350.085L378.336 299.311L407.17 282.663C409.192 281.495 411.712 281.487 413.734 282.655L480.702 321.318C506.805 336.887 520.536 368.415 512.282 399.221Z"
/>
</svg>
);
}
const MODEL_SOURCE_INLINE_MARKS: Record<string, ComponentType<{ className?: string }>> = {
codex_local: OpenAiBlossom,
};
/**
* The environment variable each source reads its key from.
*
@@ -305,20 +266,6 @@ function apiKeyEnvKeyFor(adapterType: string): string {
return API_KEY_ENV_KEYS[adapterType] ?? "API_KEY";
}
function ModelSourceMark({
type,
Fallback,
}: {
type: string;
Fallback: ComponentType<{ className?: string }>;
}) {
const Inline = MODEL_SOURCE_INLINE_MARKS[type];
if (Inline) return <Inline className="size-full" />;
const brand = MODEL_SOURCE_BRAND_MARKS[type];
if (!brand) return <Fallback className="size-full" />;
return <img src={brand} alt="" className="size-full" />;
}
export { ONBOARDING_STORAGE_KEY } from "../lib/onboarding-state";
const INCOMPLETE_ONBOARDING_STATE_MESSAGE =
@@ -26,6 +26,9 @@ type Props = {
connectionId?: string;
name: string;
hideName?: boolean;
defaultAccountDialog?: boolean;
onOtherModels?: () => void;
advancedProviders?: ReactNode;
nameForMethod?: (method: AiAuthMethod) => string;
ownership: "personal" | "shared";
agentIds: string[];
@@ -44,8 +47,10 @@ export function AiConnectionCredentialStep(props: Props) {
return <SubscriptionConnectionStep {...props} />;
}
function SubscriptionConnectionStep({ companyId, provider, initialMethod, fixedMethod, connectionId, name: initialName, hideName, nameForMethod, ownership, agentIds, allAgents, environmentId: suppliedEnvironmentId, loginAgentId, onComplete, onCancel, defaults, disabled }: Props) {
function SubscriptionConnectionStep({ defaultAccountDialog, onOtherModels, advancedProviders, companyId, provider, initialMethod, fixedMethod, connectionId, name: initialName, hideName, nameForMethod, ownership, agentIds, allAgents, environmentId: suppliedEnvironmentId, loginAgentId, onComplete, onCancel, defaults, disabled }: Props) {
const [name, setName] = useState(initialName);
const [draftMethod, setDraftMethod] = useState<"subscription" | "api">(initialMethod === "api_key" ? "api" : "subscription");
const [draftKey, setDraftKey] = useState("");
const [chosenEnvironment, setChosenEnvironment] = useState<string>();
const client = useQueryClient();
const envs = useQuery({ queryKey: queryKeys.environments.list(companyId), queryFn: () => environmentsApi.list(companyId) });
@@ -90,33 +95,34 @@ function SubscriptionConnectionStep({ companyId, provider, initialMethod, fixedM
const loading = [envs, caps, settings, experimental, general].some((query) => query.isPending) || (provider === "google" && health.isPending) || views.some((view) => view.kind === "reconnecting");
const loadError = views.find((view) => view.kind === "error");
const intent: AiConnectionLoginIntent = { provider: provider as AiConnectionLoginIntent["provider"], method: "subscription", name, ownership, agentIds, allAgents, connectionId };
return <div className="mx-auto w-full min-w-0 max-w-xl space-y-6">
{!hideName && <label className="block space-y-2 text-sm">Connection name<Input value={name} onChange={(event) => setName(event.target.value)} disabled={Boolean(connectionId)} /></label>}
const dialogFields = defaultAccountDialog && (provider === "anthropic" || provider === "openai");
const accountFields = <>{!hideName && <label className="grid gap-2 text-sm">Connection name<Input value={name} onChange={(event) => setName(event.target.value)} disabled={Boolean(connectionId)} /></label>}{defaults}</>;
return <div className={dialogFields ? "w-full min-w-0 space-y-6" : "mx-auto w-full min-w-0 max-w-xl space-y-6"}>
{!dialogFields && accountFields}
{!suppliedEnvironmentId && !forced.forced && loginEnvironments.length > 1 && <Select value={environmentId ?? ""} onValueChange={setChosenEnvironment}>
<SelectTrigger className={ANALYTICS_MASK_CLASS} aria-label="Sign-in environment"><SelectValue placeholder="Sign-in environment" /></SelectTrigger>
<SelectContent className={ANALYTICS_MASK_CLASS}>{loginEnvironments.map((env) => <SelectItem key={env.id} value={env.id}>{env.name}</SelectItem>)}</SelectContent>
</Select>}
{loadError ? <QueryErrorState size="inline" error={loadError.error} action="prepare sign-in" onRetry={loadError.retry} retrying={loadError.isFetching} />
: environmentError ? <p role="alert" className="text-sm text-destructive">{environmentError}</p> : null}
{defaults}
{loading ? <p role="status" className="text-sm text-muted-foreground">Preparing sign-in…</p> : <AgentProviderConnection
: environmentError && !loading ? <p role="alert" className="text-sm text-destructive">{environmentError}</p> : null}
{loading && !dialogFields ? <p role="status" className="text-sm text-muted-foreground">Preparing sign-in…</p> : <AgentProviderConnection
key={environmentId ?? "local"}
companyId={companyId}
adapterType={provider === "google" ? "antigravity_runtime" : provider === "anthropic" ? "claude_local" : provider === "xai" ? "grok_local" : "codex_local"}
environmentId={environmentId}
canLogin={canLogin}
canLogin={!loading && canLogin}
requiresAgent={environmentLoginRequiresAgent(environment)}
agentId={environmentId === (suppliedEnvironmentId ?? settings.data?.defaultEnvironmentId) ? loginAgentId : undefined}
localEnvironment={environment?.driver === "local"}
localEnvironment={!loading && environment?.driver === "local"}
onBack={onCancel}
onConnected={() => {}}
testConnection={async () => false}
managedAccount={{ intent, nameForMethod, initialMethod, fixedMethod: fixedMethod ?? Boolean(connectionId), disabled: disabled || loading || Boolean(environmentError) || Boolean(loadError) || !name.trim(), onComplete: (result) => { void client.invalidateQueries({ queryKey: ["ai-connections", companyId] }); void client.invalidateQueries({ queryKey: ["tools"] }); onComplete(result); } }}
managedAccount={{ draft: dialogFields ? { method: draftMethod, setMethod: setDraftMethod, apiKey: draftKey, setApiKey: setDraftKey } : undefined, preparingEnvironment: loading, defaultAccountDialog, onOtherModels, accountFields: dialogFields ? accountFields : undefined, advancedProviders, intent, nameForMethod, initialMethod, fixedMethod: fixedMethod ?? Boolean(connectionId), disabled: disabled || loading || Boolean(environmentError) || Boolean(loadError) || !name.trim(), onComplete: (result) => { void client.invalidateQueries({ queryKey: ["ai-connections", companyId] }); void client.invalidateQueries({ queryKey: ["tools"] }); onComplete(result); } }}
/>}
</div>;
}
function ApiKeyConnectionStep({ companyId, provider, connectionId, name: initialName, hideName, nameForMethod, ownership, agentIds, allAgents, environmentId: suppliedEnvironmentId, defaults, disabled, onComplete, onCancel }: Props) {
function ApiKeyConnectionStep({ advancedProviders, companyId, provider, connectionId, name: initialName, hideName, nameForMethod, ownership, agentIds, allAgents, environmentId: suppliedEnvironmentId, defaults, disabled, onComplete, onCancel }: Props) {
const [name, setName] = useState(initialName);
const [apiKey, setApiKey] = useState("");
const client = useQueryClient();
@@ -143,6 +149,7 @@ function ApiKeyConnectionStep({ companyId, provider, connectionId, name: initial
{environmentError && <p role="alert" className="text-sm text-destructive">{environmentError}</p>}
{defaults}
<ProviderApiKeyCard providerName={copilot ? "GitHub Copilot" : provider === "google" ? "Antigravity" : "OpenRouter"} value={apiKey} onChange={setApiKey} onSubmit={() => { if (!preparing && !environmentError && name.trim() && apiKey.trim()) save.mutate(); }} disabled={disabled || save.isPending || preparing || Boolean(environmentError)} placeholder={copilot ? "github_pat_..." : "Enter API key here"} autoFocus />
{advancedProviders}
<div className="flex justify-between gap-2"><Button variant="ghost" onClick={onCancel}>Cancel</Button><Button disabled={disabled || !name.trim() || !apiKey.trim() || save.isPending || preparing || Boolean(environmentError)} onClick={() => save.mutate()}>{save.isPending ? "Connecting…" : "Connect"}</Button></div>
</div>;
}
@@ -1,4 +1,6 @@
import { useRef, useState } from "react";
import { useLayoutEffect, useRef, useState, type ReactNode } from "react";
import { AnimatePresence, MotionConfig, motion, useIsPresent, useReducedMotion } from "motion/react";
import { CARD_ENTER, CARD_EXIT } from "../onboarding/onboarding-motion";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import {
aiConnectionBindingSchema,
@@ -30,6 +32,36 @@ import {
import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
import { cn } from "@/lib/utils";
function AccountDialogBody({ view, children }: { view: string; children: ReactNode }) {
const body = useRef<HTMLDivElement>(null);
const [height, setHeight] = useState<number>();
const reduced = useReducedMotion();
useLayoutEffect(() => {
const element = body.current;
if (!element) return;
const measure = () => setHeight(element.offsetHeight);
measure();
const observer = new ResizeObserver(measure);
observer.observe(element);
return () => observer.disconnect();
}, []);
return <motion.div initial={false} animate={{ height: height ?? "auto" }}
transition={reduced ? { duration: 0 } : CARD_ENTER}>
<div ref={body} className="relative">
<AnimatePresence initial={false} mode="popLayout">
<motion.div key={view} initial={{ opacity: 0 }} animate={{ opacity: 1 }}
exit={{ opacity: 0, transition: CARD_EXIT }} transition={CARD_ENTER}>
<AccountDialogView>{children}</AccountDialogView>
</motion.div>
</AnimatePresence>
</div>
</motion.div>;
}
function AccountDialogView({ children }: { children: ReactNode }) {
return <div inert={!useIsPresent()}>{children}</div>;
}
export function aiProviderForAdapter(
adapterType: string,
): AiProvider | undefined {
@@ -86,6 +118,16 @@ export function AiConnectionField({
const [pendingAdoption, setPendingAdoption] = useState<AiRuntimeConnectionBinding>();
const [connecting, setConnecting] = useState(false);
const [advancedSetup, setAdvancedSetup] = useState(false);
const viewGeneration = useRef(0);
const generation = viewGeneration.current;
const showSetup = (advanced: boolean) => {
viewGeneration.current++;
setAdvancedSetup(advanced);
};
const closeConnection = () => {
viewGeneration.current++;
setConnecting(false);
};
const [reconnecting, setReconnecting] = useState<AiManagedConnectionSummary>();
const [allAgents, setAllAgents] = useState(true);
const [savedAccount, setSavedAccount] = useState<{ connectionId: string; grantId: string; method: AiAuthMethod }>();
@@ -116,13 +158,13 @@ export function AiConnectionField({
onSuccess: async (result) => {
await client.invalidateQueries({ queryKey: ["ai-connections", companyId] });
changeBinding({ provider: provider!, method: result.method, mode: "responsible_user" });
setConnecting(false);
closeConnection();
},
});
const openConnection = (reconnect?: AiManagedConnectionSummary) => {
returnFocus.current = document.activeElement as HTMLElement;
setReconnecting(reconnect);
setAdvancedSetup(!reconnect && (preferAdvanced || provider === "openrouter"));
showSetup(!reconnect && (preferAdvanced || provider === "openrouter"));
setAllAgents(accounts.data?.canManageConnections ?? false);
setSavedAccount(undefined);
selectDefault.reset();
@@ -220,29 +262,30 @@ export function AiConnectionField({
</DialogFooter>
</DialogContent>
</Dialog>
<Dialog open={connecting} onOpenChange={(open) => { if (!selectDefault.isPending) setConnecting(open); }}>
<DialogContent className={cn("max-h-(--sz-85vh) overflow-y-auto sm:max-w-2xl", ANALYTICS_MASK_CLASS)} onCloseAutoFocus={restoreFocus}>
<DialogHeader>
<DialogTitle>{reconnecting ? "Reconnect account" : "Connect account"}</DialogTitle>
<DialogDescription>
{advancedSetup ? "Choose a provider connection for this agent." : reconnecting ? "Sign in again to repair your current default account. Its agent access stays the same." : "This account will become your default for this provider. Your tasks will use it; other users keep their own default."}
<Dialog open={connecting} onOpenChange={(open) => { if (!open && !selectDefault.isPending) closeConnection(); }}>
<DialogContent className={cn("max-h-(--sz-85vh) overflow-y-auto scrollbar-none connect-account-dialog gap-6 p-6 sm:max-w-2xl sm:p-10", ANALYTICS_MASK_CLASS)} onCloseAutoFocus={restoreFocus}>
<DialogHeader className="items-center gap-1 text-center sm:text-center">
<DialogTitle className="text-2xl font-normal text-foreground">{reconnecting ? "Reconnect account" : "Connect account"}</DialogTitle>
<DialogDescription className="text-base leading-relaxed">
{advancedSetup ? "Choose a provider connection for this agent." : reconnecting ? "Sign in again to repair your current default account. Its agent access stays the same." : <>This account will become your default for this provider.<br />Your tasks will use it. Other users keep their own default.</>}
</DialogDescription>
</DialogHeader>
<MotionConfig reducedMotion="user">
<AccountDialogBody view={advancedSetup ? "advanced" : "account"}>
{advancedSetup ? <AiProviderSetup
providerGrid
hideProviderHeading
companyId={companyId} agentId={agentId} environmentId={environmentId}
advancedOnly={preferAdvanced}
initialProtocol={adapterType === "claude_local" ? "messages" : adapterType === "codex_local" ? "responses" : "chat"}
onCancel={() => preferAdvanced ? setConnecting(false) : setAdvancedSetup(false)}
onCancel={() => preferAdvanced ? closeConnection() : showSetup(false)}
onComplete={binding => {
if (generation !== viewGeneration.current) return;
void client.invalidateQueries({ queryKey: ["ai-connections", companyId] });
setConnecting(false);
closeConnection();
changeBinding(binding);
}}
/> : <>
{!reconnecting && !savedAccount && <label className="flex items-center gap-2 text-sm">
<Checkbox checked={allAgents} disabled={!accounts.data?.canManageConnections} onCheckedChange={(checked) => setAllAgents(checked === true)} />
Allow all agents in this company to use this account for my tasks
</label>}
{savedAccount ? <div className="space-y-4">
{selectDefault.error ? <>
<p role="alert" className="text-sm text-destructive">{describeError(selectDefault.error).body}</p>
@@ -250,6 +293,16 @@ export function AiConnectionField({
</> : <p role="status" className="text-sm text-muted-foreground">Selecting your default account…</p>}
</div> :
<AiConnectionCredentialStep
defaultAccountDialog
onOtherModels={reconnecting ? undefined : () => showSetup(true)}
defaults={!reconnecting && <label className="flex items-center gap-2 text-sm">
<Checkbox checked={allAgents} disabled={!accounts.data?.canManageConnections} onCheckedChange={(checked) => setAllAgents(checked === true)} />
Allow all agents in this company to use this account for my tasks
</label>}
advancedProviders={!reconnecting && provider !== "anthropic" && provider !== "openai" && <details>
<summary className="cursor-pointer text-sm text-muted-foreground">Advanced providers</summary>
<Button type="button" variant="ghost" onClick={() => showSetup(true)}>Choose another provider or gateway</Button>
</details>}
companyId={companyId}
provider={provider}
initialMethod={reconnecting?.method ?? method}
@@ -261,17 +314,17 @@ export function AiConnectionField({
allAgents={allAgents}
environmentId={environmentId}
loginAgentId={agentId}
onCancel={() => setConnecting(false)}
onCancel={() => closeConnection()}
onComplete={(result) => {
if (generation !== viewGeneration.current) return;
setSavedAccount(result);
selectDefault.mutate(result);
}}
/>}
{!reconnecting && !savedAccount && <details>
<summary className="cursor-pointer text-sm text-muted-foreground">Advanced providers</summary>
<Button type="button" variant="ghost" onClick={() => setAdvancedSetup(true)}>Choose another provider or gateway</Button>
</details>}
</>}
</AccountDialogBody>
</MotionConfig>
</DialogContent>
</Dialog>
</div>
@@ -16,6 +16,7 @@ import { describeError } from "@/api/errors";
import { QueryErrorState, useQueryView } from "@/components/QueryView";
import { ConnectionChoiceList } from "@/features/connections/ConnectionChoiceList";
import { ConnectionAccessDefaults, connectionDefaultSummarySentence } from "@/features/connections/ConnectionSetupFlow";
import { PluginTile } from "@/pages/apps/PluginMarketplace";
import { AppLogo } from "@/pages/apps/AppLogo";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
@@ -78,6 +79,7 @@ export function AiProviderSetup({
initialProtocol,
providerLabel,
advancedOnly = false,
providerGrid = false,
hideCancel = false,
hideProviderHeading = false,
submitLabel,
@@ -92,6 +94,7 @@ export function AiProviderSetup({
initialProtocol?: AiProviderRouting["protocol"];
providerLabel?: string;
advancedOnly?: boolean;
providerGrid?: boolean;
hideCancel?: boolean;
hideProviderHeading?: boolean;
submitLabel?: string;
@@ -220,34 +223,33 @@ export function AiProviderSetup({
setApiKey("");
},
});
const choices = (advancedOnly: boolean) => (
<ConnectionChoiceList
choices={providers
.filter((p) => Boolean("advanced" in p && p.advanced) === advancedOnly)
.map((p) => ({
...p,
icon:
p.id === "gateway" || p.id === "local" ? (
<span className="flex size-9 items-center justify-center rounded-lg bg-muted">
{p.id === "gateway" ? (
<Network className="size-5" />
) : (
<Monitor className="size-5" />
)}
</span>
) : (
<AppLogo name={p.name} brandKey={aiConnectionCatalogSlug(p.id)} />
),
}))}
onSelect={(id) => {
setProvider(id as ProviderChoice);
setStep("connect");
setApiKey("");
setAuth("bearer");
save.reset();
}}
/>
);
function selectProvider(id: string) {
setProvider(id as ProviderChoice);
setStep("connect");
setApiKey("");
setAuth("bearer");
save.reset();
}
function choices(advancedFilter?: boolean) {
const options = providers
.filter(p => advancedFilter === undefined || ("advanced" in p) === advancedFilter)
.map(p => ({
...p,
icon: p.id === "gateway" || p.id === "local" ? (
<span className="flex size-9 items-center justify-center rounded-lg bg-muted">
{p.id === "gateway" ? <Network className="size-5" /> : <Monitor className="size-5" />}
</span>
) : <AppLogo name={p.name} brandKey={aiConnectionCatalogSlug(p.id)} />,
}));
if (providerGrid) return (
<div role="list" aria-label="Model providers" className="grid gap-2 sm:grid-cols-2">
{options.map(p => <PluginTile key={p.id} slug={p.id} name={p.name}
description={p.description} brandKey={p.id} icon={p.icon}
state="available" statusLabel="" action={null} onOpen={() => selectProvider(p.id)} />)}
</div>
);
return <ConnectionChoiceList choices={options} onSelect={selectProvider} />;
}
const modelSettings = (
<label className="block space-y-2 text-xs text-muted-foreground">
Model IDs (comma separated)
@@ -299,7 +301,7 @@ export function AiProviderSetup({
{agentsView.kind === "error" && <QueryErrorState size="inline" error={agents.error} action="load agents" onRetry={agentsView.retry} retrying={agentsView.isFetching} />}
{step === "provider" ? (
<>
{advancedOnly ? choices(true) : <>
{providerGrid ? choices(advancedOnly || undefined) : advancedOnly ? choices(true) : <>
{choices(false)}
<details>
<summary className="cursor-pointer text-sm text-muted-foreground">
@@ -66,7 +66,7 @@ afterEach(() => {
host.remove();
});
function renderConnection(adapterType: "antigravity_runtime" | "claude_local" | "codex_local", localEnvironment: boolean) {
function renderConnection(adapterType: "antigravity_runtime" | "claude_local" | "codex_local", localEnvironment: boolean, defaultAccountDialog = false, onComplete = vi.fn()) {
const client = new QueryClient({ defaultOptions: { queries: { retry: false } } });
const provider = adapterType === "antigravity_runtime" ? "google" : adapterType === "claude_local" ? "anthropic" : "openai";
flushSync(() => {
@@ -82,6 +82,7 @@ function renderConnection(adapterType: "antigravity_runtime" | "claude_local" |
onConnected={() => {}}
testConnection={async () => true}
managedAccount={{
defaultAccountDialog,
intent: {
provider,
method: "subscription",
@@ -90,7 +91,7 @@ function renderConnection(adapterType: "antigravity_runtime" | "claude_local" |
agentIds: [],
allAgents: true,
},
onComplete: () => {},
onComplete,
}}
/>
</QueryClientProvider>,
@@ -98,6 +99,40 @@ function renderConnection(adapterType: "antigravity_runtime" | "claude_local" |
});
}
describe("Connect account dialog", () => {
it.each([
["claude_local", "Waiting for code…"],
["codex_local", "Waiting…"],
] as const)("keeps %s sign-in in the panel", async (adapter, waiting) => {
mocks.healthGet.mockResolvedValue({ localAiLoginSupported: true });
mocks.checkLocalLogin.mockResolvedValue({
status: "sign_in_required", authorizationUrl: "https://example.test/login", code: "TEST-CODE",
});
renderConnection(adapter, true, true);
const button = (label: string) => Array.from(host.querySelectorAll("button")).find(b => b.textContent === label);
const open = vi.spyOn(window, "open").mockReturnValue(null);
try {
await vi.waitFor(() => expect(button("Sign in")?.disabled).toBe(false));
flushSync(() => button("Sign in")!.click());
expect(open).toHaveBeenCalledOnce();
expect(button(waiting)?.disabled).toBe(true);
expect(button("Next")?.disabled).toBe(true);
expect(host.querySelector("a")).toBeNull();
} finally {
open.mockRestore();
}
});
it("saves a ready account and completes once", async () => {
mocks.healthGet.mockResolvedValue({ localAiLoginSupported: true });
mocks.checkLocalLogin.mockResolvedValue({ status: "ready" });
const complete = vi.fn();
renderConnection("codex_local", true, true, complete);
await vi.waitFor(() => expect(complete).toHaveBeenCalledOnce());
expect(mocks.connectLocal).toHaveBeenCalledOnce();
});
});
describe("AgentProviderConnection hosted Google sign-in gating", () => {
it("enables hosted Google redirect sign-in for antigravity_runtime on non-local environments", async () => {
mocks.healthGet.mockResolvedValue({
@@ -3,7 +3,7 @@ import { aiConnectionsApi } from "@/api/ai-connections";
import { useLocalAiLogin } from "../ai-connections/useLocalAiLogin";
import type { AiConnectionBinding, AiConnectionLoginIntent } from "@paperclipai/shared";
import { useEffect, useRef, useState, type ReactNode } from "react";
import { Cable } from "lucide-react";
import { Cable, Cpu, Loader2 } from "lucide-react";
import { useQuery } from "@tanstack/react-query";
import { motion } from "motion/react";
import {
@@ -16,10 +16,14 @@ import { AdapterLoginPanel } from "../AgentConfigForm";
import { AdapterMark } from "./AgentBasicsDialog";
import {
LocalProviderLoginInstructions,
OnboardingSignInMark,
ProviderSubscriptionCard,
OnboardingCardField,
OnboardingLoginCard,
useLocalLoginPrimaryAction,
} from "../AdapterLoginChrome";
import { Button } from "../ui/button";
import { ModelSourceMark } from "../onboarding/ModelSourceMark";
import { ModelSourceTiles, type ModelConnectionMode } from "../onboarding/ModelSourceTiles";
import { useQueryView } from "../QueryView";
import { CredentialModeLink } from "../onboarding/CredentialModeLink";
@@ -69,6 +73,17 @@ export function AgentProviderConnection({
advancedConnection?: { content: ReactNode; value?: AiConnectionBinding };
/** Connections supplies its access intent; presentation and login controllers stay shared. */
managedAccount?: {
defaultAccountDialog?: boolean;
preparingEnvironment?: boolean;
draft?: {
method: "subscription" | "api";
setMethod: (method: "subscription" | "api") => void;
apiKey: string;
setApiKey: (key: string) => void;
};
onOtherModels?: () => void;
accountFields?: ReactNode;
advancedProviders?: ReactNode;
intent: AiConnectionLoginIntent;
nameForMethod?: (method: "subscription" | "api_key") => string;
initialMethod?: "subscription" | "api_key";
@@ -109,7 +124,9 @@ export function AgentProviderConnection({
setLoginPhase("preparing");
setLoginRequested(false);
};
const [methodChoice, setMethod] = useState<"subscription" | "api" | null>(managedAccount?.initialMethod === "api_key" ? "api" : managedAccount ? "subscription" : null);
const [localMethodChoice, setLocalMethod] = useState<"subscription" | "api" | null>(managedAccount?.initialMethod === "api_key" ? "api" : managedAccount ? "subscription" : null);
const methodChoice = managedAccount?.draft?.method ?? localMethodChoice;
const setMethod = managedAccount?.draft?.setMethod ?? setLocalMethod;
const [advanced, setAdvanced] = useState(false);
// Connections already selected the provider before showing this step.
const [opened, setOpened] = useState(Boolean(advancedConnection || managedAccount));
@@ -119,7 +136,9 @@ export function AgentProviderConnection({
const [authorizationUrl, setAuthorizationUrl] = useState<string | null>(null);
const [loginPhase, setLoginPhase] = useState<"preparing" | "ready" | "waiting" | "connecting">("preparing");
const phaseBeforeSubmit = useRef<"ready" | "waiting">("ready");
const [apiKey, setApiKey] = useState("");
const [localKey, setLocalKey] = useState("");
const apiKey = managedAccount?.draft?.apiKey ?? localKey;
const setApiKey = managedAccount?.draft?.setApiKey ?? setLocalKey;
const [busy, setBusy] = useState(false);
const [error, setError] = useState<string | null>(null);
const [storedConnection, setStoredConnection] =
@@ -273,6 +292,22 @@ export function AgentProviderConnection({
onBeforeRetry: () => setError(null),
});
const localLoginAction = localLoginPrimary.action;
const wizardCard = managedAccount?.defaultAccountDialog &&
(adapterType === "claude_local" || adapterType === "codex_local");
const inlineLogin = Boolean(wizardCard && opened && method === "subscription");
const localReady = inlineLogin && !needsLogin && canUseLocalLogin && localLogin.status === "ready";
const autoSaved = useRef(false);
useEffect(() => {
if (!localReady) {
autoSaved.current = false;
} else if (!managedAccount?.disabled && !autoSaved.current) {
autoSaved.current = true;
void connect();
}
}, [localReady, managedAccount?.disabled, connect]);
const providerMark = wizardCard
? <ModelSourceMark type={adapterType} Fallback={Loader2} />
: <AdapterMark type={adapterType} />;
const switchMode = (next: ModelConnectionMode) => {
if (advancedConnection && next === (advanced ? "advanced" : method)) return;
onDraftChanged?.();
@@ -289,23 +324,26 @@ export function AgentProviderConnection({
return (
<div className="min-w-0 max-w-full">
<ModelSourceTiles
animateLayout={!wizardCard}
label={advancedConnection ? "Connection type" : "Connect your model provider"}
sources={advancedConnection ? [
{ id: "subscription", label: provider, icon: <AdapterMark type={adapterType} />, credentialMode: "subscription" },
{ id: "api", label: provider, icon: <AdapterMark type={adapterType} />, credentialMode: "api" },
{ id: "subscription", label: provider, icon: providerMark, credentialMode: "subscription" },
{ id: "api", label: provider, icon: providerMark, credentialMode: "api" },
{ id: "advanced", label: "Advanced", icon: <Cable className="size-6 text-muted-foreground" />, credentialMode: "advanced" },
] : [
{
id: adapterType,
label: provider,
icon: <AdapterMark type={adapterType} />,
icon: providerMark,
},
...(wizardCard && managedAccount?.onOtherModels ? [{ id: "other", label: "Other Models", icon: <Cpu className="size-5" /> }] : []),
]}
mode={advanced ? "advanced" : method}
selectedId={advancedConnection ? (advanced ? "advanced" : method) : opened ? adapterType : null}
collapsed={!advancedConnection && opened}
collapsed={!wizardCard && !advancedConnection && opened}
onSelect={id => {
if (managedAccount?.disabled) return;
if (id === "other") { managedAccount?.onOtherModels?.(); return; }
if (advancedConnection) switchMode(id as ModelConnectionMode);
else setOpened(true);
}}
@@ -315,6 +353,7 @@ export function AgentProviderConnection({
<CredentialModeLink mode={method} onChange={switchMode} />
</div>
)}
{managedAccount?.accountFields && <div className="mt-6 grid gap-6">{managedAccount.accountFields}</div>}
{advanced && advancedConnection ? <>
<div className="pt-5">{advancedConnection.content}</div>
<FooterNav
@@ -346,6 +385,7 @@ export function AgentProviderConnection({
/>
</div>
)}
<OnboardingSignInMark.Provider value={inlineLogin ? providerMark : null}>
<motion.div
initial={false}
animate={{ height: opened ? "auto" : 0, opacity: opened ? 1 : 0 }}
@@ -356,7 +396,11 @@ export function AgentProviderConnection({
<div className="pt-5">
{method === "api" ? (
<OnboardingLoginCard
instruction={
revealTogether={wizardCard}
instruction={wizardCard ? <span className="grid gap-1">
<span>Provide your {provider} API key to connect.</span>
<span>This will be your default {provider} account.</span>
</span> :
savedKeys.options.length
? "Choose a saved API key or enter a new one"
: `Provide your ${provider} API key to connect`
@@ -400,6 +444,20 @@ export function AgentProviderConnection({
<p role="status" className="text-sm text-muted-foreground">
Sign-in starts when your agent's computer is ready.
</p>
) : inlineLogin && (managedAccount?.preparingEnvironment || (needsHealth && health.isPending && !needsLogin) ||
(canUseLocalLogin && !needsLogin && !localLogin.error && localLogin.status !== "expired" && !localReady &&
(localLogin.preparing || !localLogin.authorizationUrl))) ? (
<ProviderSubscriptionCard loading providerName={provider}
mode={adapterType === "claude_local" ? "submitted_code" : "displayed_code"}>
{null}
</ProviderSubscriptionCard>
) : inlineLogin && needsLogin && awaitingLoginRequest ? (
<OnboardingLoginCard revealTogether instruction={`Connect your ${provider} subscription.`}>
<Button type="button" disabled={managedAccount?.disabled} className="w-fit gap-1 rounded-full py-0 pl-3 pr-6"
onClick={() => setLoginRequested(true)}>
<span className="size-(--sz-30px) shrink-0">{providerMark}</span>Prepare sign-in
</Button>
</OnboardingLoginCard>
) : needsLogin ? !awaitingLoginRequest && (
<AdapterLoginPanel
requiresAgent={requiresAgent}
@@ -441,7 +499,11 @@ export function AgentProviderConnection({
onConnected(connection);
}}
/>
) : savedSubscription ? null : canUseLocalLogin && !storedLogin.data ? (
) : savedSubscription ? null : localReady ? (
<p role="status" className="text-sm text-muted-foreground">
{error ? "Retry saving your connected account." : "Saving your connected account…"}
</p>
) : canUseLocalLogin && !storedLogin.data ? (
<LocalProviderLoginInstructions
adapterType={adapterType}
hostedRedirect={googleHostedRedirect}
@@ -460,6 +522,7 @@ export function AgentProviderConnection({
</div>
)}
</motion.div>
</OnboardingSignInMark.Provider>
{!managedAccount && method === "subscription" && storedLoginView.kind === "error" && (
<p role="alert" className="mt-4 text-sm text-destructive">
Could not check your saved Claude subscription. Try again.
@@ -473,6 +536,7 @@ export function AgentProviderConnection({
{needsHealth && healthView.kind === "error" && (
<p role="alert" className="mt-4 text-sm text-destructive">Could not prepare sign-in. Reload this page to try again.</p>
)}
{managedAccount?.advancedProviders && <div className="pt-2">{managedAccount.advancedProviders}</div>}
<FooterNav
onBack={() => {
if (opened && !advancedConnection) {
@@ -480,8 +544,9 @@ export function AgentProviderConnection({
cancel();
} else onBack();
}}
compact={Boolean(wizardCard)}
primaryLabel={
opened && needsLogin
inlineLogin ? (localReady && error ? "Retry" : "Next") : opened && needsLogin
? loginPhase === "waiting" ? adapterType === "codex_local" ? "Waiting for auth…" : "Waiting for code"
: loginPhase === "connecting" ? "Connecting"
: automaticComputer && authorizationUrl ? `Continue to ${provider}` : `Sign in to ${provider}`
@@ -497,7 +562,7 @@ export function AgentProviderConnection({
: "Connect"
}
primaryDisabled={
managedAccount?.disabled ||
(inlineLogin && !(localReady && error)) || managedAccount?.disabled ||
(Boolean(managedAccount) && method === "subscription" && !canLogin && !canUseLocalLogin) ||
(needsHealth && health.isPending) ||
(!managedAccount && adapterType !== "antigravity_runtime" && auth.isPending) ||
@@ -517,8 +582,9 @@ export function AgentProviderConnection({
!selectedKey)
}
loading={busy}
loadingLabel={inlineLogin ? "Next" : undefined}
primaryIcon={
opened && needsLogin && !awaitingLoginRequest
inlineLogin ? "arrow" : opened && needsLogin && !awaitingLoginRequest
? loginPhase === "ready" ? "none" : "spinner"
: localLoginAction
? localLoginAction.icon
@@ -0,0 +1,55 @@
import type { ComponentType } from "react";
/**
* Full-colour brand marks for the sources this step offers.
*
* The registry's own icons are monochrome, drawn to sit in dense config UI
* where a row of saturated logos would be noise. This step is the opposite
* case: two large tiles carrying the whole choice, where the brand is the
* fastest thing to recognise.
*
* Keyed by adapter type with a fallback, so the row stays registry-driven. An
* adapter with no brand file here still renders — with its registry icon —
* rather than a gap where a tile should be.
*/
const MODEL_SOURCE_BRAND_MARKS: Record<string, string> = {
claude_local: "/brands/claude-color.svg",
};
/**
* OpenAI's blossom, inline rather than served from `/brands`.
*
* The supplied asset is a white fill, which was fine while this row only ever
* sat on a dark tile. It follows the reader's system setting now, and white on
* the light tile is invisible. Inlining lets the path take
* `currentColor` and be legible in both, which an `<img>` cannot do.
*/
function OpenAiBlossom({ className }: { className?: string }) {
return (
<svg viewBox="114 114 488 488" className={className} fill="none" aria-hidden>
<path
fill="currentColor"
d="M508.749 317.399C516.777 287.314 508.991 253.884 485.389 230.282C461.788 206.681 428.36 198.895 398.273 206.923C376.231 184.928 343.39 174.956 311.148 183.596C278.906 192.234 255.45 217.292 247.36 247.361C217.291 255.451 192.233 278.91 183.595 311.149C174.957 343.391 184.927 376.232 206.924 398.274C198.896 428.359 206.683 461.789 230.284 485.391C253.885 508.992 287.313 516.779 317.401 508.75C339.442 530.745 372.286 540.717 404.525 532.079C436.767 523.441 460.223 498.384 468.313 468.315C498.383 460.224 523.44 436.766 532.078 404.526C540.716 372.285 530.747 339.443 508.749 317.402V317.399ZM470.899 244.776C486.892 260.77 493.488 282.601 490.687 303.412L415.577 260.046C412.411 258.218 408.509 258.218 405.345 260.046L317.401 310.82V277.526C317.401 275.191 318.652 273.005 320.676 271.837L387.644 233.174C414.178 218.353 448.346 222.223 470.901 244.776H470.899ZM357.837 311.144L398.275 334.491V381.185L357.837 404.532L317.398 381.185V334.491L357.837 311.144ZM264.776 269.693C265.207 239.305 285.644 211.649 316.453 203.393C338.3 197.54 360.505 202.744 377.127 215.573L302.014 258.937C298.848 260.764 296.898 264.144 296.898 267.798V369.346L268.065 352.699C266.043 351.531 264.776 349.353 264.776 347.017V269.691V269.693ZM203.391 316.454C209.244 294.608 224.854 277.978 244.276 269.999V356.73C244.276 360.384 246.226 363.763 249.392 365.591L337.337 416.365L308.503 433.013C306.481 434.181 303.961 434.188 301.939 433.02L234.971 394.357C208.868 378.789 195.138 347.261 203.391 316.454ZM244.775 470.9C228.781 454.906 222.186 433.075 224.986 412.264L300.096 455.63C303.263 457.457 307.164 457.457 310.328 455.63L398.273 404.856V438.149C398.273 440.485 397.022 442.671 394.997 443.839L328.029 482.502C301.495 497.322 267.327 493.452 244.772 470.9H244.775ZM450.897 445.982C450.466 476.371 430.029 504.027 399.22 512.283C377.373 518.136 355.168 512.932 338.547 500.102L413.659 456.738C416.826 454.911 418.775 451.532 418.775 447.877V346.329L447.609 362.977C449.631 364.145 450.897 366.323 450.897 368.659V445.985V445.982ZM512.282 399.221C506.429 421.068 490.819 437.697 471.397 445.676V358.946C471.397 355.292 469.448 351.912 466.281 350.085L378.336 299.311L407.17 282.663C409.192 281.495 411.712 281.487 413.734 282.655L480.702 321.318C506.805 336.887 520.536 368.415 512.282 399.221Z"
/>
</svg>
);
}
const MODEL_SOURCE_INLINE_MARKS: Record<string, ComponentType<{ className?: string }>> = {
codex_local: OpenAiBlossom,
};
export function ModelSourceMark({
type,
Fallback,
}: {
type: string;
Fallback: ComponentType<{ className?: string }>;
}) {
const Inline = MODEL_SOURCE_INLINE_MARKS[type];
if (Inline) return <Inline className="size-full" />;
const brand = MODEL_SOURCE_BRAND_MARKS[type];
if (!brand) return <Fallback className="size-full" />;
return <img src={brand} alt="" className="size-full" />;
}
@@ -47,7 +47,7 @@ const CREDENTIAL_TAG_LABEL: Record<ModelConnectionMode, string> = {
* what makes the outgoing label fall out of frame rather than slide past the
* tile's padding and over the row below.
*/
export function CredentialTag({ mode }: { mode: ModelConnectionMode }) {
export function CredentialTag({ mode, animateLayout = true }: { mode: ModelConnectionMode; animateLayout?: boolean }) {
return (
<span className="relative flex h-4 w-full items-center justify-center overflow-hidden text-(length:--text-micro) text-muted-foreground">
<AnimatePresence initial={false} mode="sync">
@@ -58,7 +58,7 @@ export function CredentialTag({ mode }: { mode: ModelConnectionMode }) {
animate={{ opacity: 1, y: 0, transition: TAG_SWAP_ENTER }}
exit={{ opacity: 0, y: TAG_SWAP_TRAVEL, transition: TAG_SWAP_EXIT }}
>
<motion.span layout="position" transition={SOURCE_COLLAPSE_MOVE}>
<motion.span layout={animateLayout && "position"} transition={SOURCE_COLLAPSE_MOVE}>
{CREDENTIAL_TAG_LABEL[mode]}
</motion.span>
</motion.span>
@@ -74,6 +74,7 @@ function ModelSourceTile({
onSelect,
buttonRef,
settling,
animateLayout,
}: {
source: ModelSource;
mode: ModelConnectionMode | null;
@@ -81,6 +82,7 @@ function ModelSourceTile({
onSelect: () => void;
buttonRef: (node: HTMLButtonElement | null) => void;
settling: boolean;
animateLayout: boolean;
}) {
return (
<button
@@ -117,7 +119,7 @@ function ModelSourceTile({
)}
>
<motion.span
layout="position"
layout={animateLayout && "position"}
transition={SOURCE_COLLAPSE_MOVE}
className="flex size-(--sz-30px) shrink-0 items-center justify-center"
>
@@ -131,13 +133,13 @@ function ModelSourceTile({
rhythm rather than the Tailwind scale's paired line-height.
*/}
<motion.span
layout="position"
layout={animateLayout && "position"}
transition={SOURCE_COLLAPSE_MOVE}
className="text-(length:--text-compact) font-medium text-foreground"
>
{source.label}
</motion.span>
{mode ? <CredentialTag mode={mode} /> : <span aria-hidden className="h-4" />}
{mode ? <CredentialTag mode={mode} animateLayout={animateLayout} /> : <span aria-hidden className="h-4" />}
</button>
);
}
@@ -150,6 +152,7 @@ export function ModelSourceTiles({
label,
collapsed = false,
settling = false,
animateLayout = true,
}: {
sources: ModelSource[];
mode: ModelConnectionMode;
@@ -171,6 +174,7 @@ export function ModelSourceTiles({
* styling takes to leave — see the tile's own note.
*/
settling?: boolean;
animateLayout?: boolean;
}) {
const tiles = useRef(new Map<string, HTMLButtonElement>());
@@ -224,7 +228,7 @@ export function ModelSourceTiles({
{shown.map((source) => (
<motion.div
key={source.id}
layout
layout={animateLayout}
transition={SOURCE_COLLAPSE_MOVE}
exit={{ opacity: 0, transition: SOURCE_EXIT_FADE }}
className={cn(
@@ -237,6 +241,7 @@ export function ModelSourceTiles({
mode={source.credentialMode === undefined ? mode : source.credentialMode}
selected={source.id === selectedId}
onSelect={() => onSelect(source.id)}
animateLayout={animateLayout}
settling={settling}
buttonRef={(node) => {
if (node) tiles.current.set(source.id, node);
+5
View File
@@ -1366,6 +1366,11 @@ html:has(.paperclip-app-shell[data-keyboard-open="true"] [data-classic-task-shel
components only add class names.
──────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
.connect-account-dialog .onboarding-subscription-reveal {
animation: none;
}
.connect-account-dialog[data-state="open"],
.onboarding-subscription-reveal {
animation: tc-fade-rise var(--onboarding-motion-card-enter) ease-out;
}