feat: add mobile shell and unified search
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Failing after 50s
ci / 워크스페이스 빌드 검증 (push) Has been skipped
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 20s
ci / .NET API 서버 테스트 (push) Successful in 12s
deploy-site / deploy (push) Successful in 39s
ci / 모바일 린트·타입·Jest (push) Failing after 3h10m31s

This commit is contained in:
Yun Chan 2026-09-28 23:23:36 +09:00
parent f505a03d34
commit 5ca3709b32
98 changed files with 5168 additions and 2093 deletions

View file

@ -15,12 +15,12 @@ import {
} from 'react-native'
import type { NavigationProp, ParamListBase } from '@react-navigation/native'
import { useFocusEffect } from '@react-navigation/native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import type { Meeting, MeetingLanguage, UserTemplate } from '@d3ro/api-client'
import { useI18n } from '@d3ro/i18n'
import { useAuth } from '../lib/auth-context'
import { useMobilePreferences } from '../lib/preferences-context'
import { ThemeButton, ThemeCard, ThemeText } from '../theme/themed-components'
import { ScreenHeader } from '../components/ScreenHeader'
import {
createMeetingCreationIdempotencyKey,
createMeetingWorkspaceWithMetadata,
@ -30,9 +30,11 @@ import {
updateMeetingTitleRevisionSafe,
} from '../features/meetings/meetings-service'
import { loadTemplateLibrary } from '../features/templates'
import { useTabScreenBottomPadding } from '../navigation/tab-layout'
interface MeetingsScreenProps {
navigation: NavigationProp<ParamListBase>
route?: { params?: { createRequest?: number } }
}
type EditorMode =
@ -44,8 +46,9 @@ const MEETING_LANGUAGES = ['ko', 'en', 'ja', 'zh-cn'] as const
export default function MeetingsScreen({
navigation,
route,
}: MeetingsScreenProps): React.ReactElement {
const insets = useSafeAreaInsets()
const bottomPadding = useTabScreenBottomPadding()
const { t, formatDate } = useI18n()
const { user } = useAuth()
const { palette } = useMobilePreferences()
@ -54,6 +57,8 @@ export default function MeetingsScreen({
const templateRequestGeneration = useRef(0)
const editorBusyRef = useRef(false)
const editorUserIdRef = useRef(user?.id ?? null)
const handledCreateRequests = useRef(new Set<number>())
const openCreateRef = useRef<() => void>(() => undefined)
const [meetings, setMeetings] = useState<Meeting[]>([])
const [total, setTotal] = useState(0)
const [page, setPage] = useState(0)
@ -217,6 +222,16 @@ export default function MeetingsScreen({
void loadCreationTemplates()
}
openCreateRef.current = openCreate
useEffect(() => {
const request = route?.params?.createRequest
if (request === undefined || handledCreateRequests.current.has(request)) return
handledCreateRequests.current.add(request)
navigation.setParams({ createRequest: undefined })
openCreateRef.current()
}, [navigation, route?.params?.createRequest])
const openEdit = (meeting: Meeting): void => {
setEditor({ kind: 'edit', meeting })
setEditorTitle(meeting.title ?? '')
@ -310,21 +325,19 @@ export default function MeetingsScreen({
return (
<View style={styles.container}>
<View style={[styles.header, { paddingTop: insets.top + 12 }]}>
<View style={styles.headerCopy}>
<ThemeText variant="title" accessibilityRole="header">
{t('mobile.meetings.title')}
</ThemeText>
<ThemeText variant="label" color="muted">
{t('mobile.meetings.count', { count: total })}
</ThemeText>
</View>
<ThemeButton
label={t('mobile.meetings.create')}
onPress={openCreate}
testID="meetings-create"
/>
</View>
<ScreenHeader
title={t('mobile.meetings.title')}
subtitle={t('mobile.meetings.count', { count: total })}
showBack={false}
rightContent={(
<ThemeButton
label={t('mobile.meetings.create')}
onPress={openCreate}
testID="meetings-create"
/>
)}
testID="meetings-header"
/>
<View style={styles.searchWrap}>
<TextInput
@ -363,7 +376,10 @@ export default function MeetingsScreen({
<FlatList
data={meetings}
keyExtractor={(meeting) => meeting.id}
contentContainerStyle={meetings.length === 0 ? styles.emptyList : styles.list}
contentContainerStyle={[
meetings.length === 0 ? styles.emptyList : styles.list,
{ paddingBottom: bottomPadding },
]}
keyboardShouldPersistTaps="handled"
refreshControl={(
<RefreshControl
@ -388,7 +404,7 @@ export default function MeetingsScreen({
<View style={styles.loadingMore} testID="meetings-loading-more">
<ActivityIndicator color={palette.accent.main} />
</View>
) : <View style={{ height: insets.bottom + 100 }} />}
) : null}
renderItem={({ item: meeting }) => {
const busy = busyId === meeting.id
const owned = meeting.user_id === user?.id
@ -791,7 +807,7 @@ function createStyles(palette: Palette): ReturnType<typeof StyleSheet.create> {
},
attendeesInput: { minHeight: 86, paddingVertical: 10 },
choiceRow: { flexDirection: 'row', flexWrap: 'wrap', gap: 8 },
choice: { minHeight: 42, minWidth: 64, alignItems: 'center', justifyContent: 'center', paddingHorizontal: 12, borderRadius: 9, borderWidth: 1, borderColor: palette.border.default },
choice: { minHeight: 48, minWidth: 64, alignItems: 'center', justifyContent: 'center', paddingHorizontal: 12, borderRadius: 9, borderWidth: 1, borderColor: palette.border.default },
choiceSelected: { backgroundColor: palette.accent.main, borderColor: palette.accent.main },
templateLoading: { minHeight: 52, flexDirection: 'row', alignItems: 'center', gap: 10 },
templateEmpty: { minHeight: 52, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', gap: 10 },