Successfully overwrote file: /home/Messier82/.gemini/tmp/service-book/1b549615-dad6-48d4-84e2-57dc55fa166e/plans/fix-pr-73-review.md. Here is the updated code: # Plan to fix PR #73 Review Comments (Re-review) ## Objective Address the remaining items from the PR #73 re-review, specifically refining the Sentry opt-in disclosure, fixing UI components and styling, localizing email fallbacks, and preventing snackbar storms. ## Implementation Steps 1. **Opt-in Policy Disclosure & Documentation** - In `ReportBugScreen.kt`, add an in-screen text disclosure below the submit button when crash reporting is disabled (e.g., "Submitting will briefly connect to our error reporting service for this report only"). - Read the crash reporting preference state from `AppPreferences` into `ReportBugViewModel` and expose it in `ReportBugState` so the UI knows when to show the disclosure. - Add ADR-013 in `docs/adr.md` to formally document this User Feedback opt-in policy (the review mentioned ADR-009, but that is the testing strategy, so a new ADR will be created). 2. **Update to `SingleChoiceSegmentedButtonRow`** - Replace the two separate `Button`s used for "Type" selection in `ReportBugScreen.kt` with a Material 3 `SingleChoiceSegmentedButtonRow` and `SegmentedButton`s to match the PR description. 3. **Fix ButtonColors Import** - Add the import for `androidx.compose.material3.ButtonDefaults` in `ReportBugScreen.kt` and remove the fully qualified `buttonColors()` calls. 4. **Localize Email Fallback Strings** - Add string resources for the email fallback body: `report_bug_email_device_info`, `report_bug_email_app_version`, `report_bug_email_android_version`, `report_bug_email_device_model`. - In `ReportBugScreen.kt`, resolve these strings using `stringResource()` and pass them within the `ReportBugEvent.Submit` event to the ViewModel. - Update `ReportBugViewModel` to use these passed strings when formatting the `fallbackToEmail` body instead of hardcoded English. 5. **Fix Snackbar Storm on Failure** - In `ReportBugViewModel.submitReport()`, suppress emitting `ShowSnackbar` effects for intermediate retry attempts. Only emit a single `ShowSnackbar` effect if the final submission fails and it falls back to email. 6. **Fix `isSubmitting` Race Condition** - In `ReportBugViewModel.kt`, move `_state.update { it.copy(isSubmitting = true) }` to be *outside* and *before* `viewModelScope.launch` in the `Submit` event handler. 7. **Refresh Coverage Baseline** - Run `./gradlew generateGmdCoverage` to update the `app/coverage-baselines/gmd_smoke.ec` file since the smoke test baseline might have changed. 8. **Update Tests** - Update `ReportBugViewModelTest` to accommodate the new string arguments in the `Submit` event. - Update `ReportBugScreenTest` and `ReportBugScreenshotTest` to account for the UI changes (`SegmentedButtonRow` and the new opt-in disclosure text). ## Verification - Run `./gradlew detekt ktlintCheck testDebugUnitTest` to ensure all checks pass. - Verify visually via `./gradlew verifyRoborazziDebug`.