Skip to content

feat(cli): include every pairing address in QR codes - #53588

Merged
thdxr merged 2 commits into
v2from
pair-urls
Oct 6, 2026
Merged

thdxr merged 2 commits into
v2from
pair-urls

Conversation

@thdxr

@thdxr thdxr commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Pairing QR codes from opencode pair and the desktop pairing dialog only carried one address, so a phone on a different network interface (LAN vs. Tailscale, etc.) could fail to pair.

  • The QR now holds JSON with every non-loopback address: {"code","urls"}.
  • The in-app scanner accepts that payload (and still accepts plain /auth/connect/<code> links), tries every address concurrently with a 5s timeout, and keeps the address that actually connected.
  • When the server binds a wildcard host (0.0.0.0 / ::), /api/info now also advertises the loopback URL, so opencode pair prints a localhost link. Loopback stays out of the QR.

The iOS app is updated in anomalyco/opencode-ios#26.

How did you verify your code works?

  • bun run check, bun run lint, bun run lint:changed
  • bun test src/servers/connect/pairing.test.ts in packages/app (JSON payloads, legacy links, malformed input)

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr
thdxr enabled auto-merge (squash) October 6, 2026 19:17
@thdxr
thdxr merged commit 4a0f273 into v2 Oct 6, 2026
17 of 18 checks passed
@thdxr
thdxr deleted the pair-urls branch October 6, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant