Repository navigation
fix: reset QR sheet on invalid state; bump AGP/Kotlin/Gradle - #33
Conversation
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughMoves QR sheet visibility and QR-enabled logic into the ViewModel/UiState (single source of truth), adds guarded updates preventing an invalid QR sheet state, updates UI to call ViewModel methods, bumps Gradle/AGP/Kotlin versions, and adds a Phase 0 release workflow to docs. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@app/src/main/java/com/kingpaging/qwelcome/ui/CustomerIntakeScreen.kt`:
- Around line 148-152: The LaunchedEffect in CustomerIntakeScreen mutates local
UI state showQrSheet; hoist this into the ViewModel by adding a showQrSheet flag
(or one-shot event) to the ViewModel's uiState and exposing actions like
setShowQrSheet(boolean)/resetShowQrSheet(); remove the local showQrSheet and the
LaunchedEffect, read showQrSheet from the ViewModel (e.g.,
CustomerIntakeViewModel.uiState.showQrSheet) in the composable, and implement
the reset logic for qrEnabled transitions inside the ViewModel (observe
qrEnabled in the VM or update it via a VM method so when qrEnabled becomes false
the VM clears showQrSheet) so state survives process restore and is testable.
Summary
Fixes a bug where the QR code bottom sheet would silently reappear after a user cleared or invalidated fields (e.g., erased the SSID after the sheet had been shown). Also bumps Android Gradle Plugin, Kotlin, and Gradle Wrapper to their latest patch releases, and updates the release guide to explicitly document the Phase 0 requirement of merging all fix/feature PRs into master before starting a release branch.
Changes
Fixed
LaunchedEffect(qrEnabled)inCustomerIntakeScreenthat resetsshowQrSheet = falsewhenever QR conditions become invalid, preventing the sheet from silently reopening when fields become valid again.Changed
Documentation
Files Changed
ui/
app/src/main/java/com/kingpaging/qwelcome/ui/CustomerIntakeScreen.kt— bug fix: reset sheet state on invalid QR conditionsbuild/
gradle/libs.versions.toml— AGP 9.0.0 → 9.0.1, Kotlin 2.0.21 → 2.2.10gradle/wrapper/gradle-wrapper.properties— Gradle 9.1.0 → 9.2.1docs/
docs/RELEASE_GUIDE.md— Phase 0 pre-release PR flow addedType of Change
Testing
./gradlew testpasses./gradlew lintDebugpassesChecklist
LaunchedEffect)Summary by CodeRabbit
Bug Fixes
Documentation
Chores