Repository navigation
Conversation
opencode pair --remote pairs through one public https address, so its QR code now carries the link itself (https://<tunnel>/auth/connect/<code>) instead of {"code","urls"} JSON. A phone's camera can open it: in the OpenCode iOS app once it handles /auth/connect links on opentunnel.xyz (universal link), and otherwise in the browser, where the same link signs in and redirects to the web app. Other QR codes keep the JSON, since they can list several addresses.
The app scanners already read both forms (packages/app pairing.ts and the iOS app).
A device's first opencode pair --remote waits ~25 s for its tunnel certificate behind one plain line. In a terminal, the QR code is now built where it will be printed: two builders lay the outer wall, the corner squares and timing beams, then the rest from the bottom row up, each block popping in in its builder's color. Nothing unbuilt is shown. The step comes from OpenTunnel's provisioning progress. When the pairing code exists (after the service restarts with the tunnel), a finishing pass lays the real code and flashes, and the normal output replaces the animation line for line. Only on a first-time remote setup with a TTY stdout and color (not NO_COLOR, TERM=dumb or CI); otherwise unchanged, including the plain notice.
R44VC0RP
force-pushed
the
pair-qr-build
branch
from
October 8, 2026 13:50
16079ef to
b8548c7
Compare
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.
Stacked on #53946 (the remote QR code carries the pairing link). Retarget to
v2once that merges.What
A device's first
opencode pair --remotewaits about 25 s for its tunnel certificate (measured: 23.5–26.8 s on fresh setups; later runs take 0.1 s). Until now the user saw one line: "Setting up remote access; this can take a minute...".In a terminal, the QR code is now built where it will be printed, Minecraft-style:
The pairing code only exists after the service restarts with the tunnel (codes live in the service's memory). So the builders lay a stand-in of the same length, which has the same QR version: the same size, wall, corners, and beams. The finishing pass re-lays every data block from the real code. If the real code's size ever differed, it skips straight to the output.
Where
packages/cli/src/ui/qr-build.ts(new): the renderer. It uses the half-block glyphsrenderUnicodeCompactuses, with SGR dim and bold plus two truecolor tints, so it follows the terminal's theme.remote-tunnel.ts:ensure(onProgress?)creates a first tunnel withclient.tunnel.create({ onProgress }). With a callback, the plain notice isn't printed.pair.ts:--remotesetup, with a TTY stdout and color (notNO_COLOR,TERM=dumb, orCI).finish.Everything else is unchanged. Piped output, existing tunnels, and
opencode service set remote trueall keep the plain line.Verified
tsgo -binpackages/clipasses.termctrlfrom source on a fresh home (fresh tunnel and certificate): the build ran through the real steps, finished, and left the normal output. The final QR decodes to the tunnel's pairing link.