fix: show feedback when a scanned QR code contains unsupported data#11248
Open
mvanhorn wants to merge 1 commit into
Open
fix: show feedback when a scanned QR code contains unsupported data#11248mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
Contributor
|
Missing report label. Set exactly one of: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution Summary
Linked Issue/Ticket: Refs #8520
RFC / Technical Design (if applicable): N/A
Description
The "Import via QR code" flow silently ignores QR codes whose payload fails validation.
QrCodeScannerViewModel.handleQrCodeScannedrecords the payload hash inunsupportedPayloadHashesand returns with no state change, so the bottom bar keeps showing the generic help text and the user sees no reaction at all. That is the top-reported symptom in #8520: the camera clearly frames the code (it scans fine in other apps), but nothing happens because desktop exports with invalid payload data (blank authentication type, missing encryption settings) are decoded and rejected without feedback.This adds a
DisplayText.UnsupportedQrCodevariant toQrCodeScannerContract, sets it in the unsupported branch ofhandleQrCodeScanned, and renders it inQrCodeScannerView.buildStringwith a newmigration_qrcode_unsupported_codestring. A subsequent successful scan restores the progress text through the existinghandleSupportedPayloadpath. Only the basevalues/strings.xmlis edited; translations flow through Weblate.Scope note: this converts the silent failure into actionable feedback. It deliberately does not touch desktop-side QR generation (different repo) or device-specific camera lens selection, which the issue thread tracks separately, so the body references the issue with Refs rather than Closes.
Screen Shots
N/A: the change adds one line of text to the existing scanner bottom bar, shown only when an unsupported code is scanned.
AI Disclosure
Select one of the following (mandatory)
Contribution Checklist
gradlew spotlessCheckto check andgradlew spotlessApplyto format your source code; will be checked by CI).gradlew testDebugUnitTest; will be checked by CI).