Repository navigation
qr_decoder: report results through module_status (part of #493) - #537
Merged
NovaCode37 merged 1 commit intoOct 10, 2026
Merged
Conversation
|
Thanks for the first pull request here. CI needs a maintainer to approve the run before it starts, so it may sit for a bit before anything happens. |
NovaCode37
approved these changes
Oct 10, 2026
NovaCode37
left a comment
Owner
There was a problem hiding this comment.
Matches #493: no code in the image is an answer, an API failure is an error, and the panel now says so instead of showing nothing. Thanks.
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.
Summary
Part of #493 (qr_decoder only). qr_decoder now reports its results through
annotateinstead of settingresult["error"]directly, and "No QR code detected" is treated as an OK result, since the image was read fine.Changes
status_reason. This also covers the case where the online API finds no code, which used to come back as an error.errorwas set, so "no QR code" would have shown empty rows. It now shows the status reason instead (2 lines inToolPanels.tsx, andQrResultextendsModuleStatusFields).tests/test_qr_decoder.pywith a test for each case: local decode, no QR code, API HTTP error, network error and API decode.Type of change
Testing
git grep -n 'result\["error"\] =' modules/qr_decoder.pynow returns nothing.pytest tests/test_qr_decoder.pypasses (5 tests).Screenshots
N/A