Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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("Allow members to connect their own server account"),
).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,7 @@ 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={`Allow members to connect their own ${values.name || "server"} account`}
Comment thread
posthog-bot-comment-resolver[bot] marked this conversation as resolved.
Outdated
checked={values.teamEnabled}
onChange={(checked) => set("teamEnabled", checked)}
/>
Expand Down Expand Up @@ -365,12 +360,10 @@ function Field({

function ToggleRow({
title,
sub,
checked,
onChange,
}: {
title: string;
sub: string;
checked: boolean;
onChange: (checked: boolean) => void;
}) {
Expand All @@ -385,9 +378,6 @@ function ToggleRow({
<Text as="div" className="font-medium text-sm">
{title}
</Text>
<Text as="div" color="gray" className="text-[13px]">
{sub}
</Text>
</div>
<Switch checked={checked} onCheckedChange={onChange} />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,16 +852,9 @@ function AccessSection({
gap="3"
className="rounded-md border border-gray-5 bg-gray-2 p-3"
>
<div>
<Text as="div" className="font-medium text-sm">
Available to team members
</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}.`}
</Text>
</div>
<Text as="div" className="font-medium text-sm">
Allow members to connect their own {server.name} account
</Text>
<Switch
checked={server.is_team_enabled}
onCheckedChange={(enabled) => {
Expand Down
7 changes: 2 additions & 5 deletions products/mcp_store/frontend/gateway/GatewayAddServerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,8 @@ 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="text-sm text-secondary">
Members can find this server and connect their own account.
</div>
<div className="font-semibold">
Allow members to connect their own {addServerForm.name || 'server'} account
</div>
<LemonSwitch
checked={addServerForm.teamEnabled}
Expand Down
9 changes: 1 addition & 8 deletions products/mcp_store/frontend/gateway/GatewayServerAccess.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,7 @@ export function GatewayAccessSection(): JSX.Element | null {
{isAdmin && (
<>
<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="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.`}
</div>
</div>
<div className="font-semibold">Allow members to connect their own {server.name} account</div>
<LemonSwitch
checked={server.is_team_enabled}
loading={allServersEnabledLoading || serverEnabledLoadingIds.has(server.id)}
Expand Down
Loading