Files
orca/mobile/src/components/HostKindIcon.tsx
T
Jinwoo-H ef6f2a2a1a fix(mobile): name run targets and the desktop's own row as the host list does
The Run on picker showed a server's raw environment id behind "Remote ·" and
always a monitor glyph; it now takes the host list's badge labels and icon, as
the desktop's picker does. Server rows also made the desktop row read "This
computer" because its platform was only read for a mixed desktop catalog.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
2026-10-11 05:02:52 -04:00

11 lines
621 B
TypeScript

import { Monitor, Server } from 'lucide-react-native'
import { parseExecutionHostId } from '../../../src/shared/execution-host'
import { colors } from '../theme/mobile-theme'
/** The desktop's own machine is a monitor, any other host a server, as on the desktop's run targets. */
export function HostKindIcon({ hostId, size }: { hostId: string | undefined; size: number }) {
// Rows from hosts that predate hostId stamping are local: a remote row always carries one.
const Icon = (parseExecutionHostId(hostId)?.kind ?? 'local') === 'local' ? Monitor : Server
return <Icon size={size} color={colors.textMuted} />
}