Skip to content

Commit b2e700c

Browse files
authored
Merge pull request #43 from RonasIT/production
Production
2 parents 28dda97 + 323eff6 commit b2e700c

80 files changed

Lines changed: 7370 additions & 5525 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/mobile/app.config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ExpoConfig } from '@expo/config';
2-
import { EASConfig } from 'expo-constants/build/Constants.types';
2+
import { EASConfig } from 'expo-manifests';
33
import { AppEnv } from '../../libs/shared/utils/app-env/src/env';
44
import { AppEnvName } from '../../libs/shared/utils/app-env/src/app-env';
55
import { compact } from 'lodash-es';
@@ -27,10 +27,10 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
2727
slug: process.env.EXPO_PUBLIC_APP_SLUG as string,
2828
scheme: process.env.EXPO_PUBLIC_APP_SCHEME as string,
2929
owner: process.env.EXPO_PUBLIC_APP_OWNER as string,
30-
version: '1.1.0',
30+
version: '1.2.0',
3131
orientation: 'portrait',
3232
icon: './assets/icon.png',
33-
runtimeVersion: '1.1.0',
33+
runtimeVersion: '1.2.0',
3434
experiments: {
3535
reactCompiler: true,
3636
},
@@ -41,8 +41,8 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
4141
bundleIdentifier: appId,
4242
supportsTablet: false,
4343
buildNumber: appEnv.select({
44-
default: '13',
45-
production: '7',
44+
default: '18',
45+
production: '8',
4646
}),
4747
config: {
4848
usesNonExemptEncryption: false,
@@ -51,8 +51,8 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
5151
android: {
5252
package: appId,
5353
versionCode: appEnv.select({
54-
default: 13,
55-
production: 7,
54+
default: 15,
55+
production: 8,
5656
}),
5757
adaptiveIcon: {
5858
foregroundImage: './assets/adaptive-icon.png',

apps/mobile/app/(auth)/sign-in.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function SignInScreen(): ReactElement {
1212
const isOfflineMode = useSelector(appState$.isOfflineMode);
1313

1414
return (
15-
<ScreenWrapper isKeyboardAvoiding>
15+
<ScreenWrapper isKeyboardAvoiding safeAreaProps={{ edges: ['top'] }}>
1616
<NoConnectionBanner isVisible={isOfflineMode} />
1717
<SignIn onSuccess={resetToCreateChatScreen} />
1818
</ScreenWrapper>
Lines changed: 65 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { useSelector } from '@legendapp/state/react';
22
import { Chat } from '@open-webui-react-native/mobile/chat/features/chat';
3+
import {
4+
ChatActionsMenuSheet,
5+
ChatActionsMenuSheetMethods,
6+
} from '@open-webui-react-native/mobile/shared/features/chat-actions-menu-sheet';
37
import { useSetSelectedModel } from '@open-webui-react-native/mobile/shared/features/use-set-selected-model';
48
import { NoConnectionBanner } from '@open-webui-react-native/mobile/shared/ui/no-connection-banner';
59
import { cn } from '@open-webui-react-native/mobile/shared/ui/styles';
@@ -10,28 +14,41 @@ import {
1014
AppText,
1115
Icon,
1216
FullScreenSearchModal,
17+
AppKeyboardControllerView,
18+
IconButton,
1319
} from '@open-webui-react-native/mobile/shared/ui/ui-kit';
14-
import { ChatScreenParams, useInitialNavigation } from '@open-webui-react-native/mobile/shared/utils/navigation';
15-
import { modelsApi } from '@open-webui-react-native/shared/data-access/api';
20+
import {
21+
ChatScreenParams,
22+
navigationConfig,
23+
useInitialNavigation,
24+
} from '@open-webui-react-native/mobile/shared/utils/navigation';
25+
import { chatApi, modelsApi } from '@open-webui-react-native/shared/data-access/api';
1626
import { appState$ } from '@open-webui-react-native/shared/data-access/app-state';
27+
import { useNavigateOnce } from '@open-webui-react-native/shared/utils/navigation';
1728
import { useTranslation } from '@ronas-it/react-native-common-modules/i18n';
1829
import { useNavigationContainerRef, usePathname, useLocalSearchParams, router } from 'expo-router';
19-
import { ReactElement, useCallback } from 'react';
30+
import { ReactElement, useCallback, useRef } from 'react';
2031

2132
export default function ChatScreen(): ReactElement {
2233
const translate = useTranslation('CHAT.CHAT_SCREEN');
2334
const path = usePathname();
2435
const rootNavigation = useNavigationContainerRef();
2536
const { id, isNewChat }: ChatScreenParams = useLocalSearchParams();
2637
const { resetToChatsListScreen } = useInitialNavigation();
38+
const navigateOnce = useNavigateOnce();
39+
const chatActionsSheetRef = useRef<ChatActionsMenuSheetMethods>(null);
40+
const navigateToClonedChat = (id: string): void => navigateOnce(navigationConfig.main.chat.view({ id }));
2741

2842
const isOfflineMode = useSelector(appState$.isOfflineMode);
2943

30-
const { data: models, isLoading } = modelsApi.useGetModels();
44+
const { data: models, isLoading: isModelsLoading } = modelsApi.useGetModels();
45+
const { data: chat, isLoading: isChatLoading } = chatApi.useGet(id);
3146
const { modelId, modelName, onSelectModel } = useSetSelectedModel(id);
3247

3348
const handleGoBackPress = (): void => router.back();
3449

50+
const isLoading = isChatLoading || isModelsLoading;
51+
3552
const handleResetToChatsList = useCallback((): void => {
3653
if (path.includes(id)) {
3754
resetToChatsListScreen();
@@ -48,34 +65,50 @@ export default function ChatScreen(): ReactElement {
4865
);
4966

5067
return (
51-
<AppScreen
52-
className={cn(isOfflineMode && 'pt-20')}
53-
noOutsideSpacing
54-
header={
55-
<AppHeader
56-
title={
57-
modelId || isLoading ? (
58-
<FullScreenSearchModal
59-
data={models || []}
60-
renderTrigger={renderTrigger}
61-
selectedItemId={modelId}
62-
onSelectItem={onSelectModel}
63-
searchPlaceholder={translate('TEXT_SELECT_A_MODEL')}
68+
<AppKeyboardControllerView className='bg-background-primary'>
69+
<AppScreen
70+
className={cn(isOfflineMode && 'pt-20')}
71+
noOutsideSpacing
72+
header={
73+
<AppHeader
74+
title={
75+
isLoading && !modelId ? (
76+
translate('TEXT_LOADING')
77+
) : (
78+
<FullScreenSearchModal
79+
data={models || []}
80+
renderTrigger={renderTrigger}
81+
selectedItemId={modelId}
82+
onSelectItem={onSelectModel}
83+
searchPlaceholder={translate('TEXT_SELECT_A_MODEL')}
84+
/>
85+
)
86+
}
87+
onGoBack={handleGoBackPress}
88+
accessoryRight={
89+
<IconButton
90+
className='p-0'
91+
iconName='moreDots'
92+
onPress={() => {
93+
if (!chat) return;
94+
chatActionsSheetRef.current?.present(chat);
95+
}}
6496
/>
65-
) : (
66-
translate('TEXT_LOADING')
67-
)
68-
}
69-
onGoBack={handleGoBackPress}
70-
/>
71-
}
72-
scrollDisabled>
73-
<NoConnectionBanner isVisible={isOfflineMode} />
74-
<Chat
75-
chatId={id}
76-
isNewChat={!!isNewChat}
77-
selectedModelId={modelId}
78-
resetToChatsList={handleResetToChatsList} />
79-
</AppScreen>
97+
}
98+
/>
99+
}
100+
scrollDisabled>
101+
<NoConnectionBanner isVisible={isOfflineMode} />
102+
<Chat
103+
chatId={id}
104+
isNewChat={!!isNewChat}
105+
selectedModelId={modelId}
106+
resetToChatsList={handleResetToChatsList} />
107+
<ChatActionsMenuSheet
108+
ref={chatActionsSheetRef}
109+
goToChat={navigateToClonedChat}
110+
isInChat />
111+
</AppScreen>
112+
</AppKeyboardControllerView>
80113
);
81114
}

apps/mobile/app/(main)/chat/_layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function ChatLayout(): ReactElement {
2222
close: async () => await voiceModeModalRef.current?.close(),
2323
};
2424

25-
const handleChatCreated = (id: string): void => router.replace(navigationConfig.main.chat.view({ id }));
25+
const handleChatCreated = (id: string): void => router.push(navigationConfig.main.chat.view({ id }));
2626

2727
return (
2828
<VoiceModeModalContext.Provider value={contextValue}>

apps/mobile/app/(main)/chat/create.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@ import { appState$ } from '@open-webui-react-native/shared/data-access/app-state
1414
import { useTranslation } from '@ronas-it/react-native-common-modules/i18n';
1515
import { router } from 'expo-router';
1616
import { ReactElement, useRef } from 'react';
17+
import { Keyboard, InteractionManager } from 'react-native';
1718

1819
export default function CreateChatScreen(): ReactElement {
1920
const translate = useTranslation('CHAT.CREATE_CHAT');
2021
const upsertFolderSheetRef = useRef<UpsertFolderSheetMethods>(null);
2122

22-
const handleChatCreated = (id: string): void =>
23-
router.replace(navigationConfig.main.chat.view({ id, isNewChat: 'true' }));
23+
const handleChatCreated = (id: string): void => {
24+
Keyboard.dismiss();
25+
InteractionManager.runAfterInteractions(() => {
26+
router.push(navigationConfig.main.chat.view({ id, isNewChat: 'true' }));
27+
});
28+
};
2429

2530
const openCreateFolderModal = (): void => upsertFolderSheetRef.current?.present();
2631

@@ -41,7 +46,7 @@ export default function CreateChatScreen(): ReactElement {
4146
className: 'pt-0',
4247
header: <AppHeader title={translate('TEXT_NEW_CHAT')} onGoBack={handleBackPress} />,
4348
}}
44-
safeAreaProps={{ edges: ['bottom'] }}
49+
safeAreaProps={{ edges: [] }}
4550
keyBoardAvoidingProps={{ enabled: !isBottomSheetInputFocused }}>
4651
<NoConnectionBanner isVisible={isOfflineMode} />
4752
<CreateChat

apps/mobile/app/(main)/chat/list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function ChatListScreen(): ReactElement {
4545

4646
return (
4747
<ScreenWrapper safeAreaProps={{ edges: [] }} screenProps={{ noOutsideSpacing: true, scrollDisabled: true }}>
48-
<View className='flex-1 bg-background-primary mt-safe'>
48+
<View className='flex-1 bg-background-primary ios:mt-safe'>
4949
<AppHeader
5050
className='mt-0'
5151
title={translate('TEXT_CHATS')}

apps/mobile/app/_layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function App(): ReactElement | null {
7373

7474
return (
7575
<View className='bg-background-primary flex-1'>
76-
<StatusBar className='bg-background-primary' />
76+
<StatusBar className='bg-background-primary' translucent />
7777
<Stack>
7878
<Stack.Screen name='index' options={{ headerShown: false, contentStyle: { backgroundColor: 'transparent' } }} />
7979
<Stack.Screen name={navigationConfig.auth.root} options={{ headerShown: false }} />

apps/mobile/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = function (api) {
1212
'nativewind/babel',
1313
],
1414
plugins: [
15-
'react-native-reanimated/plugin',
1615
[
1716
'module-resolver',
1817
{
@@ -23,6 +22,7 @@ module.exports = function (api) {
2322
},
2423
},
2524
],
25+
'react-native-worklets/plugin',
2626
],
2727
};
2828
};

apps/mobile/package.json

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -29,58 +29,55 @@
2929
"@react-native-community/netinfo": "11.4.1",
3030
"@react-native-cookies/cookies": "^6.2.1",
3131
"@react-native-google-signin/google-signin": "^15.0.0",
32-
"@react-navigation/drawer": "^7.4.1",
32+
"@react-navigation/drawer": "^7.3.9",
3333
"@ronas-it/react-native-common-modules": "^1.1.0",
3434
"@ronas-it/rtkq-entity-api": "^0.4.10",
35-
"@shopify/flash-list": "^2.0.0-rc.11",
35+
"@shopify/flash-list": "2.0.2",
3636
"@tanstack/react-query": "^5.80.6",
3737
"@tanstack/react-query-persist-client": "^5.87.4",
38-
"@testing-library/jest-native": "*",
39-
"@testing-library/react-native": "*",
4038
"babel-plugin-module-resolver": "^5.0.2",
4139
"clsx": "^2.1.1",
42-
"expo": "53.0.11",
43-
"expo-asset": "~11.1.7",
44-
"expo-audio": "~0.4.9",
45-
"expo-clipboard": "~7.1.5",
46-
"expo-constants": "~17.1.6",
47-
"expo-crypto": "~14.1.5",
48-
"expo-dev-client": "^5.0.6",
49-
"expo-document-picker": "~13.1.6",
50-
"expo-file-system": "~18.1.11",
51-
"expo-haptics": "~14.1.4",
52-
"expo-image": "~2.4.0",
53-
"expo-image-picker": "~16.1.4",
54-
"expo-insights": "~0.9.3",
55-
"expo-linear-gradient": "~14.1.5",
56-
"expo-linking": "~7.1.5",
57-
"expo-localization": "~16.1.5",
58-
"expo-media-library": "~17.1.7",
59-
"expo-router": "~5.0.7",
60-
"expo-sharing": "~13.1.5",
61-
"expo-speech": "~13.1.7",
62-
"expo-splash-screen": "~0.30.10",
63-
"expo-status-bar": "^2.0.0",
64-
"expo-updates": "~0.28.13",
40+
"expo": "^54.0.0",
41+
"expo-asset": "~12.0.11",
42+
"expo-audio": "~1.1.0",
43+
"expo-clipboard": "~8.0.8",
44+
"expo-constants": "~18.0.12",
45+
"expo-crypto": "~15.0.8",
46+
"expo-dev-client": "~6.0.20",
47+
"expo-document-picker": "~14.0.8",
48+
"expo-file-system": "~19.0.21",
49+
"expo-haptics": "~15.0.8",
50+
"expo-image": "~3.0.11",
51+
"expo-image-picker": "~17.0.10",
52+
"expo-insights": "~0.10.8",
53+
"expo-linear-gradient": "~15.0.8",
54+
"expo-linking": "~8.0.10",
55+
"expo-localization": "~17.0.8",
56+
"expo-media-library": "~18.2.1",
57+
"expo-router": "~6.0.19",
58+
"expo-sharing": "~14.0.8",
59+
"expo-speech": "~14.0.8",
60+
"expo-splash-screen": "~31.0.12",
61+
"expo-status-bar": "~3.0.9",
62+
"expo-updates": "~29.0.15",
6563
"immer": "^10.1.1",
6664
"lodash-es": "^4.17.21",
6765
"luxon": "^3.6.1",
68-
"metro-config": "*",
6966
"nativewind": "^4.1.23",
70-
"react": "19.0.0",
67+
"react": "19.1.0",
7168
"react-hook-form": "^7.57.0",
72-
"react-native": "*",
69+
"react-native": "0.81.5",
7370
"react-native-compressor": "^1.12.0",
7471
"react-native-extended-stylesheet": "^0.12.0",
75-
"react-native-gesture-handler": "~2.24.0",
76-
"react-native-keyboard-controller": "^1.17.5",
72+
"react-native-gesture-handler": "~2.28.0",
73+
"react-native-keyboard-controller": "1.18.5",
7774
"react-native-mmkv": "^3.2.0",
7875
"react-native-modal": "^14.0.0-rc.1",
79-
"react-native-reanimated": "~3.17.4",
80-
"react-native-safe-area-context": "5.4.0",
81-
"react-native-screens": "~4.10.0",
82-
"react-native-svg": "*",
83-
"react-native-web": "*",
76+
"react-native-reanimated": "~4.1.1",
77+
"react-native-safe-area-context": "~5.6.0",
78+
"react-native-screens": "~4.16.0",
79+
"react-native-svg": "15.12.1",
80+
"react-native-web": "^0.21.0",
8481
"reflect-metadata": "^0.2.2",
8582
"tailwind-merge": "^3.3.0",
8683
"tailwindcss": "^3.4.17",

i18n/mobile/chat/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@
153153
"TEXT_LISTENING": "Listening...",
154154
"TEXT_THINKING": "Thinking...",
155155
"TEXT_TALKING": "Talking..."
156+
},
157+
"MESSAGE_FOLLOW_UPS": {
158+
"TEXT_FOLLOW_UP": "Follow up"
156159
}
157160
}
158161
}

0 commit comments

Comments
 (0)