[{"id":4447786291,"body":"๐Ÿ” **Coverage baseline may need a refresh.**\n\nThis PR touches `app/src/main/**`. If the changes affect what smoke covers, please refresh the baseline before merging:\n\n```bash\n./gradlew generateGmdCoverage\ngit add app/coverage-baselines/gmd_smoke.ec\ngit commit -m \"chore: refresh smoke coverage baseline\"\n```\n\n_Last checked: 2026-05-14 05:17 UTC ยท commit `bd6d929`_\n\u003c!-- Sticky Pull Request Commentbaseline-reminder-bot --\u003e","html_url":"https://github.com/Mesya82/Service-Book/pull/86#issuecomment-4447786291","user":{"login":"github-actions[bot]","id":41898282,"profile_url":"https://github.com/apps/github-actions","avatar_url":"https://avatars.githubusercontent.com/in/15368?v=4"},"author_association":"NONE","reactions":{"total_count":0,"+1":0,"-1":0,"laugh":0,"confused":0,"heart":0,"hooray":0,"rocket":0,"eyes":0},"created_at":"2026-05-14T05:17:39Z","updated_at":"2026-05-14T05:17:39Z"},{"id":4447806083,"body":"## Code Review\n\n### Overview\nConverts contact-email validation in the bug-report screen from an imperative submit-time snackbar into reactive `TextField` error state with a disabled submit button. Adds Sentry `environment` + `release` tags so events can be filtered per build, plus a debug-only \"Force test crash\" button to verify the Sentry pipeline end-to-end.\n\n### Strengths\n- **Better UX**: invalid email now surfaces inline as the user types, instead of failing only at submit. Submit button correctly disables via the new `isEmailInvalid` derived state โ€” clean and idiomatic.\n- **Sentry tagging is right**: `environment = debug|release` and `release = applicationId@versionName+versionCode` follows Sentry's recommended release format.\n- **Test coverage tracks the refactor**: removed the now-impossible \"submit with invalid email\" path and replaced it with `isEmailInvalid` assertions in VM tests, a screen test asserting the disabled submit + error string, and a new screenshot baseline. `SentryWrapperTest` now verifies environment/release passthrough; `ServiceBookApplicationTest` covers `configureSentryOptions` directly.\n- **Debug-only crash button correctly gated** under the existing `if (BuildConfig.DEBUG)` block at `SettingsScreen.kt:515`.\n\n### Issues / Suggestions\n\n**1. Duplicated environment/release computation (medium)**\n`ReportBugViewModel.kt:156-157` recomputes the exact strings that the new `sentryEnvironment` / `sentryRelease` properties on `ServiceBookApplication` already expose:\n```kotlin\nif (BuildConfig.DEBUG) \"debug\" else \"release\",\n\"${BuildConfig.APPLICATION_ID}@${BuildConfig.VERSION_NAME}+${BuildConfig.VERSION_CODE}\",\n```\nIf someone changes the format in `ServiceBookApplication` (e.g. to add a flavor suffix), the lazy-init path will silently diverge. Since `app` is already injected into the VM, prefer reading `app.sentryEnvironment` / `app.sentryRelease` โ€” or, even cleaner, push those two strings (and the DSN) into `SentryWrapperImpl` so the wrapper owns Sentry config end-to-end and the VM doesn't carry build metadata.\n\n**2. `internal` visibility purely for tests (minor)**\n`configureSentryOptions` was extracted as `internal` so `ServiceBookApplicationTest` can call it. The existing `doSentryInit` is already `protected open` and overridden by `SentryEnabledApp` in tests โ€” the same configuration assertions could be made by capturing the options inside that override, keeping `configureSentryOptions` `private`. Not a blocker, but the test seam already existed.\n\n**3. \"Force test crash\" has no confirmation (minor)**\nA `TextButton` that throws `RuntimeException` on tap is one fat-finger away from killing the dev session mid-edit. Consider an `AlertDialog` confirmation, or at least styling it as `OutlinedButton` to distinguish from the adjacent benign actions. Debug-only so low stakes, but easy to add.\n\n**4. `Patterns.EMAIL_ADDRESS` on the UI thread (very minor)**\nRecomputing the regex match on every keystroke via the `get()` getter is fine for short emails, but if you ever paste a multi-KB string it'll churn. Not worth changing now.\n\n**5. Test naming nit**\n`ReportBugViewModelTest.kt` โ€” the renamed test is now `canSubmit should be false when email is invalid`, but it asserts both the invalid *and* valid transitions. Either rename to `canSubmit reflects email validity` or split into two tests for clarity.\n\n### Risks\n- **Behavior change for users who paste an invalid email then keep typing**: previously they'd see a snackbar only on submit; now the field shows red as they type. This is strictly better but worth a note in release notes.\n- **Sentry release-tag format change**: if you already have rules/alerts filtering by release in Sentry, those filters will start missing events from this version forward until updated. Check existing Sentry project config.\n- **`SentryWrapper` interface is now 7 args**: any other callers (currently only `ReportBugViewModel`) need updating โ€” confirmed only one call site exists, so OK.\n\n### Verdict\nApprove with the duplication fix (#1) addressed before merge โ€” the other items are stylistic. Test coverage looks solid; no security concerns (validation is client-side UX, server-side Sentry handling unchanged; debug-only crash button is gated).","html_url":"https://github.com/Mesya82/Service-Book/pull/86#issuecomment-4447806083","user":{"login":"Mesya82","id":32867735,"profile_url":"https://github.com/Mesya82","avatar_url":"https://avatars.githubusercontent.com/u/32867735?v=4"},"author_association":"OWNER","reactions":{"total_count":0,"+1":0,"-1":0,"laugh":0,"confused":0,"heart":0,"hooray":0,"rocket":0,"eyes":0},"created_at":"2026-05-14T05:20:10Z","updated_at":"2026-05-14T05:20:10Z"}]