Skip to content

Commit

Permalink
Merge pull request #4138 from tloncorp/promote-6.5
Browse files Browse the repository at this point in the history
ops: promote 6.5
  • Loading branch information
arthyn authored Nov 1, 2024
2 parents 1a6d219 + 64d6ae3 commit e5bc2c5
Show file tree
Hide file tree
Showing 497 changed files with 11,200 additions and 4,469 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,13 @@ module.exports = {
additionalHooks: '(useAnimatedStyle|useDerivedValue|useAnimatedProps)',
},
],
'no-restricted-syntax': [
'error',
{
selector: 'CallExpression[callee.name="getToken"]',
message:
'Please use getTokenValue() instead of getToken() to ensure web compatibility. See: https://tamagui.dev/docs/core/exports#gettokenvalue',
},
],
},
};
2 changes: 1 addition & 1 deletion .github/workflows/deploy-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
git add desk/desk.docket-0
git add tm-alpha-desk/desk.docket-0
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ env.tag }}
BRANCH=${INPUT:-"staging"}
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/deploy-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,23 @@ jobs:
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
deploy-new:
runs-on: ubuntu-latest
name: "Release new frontend to ~marnec-dozzod-marnus (internal)"
steps:
- uses: actions/checkout@v3
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/tlon-apps tm-alpha marnec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ github.event.inputs.tag }}
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,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 Expand Up @@ -106,10 +107,11 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
ssh-key: ${{ secrets.DEPLOY_KEY }}
- uses: actions/download-artifact@v3
with:
name: "ui-dist-new"
path: apps/tlon-web/dist
path: apps/tlon-web-new/dist
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
Expand All @@ -125,7 +127,7 @@ jobs:
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
git add desk/desk.docket-0
git add tm-alpha-desk/desk.docket-0
git commit -n -m "update new frontend glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ env.tag }}
BRANCH=${INPUT:-"develop"}
Expand Down
37 changes: 23 additions & 14 deletions .github/workflows/mobile-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
- all
- android
- ios
message:
type: string
description: Brief description of what this update contains
required: true
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -31,23 +35,28 @@ jobs:
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: pnpm install
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: Build packages
run: pnpm build:all
- name: Create build vars
id: vars
run: |
echo "profile=${{ inputs.profile || 'preview' }}" >> $GITHUB_OUTPUT
- name: Push update for selected platforms
working-directory: ./apps/tlon-mobile
run:
eas update --auto --profile ${{ steps.vars.outputs.profile }}
--platform ${{ inputs.platform || 'all' }} --non-interactive
eas update --channel ${{ inputs.profile }} --platform ${{
inputs.platform || 'all' }} --message '${{ inputs.message }}'
--non-interactive
env:
NOTIFY_PROVIDER:
"${{ steps.vars.outputs.profile == 'preview' &&
'binnec-dozzod-marnus' || 'rivfur-livmet' }}"
NOTIFY_SERVICE:
"${{ steps.vars.outputs.profile == 'preview' &&
'tlon-preview-release' || 'groups-native' }}"
APP_VARIANT: ${{ inputs.profile }}
BRANCH_DOMAIN_PROD: ${{ secrets.BRANCH_DOMAIN_PROD }}
BRANCH_DOMAIN_TEST: ${{ secrets.BRANCH_DOMAIN_TEST }}
BRANCH_KEY_PROD: ${{ secrets.BRANCH_KEY_PROD }}
BRANCH_KEY_TEST: ${{ secrets.BRANCH_KEY_TEST }}
POST_HOG_API_KEY_TEST: ${{ secrets.POST_HOG_API_KEY_TEST }}
POST_HOG_API_KEY_PROD: ${{ secrets.POST_HOG_API_KEY_PROD }}
RECAPTCHA_SITE_KEY_ANDROID: ${{ secrets.RECAPTCHA_SITE_KEY_ANDROID }}
RECAPTCHA_SITE_KEY_IOS: ${{ secrets.RECAPTCHA_SITE_KEY_IOS }}
TLON_EMPLOYEE_GROUP: ${{ secrets.TLON_EMPLOYEE_GROUP }}
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.0.3"
versionName "4.1.1"

buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import com.android.volley.TimeoutError;
import com.android.volley.VolleyError;
import android.util.Log;

import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -49,13 +50,18 @@ public static void createNotificationChannel(Context context) {
}

public static void handleNotification(Context context, String uid) {
Log.d("TalkNotificationManager", "handleNotification: " + uid);
// Disabled for now, was causing issues with notifications not showing up
// while the app wasn't in the foreground (or even when it was killed)
// Skip showing notifications when app is in foreground
if (AppLifecycleManager.isInForeground) {
return;
}
// if (AppLifecycleManager.isInForeground) {
// Log.d("TalkNotificationManager", "App is in foreground, skipping notification");
// return;
// }

final TalkApi api = new TalkApi(context);
final int id = UvParser.getIntCompatibleFromUv(uid);
Log.d("TalkNotificationManager", "fetching yarn: " + uid + " " + id);
api.fetchYarn(uid, new TalkObjectCallback() {
@Override
public void onComplete(JSONObject response) {
Expand All @@ -67,16 +73,21 @@ public void onComplete(JSONObject response) {
return;
}

Log.d("TalkNotificationManager", "handleNotification, yarn: " + yarn.toString());

// Skip if not a valid push notification
if (!yarn.isValidNotification) {
Log.d("TalkNotificationManager", "Invalid notification, skipping");
return;
}

Log.d("TalkNotificationManager", "fetching contact: " + yarn.senderId);
api.fetchContact(yarn.senderId, new TalkObjectCallback() {
@Override
public void onComplete(JSONObject response) {
final Contact contact = new Contact(yarn.senderId, response);
final String channelId = yarn.channelId.orElse("");
Log.d("TalkNotificationManager", "handleNotification, contact: " + contact.toString());
createNotificationTitle(api, yarn, contact, title -> {
Bundle data = new Bundle();
data.putString("wer", yarn.wer);
Expand Down Expand Up @@ -185,6 +196,7 @@ public void onError(VolleyError error) {
}

private static void sendNotification(Context context, int id, Person person, String title, String text, Boolean isGroupConversation, Bundle data) {
Log.d("TalkNotificationManager", "sendNotification: " + id + " " + title + " " + text + " " + isGroupConversation);
Intent tapIntent = new Intent(context, MainActivity.class);
tapIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
tapIntent.replaceExtras(data);
Expand Down
8 changes: 7 additions & 1 deletion apps/tlon-mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
eas: {
projectId,
},
postHogApiKey: process.env.POST_HOG_API_KEY,
postHogApiKey: isPreview
? process.env.POST_HOG_API_KEY_TEST
: process.env.POST_HOG_API_KEY_PROD,
postHogInDev: process.env.POST_HOG_IN_DEV,
notifyProvider: process.env.NOTIFY_PROVIDER,
notifyService: process.env.NOTIFY_SERVICE,
apiUrl: process.env.API_URL,
Expand All @@ -33,6 +36,9 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
defaultInviteLinkUrl: process.env.DEFAULT_INVITE_LINK_URL,
defaultShipLoginUrl: process.env.DEFAULT_SHIP_LOGIN_URL,
defaultShipLoginAccessCode: process.env.DEFAULT_SHIP_LOGIN_ACCESS_CODE,
defaultOnboardingPassword: process.env.ONBOARDING_DEFAULT_PASSWORD,
defaultOnboardingTlonEmail: process.env.ONBOARDING_DEFAULT_TLON_EMAIL,
defaultOnboardingNickname: process.env.ONBOARDING_DEFAULT_NICKNAME,
recaptchaSiteKeyAndroid: process.env.RECAPTCHA_SITE_KEY_ANDROID,
recaptchaSiteKeyIOS: process.env.RECAPTCHA_SITE_KEY_IOS,
enabledLoggers: process.env.ENABLED_LOGGERS,
Expand Down
2 changes: 1 addition & 1 deletion apps/tlon-mobile/cosmos.imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import * as fixture54 from './src/fixtures/ActionSheet/AddGalleryPostSheet.fixtu
import * as decorator0 from './src/fixtures/cosmos.decorator';

export const rendererConfig: RendererConfig = {
"playgroundUrl": "http://localhost:5001",
"playgroundUrl": "http://localhost:5000",
"rendererUrl": null
};

Expand Down
13 changes: 13 additions & 0 deletions apps/tlon-mobile/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import PlatformState from '@tloncorp/app';
import { ENABLED_LOGGERS } from '@tloncorp/app/constants';
// Setup custom dev menu items
import '@tloncorp/app/lib/devMenuItems';
import { setupDb } from '@tloncorp/app/lib/nativeDb';
import { addCustomEnabledLoggers } from '@tloncorp/shared';
import { useDebugStore } from '@tloncorp/shared';
import * as db from '@tloncorp/shared/db';
import { setStorage } from '@tloncorp/ui';
import { registerRootComponent } from 'expo';
import 'expo-dev-client';
import { useEffect } from 'react';
import 'react-native-get-random-values';
import { TailwindProvider } from 'tailwind-rn';

Expand All @@ -20,6 +24,15 @@ addCustomEnabledLoggers(ENABLED_LOGGERS);
setStorage(AsyncStorage);

function Main(props) {
useEffect(() => {
async function init() {
const appInfo = await db.getAppInfoSettings();
useDebugStore.getState().initializeDebugInfo(PlatformState, appInfo);
}

init();
}, []);

return (
<TailwindProvider utilities={utilities}>
<App {...props} />
Expand Down
4 changes: 2 additions & 2 deletions apps/tlon-mobile/ios/Landscape.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.0.3;
MARKETING_VERSION = 4.1.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1433,7 +1433,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.0.3;
MARKETING_VERSION = 4.1.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
4 changes: 2 additions & 2 deletions apps/tlon-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ PODS:
- sqlite3 (3.42.0):
- sqlite3/common (= 3.42.0)
- sqlite3/common (3.42.0)
- tentap (0.5.11):
- tentap (0.5.21):
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1878,7 +1878,7 @@ SPEC CHECKSUMS:
SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
sqlite3: f163dbbb7aa3339ad8fc622782c2d9d7b72f7e9c
tentap: 4871503ab3d587fe80fe13f6fe712fde98b57525
tentap: 2cf2e387dd284bf867010eb7d0f91618fb35b673
UMAppLoader: 5df85360d65cabaef544be5424ac64672e648482
Yoga: fb61b2337c7688c81a137e5560b3cbb515289f91

Expand Down
7 changes: 4 additions & 3 deletions apps/tlon-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"tsc": "tsc --noEmit",
"build": "pnpm generate",
"cosmos": "cosmos-native",
"eas-build-post-install": "pnpm -w run build:all"
"eas-build-post-install": "pnpm -w run build:mobile-release"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,md,html}": [
Expand All @@ -37,7 +37,7 @@
]
},
"dependencies": {
"@10play/tentap-editor": "~0.5.11",
"@10play/tentap-editor": "~0.5.21",
"@aws-sdk/client-s3": "^3.190.0",
"@aws-sdk/s3-request-presigner": "^3.190.0",
"@dev-plugins/async-storage": "^0.0.3",
Expand All @@ -53,6 +53,7 @@
"@react-native-firebase/crashlytics": "^19.2.2",
"@react-native-firebase/perf": "19.2.2",
"@react-navigation/bottom-tabs": "^6.5.12",
"@react-navigation/drawer": "^6.7.2",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@shopify/flash-list": "1.6.3",
Expand All @@ -62,7 +63,7 @@
"@tloncorp/shared": "workspace:*",
"@tloncorp/ui": "workspace:*",
"@urbit/aura": "^1.0.0",
"@urbit/http-api": "^3.1.0-dev-3",
"@urbit/http-api": "3.2.0-dev",
"classnames": "^2.3.2",
"dotenv-expand": "^11.0.6",
"expo": "^50.0.6",
Expand Down
Loading

0 comments on commit e5bc2c5

Please sign in to comment.