Skip to content
Open
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
8 changes: 7 additions & 1 deletion .eas/workflows/deploy-to-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,17 @@ jobs:
type: get-build
environment: preview
params:
fingerprint_hash: ${{ needs.fingerprint.outputs.ios_fingerprint_hash }
fingerprint_hash: ${{ needs.fingerprint.outputs.ios_fingerprint_hash }}
profile: preview
build_android:
name: Build Android
needs: [get_android_build]
if: ${{ !needs.get_android_build.outputs.build_id }}
type: build
environment: preview
env:
POSTHOG_CLI_PROJECT_ID: ${{ env.POSTHOG_CLI_PROJECT_ID }}
POSTHOG_CLI_API_KEY: ${{ env.POSTHOG_CLI_API_KEY }}
params:
platform: android
profile: preview
Expand All @@ -61,6 +64,9 @@ jobs:
if: ${{ !needs.get_ios_build.outputs.build_id }}
type: build
environment: preview
env:
POSTHOG_CLI_PROJECT_ID: ${{ env.POSTHOG_CLI_PROJECT_ID }}
POSTHOG_CLI_API_KEY: ${{ env.POSTHOG_CLI_API_KEY }}
params:
platform: ios
profile: preview
Expand Down
6 changes: 6 additions & 0 deletions .eas/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
if: ${{ !needs.get_android_build.outputs.build_id }}
type: build
environment: production
env:
POSTHOG_CLI_PROJECT_ID: ${{ env.POSTHOG_CLI_PROJECT_ID }}
POSTHOG_CLI_API_KEY: ${{ env.POSTHOG_CLI_API_KEY }}
params:
platform: android
profile: production
Expand All @@ -61,6 +64,9 @@ jobs:
if: ${{ !needs.get_ios_build.outputs.build_id }}
type: build
environment: production
env:
POSTHOG_CLI_PROJECT_ID: ${{ env.POSTHOG_CLI_PROJECT_ID }}
POSTHOG_CLI_API_KEY: ${{ env.POSTHOG_CLI_API_KEY }}
params:
platform: ios
profile: production
Expand Down
7 changes: 4 additions & 3 deletions .eas/workflows/run-preview-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
runs_on: macos-large
params:
record_screen: true
device_identifier: 'iPhone 16e'
device_identifier: 'iPhone 17'
build_id: ${{ needs.ios_repack.outputs.build_id || needs.ios_build.outputs.build_id }}
flow_path:
[
Expand All @@ -131,9 +131,10 @@ jobs:
'.maestro/flows/sign-in.yaml'
]
hooks:
after_checkout:
before_maestro_tests:
- run: |
DEVICE_ID=$(xcrun simctl list devices -j | jq -r '.devices[][] | select(.name=="iPhone 16e") | .udid') && \
DEVICE_ID=$(xcrun simctl list devices -j | jq -r '.devices[][] | select(.state=="Booted") | .udid' | head -1) && \
if [ -z "$DEVICE_ID" ]; then echo "No booted iOS simulator found"; exit 1; fi && \
echo "Booted device ID: $DEVICE_ID" && \
# Source - https://stackoverflow.com/a/76105538
# Posted by Jonathan.
Expand Down
7 changes: 4 additions & 3 deletions .eas/workflows/run-production-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
runs_on: macos-large
params:
record_screen: true
device_identifier: 'iPhone 16e'
device_identifier: 'iPhone 17'
build_id: ${{ needs.ios_repack.outputs.build_id || needs.ios_build.outputs.build_id }}
flow_path:
[
Expand All @@ -131,9 +131,10 @@ jobs:
'.maestro/flows/sign-in.yaml'
]
hooks:
after_checkout:
before_maestro_tests:
- run: |
DEVICE_ID=$(xcrun simctl list devices -j | jq -r '.devices[][] | select(.name=="iPhone 16e") | .udid') && \
DEVICE_ID=$(xcrun simctl list devices -j | jq -r '.devices[][] | select(.state=="Booted") | .udid' | head -1) && \
if [ -z "$DEVICE_ID" ]; then echo "No booted iOS simulator found"; exit 1; fi && \
echo "Booted device ID: $DEVICE_ID" && \
# Source - https://stackoverflow.com/a/76105538
# Posted by Jonathan.
Expand Down
7 changes: 7 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ EXPO_PUBLIC_RESEND_LOCAL_INBOX_URL=http://LOCAL_IP:4000/inbox
# Optional: PostHog Analytics (leave empty for local dev)
# EXPO_PUBLIC_POSTHOG_KEY=
# EXPO_PUBLIC_POSTHOG_HOST=
# EXPO_PUBLIC_POSTHOG_DISABLED=true

# PostHog CLI — source map uploads (EAS Build / after `eas update`)
# Personal API key with error tracking write + organization read scopes.
# Set these in EAS environment secrets for preview/production (not in the app bundle).
# POSTHOG_CLI_PROJECT_ID=
# POSTHOG_CLI_API_KEY=


# Supabase Vault Secrets (for database triggers)
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ cloud-services/**/.env.keys
# Agent skills: Cursor auto-applies AGENTS.md/CLAUDE.md as always-on rules (use SKILL.md + COMPILED.md)
.agents/skills/**/AGENTS.md
.agents/skills/**/CLAUDE.md

scripts/linear-import
7 changes: 4 additions & 3 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default ({ config }: ConfigContext): ExpoConfig =>
owner: 'eten-genesis',
name: getAppName(appVariant),
slug: 'langquest',
version: '2.2.1',
version: '2.2.2',
orientation: 'portrait',
icon: iconLight,
scheme: getScheme(appVariant),
Expand Down Expand Up @@ -137,7 +137,7 @@ export default ({ config }: ConfigContext): ExpoConfig =>
// TODO: migrate existing localization to expo-localization
'expo-localization',
'expo-asset',
'expo-audio',
['expo-audio', { enableBackgroundPlayback: false }],
'expo-image',
[
'expo-build-properties',
Expand All @@ -162,7 +162,8 @@ export default ({ config }: ConfigContext): ExpoConfig =>
'expo-dev-client',
'expo-sharing',
'expo-sqlite',
['testflight-dev-deploy', { enabled: appVariant === 'development' }]
['testflight-dev-deploy', { enabled: appVariant === 'development' }],
'posthog-react-native/expo'
],
experiments: {
typedRoutes: true,
Expand Down
2 changes: 1 addition & 1 deletion components/AudioPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const AudioPlayer: React.FC<AudioPlayerProps> = ({
await setAudioModeAsync({
allowsRecording: false,
playsInSilentMode: true,
shouldPlayInBackground: true
shouldPlayInBackground: false
});
};

Expand Down
17 changes: 14 additions & 3 deletions components/FiaStepDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import type {
FiaTerm
} from '@/hooks/useFiaPericopeSteps';
import { useFiaPericopeSteps } from '@/hooks/useFiaPericopeSteps';
import { useProjectFiaLanguageCode } from '@/hooks/useProjectFiaLanguageCode';
import {
enqueue as enqueueFiaAttachment,
isFiaPericopeCached,
Expand Down Expand Up @@ -886,21 +887,31 @@ export function FiaStepDrawer({
);
const scrollRef = React.useRef<any>(null);
const dataLoadedRef = React.useRef(false);
const { fiaLanguageCode } = useProjectFiaLanguageCode(
pericopeId ? projectId : undefined
);

const { data, isLoading, error } = useFiaPericopeSteps(
pericopeId ? projectId : undefined,
pericopeId ?? undefined
);

const attachmentStatus = useFiaAttachmentStatus(pericopeId);
const attachmentStatus = useFiaAttachmentStatus(pericopeId, fiaLanguageCode);
const isAudioDownloading =
attachmentStatus?.status === 'pending' ||
attachmentStatus?.status === 'downloading';

React.useEffect(() => {
if (open && pericopeId && projectId && !isFiaPericopeCached(pericopeId)) {
if (
open &&
pericopeId &&
projectId &&
fiaLanguageCode &&
!isFiaPericopeCached(fiaLanguageCode, pericopeId)
) {
enqueueFiaAttachment(pericopeId, projectId);
}
}, [open, pericopeId, projectId]);
}, [open, pericopeId, projectId, fiaLanguageCode]);

const currentStep = data?.steps.find((s) => s.stepId === activeStep);
const audioUrl = currentStep?.audioUrl ?? null;
Expand Down
28 changes: 28 additions & 0 deletions components/NewHighlightBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Text, TextClassContext } from '@/components/ui/text';
import { cn } from '@/utils/styleUtils';
import { Platform, View } from 'react-native';

/** Matches NEW badge on asset list cards (`AssetCardItem`). */
export function NewHighlightBadge({ className }: { className?: string }) {
return (
<TextClassContext.Provider value={undefined}>
<View
className={cn(
'rounded-lg bg-primary/50 px-2',
Platform.OS === 'android' && 'items-center justify-center py-0.5',
className
)}
>
<Text
className={cn(
'text-[10px] font-semibold text-white',
Platform.OS === 'android' && 'leading-none'
)}
{...(Platform.OS === 'android' && { includeFontPadding: false })}
>
NEW
</Text>
</View>
</TextClassContext.Provider>
);
}
Loading
Loading