Repository navigation
QR code pairing for the phone apps - #38
Merged
Merged
Conversation
The hub sends its pairing link as a QR code (core/qr.bend: byte mode, level M, versions 1-40, least-penalty mask; info pair.qr). Settings' QR code shows it in the window, on the web and on phones; the code holds backplane://pair?url=<link>, so a phone's own camera opens the app. The apps scan it from the pairing screen and Hubs (iOS with AVFoundation, Android with Play services' code scanner). bridge-native.py no longer assumes the minifier names String.cmp's forcing call Q.
Snaiderbg
pushed a commit
to Snaiderbg/Backplane
that referenced
this pull request
Oct 9, 2026
Composer: Up/Down by shown lines, click to place the caret, drag to select
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.
Pair a phone by scanning a code instead of pasting the link.
src/core/qr.bend: a pure QR encoder (byte mode, level M, versions 1-40, the mask with the least penalty).Qr.linkwraps the pairing link asbackplane://pair?url=…, so the phone's own camera app opens Backplane with it. Lawsqr_*andpair_qr_none.pair.qr(Info.qrin server.bend). The Settings "Pairing link" row gets a QR code button (flagpairqr, client.bend'sPair.qr):Pq.*in layout.bend).View.pair.qr,Qr.path).qr, drawn natively (Mob.set.pair).Pair.swift, plusNSCameraUsageDescription). Android uses Google Play services' code scanner (Pair.kt), so it needs no camera permission of its own;androidx.fragmentis pinned because that dependency brought in an old one that lint rejects.scripts/bridge-native.py: String.eq's pattern hard-coded the minifier's nameQ; the larger bundle renamed it, so it now matches any name (still gated on the String.eq/Cmp.is_eq shape, still exactly once).Tests
scripts/check.sh(PROOF: all terms check) andscripts/test.sh: 75 programs, all ok, including the newtest/qr_test.bend.backplane://pair?url=http://<tailnet ip>:3911/%23token=…, and a click closes the overlay.