fix(web): resolve Shell.tsx TypeScript errors from PR #71 bot-picker refactoring

- ConversationBotPicker now receives full Bot[] instead of SpaceBot[]
- conversationSidebarGroups render simplified to BotAvatar-only (no groups)
- projectSidebarGroups render uses GroupAvatar with proper type cast
- Dead code eliminated: kind===group checks in conversation sidebar

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Ingo Wagner 2026-09-22 10:43:46 +00:00
parent cf6ac7270e
commit 629346fe89
2 changed files with 28 additions and 49 deletions

View File

@ -56,3 +56,10 @@
- **PR 67** ✅ `fix(adapters): poll run lease during silent runtime work` — merged - **PR 67** ✅ `fix(adapters): poll run lease during silent runtime work` — merged
- **PR 69** ✅ `fix(teamchat): retry delegated replies when external origin is missing` — merged - **PR 69** ✅ `fix(teamchat): retry delegated replies when external origin is missing` — merged
- **0 stale branches**, **0 draft PRs** - **0 stale branches**, **0 draft PRs**
### Shell.tsx TypeScript fixes
- ✅ **Shell.tsx TS errors fixed** (PR #71 introduced type mismatches)
- `ConversationBotPicker` now receives `bots: Bot[]` (not `SpaceBot[]`)
- `conversationSidebarGroups` render simplified — only bots, removed dead `GroupAvatar` branch
- `projectSidebarGroups` render uses `GroupAvatar` with proper members access
- All TypeScript errors resolved (0 errors across apps/web and packages/adapters)

View File

@ -3140,7 +3140,7 @@ export function ShellPage() {
className="w-auto gap-0 overflow-hidden p-0 data-closed:animate-none" className="w-auto gap-0 overflow-hidden p-0 data-closed:animate-none"
> >
<ConversationBotPicker <ConversationBotPicker
bots={homeSpaceBots} bots={bots}
onCreateBot={() => { onCreateBot={() => {
setConversationPickerOpen(false); setConversationPickerOpen(false);
setPanel("create"); setPanel("create");
@ -3336,14 +3336,7 @@ export function ShellPage() {
className={`flex w-full items-center gap-3 rounded-2xl px-3 py-3 mb-[2px] text-start transition-all duration-150 cursor-pointer min-h-[52px] ${ className={`flex w-full items-center gap-3 rounded-2xl px-3 py-3 mb-[2px] text-start transition-all duration-150 cursor-pointer min-h-[52px] ${
item.kind === "bot" ? "cursor-grab active:cursor-grabbing" : "" item.kind === "bot" ? "cursor-grab active:cursor-grabbing" : ""
} ${ } ${
( !inGroup && active?.id === item.chat.id
item.kind === "bot" && !inGroup && active?.id === item.chat.id
) ||
(
item.kind === "group" &&
inGroup &&
activeGroup?.id === item.chat.id
)
? "bg-white/[0.09] shadow-[inset_0_1px_0_rgba(255,255,255,0.14),0_4px_16px_rgba(0,0,0,0.4)] border border-emerald-500/30" ? "bg-white/[0.09] shadow-[inset_0_1px_0_rgba(255,255,255,0.14),0_4px_16px_rgba(0,0,0,0.4)] border border-emerald-500/30"
: "hover:bg-white/[0.05] border border-transparent" : "hover:bg-white/[0.05] border border-transparent"
}`} }`}
@ -3352,34 +3345,23 @@ export function ShellPage() {
item.kind === "bot" && draggedBotId === item.chat.id ? 0.55 : 1, item.kind === "bot" && draggedBotId === item.chat.id ? 0.55 : 1,
}} }}
> >
{item.kind === "bot" ? ( <div className="relative shrink-0">
<div className="relative shrink-0"> <BotAvatar
<BotAvatar color={item.chat.color}
color={item.chat.color} identity={item.chat.id}
identity={item.chat.id}
size={40}
status={item.chat.status}
/>
<span
className={`absolute -bottom-0.5 -right-0.5 size-2.5 rounded-full border-2 border-[#0b0c10] ${
item.chat.status === "running"
? "bg-amber-400 animate-pulse"
: item.chat.status === "idle"
? "bg-emerald-400"
: "bg-indigo-400"
}`}
/>
</div>
) : (
<GroupAvatar
members={
item.chat.id === activeSnapshot?.groupId
? (activeSnapshot?.members ?? item.chat.members)
: item.chat.members
}
size={40} size={40}
status={item.chat.status}
/> />
)} <span
className={`absolute -bottom-0.5 -right-0.5 size-2.5 rounded-full border-2 border-[#0b0c10] ${
item.chat.status === "running"
? "bg-amber-400 animate-pulse"
: item.chat.status === "idle"
? "bg-emerald-400"
: "bg-indigo-400"
}`}
/>
</div>
<div className="min-w-0 flex-1"> <div className="min-w-0 flex-1">
<div className="flex items-center justify-between gap-1.5"> <div className="flex items-center justify-between gap-1.5">
<div className="flex min-w-0 items-center gap-2 overflow-hidden"> <div className="flex min-w-0 items-center gap-2 overflow-hidden">
@ -3423,13 +3405,8 @@ export function ShellPage() {
item.chat.unread ? "font-medium text-white" : "text-zinc-300" item.chat.unread ? "font-medium text-white" : "text-zinc-300"
}`} }`}
> >
{item.kind === "bot" {cleanRosterPreview(item.chat.preview) ||
? cleanRosterPreview(item.chat.preview) || (item.chat.status !== "idle" ? item.chat.status : "Bereit")}
(item.chat.status !== "idle" ? item.chat.status : "Bereit")
: cleanRosterPreview(item.chat.preview) ||
item.chat.members
.map((member: any) => member.name)
.join(", ")}
</div> </div>
</div> </div>
</button> </button>
@ -3612,11 +3589,7 @@ export function ShellPage() {
}`} }`}
> >
<GroupAvatar <GroupAvatar
members={ members={(item.chat as any).members}
item.chat.id === activeSnapshot?.groupId
? (activeSnapshot?.members ?? item.chat.members)
: item.chat.members
}
size={40} size={40}
/> />
<div className="min-w-0 flex-1"> <div className="min-w-0 flex-1">
@ -3651,8 +3624,7 @@ export function ShellPage() {
item.chat.unread ? "font-medium text-white" : "text-zinc-300" item.chat.unread ? "font-medium text-white" : "text-zinc-300"
}`} }`}
> >
{cleanRosterPreview(item.chat.preview) || {cleanRosterPreview(item.chat.preview)}
item.chat.members.map((member: any) => member.name).join(", ")}
</div> </div>
</div> </div>
</button> </button>