Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(mobile): 群里离群作者的任务卡在手机上也按快照显示
Chrisb01116533436
diff --git a/apps/mobile/src/__tests__/BotGroupChatScreen.test.tsx b/apps/mobile/src/__tests__/BotGroupChatScreen.test.tsxindex 3ad5563dc0..1c0662b9f5 100644--- a/apps/mobile/src/__tests__/BotGroupChatScreen.test.tsx+++ b/apps/mobile/src/__tests__/BotGroupChatScreen.test.tsx@@ -323,6 +323,21 @@ describe('group timeline', () => {expect(byId('botGroup.task.live')).toBeNull();});+ it('shows a task from an author who has left the group as a snapshot, never a lookup on this phone\'s computer', async () => {+ const meta = { v: 1 as const, role: 'delegation-request' as const, delegationId: 'task-2', fromBotId: 'gone', fromBotName: '离开的伙伴', toBotId: null,+ toBotName: 'Cindy', parentSessionId: 'group-lane', childSessionId: 'child-2', objective: '整理行程' };+ const data = group({ serverBacked: true, members: [+ { botId: 'mimi', name: '咪咪', avatar: '🐱', avatarColor: 'red', status: 'active', isOwned: true },+ ] });+ data.messages.push(message('t2', 21, { authorBotId: 'gone', authorName: '离开的伙伴', content: '我也开了',+ task: { meta, state: 'started', title: '整理行程' } }));+ await render(parseBotGroupChatData(data)!);+ const card = byId('botGroup.task')!;+ expect(card.textContent).toContain('整理行程');+ expect(card.textContent).toContain('groupChat.task.state.started');+ expect(byId('botGroup.task.live')).toBeNull();+ });+it('uses the shared Android keyboard avoidance behavior for the group composer', async () => {h.platform.OS = 'android';await render();diff --git a/apps/mobile/src/session/BotGroupChatScreen.tsx b/apps/mobile/src/session/BotGroupChatScreen.tsxindex 040e962040..a7f59de664 100644--- a/apps/mobile/src/session/BotGroupChatScreen.tsx+++ b/apps/mobile/src/session/BotGroupChatScreen.tsx@@ -538,8 +538,10 @@ function BotGroupTimelineItem({onStart={() => onPlanAction('start')} onDismiss={() => onPlanAction('dismiss')} onEditStep={onEditStep} />: <>{quoteDisplay ? <BotGroupQuote display={quoteDisplay} /> : null}- {/* A task this teammate started from the group; mine is live, another owner's is a snapshot. */}- {message.task ? <BotGroupTaskCard task={message.task} owned={member?.isOwned !== false} deviceId={deviceId} /> : null}+ {/* A task this teammate started from the group; mine is live, another owner's is a snapshot.+ An author no longer in the group is unknown: its task may run on another computer, so it+ stays a snapshot rather than a lookup on this one (same rule as the desktop timeline). */}+ {message.task ? <BotGroupTaskCard task={message.task} owned={member !== undefined && member.isOwned !== false} deviceId={deviceId} /> : null}{message.attachments?.length ? <BotGroupMessageAttachments messageId={message.id} attachments={message.attachments} align="left" onResolveRemoteMedia={resolveMedia} resolveServerMedia={resolveServerMedia} /> : null}{message.content.trim() ? <BotGroupMarkdownText content={message.content} /> : null}<BotGroupHandoffFiles files={message.files} />