Skip to content

fix: reset QR sheet on invalid state; bump AGP/Kotlin/Gradle - #33

Merged
H2OKing89 merged 3 commits into
masterfrom
fix/qr-sheet-deps-update
Feb 19, 2026
Merged

H2OKing89 merged 3 commits into
masterfrom
fix/qr-sheet-deps-update

Conversation

@H2OKing89

@H2OKing89 H2OKing89 commented Feb 19, 2026 •

Copy link
Copy Markdown
Owner

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

  • QR Sheet Reappear Bug - Added LaunchedEffect(qrEnabled) in CustomerIntakeScreen that resets showQrSheet = false whenever QR conditions become invalid, preventing the sheet from silently reopening when fields become valid again.

Changed

  • AGP 9.0.0 → 9.0.1 - Latest Android Gradle Plugin patch release
  • Kotlin 2.0.21 → 2.2.10 - Latest Kotlin patch release
  • Gradle 9.1.0 → 9.2.1 - Updated Gradle wrapper distribution URL and SHA-256 checksum

Documentation

  • Release Guide Phase 0 - Added explicit "Phase 0 — Merge All Pending Fix/Feature PRs First" section and matching step 0 in the Quick-Reference command sequence, so the required pre-release PR flow is formally documented.

Files Changed

ui/

  • app/src/main/java/com/kingpaging/qwelcome/ui/CustomerIntakeScreen.kt — bug fix: reset sheet state on invalid QR conditions

build/

  • gradle/libs.versions.toml — AGP 9.0.0 → 9.0.1, Kotlin 2.0.21 → 2.2.10
  • gradle/wrapper/gradle-wrapper.properties — Gradle 9.1.0 → 9.2.1

docs/

  • docs/RELEASE_GUIDE.md — Phase 0 pre-release PR flow added

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • ./gradlew test passes
  • ./gradlew lintDebug passes
  • Verified dark mode
  • Verified light mode

Checklist

  • Fix is minimal and targeted (single LaunchedEffect)
  • Dependency versions verified against official release notes
  • Release guide updated to document this flow
  • All CI checks pass

Summary by CodeRabbit

  • Bug Fixes

    • QR sheet visibility is now reliably controlled to avoid reopening when inputs change.
    • QR sheet will not open unless QR generation is allowed by current input validation.
  • Documentation

    • Expanded release workflow with a new Phase 0 covering pre-release merge and verification steps.
  • Chores

    • Gradle wrapper updated to 9.2.1.
    • Kotlin and Android Gradle Plugin versions updated.

@coderabbitai

coderabbitai Bot commented Feb 19, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Moves 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

Cohort / File(s) Summary
UI: Screen
app/src/main/java/com/kingpaging/qwelcome/ui/CustomerIntakeScreen.kt
Replaced local QR sheet state with ViewModel-driven uiState.showQrSheet; screen now calls customerIntakeViewModel.setShowQrSheet(true/false) and reads uiState.qrEnabled for QR UI.
UI: State
app/src/main/java/com/kingpaging/qwelcome/ui/CustomerIntakeUiState.kt
Added showQrSheet: Boolean and computed qrEnabled: Boolean (validation differs for open vs closed networks).
ViewModel
app/src/main/java/com/kingpaging/qwelcome/viewmodel/CustomerIntakeViewModel.kt
Added setShowQrSheet(Boolean) and updateState helper that prevents showQrSheet=true when qrEnabled=false; replaced direct state updates with guarded updates where applicable.
Build config
gradle/libs.versions.toml, gradle/wrapper/gradle-wrapper.properties
Bumped AGP 9.0.0→9.0.1, Kotlin 2.0.21→2.2.10; upgraded Gradle wrapper to 9.2.1 and updated checksum/zipStorePath.
Docs
docs/RELEASE_GUIDE.md
Inserted Phase 0 pre-branch release workflow and updated Phase 1 references (merge-all-fixes/features into master before cutting release branches).

Sequence Diagram(s)

mermaid
sequenceDiagram
rect rgba(200,200,255,0.5)
participant User
end
rect rgba(200,255,200,0.5)
participant UI as CustomerIntakeScreen
end
rect rgba(255,200,200,0.5)
participant VM as CustomerIntakeViewModel
end
rect rgba(255,255,200,0.5)
participant State as CustomerIntakeUiState
end

User->>UI: Tap "Show QR"
UI->>VM: setShowQrSheet(true)
VM->>State: compute qrEnabled (ssid/password/flags)
VM->>VM: updateState guard -> if qrEnabled false then setShowQrSheet(false)
VM-->>UI: uiState updated (showQrSheet = true/false)
UI->>User: Render QR sheet if uiState.showQrSheet

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately summarizes the main changes: a bug fix for QR sheet state management and dependency version bumps across build tooling.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/qr-sheet-deps-update

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@H2OKing89
H2OKing89 merged commit 8005d6a into master Feb 19, 2026
3 checks passed
@H2OKing89
H2OKing89 deleted the fix/qr-sheet-deps-update branch February 19, 2026 00:29
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.

1 participant