镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

feat(mobile): pair by pasting a pairing code into the community link field - #8735

Closed
johnmatthewtennant wants to merge 1 commit into
mainfrom
jtennant/oliver/mobile-paste-pairing-code
Closed

johnmatthewtennant wants to merge 1 commit into
mainfrom
jtennant/oliver/mobile-paste-pairing-code

Conversation

@johnmatthewtennant

Copy link
Copy Markdown
Contributor

Summary

Desktop's Pair mobile dialog offers Copy pairing code (a nostrpair:// URI), but mobile onboarding had nowhere obvious to put it: pasting it into the community link field was rejected as an invalid link. A device without a usable camera, such as the iOS simulator, could only pair through the hidden developer gesture.

The community link field now accepts a nostrpair:// code, on first-run onboarding and in Add community, and hands it to the same path a scanned QR code takes, including the recovery-mode checks. No visible "Enter pairing code" control is added.

Product decision needed: #8599 made onboarding QR-first and kept manual pairing as a hidden developer option with "no keyboard path by design". This PR adds a keyboard path through the existing link field. It should not merge without sign-off on that intent.

Related issue

#8599 (the QR-first decision this revisits).

Testing

  • New pairing_page_test.dart widget test pastes a nostrpair:// code into the link field on both onboarding and Add community and asserts pairing starts with that code. Fails on main (Actual: []).
  • community_link_input_test.dart now expects nostrpair:// to pass through instead of being rejected.

Desktop's "Copy pairing code" copies a nostrpair:// URI, but the only
way to enter it on mobile was a hidden two-finger double tap. Pasting
it into the community link field, which is visible, was rejected as an
invalid address. That blocks pairing wherever there is no camera, such
as the iOS simulator.

The community link input now passes a nostrpair:// code through, and
the pairing page hands it to the same handler a scanned QR code uses,
in both first-run onboarding and Add community. No new visible entry
is added: onboarding's QR-first choice (and the hidden pairing option)
is a deliberate product decision from #8599.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
@johnmatthewtennant

Copy link
Copy Markdown
Contributor Author

🤖 Closing: the existing developer double-tap on Scan a QR code already covers simulator pairing, and onboarding stays QR-first.

@johnmatthewtennant
johnmatthewtennant deleted the jtennant/oliver/mobile-paste-pairing-code branch October 30, 2026 14:18
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