From c469f90b12c8338f67a2b50188c8855ccd0dc2ac Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Wed, 22 Jul 2026 17:29:20 -0700 Subject: [PATCH] FN-8500: add Xiaomi provider icons Show Xiaomi branding for direct provider names and MiMo model labels. - Add an accessible, tokenized Xiaomi provider mark - Infer boundary-safe MiMo labels through the shared provider icon key - Reuse shared inference in usage cards and cover Xiaomi mappings - Add a patch changeset for Xiaomi provider branding Files changed: .changeset/fn-8500-xiaomi-provider-icon.md | 7 +++ packages/dashboard/app/components/ProviderIcon.tsx | 24 +++++++++ .../dashboard/app/components/UsageIndicator.tsx | 58 +++------------------- .../app/components/__tests__/ProviderIcon.test.tsx | 48 ++++++++++++++++++ .../components/__tests__/UsageIndicator.test.tsx | 17 +++++++ packages/dashboard/app/styles.css | 1 + .../app/utils/__tests__/providerIconKey.test.ts | 9 ++++ packages/dashboard/app/utils/providerIconKey.ts | 8 +++ 8 files changed, 120 insertions(+), 52 deletions(-) Fusion-Task-Id: FN-8500 Fusion-Task-Lineage: 1784a180-cf41-4666-a59e-10aa24f47b72 Co-authored-by: Fusion (runfusion.ai) --- .changeset/fn-8500-xiaomi-provider-icon.md | 7 +++ .../dashboard/app/components/ProviderIcon.tsx | 24 ++++++++ .../app/components/UsageIndicator.tsx | 58 ++----------------- .../__tests__/ProviderIcon.test.tsx | 48 +++++++++++++++ .../__tests__/UsageIndicator.test.tsx | 17 ++++++ packages/dashboard/app/styles.css | 1 + .../utils/__tests__/providerIconKey.test.ts | 9 +++ .../dashboard/app/utils/providerIconKey.ts | 8 +++ 8 files changed, 120 insertions(+), 52 deletions(-) create mode 100644 .changeset/fn-8500-xiaomi-provider-icon.md diff --git a/.changeset/fn-8500-xiaomi-provider-icon.md b/.changeset/fn-8500-xiaomi-provider-icon.md new file mode 100644 index 0000000000..047d22c46c --- /dev/null +++ b/.changeset/fn-8500-xiaomi-provider-icon.md @@ -0,0 +1,7 @@ +--- +"@runfusion/fusion": patch +--- + +summary: Show Xiaomi branding for Xiaomi and MiMo provider labels. +category: feature +dev: Adds a tokenized shared ProviderIcon mark and boundary-safe MiMo inference. diff --git a/packages/dashboard/app/components/ProviderIcon.tsx b/packages/dashboard/app/components/ProviderIcon.tsx index f36bc1eab5..f2c6870b1b 100644 --- a/packages/dashboard/app/components/ProviderIcon.tsx +++ b/packages/dashboard/app/components/ProviderIcon.tsx @@ -258,6 +258,29 @@ function OpencodeIcon({ size, color, label = "Opencode" }: { size: number; color ); } +/* +FNXC:ProviderIcons 2026-07-22-17:04: +FN-8500 requires Hermes-supported Xiaomi and confirmed MiMo labels to share one accessible brand mark across dashboard surfaces. This inline path is Xiaomi's Simple Icons mark (CC0 1.0); keep its color supplied by the provider token rather than hardcoding presentation in TSX. +*/ +function XiaomiIcon({ size, color, label = "Xiaomi" }: { size: number; color: string; label?: string }) { + return ( + + + + ); +} + function DeepSeekIcon({ size, color, label = "DeepSeek" }: { size: number; color: string; label?: string }) { return ( void; } -/** - * Map provider names to ProviderIcon provider keys - */ -function getProviderIconKey(providerName: string): string { - const normalized = providerName.toLowerCase(); - - // Map common provider names to their icon keys - if (normalized.includes('claude') || normalized.includes('anthropic')) { - return 'anthropic'; - } - if (normalized.includes('codex') || normalized.includes('openai') || normalized.includes('gpt')) { - return 'openai'; - } - if (normalized.includes('gemini') || normalized.includes('google') || normalized.includes('antigravity')) { - return 'google'; - } - if (normalized.includes('ollama')) { - return 'ollama'; - } - if (normalized.includes('minimax')) { - return 'minimax'; - } - if (normalized.includes('zai') || normalized.includes('zhipu')) { - return 'zai'; - } - if (normalized.includes('kimi') || normalized.includes('moonshot')) { - return 'kimi'; - } - if (normalized.includes('bedrock') || normalized.includes('amazon')) { - return 'bedrock'; - } - if (normalized.includes('xai') || normalized.includes('grok')) { - return 'xai'; - } - /* - FNXC:UsageIndicator 2026-07-10-00:00: - Cursor usage cards are rendered by the generic ProviderCard path, so provider-name mapping is the only frontend-specific requirement: route "Cursor" to the existing cursor-cli icon token and SVG. - */ - if (normalized.includes('cursor')) { - return 'cursor-cli'; - } - if (normalized.includes('opencode')) { - return 'opencode'; - } - if (normalized.includes('copilot') || normalized === 'github copilot') { - return 'github-copilot'; - } - - // Return the original name as fallback (ProviderIcon will show a default icon) - return providerName; -} +/* +FNXC:UsageIndicator 2026-07-22-17:04: +FN-8500 makes usage cards consume the canonical provider/model inference seam rather than duplicate it. This keeps Xiaomi MiMo labels and every existing shared mapping aligned with model, task, and analytics surfaces. +*/ /** * Provider card showing status and usage windows @@ -522,7 +476,7 @@ function ProviderCard({ >
- + {provider.name} {hiddenCount > 0 && (