Put the Loopky fox in the middle of a share QR code - #333
Merged
Merged
Conversation
A deck or profile code now carries the mark, so a code on someone's screen reads as a Loopky link before it is scanned rather than as an anonymous square. The mark destroys the modules under it, so `qrBitmap` raises the correction level from M to H whenever one is passed: H recovers ~30% of the code and a 24% plate covers ~6% of its area. Decoded back at 816, 400, 240, 160 and 120px to confirm the margin is real. Sign-in and invoice codes pass no mark and stay at M — their payloads are dense one-shot credentials with nothing to brand. Two things the platform gets wrong if left to it. The launcher foreground is drawn inside the adaptive-icon safe zone, so it is trimmed to its own artwork rather than scaled by a hardcoded factor. And the xxxhdpi art is asked for by name: the shared PNG's plate is 173px on every device, so an mdpi phone would otherwise upscale 60px of fox into it and send a soft mark that nothing on that device shows. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`QrCodeView` gains `showsMark`, which draws the launcher fox on a white disc over the centre and moves the correction level from M to H for the same reason as Android: the plate destroys the modules under it, and H recovers ~30% against the ~6% a 24% plate covers. Each platform uses its own launcher art rather than a shared asset, so the mark in the code matches the icon on the home screen either side. `shareImage` restores `interpolationQuality` to `.high` before drawing the fox — the `.none` above it is set for the modules, and the artwork comes out visibly stepped under it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
A deck or profile QR now carries the app icon in its centre, so a code on someone's screen reads as a Loopky link before it is scanned rather than as an anonymous square. Sign-in and Lightning codes are untouched — their payloads are dense one-shot credentials with nothing to brand.
What it costs, and why it is safe
The mark destroys the modules under it, so both platforms raise the correction level from M to H whenever a mark is drawn: H recovers ~30% of the code, and a 24% plate covers ~6% of its area. That margin is measured rather than asserted — the shared PNG was decoded back with zxing at 816, 400, 240, 160 and 120px, the last being about two pixels per module. Widening the plate without moving the level is how this silently stops scanning.
Two things the platform gets wrong if left to it
decodeResourcepicks the device's own density bucket, but the shared PNG's plate is 173px everywhere — an mdpi phone would upscale 60px of fox into it and send a soft mark that nothing on that device shows. The xxxhdpi art is asked for by name.Each platform uses its own launcher art rather than a shared asset, so the mark in the code matches the icon on the home screen either side.
Verification
Driven on
emulator-5554against staging at both the compact and expanded width classes: deck share, profile share, the attached PNG and the four downscales all decode to the exact URI.:androidApp:assembleDebuganddetektAllpass.journeys/RESULTS.mdhas the table.iOS is unverified. This was done on a Linux box, so no Swift here was compiled, let alone driven — the change mirrors the Android one and follows the file's existing patterns, but it needs a Mac before merge.