Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@ export default function TabLayout() {
<Tabs.Screen
name="index"
options={{
title: 'Home',
title: 'Sessions',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
}}
/>
<Tabs.Screen
name="inbox"
options={{
title: 'Inbox',
tabBarIcon: ({ color }) => <IconSymbol size={28} name="tray.fill" color={color} />,
}}
/>
<Tabs.Screen
name="explore"
options={{
Expand Down
58 changes: 58 additions & 0 deletions app/(tabs)/inbox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React, { useState } from 'react'
import { View, ScrollView, RefreshControl, StyleSheet } from 'react-native'
import { InboxHeader } from '@/components/inbox/InboxHeader'
import { StuckAgentBanner } from '@/components/inbox/StuckAgentBanner'
import { DecisionQueueCard } from '@/components/inbox/DecisionQueueCard'
import { OvernightResultsCard } from '@/components/inbox/OvernightResultsCard'
import { ForecastCard } from '@/components/inbox/ForecastCard'
import { mockInboxData, mockPendingDecisions } from '@/utils/mockInboxData'
import { useTheme } from '@/hooks/useTheme'

export default function InboxScreen() {
const { colors } = useTheme()
const [refreshing, setRefreshing] = useState(false)

const onRefresh = async () => {
setRefreshing(true)
// Simulate fetch delay
await new Promise((resolve) => setTimeout(resolve, 500))
setRefreshing(false)
}

const { user, summary, stuckAgents, overnightResults, forecast } = mockInboxData

// Calculate total minutes for decision queue
const totalMinutes = mockPendingDecisions.reduce(
(sum, decision) => sum + decision.estimatedMinutes,
0
)

return (
<ScrollView
style={[styles.container, { backgroundColor: colors.bg }]}
refreshControl={
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} tintColor={colors.accent} />
}
showsVerticalScrollIndicator={false}
>
<InboxHeader userName={user.name} summary={summary} />

<StuckAgentBanner agents={stuckAgents} />

<DecisionQueueCard count={summary.pendingDecisions} totalMinutes={totalMinutes} />

<OvernightResultsCard results={overnightResults} />

<ForecastCard forecast={forecast} />

{/* Bottom padding */}
<View style={{ height: 24 }} />
</ScrollView>
)
}

const styles = StyleSheet.create({
container: {
flex: 1,
},
})
Loading
Loading