From 19735fb02b99a5cd21ed85f199e2a56f326408cd Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Tue, 13 Jan 2026 14:32:22 -0800 Subject: [PATCH] clean up dev settings (#1604) --- app/src/screens/dev/DevSettingsScreen.tsx | 192 ++++++++++++---------- 1 file changed, 108 insertions(+), 84 deletions(-) diff --git a/app/src/screens/dev/DevSettingsScreen.tsx b/app/src/screens/dev/DevSettingsScreen.tsx index d40e48c4f..8eba89e13 100644 --- a/app/src/screens/dev/DevSettingsScreen.tsx +++ b/app/src/screens/dev/DevSettingsScreen.tsx @@ -33,7 +33,6 @@ import { dinot } from '@selfxyz/mobile-sdk-alpha/constants/fonts'; import { useSafeBottomPadding } from '@selfxyz/mobile-sdk-alpha/hooks'; import BugIcon from '@/assets/icons/bug_icon.svg'; -import IdIcon from '@/assets/icons/id_icon.svg'; import WarningIcon from '@/assets/icons/warning.svg'; import type { RootStackParamList } from '@/navigation'; import { navigationScreens } from '@/navigation'; @@ -287,6 +286,110 @@ const ScreenSelector = ({}) => { ); }; +const LogLevelSelector = ({ + currentLevel, + onSelect, +}: { + currentLevel: string; + onSelect: (level: 'debug' | 'info' | 'warn' | 'error') => void; +}) => { + const [open, setOpen] = useState(false); + + const logLevels = ['debug', 'info', 'warn', 'error'] as const; + + return ( + <> + + + + + + + + + Select log level + + + + + {logLevels.map(level => ( + { + setOpen(false); + onSelect(level); + }} + > + + + {level.toUpperCase()} + + {currentLevel === level && ( + + )} + + + ))} + + + + + + ); +}; + const DevSettingsScreen: React.FC = ({}) => { const { clearDocumentCatalogForMigrationTesting } = usePassport(); const clearPointEvents = usePointEventStore(state => state.clearEvents); @@ -547,57 +650,6 @@ const DevSettingsScreen: React.FC = ({}) => { paddingTop="$4" paddingBottom={paddingBottom} > - } - title="Manage ID Documents" - description="Register new IDs and generate test IDs" - > - {[ - { - label: 'Manage available IDs', - onPress: () => { - navigation.navigate('ManageDocuments'); - }, - }, - { - label: 'Generate Test ID', - onPress: () => { - navigation.navigate('CreateMock'); - }, - }, - { - label: 'Scan new ID Document', - onPress: () => { - navigation.navigate('DocumentOnboarding'); - }, - }, - ].map(({ label, onPress }) => ( - - - - ))} - - } title="Debug Shortcuts" @@ -696,38 +748,10 @@ const DevSettingsScreen: React.FC = ({}) => { title="Log Level" description="Configure logging verbosity" > - - {(['debug', 'info', 'warn', 'error'] as const).map(level => ( - - ))} - +