fix(mobile): show the bundled whale on DeepSeek Build tabs (#31359)

fix(mobile): reuse DeepSeek whale for Build tabs
Adapted from community PR #30525 with a focused component regression and native current-shell validation.

test(mobile): use checked icon renderer guard


test(mobile): keep icon diagnostic with review evidence
Native before/after captures cover this low-impact asset mapping; retain the local fail/pass diagnostic outside the product diff.

Use checked optional type for mobile icon lookup

Co-authored-by: Wooseong Kim <innocarpe@gmail.com>
This commit is contained in:
Neil
2026-10-20 21:32:39 -07:00
committed by GitHub
co-authored by Wooseong Kim
parent 8bec7323ef
commit f19ce3635b
+4 -2
View File
@@ -1,13 +1,14 @@
import { Image, StyleSheet, Text, View } from 'react-native'
import type { ImageSourcePropType } from 'react-native'
import { Terminal } from 'lucide-react-native'
import type { TuiAgent } from '../../../src/shared/tui-agent'
import Svg, { Defs, G, LinearGradient, Path, Stop } from 'react-native-svg'
import { colors } from '../theme/mobile-theme'
import { MOBILE_AGENT_CATALOG } from '../tasks/mobile-agent-catalog'
import { MOBILE_AGENT_ICON_ASSETS } from './mobile-agent-icon-assets'
import { ClaudeIcon, OpenAIIcon } from './AgentIcons'
const iconAssets: Partial<Record<string, ImageSourcePropType>> = MOBILE_AGENT_ICON_ASSETS
// Why: agent branding should match the desktop/new-worktree picker everywhere
// mobile lets users choose the agent that will own a workspace.
@@ -107,7 +108,8 @@ export function MobileAgentIcon({ agentId, size = 16 }: { agentId: string; size?
// Why: prefer the favicon bundled into the app over Google's favicon service,
// which is unreachable in some regions and offline (#8451).
const bundledIcon = MOBILE_AGENT_ICON_ASSETS[agentId as TuiAgent]
const iconAgentId = agentId === 'dsb' ? 'dsh' : agentId
const bundledIcon = iconAssets[iconAgentId]
if (bundledIcon) {
return <BundledIcon source={bundledIcon} size={size} />
}