Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
import { useMemo, useSyncExternalStore } from 'react'
import { useWindowDimensions, View } from 'react-native'
import { Slot, usePathname } from 'expo-router'
import { SafeAreaFrameContext, SafeAreaInsetsContext } from 'react-native-safe-area-context'
import { ZERO_SAFE_AREA_INSETS } from '../src/mobile-web-shell/bridge/bridge-safe-area-insets'
import { SideSafeArea } from '../src/layout/side-safe-area'
import { usePageBridgeClient } from '../src/transport/client-context.web'
import { colors } from '../src/theme/mobile-theme'
import { themedStyleSheet } from '../src/theme/themed-styles'
import { useMobileColorScheme } from '../src/theme/use-mobile-color-scheme'
import { isOverlayPageRoute } from '../src/new-workspace/overlay-page-route'
// Provide shell insets below ExpoRoot (WebView CSS env insets are zero); pad only sides to avoid DefaultNavigator’s duplicate all-edge SafeAreaView.
export default function PageRootLayout() {
useMobileColorScheme()
const client = usePageBridgeClient()
const insets = useSyncExternalStore(
client.onSafeAreaInsetsUpdate,
() => client.getShellSession()?.safeAreaInsets ?? ZERO_SAFE_AREA_INSETS
)
const { width, height } = useWindowDimensions()
const transparent = isOverlayPageRoute(usePathname())
const frame = useMemo(() => ({ x: 0, y: 0, width, height }), [width, height])
return (
<SafeAreaFrameContext.Provider value={frame}>
<SafeAreaInsetsContext.Provider value={insets}>
<View style={[styles.root, transparent && styles.transparent]}>
<SideSafeArea>
<Slot />
</SideSafeArea>
</View>
</SafeAreaInsetsContext.Provider>
</SafeAreaFrameContext.Provider>
)
}
const styles = themedStyleSheet(() => ({
root: {
flex: 1,
backgroundColor: colors.bgBase
},
transparent: {
backgroundColor: 'transparent'
}
}))