Skip to content

The open-source app everyone uses to manage agents at work

copy(connectors): say "organization" in the connector setup flow (#13589)

scotttong3f1d897a7c01
diff --git a/doc/connections/GMAIL.md b/doc/connections/GMAIL.md
index 1cdbf01536..d6abceeaf0 100644
--- a/doc/connections/GMAIL.md
+++ b/doc/connections/GMAIL.md
@@ -302,8 +302,9 @@ keys before they deploy a binary that enables the Cloud connector.
Gmail uses the same credential ownership choice as the rest of the Apps setup:
- **Just me** stores the Gmail credential on the connecting user's grant.
-- **Any human in the company** stores it on the default organization grant so a
- deliberately shared mailbox or Workspace account can back company-wide use.
+- **Any human in the organization** stores it on the default organization grant
+ so a deliberately shared mailbox or Workspace account can back
+ organization-wide use.
- The disclosure states that Gmail access can search/read mail and create
drafts. Sending mail is not enabled.
- A user grant does not automatically authorize an agent. The user must also
diff --git a/ui/src/components/EmailConnectionAccess.tsx b/ui/src/components/EmailConnectionAccess.tsx
index 4933b9f88e..e3835fb6df 100644
--- a/ui/src/components/EmailConnectionAccess.tsx
+++ b/ui/src/components/EmailConnectionAccess.tsx
@@ -45,7 +45,7 @@ export function EmailConnectionAccess({
const everyone = active.some((g) => g.kind === "organization");
const personal = active.find((g) => g.kind === "user");
const humanLabel = everyone
- ? "Any human in the company"
+ ? "Any human in the organization"
: personal
? personal.subjectUserId === grants.data?.currentUserId
? "Just me"
diff --git a/ui/src/features/connections/ConnectionSetupFlow.tsx b/ui/src/features/connections/ConnectionSetupFlow.tsx
index 618b4c0aab..bc126a9cfb 100644
--- a/ui/src/features/connections/ConnectionSetupFlow.tsx
+++ b/ui/src/features/connections/ConnectionSetupFlow.tsx
@@ -1690,7 +1690,7 @@ export function ConnectionSetupFlow({
});
if (!selectedCompanyId) {
- return <div className="p-6 text-sm text-muted-foreground">Select a company to connect apps.</div>;
+ return <div className="p-6 text-sm text-muted-foreground">Select an organization to connect apps.</div>;
}
if (
@@ -1732,7 +1732,7 @@ export function ConnectionSetupFlow({
<div className="mx-auto max-w-xl rounded-xl border border-border bg-card p-6">
<h2 className="text-lg font-semibold text-foreground">This setup can’t be resumed</h2>
<p className="mt-2 text-sm text-muted-foreground">
- The saved connection no longer exists or is not available to this company.
+ The saved connection no longer exists or is not available to this organization.
</p>
<Button type="button" variant="outline" className="mt-5" onClick={() => navigate("/apps")}>
Back to apps
@@ -1752,7 +1752,7 @@ export function ConnectionSetupFlow({
<h2 className="text-lg font-semibold text-foreground">This connection can’t be reconnected</h2>
<p className="mt-2 text-sm text-muted-foreground">
{!reconnectConnection
- ? "The retained connection no longer exists or is not available to this company."
+ ? "The retained connection no longer exists or is not available to this organization."
: "This reconnect link does not match the retained connection's provider."}
</p>
<Button type="button" variant="outline" className="mt-5" onClick={() => navigate("/apps")}>
@@ -3982,7 +3982,7 @@ export function AccessStep({
? githubIdentity ? "My GitHub account" : "Just me"
: allowedGrantKinds[0] === "agent"
? "A dedicated account for an agent"
- : githubIdentity ? "Shared company GitHub account (advanced)" : "Any human in the company"}
+ : githubIdentity ? "Shared organization GitHub account (advanced)" : "Any human in the organization"}
</div>
{githubIdentity ? (
<p className="mt-1 text-xs text-muted-foreground">
@@ -4027,14 +4027,14 @@ export function AccessStep({
},
{
value: "organization",
- title: githubIdentity ? "Shared company GitHub account (advanced)" : "Any human in the company",
+ title: githubIdentity ? "Shared organization GitHub account (advanced)" : "Any human in the organization",
description: githubIdentity
? "Eligible agents use one shared credential, regardless of who starts the run."
: undefined,
icon: <UsersRound className="h-4 w-4" aria-hidden="true" />,
accessibleLabel: canCreateOrganizationGrant
- ? githubIdentity ? "Shared company GitHub account (advanced)" : "Any human in the company"
- : `${githubIdentity ? "Shared company GitHub account (advanced)" : "Any human in the company"}. Unavailable: ${capabilities?.organizationGrantReason ??
+ ? githubIdentity ? "Shared organization GitHub account (advanced)" : "Any human in the organization"
+ : `${githubIdentity ? "Shared organization GitHub account (advanced)" : "Any human in the organization"}. Unavailable: ${capabilities?.organizationGrantReason ??
"Only a connection manager can share this credential with the organization."}`,
tooltip: canCreateOrganizationGrant
? undefined
diff --git a/ui/src/pages/apps/AppsConnect.test.tsx b/ui/src/pages/apps/AppsConnect.test.tsx
index 6c95df73ce..1219ae8122 100644
--- a/ui/src/pages/apps/AppsConnect.test.tsx
+++ b/ui/src/pages/apps/AppsConnect.test.tsx
@@ -388,7 +388,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(container.textContent).toContain("Which humans can use this credential?");
expect(container.textContent).toContain("Which agents can use this connection?");
expect(radioContaining("Just me")).toBeTruthy();
- expect(radioContaining("Any human in the company")?.getAttribute("aria-checked")).toBe("true");
+ expect(radioContaining("Any human in the organization")?.getAttribute("aria-checked")).toBe("true");
expect(radioContaining("Just agents I pick")).toBeTruthy();
expect(radioContaining("Any agent")?.getAttribute("aria-checked")).toBe("true");
expect(container.textContent).not.toContain("Does it need a key?");
@@ -617,7 +617,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
);
return {
justMe: radios.find((r) => r.textContent?.includes("Just me")),
- wholeOrg: radios.find((r) => r.textContent?.includes("Any human in the company")),
+ wholeOrg: radios.find((r) => r.textContent?.includes("Any human in the organization")),
};
};
@@ -1327,7 +1327,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(container.textContent).not.toContain("final project-registration email");
expect(container.textContent).not.toContain("Apply or verify Developer Preview enrollment");
expect(radioContaining("Just me")).toBeTruthy();
- expect(radioContaining("Any human in the company")?.getAttribute("aria-checked")).toBe("true");
+ expect(radioContaining("Any human in the organization")?.getAttribute("aria-checked")).toBe("true");
await passAccessStep();
expect(radioContaining("Read & create")?.getAttribute("aria-checked")).toBe("true");
@@ -1418,7 +1418,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(anyAgent?.getAttribute("aria-label")).toContain(
"Your company policy limits this choice to connection managers.",
);
- const organization = radioContaining("Any human in the company");
+ const organization = radioContaining("Any human in the organization");
expect(organization?.disabled).toBe(true);
expect(organization?.getAttribute("title")).toBe(
"Only connection managers can share this credential.",
@@ -1507,7 +1507,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(connectAppMock).toHaveBeenCalledWith("company-1", {
galleryKey: "posthog",
connectionMethodKey: "mcp-api-key",
- name: "PostHog for the company",
+ name: "PostHog for the organization",
credentialSource: "paperclip_vault",
credentialValues: { "credentials.authorization": "phx_test-key" },
configValues: {
@@ -1561,7 +1561,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(connectAppMock).toHaveBeenCalledWith("company-1", {
galleryKey: "posthog",
connectionMethodKey: "mcp-api-key",
- name: "PostHog for the company",
+ name: "PostHog for the organization",
credentialSource: "vercel_connect",
vercelConnect: { connector: "posthog/paperclip" },
configValues: { readOnly: false, mode: "tools" },
@@ -1801,7 +1801,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(container.textContent).toContain("Which humans can use this credential?");
expect(container.textContent).not.toContain("Choose access before sign-in");
const identityRadios = Array.from(document.body.querySelectorAll('[role="radio"]'));
- expect(identityRadios.find((radio) => radio.textContent?.includes("Any human in the company"))?.getAttribute("aria-checked"))
+ expect(identityRadios.find((radio) => radio.textContent?.includes("Any human in the organization"))?.getAttribute("aria-checked"))
.toBe("true");
await passAccessStep();
@@ -1811,7 +1811,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(connectAppMock).toHaveBeenCalledWith("company-1", {
galleryKey: "notion",
connectionMethodKey: "mcp-oauth",
- name: "Notion for the company",
+ name: "Notion for the organization",
credentialSource: "paperclip_vault",
credentialValues: {},
configValues: undefined,
@@ -2052,7 +2052,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
await render();
expect(container.textContent).toContain(
- credentialPolicy === "per_user" ? "Just me" : "Any human in the company",
+ credentialPolicy === "per_user" ? "Just me" : "Any human in the organization",
);
expect(container.textContent).toContain("Existing agent access stays the same");
await passAccessStep();
@@ -2105,7 +2105,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
});
await render();
- expect(container.textContent).toContain("Any human in the company");
+ expect(container.textContent).toContain("Any human in the organization");
await passAccessStep();
await submitCuratedOAuthSetup();
@@ -2256,7 +2256,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(connectAppMock).toHaveBeenCalledWith("company-1", {
galleryKey: "notion",
connectionMethodKey: "mcp-oauth",
- name: "Notion for the company",
+ name: "Notion for the organization",
credentialSource: "paperclip_vault",
credentialValues: {},
configValues: undefined,
@@ -2523,7 +2523,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
const [, input] = connectAppMock.mock.calls[0];
expect(input).toMatchObject({
link: "https://www.example.com/actions",
- name: "example.com/actions for the company",
+ name: "example.com/actions for the organization",
});
expect(input.credentialValues).toBeUndefined();
});
@@ -2600,7 +2600,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(connectAppMock).toHaveBeenCalledTimes(1);
expect(connectAppMock.mock.calls[0]?.[1]).toMatchObject({
link: zapierUrl,
- name: "Zapier for the company",
+ name: "Zapier for the organization",
galleryKey: "zapier",
connectionMethodKey: "generated-url",
});
@@ -2741,7 +2741,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
const [, input] = connectAppMock.mock.calls[0];
expect(input).toMatchObject({
link: "https://www.example.com/actions",
- name: "Bla for the company",
+ name: "Bla for the organization",
applicationId: "app-77",
});
});
@@ -2878,7 +2878,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(connectAppMock).toHaveBeenCalledTimes(1);
expect(mockNavigate).toHaveBeenCalledWith("/apps/connect?source=github");
const [, input] = connectAppMock.mock.calls[0];
- expect(input).toMatchObject({ galleryKey: "github", name: "GitHub for the company" });
+ expect(input).toMatchObject({ galleryKey: "github", name: "GitHub for the organization" });
});
it("continues an exact credential-based draft instead of creating a replacement", async () => {
@@ -2892,7 +2892,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
connections: [{
id: connectionId,
applicationId: "app-github",
- name: "Engineering GitHub for the company",
+ name: "Engineering GitHub for the organization",
authKind: "api_key",
credentialPolicy: "shared",
status: "draft",
@@ -2917,7 +2917,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
galleryKey: "github",
connectionMethodKey: "mcp-key",
resumeConnectionId: connectionId,
- name: "Engineering GitHub for the company",
+ name: "Engineering GitHub for the organization",
credentialValues: { "credentials.authorization": "replacement-key" },
});
});
@@ -2943,7 +2943,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
const [, input] = connectAppMock.mock.calls[0];
expect(input).toMatchObject({
galleryKey: "github",
- name: "GitHub for the company",
+ name: "GitHub for the organization",
});
});
@@ -2980,7 +2980,7 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
const [, input] = connectAppMock.mock.calls[0];
expect(input).toMatchObject({
galleryKey: "google-sheets",
- name: "Google Sheets for the company",
+ name: "Google Sheets for the organization",
configValues: { allowedSpreadsheetIds: ["sheet_123"] },
});
});
@@ -3111,7 +3111,7 @@ describe("AppsConnect — guided generic MCP flow (PAP-17087)", () => {
});
await flushReact();
expect(connectAppMock.mock.calls[0]?.[1]).toMatchObject({
- name: "127.0.0.1:47399/mcp for the company",
+ name: "127.0.0.1:47399/mcp for the organization",
});
});
diff --git a/ui/src/pages/apps/Connections.test.tsx b/ui/src/pages/apps/Connections.test.tsx
index c01c6e05d1..90614a2ca3 100644
--- a/ui/src/pages/apps/Connections.test.tsx
+++ b/ui/src/pages/apps/Connections.test.tsx
@@ -311,7 +311,7 @@ describe("Connections table (M1b / PAP-13254 door 2)", () => {
const headers = Array.from(container.querySelectorAll("th")).map((th) => th.textContent?.trim());
expect(headers).toEqual(["Connection", "Type", "Connected by", "Status", "Actions", "Last used", ""]);
expect(text).toContain("Personal");
- expect(text).toContain("Company");
+ expect(text).toContain("Organization");
// 4. Actions column reflects enabled catalog entries per account; missing profile => 0 on.
expect(text).toContain("3 on");
expect(text).toContain("0 on");
@@ -334,8 +334,8 @@ describe("Connections table (M1b / PAP-13254 door 2)", () => {
expect(rowButtonLabel("Notion")).toBe("Permissions");
// 8. Generic connection names inherit the originating user's first name.
expect(text).toContain("Dotta’s GitHub");
- expect(text).toContain("Slack for the company");
- expect(text).toContain("Slack Team for the company");
+ expect(text).toContain("Slack for the organization");
+ expect(text).toContain("Slack Team for the organization");
expect(container.querySelector('[title="Dotta"] [data-slot="avatar"]')).toBeTruthy();
// Custom account labels remain untouched.
expect(text).toContain("Slack Team");
@@ -392,7 +392,7 @@ describe("Connections table (M1b / PAP-13254 door 2)", () => {
await renderApps();
const deleteButton = container.querySelector<HTMLButtonElement>(
- 'button[aria-label="Delete GitHub for the company connection"]',
+ 'button[aria-label="Delete GitHub for the organization connection"]',
);
expect(deleteButton).toBeTruthy();
@@ -449,7 +449,7 @@ describe("Connections table (M1b / PAP-13254 door 2)", () => {
await renderApps();
const deleteButton = container.querySelector<HTMLButtonElement>(
- 'button[aria-label="Delete Composio for the company connection"]',
+ 'button[aria-label="Delete Composio for the organization connection"]',
);
await act(async () => {
deleteButton?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
@@ -483,7 +483,7 @@ describe("Connections table (M1b / PAP-13254 door 2)", () => {
await renderApps();
const deleteButton = container.querySelector<HTMLButtonElement>(
- 'button[aria-label="Delete GitHub for the company connection"]',
+ 'button[aria-label="Delete GitHub for the organization connection"]',
);
await act(async () => {
deleteButton?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
@@ -533,7 +533,7 @@ describe("Connections table (M1b / PAP-13254 door 2)", () => {
await renderApps();
const deleteButton = container.querySelector<HTMLButtonElement>(
- 'button[aria-label="Delete GitHub for the company connection"]',
+ 'button[aria-label="Delete GitHub for the organization connection"]',
);
await act(async () => {
deleteButton?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
diff --git a/ui/src/pages/apps/Connections.tsx b/ui/src/pages/apps/Connections.tsx
index 57ed1b93ce..253e4a8afe 100644
--- a/ui/src/pages/apps/Connections.tsx
+++ b/ui/src/pages/apps/Connections.tsx
@@ -274,7 +274,7 @@ export function Connections() {
return appConnections.map((connection) => {
const owner = connectionOwnerProfile(connection, userProfileById);
const type = connectionTypeLabel(connection.credentialPolicy);
- const displayName = type === "Company"
+ const displayName = type === "Organization"
? connectionNameForCredentialPolicy(
humanizeConnectionDisplayName(connection),
connection.credentialPolicy,
diff --git a/ui/src/pages/apps/connection-identity.test.ts b/ui/src/pages/apps/connection-identity.test.ts
new file mode 100644
index 0000000000..715e760f32
--- /dev/null
+++ b/ui/src/pages/apps/connection-identity.test.ts
@@ -0,0 +1,64 @@
+import { describe, expect, it } from "vitest";
+import {
+ connectionNameForCredentialPolicy,
+ connectionNameForGrantKind,
+ connectionTypeLabel,
+} from "./connection-identity";
+
+describe("connectionTypeLabel", () => {
+ it("names each credential policy", () => {
+ expect(connectionTypeLabel("per_user")).toBe("Personal");
+ expect(connectionTypeLabel("per_agent")).toBe("Dedicated agent");
+ expect(connectionTypeLabel("shared")).toBe("Organization");
+ });
+});
+
+describe("connectionNameForGrantKind", () => {
+ it("suffixes an organization-owned connection", () => {
+ expect(connectionNameForGrantKind("Slack", "organization")).toBe("Slack for the organization");
+ });
+
+ it("leaves a user-owned connection alone", () => {
+ expect(connectionNameForGrantKind("Slack", "user")).toBe("Slack");
+ });
+
+ it("does not suffix a name that already carries the suffix", () => {
+ expect(connectionNameForGrantKind("Slack for the organization", "organization"))
+ .toBe("Slack for the organization");
+ });
+
+ // Connections created before the rename persisted " for the company". The
+ // setup flow writes this name back when a draft resumes, so a doubled suffix
+ // would be stored, not just rendered.
+ it("replaces the legacy suffix instead of appending a second one", () => {
+ expect(connectionNameForGrantKind("Slack for the company", "organization"))
+ .toBe("Slack for the organization");
+ });
+
+ it("matches the legacy suffix regardless of case", () => {
+ expect(connectionNameForGrantKind("Slack For The Company", "organization"))
+ .toBe("Slack for the organization");
+ });
+
+ it("keeps a name that merely mentions the old word", () => {
+ expect(connectionNameForGrantKind("Company directory", "organization"))
+ .toBe("Company directory for the organization");
+ });
+
+ it("trims surrounding whitespace before it decides", () => {
+ expect(connectionNameForGrantKind(" Slack for the company ", "organization"))
+ .toBe("Slack for the organization");
+ });
+});
+
+describe("connectionNameForCredentialPolicy", () => {
+ it("suffixes a shared credential and leaves a personal one alone", () => {
+ expect(connectionNameForCredentialPolicy("Notion", "shared")).toBe("Notion for the organization");
+ expect(connectionNameForCredentialPolicy("Notion", "per_user")).toBe("Notion");
+ });
+
+ it("carries the legacy-suffix handling through to the connections list", () => {
+ expect(connectionNameForCredentialPolicy("Notion for the company", "shared"))
+ .toBe("Notion for the organization");
+ });
+});
diff --git a/ui/src/pages/apps/connection-identity.ts b/ui/src/pages/apps/connection-identity.ts
index 0e864c3d9d..9636893a91 100644
--- a/ui/src/pages/apps/connection-identity.ts
+++ b/ui/src/pages/apps/connection-identity.ts
@@ -15,7 +15,7 @@ import type {
* card cannot drift into three different names for the same thing.
*/
-export type ConnectionTypeLabel = "Personal" | "Dedicated agent" | "Company";
+export type ConnectionTypeLabel = "Personal" | "Dedicated agent" | "Organization";
/** The two connection types shown throughout the product. */
export function connectionTypeLabel(
@@ -25,18 +25,34 @@ export function connectionTypeLabel(
? "Personal"
: credentialPolicy === "per_agent"
? "Dedicated agent"
- : "Company";
+ : "Organization";
}
-const COMPANY_NAME_SUFFIX = " for the company";
+const ORGANIZATION_NAME_SUFFIX = " for the organization";
-/** Keep company-owned connections unmistakable anywhere their name appears. */
+/**
+ * Connections created before the rename persisted the old suffix. Treat it as
+ * the same suffix so a legacy row reads "Slack for the organization" and never
+ * "Slack for the company for the organization" — the setup flow persists this
+ * name when a draft resumes, so a doubled suffix would outlive the render.
+ */
+const LEGACY_ORGANIZATION_NAME_SUFFIX = " for the company";
+
+/** Keep organization-owned connections unmistakable anywhere their name appears. */
export function connectionNameForGrantKind(name: string, grantKind: ConnectionGrantKind): string {
const trimmed = name.trim();
- if (grantKind !== "organization" || trimmed.toLocaleLowerCase().endsWith(COMPANY_NAME_SUFFIX)) {
+ if (grantKind !== "organization") {
return trimmed;
}
- return `${trimmed}${COMPANY_NAME_SUFFIX}`;
+ const lowercased = trimmed.toLocaleLowerCase();
+ if (lowercased.endsWith(ORGANIZATION_NAME_SUFFIX)) {
+ return trimmed;
+ }
+ if (lowercased.endsWith(LEGACY_ORGANIZATION_NAME_SUFFIX)) {
+ const base = trimmed.slice(0, trimmed.length - LEGACY_ORGANIZATION_NAME_SUFFIX.length).trimEnd();
+ return `${base}${ORGANIZATION_NAME_SUFFIX}`;
+ }
+ return `${trimmed}${ORGANIZATION_NAME_SUFFIX}`;
}
export function connectionNameForCredentialPolicy(
@@ -45,7 +61,7 @@ export function connectionNameForCredentialPolicy(
): string {
return connectionNameForGrantKind(
name,
- connectionTypeLabel(credentialPolicy) === "Company" ? "organization" : "user",
+ connectionTypeLabel(credentialPolicy) === "Organization" ? "organization" : "user",
);
}
diff --git a/ui/storybook/stories/agentmail-onboarding.stories.tsx b/ui/storybook/stories/agentmail-onboarding.stories.tsx
index 1626385f27..9cfa3b4443 100644
--- a/ui/storybook/stories/agentmail-onboarding.stories.tsx
+++ b/ui/storybook/stories/agentmail-onboarding.stories.tsx
@@ -297,7 +297,7 @@ function AgentMailJourney({
</div>
);
const humanLabel =
- humanAccess === "organization" ? "Any human in the company" : "Just me";
+ humanAccess === "organization" ? "Any human in the organization" : "Just me";
const agentLabel =
agentAccess === "all"
? "Any agent"