chore: land in-progress workspace changes before 1.16.2
The tree carried uncommitted work from several areas (web push, mobile screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed as one commit so the release pipeline can start from a clean tree; the desktop transcript-correction behaviour shipped in the previous commit and is unchanged here.
This commit is contained in:
parent
9c2b6a9782
commit
7fe49c437e
144 changed files with 3760 additions and 4523 deletions
|
|
@ -14,6 +14,7 @@ import {
|
|||
} from 'react-native'
|
||||
import InAppBrowser from 'react-native-inappbrowser-reborn'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import {
|
||||
Led,
|
||||
MetalCard,
|
||||
|
|
@ -46,6 +47,7 @@ import {
|
|||
type AccountDeletionService,
|
||||
} from '../features/account/account-deletion-service'
|
||||
import { ScreenHeader } from '../components/ScreenHeader'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
// Public surface kept for existing importers; the use case now lives in
|
||||
// features/account so it is testable without rendering this screen.
|
||||
|
|
@ -77,12 +79,13 @@ export interface AccountScreenProps {
|
|||
}
|
||||
|
||||
type ActiveAction = 'save' | 'logout' | 'delete' | `link:${ManagedOAuthProvider}` | `unlink:${string}` | null
|
||||
type AccountNavigation = NativeStackNavigationProp<RootStackParamList, 'Account'>
|
||||
|
||||
export default function AccountScreen({
|
||||
deletionService = edgeAccountDeletionService,
|
||||
identityService = identityManagementService,
|
||||
}: AccountScreenProps): React.ReactElement {
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<AccountNavigation>()
|
||||
const { user, purgeLocalSession } = useAuth()
|
||||
const { currentDevice } = useDevice()
|
||||
const { palette } = useMobilePreferences()
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import {
|
|||
View,
|
||||
} from 'react-native'
|
||||
import { useFocusEffect, useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import { useI18n, type TranslationKey } from '@d3ro/i18n'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
|
|
@ -39,6 +40,9 @@ import {
|
|||
import ContentReportSheet, {
|
||||
type ContentReportTarget,
|
||||
} from '../components/ContentReportSheet'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
type CommandsNavigation = NativeStackNavigationProp<RootStackParamList, 'Commands'>
|
||||
|
||||
const NAME_KEYS: Record<CommandBuiltinKey, TranslationKey> = {
|
||||
translate_en: 'mobile.commands.translate.name',
|
||||
|
|
@ -85,7 +89,7 @@ interface EditorState {
|
|||
|
||||
export default function CommandsScreen(): React.ReactElement {
|
||||
const insets = useSafeAreaInsets()
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<CommandsNavigation>()
|
||||
const { t } = useI18n()
|
||||
const { user, session } = useAuth()
|
||||
const { palette, preferences } = useMobilePreferences()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { useMemo, useState } from 'react';
|
||||
import { ActivityIndicator, ScrollView, StyleSheet, View } from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { useI18n, type TranslationKey } from '@d3ro/i18n';
|
||||
import { useAuth } from '../lib/auth-context';
|
||||
|
|
@ -18,6 +19,7 @@ import {
|
|||
sharePreparedPortableFile,
|
||||
type PreparedPortableFile,
|
||||
} from '../features/data-portability';
|
||||
import type { RootStackParamList } from '../../App';
|
||||
|
||||
type ExportKind =
|
||||
| 'account-json'
|
||||
|
|
@ -26,6 +28,7 @@ type ExportKind =
|
|||
| 'history-csv'
|
||||
| 'summary-txt';
|
||||
type BusyAction = ExportKind | 'import' | null;
|
||||
type DataPortabilityNavigation = NativeStackNavigationProp<RootStackParamList, 'DataPortability'>;
|
||||
|
||||
const ERROR_KEYS: Record<PortabilityError['code'], TranslationKey> = {
|
||||
auth: 'mobile.portability.error.auth',
|
||||
|
|
@ -45,7 +48,7 @@ const ERROR_KEYS: Record<PortabilityError['code'], TranslationKey> = {
|
|||
|
||||
export default function DataPortabilityScreen(): React.ReactElement {
|
||||
const insets = useSafeAreaInsets();
|
||||
const navigation = useNavigation<any>();
|
||||
const navigation = useNavigation<DataPortabilityNavigation>();
|
||||
const { t } = useI18n();
|
||||
const { user } = useAuth();
|
||||
const { palette } = useMobilePreferences();
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
View,
|
||||
} from 'react-native'
|
||||
import { useFocusEffect, useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
|
|
@ -22,10 +23,13 @@ import {
|
|||
revokeRegisteredDevice,
|
||||
type RegisteredDevice,
|
||||
} from '../features/devices/device-service'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
type DevicesNavigation = NativeStackNavigationProp<RootStackParamList, 'Devices'>
|
||||
|
||||
export default function DevicesScreen(): React.ReactElement {
|
||||
const insets = useSafeAreaInsets()
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<DevicesNavigation>()
|
||||
const { t } = useI18n()
|
||||
const { user } = useAuth()
|
||||
const { currentDevice } = useDevice()
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {
|
|||
View,
|
||||
} from 'react-native'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import {
|
||||
Led,
|
||||
|
|
@ -21,15 +22,17 @@ import { useI18n } from '@d3ro/i18n'
|
|||
import { isSupabaseConfigured, supabase } from '../lib/supabase'
|
||||
import { AUTH_REDIRECT_URL } from '../lib/auth-redirect'
|
||||
import { useMobilePreferences } from '../lib/preferences-context'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
||||
type ForgotPasswordNavigation = NativeStackNavigationProp<RootStackParamList, 'ForgotPassword'>
|
||||
// Canonical product callback. AuthProvider owns PKCE/implicit token exchange and
|
||||
// routes the resulting recovery state to UpdatePassword.
|
||||
export const PASSWORD_RECOVERY_REDIRECT = AUTH_REDIRECT_URL
|
||||
|
||||
export default function ForgotPasswordScreen(): React.ReactElement {
|
||||
const insets = useSafeAreaInsets()
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<ForgotPasswordNavigation>()
|
||||
const { t } = useI18n()
|
||||
const { palette } = useMobilePreferences()
|
||||
const styles = useMemo(() => createStyles(palette), [palette])
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@ import {
|
|||
StyleSheet,
|
||||
View,
|
||||
} from 'react-native'
|
||||
import type { ParamListBase, RouteProp } from '@react-navigation/native'
|
||||
import type { RouteProp } from '@react-navigation/native'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
|
|
@ -25,19 +26,18 @@ import {
|
|||
savePendingInviteToken,
|
||||
} from '../features/teams/pending-invite'
|
||||
import { teamErrorCode, teamErrorMessage } from './TeamsScreen'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
interface InviteAcceptRouteParams extends ParamListBase {
|
||||
InviteAccept: { token?: string; url?: string } | undefined
|
||||
}
|
||||
type InviteAcceptNavigation = NativeStackNavigationProp<RootStackParamList, 'InviteAccept'>
|
||||
|
||||
interface InviteAcceptScreenProps {
|
||||
route: RouteProp<InviteAcceptRouteParams, 'InviteAccept'>
|
||||
route: RouteProp<RootStackParamList, 'InviteAccept'>
|
||||
}
|
||||
|
||||
type InviteState = 'loading' | 'ready' | 'accepting' | 'success' | 'error'
|
||||
|
||||
export default function InviteAcceptScreen({ route }: InviteAcceptScreenProps): React.ReactElement {
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<InviteAcceptNavigation>()
|
||||
const insets = useSafeAreaInsets()
|
||||
const { t } = useI18n()
|
||||
const { user } = useAuth()
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
View,
|
||||
} from 'react-native'
|
||||
import { useFocusEffect, useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
|
|
@ -33,6 +34,9 @@ import {
|
|||
synchronizePushRegistration,
|
||||
type NotificationSyncResult,
|
||||
} from '../features/notifications/notification-service'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
type NotificationsNavigation = NativeStackNavigationProp<RootStackParamList, 'Notifications'>
|
||||
|
||||
interface ReceivedNotification {
|
||||
key: string
|
||||
|
|
@ -41,7 +45,7 @@ interface ReceivedNotification {
|
|||
}
|
||||
|
||||
export default function NotificationsScreen(): React.ReactElement {
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<NotificationsNavigation>()
|
||||
const insets = useSafeAreaInsets()
|
||||
const { t, formatDate } = useI18n()
|
||||
const { user } = useAuth()
|
||||
|
|
@ -120,7 +124,16 @@ export default function NotificationsScreen(): React.ReactElement {
|
|||
|
||||
const openNotification = (notification: D3RONotification): void => {
|
||||
const target = notificationNavigationTarget(notification)
|
||||
navigation.navigate(target.name, target.params)
|
||||
if (target.name === 'HistoryDetail') {
|
||||
const historyId = target.params?.historyId
|
||||
if (historyId !== undefined) navigation.navigate('HistoryDetail', { historyId })
|
||||
return
|
||||
}
|
||||
if (target.name === 'InviteAccept') {
|
||||
navigation.navigate('InviteAccept', target.params)
|
||||
return
|
||||
}
|
||||
navigation.navigate('ProPaywall')
|
||||
}
|
||||
|
||||
const statusTone = syncResult?.status === 'registered' ? 'success' : 'muted'
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import {
|
|||
View,
|
||||
} from 'react-native'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useI18n, type TranslationKey } from '@d3ro/i18n'
|
||||
import { SITE_URLS } from '@d3ro/core/web-urls'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
|
|
@ -34,8 +35,10 @@ import { useDevice } from '../lib/device-context'
|
|||
import { currentAdminRole } from '../features/admin/admin-service'
|
||||
import { ScreenHeader } from '../components/ScreenHeader'
|
||||
import { performAccountLogout } from '../lib/account-exit'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
type SavingPreference = 'theme' | 'locale' | 'autoPolish' | 'haptic' | null
|
||||
type SettingsNavigation = NativeStackNavigationProp<RootStackParamList, 'Settings'>
|
||||
|
||||
const THEME_LABEL_KEYS: Record<MobileThemeMode, TranslationKey> = {
|
||||
system: 'mobile.theme.system',
|
||||
|
|
@ -62,7 +65,7 @@ const ERROR_KEYS: Record<PreferencesErrorCode, TranslationKey> = {
|
|||
export default function SettingsScreen(): React.ReactElement {
|
||||
const { t, locale, setLocale, formatTime } = useI18n()
|
||||
const { user, purgeLocalSession } = useAuth()
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<SettingsNavigation>()
|
||||
const {
|
||||
preferences,
|
||||
palette,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import {
|
|||
View,
|
||||
} from 'react-native'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import {
|
||||
Led,
|
||||
|
|
@ -31,13 +32,15 @@ import {
|
|||
} from '../features/auth/oauth-sign-in'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
import { useMobilePreferences } from '../lib/preferences-context'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
||||
const MIN_PASSWORD_LENGTH = 8
|
||||
type SignUpNavigation = NativeStackNavigationProp<RootStackParamList, 'SignUp'>
|
||||
|
||||
export default function SignUpScreen(): React.ReactElement {
|
||||
const insets = useSafeAreaInsets()
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<SignUpNavigation>()
|
||||
const { locale, t } = useI18n()
|
||||
const { authError } = useAuth()
|
||||
const { palette } = useMobilePreferences()
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|||
import { useI18n } from '@d3ro/i18n'
|
||||
import { ThemeButton, ThemeText } from '../theme/themed-components'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
import { createLogger } from '../lib/logger'
|
||||
import { useMobilePreferences } from '../lib/preferences-context'
|
||||
import {
|
||||
audioRecorder,
|
||||
|
|
@ -65,6 +66,7 @@ type TalkErrorCode = ChatErrorCode
|
|||
| 'TTS_FAILED'
|
||||
|
||||
const MIN_RECORDING_MS = 450
|
||||
const log = createLogger('Talk')
|
||||
|
||||
function errorTranslationKey(code: TalkErrorCode) {
|
||||
switch (code) {
|
||||
|
|
@ -467,8 +469,8 @@ export default function TalkScreen(): React.ReactElement {
|
|||
) {
|
||||
causeChain.push(e.message)
|
||||
}
|
||||
console.warn(
|
||||
`[Talk] transcription failed (${error instanceof AudioPipelineError ? error.code : 'unknown'}):`,
|
||||
log.warn(
|
||||
`transcription failed (${error instanceof AudioPipelineError ? error.code : 'unknown'}):`,
|
||||
causeChain.join(' | '),
|
||||
)
|
||||
if (!isCurrentOperation(operationId)) return
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ import {
|
|||
TextInput,
|
||||
View,
|
||||
} from 'react-native'
|
||||
import type { ParamListBase, RouteProp } from '@react-navigation/native'
|
||||
import type { RouteProp } from '@react-navigation/native'
|
||||
import { useFocusEffect, useNavigation } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
|
|
@ -38,20 +39,19 @@ import {
|
|||
updateTeamMemberRole,
|
||||
} from '../features/teams/team-service'
|
||||
import { teamErrorCode, teamErrorMessage } from './TeamsScreen'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
interface TeamDetailRouteParams extends ParamListBase {
|
||||
TeamDetail: { teamId: string }
|
||||
}
|
||||
type TeamDetailNavigation = NativeStackNavigationProp<RootStackParamList, 'TeamDetail'>
|
||||
|
||||
interface TeamDetailScreenProps {
|
||||
route: RouteProp<TeamDetailRouteParams, 'TeamDetail'>
|
||||
route: RouteProp<RootStackParamList, 'TeamDetail'>
|
||||
}
|
||||
|
||||
type Editor = 'rename' | 'invite' | null
|
||||
|
||||
export default function TeamDetailScreen({ route }: TeamDetailScreenProps): React.ReactElement {
|
||||
const teamId = route.params.teamId
|
||||
const navigation = useNavigation<any>()
|
||||
const navigation = useNavigation<TeamDetailNavigation>()
|
||||
const insets = useSafeAreaInsets()
|
||||
const { t, formatDate } = useI18n()
|
||||
const { user } = useAuth()
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ import {
|
|||
TextInput,
|
||||
View,
|
||||
} from 'react-native'
|
||||
import { useNavigation, useRoute } from '@react-navigation/native'
|
||||
import { useNavigation, useRoute, type RouteProp } from '@react-navigation/native'
|
||||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import {
|
||||
Led,
|
||||
|
|
@ -22,13 +23,16 @@ import { useI18n } from '@d3ro/i18n'
|
|||
import { isSupabaseConfigured, supabase } from '../lib/supabase'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
import { useMobilePreferences } from '../lib/preferences-context'
|
||||
import type { RootStackParamList } from '../../App'
|
||||
|
||||
const MIN_PASSWORD_LENGTH = 8
|
||||
type UpdatePasswordNavigation = NativeStackNavigationProp<RootStackParamList, 'UpdatePassword'>
|
||||
type UpdatePasswordRoute = RouteProp<RootStackParamList, 'UpdatePassword'>
|
||||
|
||||
export default function UpdatePasswordScreen(): React.ReactElement {
|
||||
const insets = useSafeAreaInsets()
|
||||
const navigation = useNavigation<any>()
|
||||
const route = useRoute<any>()
|
||||
const navigation = useNavigation<UpdatePasswordNavigation>()
|
||||
const route = useRoute<UpdatePasswordRoute>()
|
||||
const { t } = useI18n()
|
||||
const { palette } = useMobilePreferences()
|
||||
const styles = useMemo(() => createStyles(palette), [palette])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue