From a4c82fdb2a8044140e81e0d2657a2c7ecdb53d0b Mon Sep 17 00:00:00 2001 From: Bob Lee Date: Mon, 2 Nov 2026 20:49:42 +0800 Subject: [PATCH] fix(mobile-web): use one Claw icon for assistant entries and session history Claw sessions rendered a generic AppWindow icon in the launch panel, resume card and history rows while the assistant workspace row used the Bot icon. Route every session icon through a shared sessionIconKind mapping and SessionTypeIcon component so Claw sessions and assistant entries both use the Bot icon, including Claw rows in the compact sidebar. Fixes #2363 --- .../src/components/SessionTypeIcon.tsx | 31 ++++++++++++++++ src/mobile-web/src/pages/SessionListPage.tsx | 37 +++++-------------- .../src/services/workspaceIdentity.ts | 19 ++++++++++ .../tests/workspace-identity.test.mjs | 20 +++++++++- 4 files changed, 78 insertions(+), 29 deletions(-) create mode 100644 src/mobile-web/src/components/SessionTypeIcon.tsx diff --git a/src/mobile-web/src/components/SessionTypeIcon.tsx b/src/mobile-web/src/components/SessionTypeIcon.tsx new file mode 100644 index 0000000000..506068a67b --- /dev/null +++ b/src/mobile-web/src/components/SessionTypeIcon.tsx @@ -0,0 +1,31 @@ +import { + Bot as LucideBot, + MessageSquare as LucideMessageSquare, + Users as LucideUsers, +} from 'lucide-react'; +import React from 'react'; +import type { RecentWorkspaceEntry } from '../services/RemoteSessionManager'; +import { sessionIconKind, type SessionIconKind } from '../services/workspaceIdentity'; + +const SESSION_ICONS: Record = { + assistant: LucideBot, + cowork: LucideUsers, + code: LucideMessageSquare, +}; + +/** + * Shared session-type icon: assistant entries, Claw history rows, the resume + * card and the compact sidebar all resolve through `sessionIconKind`. + */ +export function SessionTypeIcon({ + agentType, + workspaceKind, + size = 18, +}: { + agentType?: string; + workspaceKind?: RecentWorkspaceEntry['workspace_kind']; + size?: number; +}) { + const Icon = SESSION_ICONS[sessionIconKind(agentType, workspaceKind)]; + return