Skip to content

Non sensitive#282

Merged
El-swaggerito merged 8 commits into
Axionvera:mainfrom
Chigybillionz:non-sensitive
Jul 23, 2026
Merged

Non sensitive#282
El-swaggerito merged 8 commits into
Axionvera:mainfrom
Chigybillionz:non-sensitive

Conversation

@Chigybillionz

Copy link
Copy Markdown
Contributor

**Close #267

Summary of the issue:
Debugging tester issues is currently difficult without safe diagnostic information. The app needs a diagnostics screen that shows non-sensitive app, network, and wallet status (like initialization, balance load status, transaction counts) while completely redacting sensitive wallet secrets.

Root cause:
The application lacked a dedicated UI and routing to surface the application state securely. Testers and developers didn't have an easy way to view and export debugging metadata without risking the exposure of sensitive user keys or contact details.

Solution implemented:
Added a new DiagnosticsScreen component and updated the development section in SettingsScreen to navigate to it. The screen leverages the existing src/utils/diagnostics.ts utility to safely aggregate and redact diagnostic state (environment, app state, wallet state) and display it securely to the user. A clipboard copy function is provided for convenience.

Key changes made:

  • app/diagnostics.tsx: Created a new screen that fetches non-sensitive state from getDiagnostics() and displays it in a scrollable, copyable format.
  • app/(tabs)/settings.tsx: Replaced the stubbed handleExportDiagnostics method with navigation to the new diagnostics screen (/diagnostics). Additionally, fixed a preexisting unclosed <View> tag and variable reference (COLORS -> colors) that was causing syntax errors on the screen.
  • docs/diagnostics.md: Updated documentation to reflect the new dedicated screen approach rather than the native share dialog.

Any trade-offs or considerations:

  • Preview Screen vs. Direct Share Dialog: I opted to create a dedicated screen where users can see the diagnostic output before copying, strictly adhering to the issue description ("Add a diagnostics screen"). We use expo-clipboard to allow quick copying. This approach provides transparency, letting the user verify exactly what data is being shared.
  • Environment Gating: The entry point in the settings tab remains gated behind the __DEV__ flag to ensure this diagnostic tool is not exposed to production users.

Testing steps (how to verify the fix):

  1. Run the app in development mode (npm start -> iOS/Android simulator).
  2. Navigate to the Settings tab.
  3. Scroll down to the Development section.
  4. Tap View Diagnostics.
  5. Verify the new Diagnostics screen opens, displaying the JSON payload.
  6. Verify that sensitive data (like publicKey, secretKey, etc.) is omitted or transformed into boolean flags (hasPublicKey: true).
  7. Tap Copy to Clipboard and verify the JSON is correctly copied.

Please kindly review this task. If there are any corrections, improvements, adjustments, or merge conflicts that you notice regarding my implementation, I'd really appreciate your feedback. I'd also love to hear your overall review of my work on this branch.Thank you!

@El-swaggerito

Copy link
Copy Markdown
Contributor

This PR cannot be merged automatically because it has merge conflicts.

Please update the branch with the latest base branch and resolve the conflicts.

After the conflicts are resolved and checks pass, the automation can review it again.

@El-swaggerito
El-swaggerito merged commit a4a520f into Axionvera:main Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add non-sensitive diagnostics screen

2 participants