Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ describe("GatewayAddServer", () => {
</Theme>,
);

expect(screen.getByText("Available to team members")).toBeInTheDocument();
expect(
screen.getByText("Enabled for your organization"),
).toBeInTheDocument();
expect(screen.getByText("Share with agents")).toBeInTheDocument();
expect(screen.getByText(account.name)).toBeInTheDocument();
expect(screen.queryByText("One shared credential")).not.toBeInTheDocument();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,8 @@ export function GatewayAddServer({
<Flex direction="column" gap="3">
{isAdmin && (
<ToggleRow
title="Available to team members"
sub={
values.teamEnabled
? "Members can find this server and connect their own account"
: "Only admins will see it until you enable it in Team settings."
}
title="Enabled for your organization"
description="Anyone in your organization can find and use this server. Each person connects with their own account."
Comment thread
cvolzer3 marked this conversation as resolved.
Outdated
checked={values.teamEnabled}
onChange={(checked) => set("teamEnabled", checked)}
/>
Expand Down Expand Up @@ -365,12 +361,12 @@ function Field({

function ToggleRow({
title,
sub,
description,
checked,
onChange,
}: {
title: string;
sub: string;
description?: string;
checked: boolean;
onChange: (checked: boolean) => void;
}) {
Expand All @@ -385,9 +381,11 @@ function ToggleRow({
<Text as="div" className="font-medium text-sm">
{title}
</Text>
<Text as="div" color="gray" className="text-[13px]">
{sub}
</Text>
{description && (
<Text as="div" color="gray" className="text-[13px]">
{description}
</Text>
)}
</div>
<Switch checked={checked} onCheckedChange={onChange} />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -854,12 +854,12 @@ function AccessSection({
>
<div>
<Text as="div" className="font-medium text-sm">
Available to team members
Enabled for your organization

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title "Enabled for your organization" contradicts the PR description which states it should be "Allow members to connect their own account". The PR description explicitly gives an example showing "Allow members to connect their own GitHub account" as the expected output.

Suggested change
Enabled for your organization
Allow members to connect their own {server.name} account

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

</Text>
<Text as="div" color="gray" className="text-[13px]">
{server.is_team_enabled
? `Members can connect their own ${server.name} account.`
: `Turned off — members can't see or call ${server.name}.`}
? `Anyone in your organization can find and use ${server.name}. Each person connects with their own account.`
: `${server.name} is turned off for everyone in your organization.`}
</Text>
</div>
<Switch
Expand Down
5 changes: 3 additions & 2 deletions products/mcp_store/frontend/gateway/GatewayAddServerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,10 @@ export function GatewayAddServerModal(): JSX.Element | null {
{isAdmin && (
<div className="flex items-center justify-between gap-4 rounded border p-3">
<div>
<div className="font-semibold">Available to team members</div>
<div className="font-semibold">Enabled for your organization</div>
<div className="text-sm text-secondary">
Members can find this server and connect their own account.
Anyone in your organization can find and use this server. Each person connects with
their own account.
</div>
</div>
<LemonSwitch
Expand Down
8 changes: 4 additions & 4 deletions products/mcp_store/frontend/gateway/GatewayServerAccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ export function GatewayAccessSection(): JSX.Element | null {
<>
<div className="border rounded p-3 flex items-center justify-between gap-3 bg-surface-secondary">
<div>
<div className="font-semibold">Available to team members</div>
<div className="font-semibold">Enabled for your organization</div>
<div className="text-sm text-secondary">
{server.is_team_enabled
? `Members can connect their own ${server.name} account.`
: `Members cannot see or call ${server.name} while it is off.`}
? `Anyone in your organization can find and use ${server.name}. Each person connects with their own account.`
: `${server.name} is turned off for everyone in your organization.`}
</div>
</div>
<LemonSwitch
checked={server.is_team_enabled}
loading={allServersEnabledLoading || serverEnabledLoadingIds.has(server.id)}
aria-label={`${server.is_team_enabled ? 'Turn off' : 'Turn on'} ${server.name} for the team`}
aria-label={`${server.is_team_enabled ? 'Turn off' : 'Turn on'} ${server.name} for your organization`}
onChange={(checked) => toggleServerEnabled(server.id, checked)}
/>
</div>
Expand Down
Loading