Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 21, 2024
2 parents b280fc3 + fbee4ec commit 47c2e44
Show file tree
Hide file tree
Showing 161 changed files with 3,974 additions and 1,769 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
ssh-key: ${{ secrets.DEPLOY_KEY }}
- uses: actions/download-artifact@v3
with:
name: "ui-dist"
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/sync-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ jobs:
name: "Syncs the latest staging deploy from staging to develop"
steps:
- uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Set Git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "Github Actions"
- name: Merge Dev to Master
- name: Merge Staging to Develop
run: |
git fetch --unshallow
git checkout staging
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
name: "Syncs the latest livenet deploy from develop to master"
steps:
- uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Set Git config
run: |
git config --local user.email "[email protected]"
Expand All @@ -22,4 +24,4 @@ jobs:
git checkout master
git pull
git merge --no-ff staging
git push
git push
2 changes: 1 addition & 1 deletion apps/tlon-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
compileSdk rootProject.ext.compileSdkVersion
versionCode 108
versionName "4.2.3"
versionName "5.0.0"

buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
}
Expand Down
8 changes: 4 additions & 4 deletions apps/tlon-mobile/ios/Landscape.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.2.3;
MARKETING_VERSION = 5.0.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1465,7 +1465,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.2.3;
MARKETING_VERSION = 5.0.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1689,7 +1689,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.2.3;
MARKETING_VERSION = 5.0.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1732,7 +1732,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.2.3;
MARKETING_VERSION = 5.0.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
2 changes: 1 addition & 1 deletion apps/tlon-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1884,4 +1884,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 0cb7a78e5777e69c86c1bf4bb5135fd660376dbe

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ enum NotificationCategory: String {
content.threadIdentifier = yarn.rope.thread
content.title = await yarn.getTitle()
content.body = yarn.body
content.badge = await withUnsafeContinuation { cnt in
UNUserNotificationCenter.current().getDeliveredNotifications { notifs in
cnt.resume(returning: NSNumber(value: notifs.count + 1))
}
}
// content.badge = await withUnsafeContinuation { cnt in
// UNUserNotificationCenter.current().getDeliveredNotifications { notifs in
// cnt.resume(returning: NSNumber(value: notifs.count + 1))
// }
// }
content.categoryIdentifier = yarn.category.rawValue
content.userInfo = yarn.userInfo
content.sound = UNNotificationSound.default
Expand Down
69 changes: 37 additions & 32 deletions apps/tlon-mobile/src/App.main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { finishingSelfHostedLogin as selfHostedLoginStatus } from '@tloncorp/sha
import {
LoadingSpinner,
PortalProvider,
StoreProvider,
Text,
View,
usePreloadedEmojis,
Expand Down Expand Up @@ -127,39 +128,43 @@ export default function ConnectedApp() {
theme={isDarkMode ? DarkTheme : DefaultTheme}
ref={navigationContainerRef}
>
<BranchProvider>
<PostHogProvider
client={posthogAsync}
autocapture={{
captureTouches: false,
}}
options={{
enable:
process.env.NODE_ENV !== 'test' ||
!!process.env.POST_HOG_IN_DEV,
}}
>
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
<MigrationCheck>
<QueryClientProvider client={queryClient}>
<SignupProvider>
<PortalProvider>
<App />
</PortalProvider>
<StoreProvider>
<BranchProvider>
<PostHogProvider
client={posthogAsync}
autocapture={{
captureTouches: false,
}}
options={{
enable:
process.env.NODE_ENV !== 'test' ||
!!process.env.POST_HOG_IN_DEV,
}}
>
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
<MigrationCheck>
<QueryClientProvider client={queryClient}>
<SignupProvider>
<PortalProvider>
<App />
</PortalProvider>

{__DEV__ && (
<DevTools
navigationContainerRef={navigationContainerRef}
/>
)}
</SignupProvider>
</QueryClientProvider>
</MigrationCheck>
</SafeAreaProvider>
</GestureHandlerRootView>
</PostHogProvider>
</BranchProvider>
{__DEV__ && (
<DevTools
navigationContainerRef={
navigationContainerRef
}
/>
)}
</SignupProvider>
</QueryClientProvider>
</MigrationCheck>
</SafeAreaProvider>
</GestureHandlerRootView>
</PostHogProvider>
</BranchProvider>
</StoreProvider>
</NavigationContainer>
</ShipProvider>
</TamaguiProvider>
Expand Down
12 changes: 10 additions & 2 deletions apps/tlon-mobile/src/components/AuthenticatedApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { useShip } from '@tloncorp/app/contexts/ship';
import { useAppStatusChange } from '@tloncorp/app/hooks/useAppStatusChange';
import { useConfigureUrbitClient } from '@tloncorp/app/hooks/useConfigureUrbitClient';
import { useCurrentUserId } from '@tloncorp/app/hooks/useCurrentUser';
import { useFindSuggestedContacts } from '@tloncorp/app/hooks/useFindSuggestedContacts';
import { useNavigationLogging } from '@tloncorp/app/hooks/useNavigationLogger';
import { useNetworkLogger } from '@tloncorp/app/hooks/useNetworkLogger';
import { useTelemetry } from '@tloncorp/app/hooks/useTelemetry';
import { useUpdatePresentedNotifications } from '@tloncorp/app/lib/notifications';
import { RootStack } from '@tloncorp/app/navigation/RootStack';
import { AppDataProvider } from '@tloncorp/app/provider/AppDataProvider';
import { sync } from '@tloncorp/shared';
import { ZStack } from '@tloncorp/ui';
import { PortalProvider, ZStack } from '@tloncorp/ui';
import { useCallback, useEffect } from 'react';
import { AppStateStatus } from 'react-native';

Expand All @@ -29,6 +30,7 @@ function AuthenticatedApp() {
useNavigationLogging();
useNetworkLogger();
useCheckAppUpdated();
useFindSuggestedContacts();

useEffect(() => {
configureClient();
Expand Down Expand Up @@ -58,7 +60,13 @@ function AuthenticatedApp() {
export default function ConnectedAuthenticatedApp() {
return (
<AppDataProvider>
<AuthenticatedApp />
{/*
This portal provider overrides the root portal provider
to ensure that sheets have access to `AppDataContext`
*/}
<PortalProvider>
<AuthenticatedApp />
</PortalProvider>
</AppDataProvider>
);
}
6 changes: 4 additions & 2 deletions apps/tlon-mobile/src/fixtures/cosmos.decorator.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { TamaguiProvider, config } from '@tloncorp/ui';
import { StoreProvider, TamaguiProvider, config } from '@tloncorp/ui';
import React from 'react';
import { SafeAreaProvider } from 'react-native-safe-area-context';

// eslint-disable-next-line
export default ({ children }: { children: React.ReactNode }) => (
<TamaguiProvider defaultTheme={'light'} config={config}>
<SafeAreaProvider>{children}</SafeAreaProvider>
<StoreProvider stub>
<SafeAreaProvider>{children}</SafeAreaProvider>
</StoreProvider>
</TamaguiProvider>
);
18 changes: 10 additions & 8 deletions apps/tlon-mobile/src/hooks/useNotificationListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { connectNotifications } from '@tloncorp/app/lib/notifications';
import { RootStackParamList } from '@tloncorp/app/navigation/types';
import {
createTypedReset,
getMainGroupRoute,
screenNameFromChannelId,
} from '@tloncorp/app/navigation/utils';
import * as posthog from '@tloncorp/app/utils/posthog';
Expand Down Expand Up @@ -154,17 +155,18 @@ export default function useNotificationListener() {
}

const routeStack: RouteStack = [{ name: 'ChatList' }];
if (channel.groupId && !channelSwitcherEnabled) {
if (channel.groupId) {
const mainGroupRoute = await getMainGroupRoute(channel.groupId);
routeStack.push(mainGroupRoute);
}
// Only push the channel if it wasn't already handled by the main group stack
if (routeStack[routeStack.length - 1].name !== 'Channel') {
const screenName = screenNameFromChannelId(channelId);
routeStack.push({
name: 'GroupChannels',
params: { groupId: channel.groupId },
name: screenName,
params: { channelId: channel.id },
});
}
const screenName = screenNameFromChannelId(channelId);
routeStack.push({
name: screenName,
params: { channelId: channel.id },
});

// if we have a post id, try to navigate to the thread
if (postInfo) {
Expand Down
4 changes: 2 additions & 2 deletions apps/tlon-mobile/src/screens/Onboarding/ReserveShipScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { NativeStackScreenProps } from '@react-navigation/native-stack';
import { useLureMetadata } from '@tloncorp/app/contexts/branch';
import { useSignupContext } from '.././../lib/signupContext';
import { NodeBootPhase } from '@tloncorp/app/lib/bootHelpers';
import {
ArvosDiscussing,
Expand All @@ -14,6 +13,7 @@ import {
} from '@tloncorp/ui';
import { useEffect, useMemo } from 'react';

import { useSignupContext } from '../../lib/signupContext';
import type { OnboardingStackParamList } from '../../types';

type Props = NativeStackScreenProps<OnboardingStackParamList, 'ReserveShip'>;
Expand All @@ -36,7 +36,7 @@ export const ReserveShipScreen = ({ navigation }: Props) => {
signupContext.setOnboardingValues({ didCompleteOnboarding: true });
}
signupContext.kickOffBootSequence();
}, []);
}, [signupContext]);

return (
<View flex={1} backgroundColor="$secondaryBackground">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
import { useEffect } from 'react';
import { Controller, useForm } from 'react-hook-form';

import { useSignupContext } from '../../lib/signupContext';
import type { OnboardingStackParamList } from '../../types';
import { useSignupContext } from '.././../lib/signupContext';

type Props = NativeStackScreenProps<OnboardingStackParamList, 'SetNickname'>;

Expand Down
1 change: 0 additions & 1 deletion apps/tlon-web-new/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@tamagui/vite-plugin": "~1.112.12",
"@tanstack/react-query": "^5.32.1",
"@tanstack/react-query-devtools": "^5.32.1",
"@tanstack/react-query-persist-client": "^5.32.1",
"@tiptap/core": "^2.6.6",
"@tiptap/extension-blockquote": "^2.6.6",
"@tiptap/extension-bold": "^2.6.6",
Expand Down
18 changes: 17 additions & 1 deletion apps/tlon-web-new/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from '@react-navigation/native';
import { useConfigureUrbitClient } from '@tloncorp/app/hooks/useConfigureUrbitClient';
import { useCurrentUserId } from '@tloncorp/app/hooks/useCurrentUser';
import { useFindSuggestedContacts } from '@tloncorp/app/hooks/useFindSuggestedContacts';
import { useIsDarkMode } from '@tloncorp/app/hooks/useIsDarkMode';
import { checkDb, useMigrations } from '@tloncorp/app/lib/webDb';
import { BasePathNavigator } from '@tloncorp/app/navigation/BasePathNavigator';
Expand All @@ -17,6 +18,7 @@ import { Provider as TamaguiProvider } from '@tloncorp/app/provider';
import { AppDataProvider } from '@tloncorp/app/provider/AppDataProvider';
import { sync } from '@tloncorp/shared';
import * as store from '@tloncorp/shared/store';
import { LoadingSpinner, StoreProvider, View } from '@tloncorp/ui';
import cookies from 'browser-cookies';
import { usePostHog } from 'posthog-js/react';
import React, { PropsWithChildren, useEffect, useState } from 'react';
Expand Down Expand Up @@ -134,6 +136,7 @@ const App = React.memo(function AppComponent() {
const [dbIsLoaded, setDbIsLoaded] = useState(false);
const [startedSync, setStartedSync] = useState(false);
const configureClient = useConfigureUrbitClient();
useFindSuggestedContacts();

useEffect(() => {
handleError(() => {
Expand Down Expand Up @@ -181,7 +184,20 @@ const App = React.memo(function AppComponent() {
<MigrationCheck>
<SafeAreaProvider>
<TamaguiProvider defaultTheme={isDarkMode ? 'dark' : 'light'}>
{dbIsLoaded && <AppRoutes isLoaded={dbIsLoaded} />}
<StoreProvider>
{dbIsLoaded ? (
<AppRoutes isLoaded={dbIsLoaded} />
) : (
<View
height="100%"
width="100%"
justifyContent="center"
alignItems="center"
>
<LoadingSpinner />
</View>
)}
</StoreProvider>
</TamaguiProvider>
</SafeAreaProvider>
</MigrationCheck>
Expand Down
23 changes: 0 additions & 23 deletions apps/tlon-web-new/src/indexedDBPersistor.ts

This file was deleted.

Loading

0 comments on commit 47c2e44

Please sign in to comment.