π OpenHands: AI-Driven Development
fix: render Slack logo from a bundled icon instead of the removed CDN asset (#1523)
Hiep Lee0a483c200f6
diff --git a/src/components/features/mcp-logo-badge.tsx b/src/components/features/mcp-logo-badge.tsxindex 3547d48b13..3fa4b45d52 100644--- a/src/components/features/mcp-logo-badge.tsx+++ b/src/components/features/mcp-logo-badge.tsx@@ -1,6 +1,7 @@-import type { ReactNode } from "react";+import type { ComponentType, ReactNode, SVGProps } from "react";import { Bot } from "lucide-react";import type { IntegrationCatalogEntry } from "@openhands/extensions/integrations";+import SlackIcon from "#/icons/slack.svg?react";import { cn } from "#/utils/utils";type McpLogoEntry = Pick<@@ -24,6 +25,16 @@ const sizeClassNames = {md: "h-10 w-10 rounded-lg [&>svg]:h-5 [&>svg]:w-5",};+// Catalog entries whose remote logoUrl is unreliable (e.g. Slack's was removed+// from cdn.simpleicons.org and now 404s) render a bundled mark instead, keyed+// by IntegrationCatalogEntry.id.+const LOCAL_LOGO_ICONS: Record<+ string,+ ComponentType<SVGProps<SVGSVGElement>>+> = {+ slack: SlackIcon,+};+export function McpLogoBadge({entry,size = "md",@@ -31,6 +42,7 @@ export function McpLogoBadge({fallback,testId,}: McpLogoBadgeProps) {+ const LocalLogoIcon = entry ? LOCAL_LOGO_ICONS[entry.id] : undefined;return (<spanaria-hidden="true"@@ -47,7 +59,9 @@ export function McpLogoBadge({color: entry?.iconColor ?? "#FFFFFF",}}>- {entry?.logoUrl ? (+ {LocalLogoIcon ? (+ <LocalLogoIcon />+ ) : entry?.logoUrl ? (<imgsrc={entry.logoUrl}alt={`${entry.name} logo`}diff --git a/src/icons/slack.svg b/src/icons/slack.svgnew file mode 100644index 0000000000..aef7dfeeae--- /dev/null+++ b/src/icons/slack.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">+ <path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z" fill="currentColor"/>+</svg>