# PR #86 Round 2 Fixes Plan ## Overview This plan addresses the additional review comments for PR #86, focusing on minor fixes, missing screenshot tests, and better code documentation. ## Tasks ### 1. `ReportBugViewModel.kt` - Trim the email address in `isEmailInvalid` to correctly reject whitespace-padded emails. - Trim the email address in `performSubmission` before sending it to Sentry. ### 2. `SentryWrapper.kt` - Add a comment to `lazyInitAndSendFeedback` explaining that this path intentionally bypasses the crash-reporting opt-out because it is user-initiated. - Extract `dsn`, `environment`, and `release` into a new `SentryInitParams` data class. - Update `lazyInitAndSendFeedback` signature to take `SentryInitParams` instead of individual arguments. - Remove the `@Suppress("LongParameterList")` annotation. ### 3. `ReportBugViewModel.kt` (Continued) - Update the `lazyInitAndSendFeedback` call in `performSubmission` to pass a `SentryInitParams` instance. ### 3. `SettingsScreen.kt` - Add a confirmation dialog (`AlertDialog`) to the "Force test crash" button to prevent accidental data loss. The dialog will use hardcoded English (acceptable for debug-only features) and will throw the `RuntimeException` only when confirmed. ### 4. `ReportBugScreenshotTest.kt` - Add a `report_bug_invalid_email_dark` screenshot test to ensure the error state renders correctly in dark mode. ### 5. `SettingsScreenshotTest.kt` - Add a `SettingsScreen_debug_crash_section_light` screenshot test to establish a baseline for the new debug section. ## Verification - Run `./gradlew testDebugUnitTest` to ensure all tests pass. - Run `./gradlew recordRoborazziDebug` and `./gradlew verifyRoborazziDebug` to verify the new screenshot baselines.