Skip to content

feat(signal): add device-linking QR flow for Signal channels#358

Merged
MatthewSuttles merged 1 commit into
mainfrom
feat/signal-device-linking-qr
Jun 9, 2026
Merged

feat(signal): add device-linking QR flow for Signal channels#358
MatthewSuttles merged 1 commit into
mainfrom
feat/signal-device-linking-qr

Conversation

@MatthewSuttles

Copy link
Copy Markdown
Collaborator

Adds a Signal device-linking QR flow so users can link Signal the same one-click way as WhatsApp. Previously the connect UI was hardcoded for WhatsApp and the Signal bridge never generated a QR (it just threw 'Phone number not registered'), so there was no way to link a device.

Changes:

  • connector/signal.js: start() enters linking mode instead of throwing; fetchLinkQR() proxies signal-cli /v1/qrcodelink as a PNG data URL; watchForLink() polls /v1/accounts until linked then starts the receive loop; relink() for reconnect; status exposes status/hasQR/phoneNumber.
  • connector/index.js: adds /signal/qr, /signal/connect, /signal/logout; /signal/health returns full status; /signal/configure no longer 500s when unlinked and no longer requires a phone number.
  • channels_controller.rb: connect/qr/health/logout proxies are channel-type aware, routing Signal to /signal/*; phone number no longer required.
  • connect.html.erb + qr_pair_controller.js: platform-aware copy and 'Linked as' label.
  • _form.html.erb: Signal setup points at the QR Connect flow; phone number marked optional.

Fixes the 'no way to get a QR code for linking Signal' report.

Signal had no way to link a device — the connect UI was hardcoded for
WhatsApp and the /qr endpoints served the WhatsApp (Baileys) QR. The
Signal bridge only ever checked registration and threw "Phone number not
registered", so users could never get a linking QR.

Now Signal reuses the same one-click QR pairing UX as WhatsApp:

- signal.js: start() enters linking mode instead of throwing when the
  account isn't registered. Adds fetchLinkQR() (proxies signal-cli
  /v1/qrcodelink as a PNG data URL), beginLinking(), watchForLink()
  (polls /v1/accounts until the device links, then starts the receive
  loop), and relink(). status getter now exposes status/hasQR/phoneNumber.
- connector/index.js: adds /signal/qr, /signal/connect, /signal/logout;
  /signal/health returns full status; /signal/configure no longer 500s
  when unlinked and no longer requires a phone number up front.
- channels_controller: connect/qr/health/logout proxies are now
  channel-type aware and route Signal to /signal/* on the connector.
  Phone number is no longer required to configure Signal.
- connect.html.erb + qr_pair_controller.js: platform-aware copy and
  "Linked as" label (Signal vs WhatsApp); falls back to phone number.
- _form.html.erb: Signal setup now points users at the QR Connect flow;
  phone number marked optional (auto-detected after linking).

Fixes the "no way to get a QR code for linking Signal" report.
@MatthewSuttles MatthewSuttles merged commit 6b9e6da into main Jun 9, 2026
2 of 3 checks passed
@MatthewSuttles MatthewSuttles deleted the feat/signal-device-linking-qr branch June 9, 2026 14:57
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