Skip to content

Commit dd54d31

Browse files
authored
fix(search): gate Zoom rollout and correct Lucid tiles (#8491)
1 parent fb33da1 commit dd54d31

29 files changed

Lines changed: 343 additions & 46 deletions

File tree

‎apps/docs/components/icons.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ interface LucidIconProps extends SVGProps<SVGSVGElement> {}
66
export function LucidIcon(props: LucidIconProps) {
77
return (
88
<svg {...props} viewBox='0 0 192 192' fill='none' xmlns='http://www.w3.org/2000/svg'>
9-
<rect width='192' height='192' rx='32' fill='#282C33' />
10-
<g transform='translate(46 24)' fill='#FFFFFF'>
9+
<g transform='translate(46 24)' fill='currentColor'>
1110
<path d='M50 0L0 28.9V144.5L50 115.6V0Z' />
1211
<path d='M100 142.7V86.7L50 115.6V142.7H100Z' />
1312
</g>

‎apps/sim/app/o/[organizationId]/integrations/live-member-integrations.tsx‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export function LiveMemberIntegrations({ organizationId, search }: LiveMemberInt
7474
)
7575
const available = LIVE_SEARCH_SOURCE_TYPES.filter(
7676
([provider]) =>
77+
(approvals.get(provider)?.available !== false || accountsForProvider(provider).length > 0) &&
7778
LIVE_SEARCH_SCOPE_FIELDS[provider] &&
7879
((provider !== 'hubspot' && provider !== 'zoom') ||
7980
data.availableMcpConnectors.includes(provider) ||
@@ -130,6 +131,7 @@ export function LiveMemberIntegrations({ organizationId, search }: LiveMemberInt
130131
: undefined
131132
const accounts = accountsForProvider(provider)
132133
const ready =
134+
approval?.available !== false &&
133135
group?.status === 'active' &&
134136
Boolean(option || server) &&
135137
approved &&
@@ -140,15 +142,18 @@ export function LiveMemberIntegrations({ organizationId, search }: LiveMemberInt
140142
approval?.policy?.accessMode === 'service_account'
141143
? 'Selected resources you can access'
142144
: 'All accessible content'
143-
const state = !approved
144-
? 'Disabled by your organization'
145-
: group && group.status !== 'active'
146-
? 'Connections are paused by your organization'
147-
: !ready
148-
? 'Not configured'
149-
: accounts.length
150-
? scope
151-
: undefined
145+
const state =
146+
approval?.available === false
147+
? 'Currently unavailable'
148+
: !approved
149+
? 'Disabled by your organization'
150+
: group && group.status !== 'active'
151+
? 'Connections are paused by your organization'
152+
: !ready
153+
? 'Not configured'
154+
: accounts.length
155+
? scope
156+
: undefined
152157
const description = [
153158
accounts
154159
.map(

‎apps/sim/app/o/[organizationId]/settings/components/integrations/live-search-settings.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ export function LiveSearchSettings() {
8282
secretSource && GENERIC_SECRETS_META.name.toLowerCase().includes(search.toLowerCase())
8383
const availableToAdd = [
8484
...LIVE_SEARCH_SOURCE_TYPES.filter(
85-
([type]) => LIVE_SEARCH_SCOPE_FIELDS[type] && !added.some((row) => row.connectorType === type)
85+
([type]) =>
86+
(type !== 'zoom' ||
87+
policies.data?.some((row) => row.connectorType === type && row.available !== false)) &&
88+
LIVE_SEARCH_SCOPE_FIELDS[type] &&
89+
!added.some((row) => row.connectorType === type)
8690
).map(([type, meta]) => ({
8791
type,
8892
meta,
@@ -160,6 +164,7 @@ export function LiveSearchSettings() {
160164
const mcpProvider = liveSearchMcpConnector(type)
161165
const group = accounts.data?.credentialGroup
162166
const needsMemberSetup =
167+
integration.available !== false &&
163168
accounts.data &&
164169
(memberProvider || mcpProvider) &&
165170
(group?.status !== 'active' ||
@@ -188,7 +193,7 @@ export function LiveSearchSettings() {
188193
iconVariant='custom'
189194
icon={<IntegrationTile blockType={type} icon={meta.icon} />}
190195
title={meta.name}
191-
description={scope}
196+
description={integration.available === false ? 'Currently unavailable' : scope}
192197
trailing={
193198
<div className='flex gap-2'>
194199
{serviceAccount && (

‎apps/sim/app/workspace/[workspaceId]/integrations/components/integrations-showcase/integrations-showcase.tsx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { ComponentType } from 'react'
22
import { cn } from '@sim/emcn'
3+
import { getManagedMcpConnectorBgColor } from '@/lib/credential-groups/managed-mcp-connectors'
34
import { BrandTile } from '@/app/workspace/[workspaceId]/components/resource-tile'
45
import { getBlock } from '@/blocks'
56
import { getTileIconColorClass } from '@/blocks/icon-color'
@@ -47,11 +48,11 @@ const SHOWCASE_TILES = [
4748
] as const
4849

4950
/**
50-
* Resolves the brand background color for a block type from the block registry.
51-
* Returns `null` when the block is unknown or has no brand color configured.
51+
* Resolves the brand background color for workflow blocks and managed MCP connectors.
52+
* Returns `null` when neither catalog provides a brand color.
5253
*/
5354
function resolveBrandTileBg(blockType: string): string | null {
54-
return getBlock(blockType)?.bgColor || null
55+
return getBlock(blockType)?.bgColor || getManagedMcpConnectorBgColor(blockType) || null
5556
}
5657

5758
interface IntegrationTileProps {
@@ -61,7 +62,7 @@ interface IntegrationTileProps {
6162
}
6263

6364
/**
64-
* Brand-colored square tile that renders a block's icon. The unframed variant
65+
* Brand-colored square tile that renders an integration's icon. The unframed variant
6566
* is a 36px tile used in list rows and headers; the framed variant adds an
6667
* outer 44px halo used inside the showcase grid.
6768
*/

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { useParams } from 'next/navigation'
2020
import { McpIcon, WorkflowIcon } from '@/components/icons'
2121
import { McpOperationPolicyEditor } from '@/components/mcp/operation-policy-editor'
2222
import { getManagedMcpConnectorIcon } from '@/lib/credential-groups/managed-mcp-connector-icons'
23+
import { getManagedMcpConnectorBgColor } from '@/lib/credential-groups/managed-mcp-connectors'
2324
import { MCP_SERVER_ADVANCED_TOOL_TYPE } from '@/lib/mcp/shared'
2425
import {
2526
getIssueBadgeLabel,
@@ -1200,7 +1201,10 @@ export const ToolInput = memo(function ToolInput({
12001201
serverToolItems.push({
12011202
label: 'Configure operations access',
12021203
value: `mcp-server-all-${mcpServerDrilldown}`,
1203-
iconElement: createToolIcon('var(--brand-agent)', ServerIcon),
1204+
iconElement: createToolIcon(
1205+
getManagedMcpConnectorBgColor(server?.managedConnectorId) ?? 'var(--brand-agent)',
1206+
ServerIcon
1207+
),
12041208
onSelect: () => {
12051209
if (allAlreadySelected) return
12061210
const filteredTools = selectedTools.filter(
@@ -1350,7 +1354,10 @@ export const ToolInput = memo(function ToolInput({
13501354
serverItems.push({
13511355
label: `${serverName} (${toolCount} tools)`,
13521356
value: `mcp-server-folder-${serverId}`,
1353-
iconElement: createToolIcon('#6366F1', ServerIcon),
1357+
iconElement: createToolIcon(
1358+
getManagedMcpConnectorBgColor(server.managedConnectorId) ?? '#6366F1',
1359+
ServerIcon
1360+
),
13541361
suffixElement: <ChevronRight className='size-[12px] text-[var(--text-tertiary)]' />,
13551362
onSelect: () => {
13561363
setMcpServerDrilldown(serverId)
@@ -1572,7 +1579,10 @@ export const ToolInput = memo(function ToolInput({
15721579
: advancedMcpServer?.managedConnectorId
15731580
? getManagedMcpConnectorIcon(advancedMcpServer.managedConnectorId)
15741581
: McpIcon
1575-
const mcpTileColor = mcpTool?.bgColor || 'var(--brand-agent)'
1582+
const mcpTileColor =
1583+
mcpTool?.bgColor ||
1584+
getManagedMcpConnectorBgColor(advancedMcpServer?.managedConnectorId) ||
1585+
'var(--brand-agent)'
15761586
const mcpToolSchema = isMcpTool ? tool.schema || mcpTool?.inputSchema : null
15771587

15781588
// Canonical name wins; stored title only when nothing resolves

‎apps/sim/components/icons.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ interface LucidIconProps extends SVGProps<SVGSVGElement> {}
66
export function LucidIcon(props: LucidIconProps) {
77
return (
88
<svg {...props} viewBox='0 0 192 192' fill='none' xmlns='http://www.w3.org/2000/svg'>
9-
<rect width='192' height='192' rx='32' fill='#282C33' />
10-
<g transform='translate(46 24)' fill='#FFFFFF'>
9+
<g transform='translate(46 24)' fill='currentColor'>
1110
<path d='M50 0L0 28.9V144.5L50 115.6V0Z' />
1211
<path d='M100 142.7V86.7L50 115.6V142.7H100Z' />
1312
</g>

‎apps/sim/ee/credential-groups/components/credential-group-provider-tile.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import type { ComponentType } from 'react'
22
import { getIntegrationTypesForOAuthServiceId } from '@sim/deployment-config/integration-availability'
33
import { INTEGRATION_METADATA } from '@sim/deployment-config/integration-metadata'
4-
import type { ManagedMcpConnectorId } from '@/lib/credential-groups/managed-mcp-connectors'
4+
import {
5+
getManagedMcpConnectorBgColor,
6+
type ManagedMcpConnectorId,
7+
} from '@/lib/credential-groups/managed-mcp-connectors'
58
import type { CredentialGroupProvider } from '@/lib/credential-groups/providers'
69
import { blockTypeToIconMap } from '@/lib/integrations/icon-mapping'
710
import { BrandTile } from '@/app/workspace/[workspaceId]/components/resource-tile'
@@ -18,7 +21,9 @@ export function CredentialGroupProviderTile({ provider, icon }: CredentialGroupP
1821
return (
1922
<BrandTile
2023
icon={blockTypeToIconMap[blockType] ?? icon}
21-
background={INTEGRATION_BY_TYPE.get(blockType)?.bgColor}
24+
background={
25+
INTEGRATION_BY_TYPE.get(blockType)?.bgColor ?? getManagedMcpConnectorBgColor(provider)
26+
}
2227
/>
2328
)
2429
}

‎apps/sim/hooks/mcp/use-mcp-tools.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { createLogger } from '@sim/logger'
1111
import { useQueryClient } from '@tanstack/react-query'
1212
import { McpIcon } from '@/components/icons'
1313
import { getManagedMcpConnectorIcon } from '@/lib/credential-groups/managed-mcp-connector-icons'
14+
import { getManagedMcpConnectorBgColor } from '@/lib/credential-groups/managed-mcp-connectors'
1415
import { createMcpToolId } from '@/lib/mcp/shared'
1516
import type { McpToolSchema } from '@/lib/mcp/types'
1617
import { useMcpToolsQuery } from '@/hooks/queries/mcp'
@@ -54,7 +55,7 @@ export function useMcpTools(workspaceId: string): UseMcpToolsResult {
5455
serverName: tool.serverName,
5556
type: 'mcp' as const,
5657
inputSchema: tool.inputSchema,
57-
bgColor: '#6366F1',
58+
bgColor: getManagedMcpConnectorBgColor(tool.managedConnectorId) ?? '#6366F1',
5859
icon: tool.managedConnectorId ? getManagedMcpConnectorIcon(tool.managedConnectorId) : McpIcon,
5960
}))
6061
}, [mcpToolsData])

‎apps/sim/lib/api/contracts/knowledge/search-integrations.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export const searchIntegrationApprovalSchema = z.object({
1111
})
1212
export type SearchIntegrationApproval = z.output<typeof searchIntegrationApprovalSchema>
1313

14+
export const searchIntegrationStatusSchema = searchIntegrationApprovalSchema.extend({
15+
available: z.boolean().optional(),
16+
})
17+
export type SearchIntegrationStatus = z.output<typeof searchIntegrationStatusSchema>
18+
1419
export const listSearchIntegrationsQuerySchema = z.object({ organizationId: organizationIdSchema })
1520
export type ListSearchIntegrationsQuery = z.input<typeof listSearchIntegrationsQuerySchema>
1621
export const listSearchIntegrationsContract = defineRouteContract({
@@ -19,7 +24,7 @@ export const listSearchIntegrationsContract = defineRouteContract({
1924
query: listSearchIntegrationsQuerySchema,
2025
response: {
2126
mode: 'json',
22-
schema: successResponseSchema(z.array(searchIntegrationApprovalSchema).max(100)),
27+
schema: successResponseSchema(z.array(searchIntegrationStatusSchema).max(100)),
2328
},
2429
})
2530

‎apps/sim/lib/api/contracts/mothership-search-sources.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import {
33
searchSourcePageSchema,
44
searchSourceSummarySchema,
55
} from '@/lib/api/contracts/knowledge/connectors'
6-
import { searchIntegrationApprovalSchema } from '@/lib/api/contracts/knowledge/search-integrations'
6+
import {
7+
searchIntegrationApprovalSchema,
8+
searchIntegrationStatusSchema,
9+
} from '@/lib/api/contracts/knowledge/search-integrations'
710

811
const connectorTypeSchema = z.string().trim().min(1).max(100)
912

@@ -36,7 +39,7 @@ export const organizationSearchSourcesOutputSchema = z.discriminatedUnion('actio
3639
z.object({ action: z.literal('get'), source: searchSourceSummarySchema }),
3740
z.object({
3841
action: z.literal('providers'),
39-
providers: z.array(searchIntegrationApprovalSchema).max(100),
42+
providers: z.array(searchIntegrationStatusSchema).max(100),
4043
}),
4144
z.object({
4245
action: z.literal('setup'),

0 commit comments

Comments
 (0)