diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx
index 0dd5d5f3b..2eb324c53 100644
--- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx
+++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx
@@ -34,7 +34,6 @@ import {
} from '@/lib/oauth'
import { EditConnectorModal } from '@/app/workspace/[workspaceId]/knowledge/[id]/components/edit-connector-modal/edit-connector-modal'
import { OAuthRequiredModal } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/components/oauth-required-modal'
-import { CONNECTOR_META } from '@/connectors/icons'
import { CONNECTOR_REGISTRY } from '@/connectors/registry'
import type { ConnectorData, SyncLogData } from '@/hooks/queries/kb/connectors'
import {
@@ -265,15 +264,14 @@ function ConnectorCard({
const [expanded, setExpanded] = useState(false)
const [showOAuthModal, setShowOAuthModal] = useState(false)
- const meta = CONNECTOR_META[connector.connectorType]
- const Icon = meta?.icon
+ const connectorDef = CONNECTOR_REGISTRY[connector.connectorType]
+ const Icon = connectorDef?.icon
const statusConfig =
STATUS_CONFIG[connector.status as keyof typeof STATUS_CONFIG] || STATUS_CONFIG.active
- const connectorConfig = CONNECTOR_REGISTRY[connector.connectorType]
- const serviceId = connectorConfig?.oauth.provider
+ const serviceId = connectorDef?.oauth.provider
const providerId = serviceId ? getProviderIdFromServiceId(serviceId) : undefined
- const requiredScopes = connectorConfig?.oauth.requiredScopes ?? []
+ const requiredScopes = connectorDef?.oauth.requiredScopes ?? []
const { data: credentials } = useOAuthCredentials(providerId)
@@ -297,7 +295,7 @@ function ConnectorCard({
- {meta?.name || connector.connectorType}
+ {connectorDef?.name || connector.connectorType}
{connector.status === 'syncing' && (
@@ -444,7 +442,7 @@ function ConnectorCard({
isOpen={showOAuthModal}
onClose={() => setShowOAuthModal(false)}
provider={providerId as OAuthProvider}
- toolName={connectorConfig?.name ?? connector.connectorType}
+ toolName={connectorDef?.name ?? connector.connectorType}
requiredScopes={getCanonicalScopesForProvider(providerId)}
newScopes={missingScopes}
serviceId={serviceId}
diff --git a/apps/sim/connectors/github/github.ts b/apps/sim/connectors/github/github.ts
index 27b69cf0f..4068db604 100644
--- a/apps/sim/connectors/github/github.ts
+++ b/apps/sim/connectors/github/github.ts
@@ -282,7 +282,8 @@ export const githubConnector: ConnectorConfig = {
const path = externalId
try {
- const url = `${GITHUB_API_URL}/repos/${owner}/${repo}/contents/${encodeURIComponent(path)}?ref=${encodeURIComponent(branch)}`
+ const encodedPath = path.split('/').map(encodeURIComponent).join('/')
+ const url = `${GITHUB_API_URL}/repos/${owner}/${repo}/contents/${encodedPath}?ref=${encodeURIComponent(branch)}`
const response = await fetchWithRetry(url, {
method: 'GET',
headers: {
diff --git a/apps/sim/connectors/icons.ts b/apps/sim/connectors/icons.ts
deleted file mode 100644
index 4ffdd2776..000000000
--- a/apps/sim/connectors/icons.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { ConfluenceIcon, GithubIcon, LinearIcon, NotionIcon } from '@/components/icons'
-
-interface ConnectorMeta {
- icon: React.ComponentType<{ className?: string }>
- name: string
-}
-
-/** Connector type → client-safe metadata (icon + display name) */
-export const CONNECTOR_META: Record = {
- confluence: { icon: ConfluenceIcon, name: 'Confluence' },
- github: { icon: GithubIcon, name: 'GitHub' },
- linear: { icon: LinearIcon, name: 'Linear' },
- notion: { icon: NotionIcon, name: 'Notion' },
-}
-
-/** Connector type → icon component mapping for client-side use */
-export const CONNECTOR_ICONS: Record<
- string,
- React.ComponentType<{ className?: string }>
-> = Object.fromEntries(Object.entries(CONNECTOR_META).map(([k, v]) => [k, v.icon]))
diff --git a/apps/sim/lib/knowledge/documents/service.ts b/apps/sim/lib/knowledge/documents/service.ts
index af6cc5a1f..736480336 100644
--- a/apps/sim/lib/knowledge/documents/service.ts
+++ b/apps/sim/lib/knowledge/documents/service.ts
@@ -804,9 +804,28 @@ export interface TagFilterCondition {
/**
* Builds a Drizzle SQL condition from a tag filter.
*/
+const ALLOWED_TAG_SLOTS = new Set([
+ 'tag1',
+ 'tag2',
+ 'tag3',
+ 'tag4',
+ 'tag5',
+ 'tag6',
+ 'tag7',
+ 'number1',
+ 'number2',
+ 'number3',
+ 'number4',
+ 'number5',
+ 'date1',
+ 'date2',
+ 'boolean1',
+ 'boolean2',
+ 'boolean3',
+])
+
function buildTagFilterCondition(filter: TagFilterCondition): SQL | undefined {
- const column = document[filter.tagSlot as keyof typeof document.$inferSelect]
- if (!column) return undefined
+ if (!ALLOWED_TAG_SLOTS.has(filter.tagSlot)) return undefined
const col = document[filter.tagSlot as keyof typeof document]