Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(mobile): 在双栏任务列表顶部显示伙伴
Dashc53c65d56c54
diff --git a/apps/mobile/app/devices/index.tsx b/apps/mobile/app/devices/index.tsxindex 1884e12f90..b44f95bee3 100644--- a/apps/mobile/app/devices/index.tsx+++ b/apps/mobile/app/devices/index.tsx@@ -1,6 +1,4 @@import { StyleSheet, View } from 'react-native';-import { useAuth } from '@/auth/AuthContext';-import { HomeRosterProvider } from '@/session/HomeRosterContext';import { MobileHome } from '@/session/HomeSurface';import { SessionHeaderNativeBlur } from '@/session/SessionHeaderNativeControls';import { useHomeMode } from '@/session/useHomeMode';@@ -8,15 +6,14 @@ import { useOptionalHeaderHeight } from '@/session/useOptionalHeaderHeight';/** One home, as on desktop: teammates are the section at the top of the task list. */export default function HomeScreen() {- const { accountGeneration } = useAuth();const navigation = useHomeMode();const headerHeight = useOptionalHeaderHeight();// The teammate section's stored fold is part of the first frame.if (!navigation.hydrated) return null;- return <HomeRosterProvider key={accountGeneration}><View style={styles.home}>+ return <View style={styles.home}><MobileHome /><SessionHeaderNativeBlur height={headerHeight} />- </View></HomeRosterProvider>;+ </View>;}const styles = StyleSheet.create({ home: { flex: 1 } });diff --git a/apps/mobile/src/session/HomeSurface.tsx b/apps/mobile/src/session/HomeSurface.tsxindex 43f69a7394..c5ac971dcf 100644--- a/apps/mobile/src/session/HomeSurface.tsx+++ b/apps/mobile/src/session/HomeSurface.tsx@@ -69,6 +69,7 @@ import { useTranslation } from 'react-i18next';import type { TFunction } from 'i18next';import { useAuth } from '@/auth/AuthContext';import { HomeTeammatesSection, useHomeTeammatesSectionContext } from './HomeTeammatesSection';+import { HomeRosterProvider } from './HomeRosterContext';import { createDisclosureListCell, DisclosureGroupView, DisclosureItem, ListDisclosureScope, useDisclosurePrepare, useListDisclosureTransition } from './listDisclosureTransition';import { useGuardedPush } from '@/utils/useGuardedPush';import { useHomeMenuFadeTiming } from '@/session/homeMenuFadeTiming';@@ -462,7 +463,9 @@ export function MobileHome(props: MobileHomeProps) {const { accountGeneration } = useAuth();return <RemoteSessionStoreSubscriptionGate enabled={screenFocused}><ActiveHomeSession.Provider value={props.currentSessionId}>- <HomeScreenContent key={accountGeneration} {...props} />+ <HomeRosterProvider key={accountGeneration}>+ <HomeScreenContent {...props} />+ </HomeRosterProvider></ActiveHomeSession.Provider></RemoteSessionStoreSubscriptionGate>;}@@ -1315,11 +1318,11 @@ function HomeScreenContent({ active = true, width, newSessionInSystemBar = falseconst homeRoster = teammatesSectionContext.shared;const refreshHome = useCallback(() => {void loadHome({ visible: true });- if (embedded || !homeRoster) return;+ if (!homeRoster) return;void homeRoster.roster.refresh();if (homeRoster.groups.supported) void homeRoster.groups.refresh();setTeammatesRefreshKey(key => key + 1);- }, [embedded, homeRoster, loadHome]);+ }, [homeRoster, loadHome]);loadHomeRef.current = loadHome;// 冷启动先画缓存:上次 loadHome 成功的设备+会话快照种入 store,先把列表画出来(消除首屏强制@@ -2973,13 +2976,13 @@ function HomeScreenContent({ active = true, width, newSessionInSystemBar = false}}sections={sections}ListHeaderComponent={<>- {embedded ? null : <HomeTeammatesSection context={teammatesSectionContext} active={active} refreshKey={teammatesRefreshKey}+ <HomeTeammatesSection context={teammatesSectionContext} active={active} refreshKey={teammatesRefreshKey}// Independent of the computer-connection guide: server group chats and cloud companions need no computer.visible={indexedSearch.activeFilterCount === 0 && statusFilter !== 'archived'}query={searchQuery}// Shared group and project blocks draw their own full-width top line.showFooter={sharedRows.length === 0 && !isBlockHomeRow(sections[0]?.data[0])}- runDisclosure={runDisclosure} prepareDisclosure={prepareListDisclosure} />}+ runDisclosure={runDisclosure} prepareDisclosure={prepareListDisclosure} />{sharedRows.length > 0 ? <DisclosureItem clip style={styles.projectGroup} testID="home.sharedGroup"><PressableaccessibilityRole="button"